summaryrefslogtreecommitdiff
path: root/meta-openvuplus/recipes-multimedia
diff options
context:
space:
mode:
authorhschang <chang@dev3>2015-12-14 09:07:57 (GMT)
committerhschang <chang@dev3>2015-12-14 09:38:02 (GMT)
commit36e143d512ae538a5c9857313e1d846b740647ba (patch)
treedb0d5b182a15d0c03aaff026820a54c098bfd082 /meta-openvuplus/recipes-multimedia
parent66a8283eddab96009c9a24cafdb4e867de43a244 (diff)
[gstreamer1.0-plugin-dvbmediasink] apply patch files.
- audiosink_mpeg4_aac_header.patch, thanks to mx3L <mx3ldev@gmail.com> - videosink_ffmpeg_mpeg4_nofourcc.patch, thanks to christophecvr <stefansat@telenet.be>
Diffstat (limited to 'meta-openvuplus/recipes-multimedia')
-rw-r--r--meta-openvuplus/recipes-multimedia/gstreamer/gstreamer1.0-plugin-dvbmediasink.bb4
-rw-r--r--meta-openvuplus/recipes-multimedia/gstreamer/gstreamer1.0-plugin-dvbmediasink/audiosink_mpeg4_aac_header.patch34
-rw-r--r--meta-openvuplus/recipes-multimedia/gstreamer/gstreamer1.0-plugin-dvbmediasink/videosink_ffmpeg_mpeg4_nofourcc.patch69
3 files changed, 106 insertions, 1 deletions
diff --git a/meta-openvuplus/recipes-multimedia/gstreamer/gstreamer1.0-plugin-dvbmediasink.bb b/meta-openvuplus/recipes-multimedia/gstreamer/gstreamer1.0-plugin-dvbmediasink.bb
index 3059fcf..a3fa375 100644
--- a/meta-openvuplus/recipes-multimedia/gstreamer/gstreamer1.0-plugin-dvbmediasink.bb
+++ b/meta-openvuplus/recipes-multimedia/gstreamer/gstreamer1.0-plugin-dvbmediasink.bb
@@ -13,6 +13,8 @@ SRC_URI = " \
file://dvbmediasink_h265.patch \
file://audiosink_change_message_mode_to_sync.diff \
file://dvbmediasink_divx4.patch \
+ file://audiosink_mpeg4_aac_header.patch \
+ file://videosink_ffmpeg_mpeg4_nofourcc.patch \
"
#SRCREV = "${AUTOREV}"
SRCREV = "e83973478549ecb52067f30a3537b590d83401d6"
@@ -23,7 +25,7 @@ inherit gitpkgv
PV = "${GSTVERSION}+git${SRCPV}"
PKGV = "${GSTVERSION}+git${GITPKGV}"
-PR = "r4"
+PR = "r5"
inherit autotools pkgconfig
diff --git a/meta-openvuplus/recipes-multimedia/gstreamer/gstreamer1.0-plugin-dvbmediasink/audiosink_mpeg4_aac_header.patch b/meta-openvuplus/recipes-multimedia/gstreamer/gstreamer1.0-plugin-dvbmediasink/audiosink_mpeg4_aac_header.patch
new file mode 100644
index 0000000..f200d59
--- /dev/null
+++ b/meta-openvuplus/recipes-multimedia/gstreamer/gstreamer1.0-plugin-dvbmediasink/audiosink_mpeg4_aac_header.patch
@@ -0,0 +1,34 @@
+commit 73a48e31bdd977d8aa51f06388d6122dec5b8d2c
+Author: hschang <chang@dev3>
+Date: Thu Dec 10 14:29:53 2015 +0900
+
+ [gstdvbaudiosink] fix creation of ADTS header for AAC audio.
+
+ fix according to:
+ https://github.com/christophecvr/gstreamer1.0-plugin-multibox-dvbmediasink/commit/0534a00ffd1341c29938547f9a1ed4d00d1c4e05
+ http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=72c5c70b90c79efcf013e0e414809931815be797
+
+diff --git a/gstdvbaudiosink.c b/gstdvbaudiosink.c
+index f003020..20439cf 100644
+--- a/gstdvbaudiosink.c
++++ b/gstdvbaudiosink.c
+@@ -479,8 +479,8 @@ static gboolean gst_dvbaudiosink_set_caps(GstBaseSink *basesink, GstCaps *caps)
+ guint8 h[2];
+ gst_buffer_extract(gst_value_get_buffer(codec_data), 0, h, sizeof(h));
+ #endif
+- guint8 obj_type =((h[0] & 0xC) >> 2) + 1;
+- guint8 rate_idx =((h[0] & 0x3) << 1) |((h[1] & 0x80) >> 7);
++ guint8 obj_type =h[0] >> 3;
++ guint8 rate_idx =((h[0] & 0x7) << 1) |((h[1] & 0x80) >> 7);
+ guint8 channels =(h[1] & 0x78) >> 3;
+ GST_INFO_OBJECT(self, "have codec data -> obj_type = %d, rate_idx = %d, channels = %d\n",
+ obj_type, rate_idx, channels);
+@@ -492,7 +492,7 @@ static gboolean gst_dvbaudiosink_set_caps(GstBaseSink *basesink, GstCaps *caps)
+ if (mpegversion == 2)
+ self->aac_adts_header[1] |= 8;
+ /* Object type over first 2 bits */
+- self->aac_adts_header[2] = obj_type << 6;
++ self->aac_adts_header[2] = (obj_type - 1) << 6;
+ /* rate index over next 4 bits */
+ self->aac_adts_header[2] |= rate_idx << 2;
+ /* channels over last 2 bits */
diff --git a/meta-openvuplus/recipes-multimedia/gstreamer/gstreamer1.0-plugin-dvbmediasink/videosink_ffmpeg_mpeg4_nofourcc.patch b/meta-openvuplus/recipes-multimedia/gstreamer/gstreamer1.0-plugin-dvbmediasink/videosink_ffmpeg_mpeg4_nofourcc.patch
new file mode 100644
index 0000000..4ddcb5a
--- /dev/null
+++ b/meta-openvuplus/recipes-multimedia/gstreamer/gstreamer1.0-plugin-dvbmediasink/videosink_ffmpeg_mpeg4_nofourcc.patch
@@ -0,0 +1,69 @@
+commit 72631c9afb1b8d94a5639c6300e9e34cd2ee6859
+Author: hschang <chang@dev3>
+Date: Mon Dec 14 17:17:50 2015 +0900
+
+ dvbvideosink : fix no video problem with "FFmpeg MPEG-4" codec.
+ based on:
+ https://github.com/christophecvr/gstreamer1.0-plugin-multibox-dvbmediasink/commit/cefca9e0a897a806a577bc667aab8f3cc13fdad6
+
+diff --git a/gstdvbvideosink.c b/gstdvbvideosink.c
+index f50929e..7a4f5b4 100644
+--- a/gstdvbvideosink.c
++++ b/gstdvbvideosink.c
+@@ -517,6 +517,25 @@ static gboolean gst_dvbvideosink_event(GstBaseSink *sink, GstEvent *event)
+ }
+ break;
+ }
++ case GST_EVENT_TAG:
++ {
++ GstTagList *taglist;
++ gst_event_parse_tag(event, &taglist);
++ gchar *vcodec_value = NULL;
++ GST_INFO_OBJECT(self,"[*] TAG %"GST_PTR_FORMAT, taglist);
++ gst_tag_list_get_string (taglist, "video-codec", &vcodec_value);
++ if (vcodec_value)
++ {
++ if(!strncmp(vcodec_value,"FFmpeg MPEG-4", 13) && self->mpeg4_no_fourcc)
++ {
++ self->stream_type = STREAMTYPE_XVID;
++ self->use_dts = TRUE;
++ GST_INFO_OBJECT (self, "[*] VIDEO_CODEC = %s, set STREAMTYPE_XVID", vcodec_value);
++ }
++ }
++ ret = GST_BASE_SINK_CLASS(parent_class)->event(sink, event);
++ break;
++ }
+ default:
+ ret = GST_BASE_SINK_CLASS(parent_class)->event(sink, event);
+ break;
+@@ -1283,6 +1302,7 @@ static gboolean gst_dvbvideosink_set_caps(GstBaseSink *basesink, GstCaps *caps)
+ const char *mimetype = gst_structure_get_name (structure);
+ self->stream_type = STREAMTYPE_UNKNOWN;
+ self->must_send_header = TRUE;
++ self->mpeg4_no_fourcc = FALSE;
+
+ GST_INFO_OBJECT (self, "caps = %" GST_PTR_FORMAT, caps);
+
+@@ -1320,6 +1340,9 @@ static gboolean gst_dvbvideosink_set_caps(GstBaseSink *basesink, GstCaps *caps)
+ fourcc = GST_STR_FOURCC(value);
+ switch (fourcc)
+ {
++ case 0:
++ self->mpeg4_no_fourcc = TRUE;
++ break;
+ case GST_MAKE_FOURCC('R', 'M', 'P', '4'):
+ case GST_MAKE_FOURCC('x', 'v', 'i', 'd'):
+ case GST_MAKE_FOURCC('X', 'V', 'I', 'D'):
+diff --git a/gstdvbvideosink.h b/gstdvbvideosink.h
+index 8577f2d..d055d4a 100644
+--- a/gstdvbvideosink.h
++++ b/gstdvbvideosink.h
+@@ -117,6 +117,8 @@ struct _GstDVBVideoSink
+ gboolean must_send_header;
+
+ queue_entry_t *queue;
++
++ gboolean mpeg4_no_fourcc;
+ };
+
+ struct _GstDVBVideoSinkClass