diff options
author | Koen Kooi <koen@openembedded.org> | 2010-05-26 09:30:41 +0200 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2010-05-26 09:30:41 +0200 |
commit | e71818be2f723f9843a40e7b85ac7a7d9bbe7a9f (patch) | |
tree | 4746c710baf10165a19399c692c6e6978d05443a /recipes/ti | |
parent | 65253e1774e2bd10a42ef2a8fb6a205ec452394c (diff) |
gstreamer-ti: add mpeg2 caps, patch from gst-ti svn
Diffstat (limited to 'recipes/ti')
-rw-r--r-- | recipes/ti/gstreamer-ti/mpeg2-caps.patch | 61 | ||||
-rw-r--r-- | recipes/ti/gstreamer-ti_svn.bb | 3 |
2 files changed, 63 insertions, 1 deletions
diff --git a/recipes/ti/gstreamer-ti/mpeg2-caps.patch b/recipes/ti/gstreamer-ti/mpeg2-caps.patch new file mode 100644 index 0000000000..c8246579f2 --- /dev/null +++ b/recipes/ti/gstreamer-ti/mpeg2-caps.patch @@ -0,0 +1,61 @@ +From 5e5fe9fa15ceb0abae90c8f857f40d1791e7d2d4 Mon Sep 17 00:00:00 2001 +From: don.darling <don.darling@24075187-2e39-4e88-bbb8-bc8aa768f540> +Date: Mon, 24 May 2010 21:24:12 +0000 +Subject: Create source caps information for MPEG-2 streams in TIVidenc1. + +If you don't generate this caps information, you will also get errors while +encoding that look like this: + +(gst-launch-0.10:1580): GStreamer-CRITICAL **: gst_caps_unref: assertion `caps != NULL' failed + +The fact that source caps information was never generated for MPEG-2 looks like +an oversight -- the static caps for TIVidenc1 already allowed MPEG-2. + +git-svn-id: https://gstreamer.ti.com/svn/gstreamer_ti/trunk@647 24075187-2e39-4e88-bbb8-bc8aa768f540 +--- +diff --git a/gstreamer_ti/ti_build/ticodecplugin/src/gsttividenc1.c b/gstreamer_ti/ti_build/ticodecplugin/src/gsttividenc1.c +index 2e1fb31..9749459 100644 +--- a/gstreamer_ti/ti_build/ticodecplugin/src/gsttividenc1.c ++++ b/gstreamer_ti/ti_build/ticodecplugin/src/gsttividenc1.c +@@ -724,10 +724,13 @@ static gboolean gst_tividenc1_set_source_caps( + gboolean ret; + GstPad *pad; + char *string; +- GstTICodec *h264Codec = NULL, *mpeg4Codec = NULL; ++ GstTICodec *h264Codec = NULL; ++ GstTICodec *mpeg4Codec = NULL; ++ GstTICodec *mpeg2Codec = NULL; + + h264Codec = gst_ticodec_get_codec("H.264 Video Encoder"); + mpeg4Codec = gst_ticodec_get_codec("MPEG4 Video Encoder"); ++ mpeg2Codec = gst_ticodec_get_codec("MPEG2 Video Encoder"); + + pad = videnc1->srcpad; + +@@ -754,6 +757,24 @@ static gboolean gst_tividenc1_set_source_caps( + g_free(string); + } + ++ /* Create MPEG-2 source cap */ ++ if (mpeg2Codec && (!strcmp(mpeg2Codec->CE_CodecName, videnc1->codecName))) { ++ gint mpegversion = 2; ++ ++ caps = ++ gst_caps_new_simple("video/mpeg", ++ "mpegversion", G_TYPE_INT, mpegversion, ++ "framerate", GST_TYPE_FRACTION, videnc1->framerateNum, ++ videnc1->framerateDen, ++ "width", G_TYPE_INT, dim.width, ++ "height", G_TYPE_INT, dim.height, ++ NULL); ++ ++ string = gst_caps_to_string(caps); ++ GST_LOG("setting source caps to mpeg2: %s", string); ++ g_free(string); ++ } ++ + /* Create MPEG4 source cap */ + if (mpeg4Codec && (!strcmp(mpeg4Codec->CE_CodecName, videnc1->codecName))) { + gint mpegversion = 4; +-- +cgit v0.8.3.1-30-gff3a diff --git a/recipes/ti/gstreamer-ti_svn.bb b/recipes/ti/gstreamer-ti_svn.bb index 0486b8f671..df0705c2ba 100644 --- a/recipes/ti/gstreamer-ti_svn.bb +++ b/recipes/ti/gstreamer-ti_svn.bb @@ -18,7 +18,7 @@ PROVIDES += "gstreamer-ti-demo-script" PV = "svnr${SRCREV}" # Rebuild on kernel change since it links statically to ti-dmai, ti-codec-engine, etc -PR = "r49+${MACHINE_KERNEL_PR}" +PR = "r50+${MACHINE_KERNEL_PR}" S = "${WORKDIR}/gstreamer_ti/ti_build/ticodecplugin" @@ -36,6 +36,7 @@ SRCREV = "573" SRC_URI = "svn://gforge.ti.com/svn/gstreamer_ti/trunk;module=gstreamer_ti;proto=https;user=anonymous;pswd='' \ file://gstreamer-ti-tracker-462.patch \ file://gstreamer-ti-remove-mp3-decode-support-from-auddec1.patch \ + file://mpeg2-caps.patch;striplevel=4\ file://${GST_TI_RC_SCRIPT} \ " |