diff options
author | Chang.H.S <jhs@dev3> | 2012-11-30 09:09:08 (GMT) |
---|---|---|
committer | Chang.H.S <jhs@dev3> | 2012-11-30 09:21:08 (GMT) |
commit | 0e6c5d97c12ae5eb100dc835a2ec6df30c9ebb95 (patch) | |
tree | a8b60d7dfd416b50deec6ac9282381aa5312f965 /meta-openvuplus/recipes-multimedia/gstreamer | |
parent | e56f897c120c6a2c70e6b3129dde975f92d105cc (diff) |
relocate packages on recipes-base/recipes-enigma2/recipes-wlan.
Diffstat (limited to 'meta-openvuplus/recipes-multimedia/gstreamer')
16 files changed, 1234 insertions, 0 deletions
diff --git a/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugin-dvbmediasink_0.10.bb b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugin-dvbmediasink_0.10.bb new file mode 100644 index 0000000..11febfc --- /dev/null +++ b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugin-dvbmediasink_0.10.bb @@ -0,0 +1,17 @@ +SUMMARY = "Plugin for gstreamer: dvbmediasink" +SECTION = "multimedia" +LICENSE = "MIT | LGPLv2.1" +LIC_FILES_CHKSUM = "file://src/gstdvbaudiosink.c;beginline=1;endline=45;md5=023ebb8eaef9b8cce8591a9d96638392 \ + file://src/gstdvbvideosink.c;beginline=1;endline=44;md5=b597d3f0a4e3b49db42d2b5140bd7004" +DEPENDS = "gstreamer gst-plugins-base" +SRCREV = "1bc9f47255396df4b3119a02790c4e864566560a" +PR = "r5" + +SCHWERKRAFT_PROJECT = "dvbmediasink" + +inherit autotools schwerkraft-git + +FILES_${PN} = "${libdir}/gstreamer-0.10/*.so" +FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.la" +FILES_${PN}-staticdev += "${libdir}/gstreamer-0.10/*.a" +FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug" diff --git a/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-bad-0.10.23/0001-mpegtsdemux-fix-bd-streamtype-detection.diff.patch b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-bad-0.10.23/0001-mpegtsdemux-fix-bd-streamtype-detection.diff.patch new file mode 100644 index 0000000..7061e4a --- /dev/null +++ b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-bad-0.10.23/0001-mpegtsdemux-fix-bd-streamtype-detection.diff.patch @@ -0,0 +1,201 @@ +From 55091d9a55ad100b99638503da038432549632f8 Mon Sep 17 00:00:00 2001 +From: Andreas Oberritter <obi@opendreambox.org> +Date: Wed, 21 Mar 2012 15:45:17 +0100 +Subject: [PATCH 1/3] mpegtsdemux-fix-bd-streamtype-detection.diff + +--- + gst/mpegdemux/gstmpegtsdemux.c | 134 +++++++++++++++++++++++---------------- + 1 files changed, 79 insertions(+), 55 deletions(-) + +diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c +index 012c1cc..fffc50f 100644 +--- a/gst/mpegdemux/gstmpegtsdemux.c ++++ b/gst/mpegdemux/gstmpegtsdemux.c +@@ -647,6 +647,18 @@ gst_mpegts_demux_get_stream_for_PID (GstMpegTSDemux * demux, guint16 PID) + } + + static gboolean ++gst_mpeg_desc_reg_format_id_in_array(GArray *array, guint32 identifier) ++{ ++ guint i = 0; ++ for (; i < array->len; ++i) { ++ guint8 *desc = g_array_index(array, guint8*, i); ++ if (DESC_REGISTRATION_format_identifier (desc) == identifier) ++ return TRUE; ++ } ++ return FALSE; ++} ++ ++static gboolean + gst_mpegts_demux_fill_stream (GstMpegTSStream * stream, guint8 id, + guint8 stream_type) + { +@@ -655,6 +667,8 @@ gst_mpegts_demux_fill_stream (GstMpegTSStream * stream, guint8 id, + GstMpegTSDemuxClass *klass; + GstMpegTSDemux *demux; + GstCaps *caps; ++ GArray *stream_desc_reg_array = NULL; ++ gboolean is_hdmv = FALSE; + + if (stream->stream_type && stream->stream_type != stream_type) + goto wrong_type; +@@ -666,6 +680,31 @@ gst_mpegts_demux_fill_stream (GstMpegTSStream * stream, guint8 id, + template = NULL; + caps = NULL; + ++ if (stream->ES_info) { ++ stream_desc_reg_array = ++ gst_mpeg_descriptor_find_all (stream->ES_info, DESC_REGISTRATION); ++ if (stream_desc_reg_array && ++ gst_mpeg_desc_reg_format_id_in_array(stream_desc_reg_array, DRF_ID_HDMV)) { ++ is_hdmv = TRUE; ++ } ++ } ++ ++ if (!is_hdmv) { ++ GstMpegTSStream *PMT_stream = ++ gst_mpegts_demux_get_stream_for_PID (stream->demux, stream->PMT_pid); ++ GstMPEGDescriptor *program_info = PMT_stream->PMT.program_info; ++ if (program_info) { ++ GArray *program_desc_reg_array = ++ gst_mpeg_descriptor_find_all (program_info, DESC_REGISTRATION); ++ if (program_desc_reg_array) { ++ if (gst_mpeg_desc_reg_format_id_in_array(program_desc_reg_array, DRF_ID_HDMV)) { ++ is_hdmv = TRUE; ++ } ++ g_array_free(program_desc_reg_array, TRUE); ++ } ++ } ++ } ++ + switch (stream_type) { + case ST_VIDEO_MPEG1: + case ST_VIDEO_MPEG2: +@@ -756,11 +795,8 @@ gst_mpegts_demux_fill_stream (GstMpegTSStream * stream, guint8 id, + break; + case ST_PRIVATE_EA: /* Try to detect a VC1 stream */ + { +- guint8 *desc = NULL; +- +- if (stream->ES_info) +- desc = gst_mpeg_descriptor_find (stream->ES_info, DESC_REGISTRATION); +- if (!(desc && DESC_REGISTRATION_format_identifier (desc) == DRF_ID_VC1)) { ++ if (!(stream_desc_reg_array && ++ gst_mpeg_desc_reg_format_id_in_array(stream_desc_reg_array, DRF_ID_VC1))) { + GST_WARNING ("0xea private stream type found but no descriptor " + "for VC1. Assuming plain VC1."); + } +@@ -772,47 +808,7 @@ gst_mpegts_demux_fill_stream (GstMpegTSStream * stream, guint8 id, + NULL); + break; + } +- case ST_BD_AUDIO_AC3: +- { +- GstMpegTSStream *PMT_stream = +- gst_mpegts_demux_get_stream_for_PID (stream->demux, stream->PMT_pid); +- GstMPEGDescriptor *program_info = PMT_stream->PMT.program_info; +- guint8 *desc = NULL; +- +- if (program_info) +- desc = gst_mpeg_descriptor_find (program_info, DESC_REGISTRATION); +- +- if (desc && DESC_REGISTRATION_format_identifier (desc) == DRF_ID_HDMV) { +- template = klass->audio_template; +- name = g_strdup_printf ("audio_%04x", stream->PID); +- caps = gst_caps_new_simple ("audio/x-eac3", NULL); +- } else if (stream->ES_info && gst_mpeg_descriptor_find (stream->ES_info, +- DESC_DVB_ENHANCED_AC3)) { +- template = klass->audio_template; +- name = g_strdup_printf ("audio_%04x", stream->PID); +- caps = gst_caps_new_simple ("audio/x-eac3", NULL); +- } else { +- if (!stream->ES_info || +- !gst_mpeg_descriptor_find (stream->ES_info, DESC_DVB_AC3)) { +- GST_WARNING ("AC3 stream type found but no corresponding " +- "descriptor to differentiate between AC3 and EAC3. " +- "Assuming plain AC3."); +- } +- template = klass->audio_template; +- name = g_strdup_printf ("audio_%04x", stream->PID); +- caps = gst_caps_new_simple ("audio/x-ac3", NULL); +- } +- break; +- } +- case ST_BD_AUDIO_EAC3: +- template = klass->audio_template; +- name = g_strdup_printf ("audio_%04x", stream->PID); +- caps = gst_caps_new_simple ("audio/x-eac3", NULL); +- break; + case ST_PS_AUDIO_DTS: +- case ST_BD_AUDIO_DTS: +- case ST_BD_AUDIO_DTS_HD: +- case ST_BD_AUDIO_DTS_HD_MASTER_AUDIO: + template = klass->audio_template; + name = g_strdup_printf ("audio_%04x", stream->PID); + caps = gst_caps_new_simple ("audio/x-dts", NULL); +@@ -822,24 +818,52 @@ gst_mpegts_demux_fill_stream (GstMpegTSStream * stream, guint8 id, + name = g_strdup_printf ("audio_%04x", stream->PID); + caps = gst_caps_new_simple ("audio/x-lpcm", NULL); + break; +- case ST_BD_AUDIO_LPCM: +- template = klass->audio_template; +- name = g_strdup_printf ("audio_%04x", stream->PID); +- caps = gst_caps_new_simple ("audio/x-private-ts-lpcm", NULL); +- break; + case ST_PS_DVD_SUBPICTURE: + template = klass->subpicture_template; + name = g_strdup_printf ("subpicture_%04x", stream->PID); + caps = gst_caps_new_simple ("video/x-dvd-subpicture", NULL); + break; +- case ST_BD_PGS_SUBPICTURE: +- template = klass->subpicture_template; +- name = g_strdup_printf ("subpicture_%04x", stream->PID); +- caps = gst_caps_new_simple ("subpicture/x-pgs", NULL); +- break; + default: + break; + } ++ ++ if (!template && is_hdmv) { ++ switch (stream_type) { ++ case ST_BD_AUDIO_AC3: ++ template = klass->audio_template; ++ name = g_strdup_printf ("audio_%04x", stream->PID); ++ caps = gst_caps_new_simple ("audio/x-ac3", NULL); ++ break; ++ case ST_BD_AUDIO_EAC3: ++ template = klass->audio_template; ++ name = g_strdup_printf ("audio_%04x", stream->PID); ++ caps = gst_caps_new_simple ("audio/x-eac3", NULL); ++ break; ++ case ST_BD_AUDIO_DTS: ++ case ST_BD_AUDIO_DTS_HD: ++ case ST_BD_AUDIO_DTS_HD_MASTER_AUDIO: ++ template = klass->audio_template; ++ name = g_strdup_printf ("audio_%04x", stream->PID); ++ caps = gst_caps_new_simple ("audio/x-dts", NULL); ++ break; ++ case ST_BD_AUDIO_LPCM: ++ template = klass->audio_template; ++ name = g_strdup_printf ("audio_%04x", stream->PID); ++ caps = gst_caps_new_simple ("audio/x-private-ts-lpcm", NULL); ++ break; ++ case ST_BD_PGS_SUBPICTURE: ++ template = klass->subpicture_template; ++ name = g_strdup_printf ("subpicture_%04x", stream->PID); ++ caps = gst_caps_new_simple ("subpicture/x-pgs", NULL); ++ break; ++ default: ++ break; ++ } ++ } ++ ++ if (stream_desc_reg_array) ++ g_array_free(stream_desc_reg_array, TRUE); ++ + if (name == NULL || template == NULL || caps == NULL) { + if (name) + g_free (name); +-- +1.7.5.4 + diff --git a/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-bad-0.10.23/0002-add-indexing-capabilities-to-generate-a-SPN-PTS-map-.patch b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-bad-0.10.23/0002-add-indexing-capabilities-to-generate-a-SPN-PTS-map-.patch new file mode 100644 index 0000000..1be4bbd --- /dev/null +++ b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-bad-0.10.23/0002-add-indexing-capabilities-to-generate-a-SPN-PTS-map-.patch @@ -0,0 +1,423 @@ +From 0d5e73089dcf64398a4835d84c0dbcf77ef04e14 Mon Sep 17 00:00:00 2001 +From: Andreas Frisch <fraxinas@opendreambox.org> +Date: Mon, 28 Mar 2011 10:31:23 +0200 +Subject: [PATCH 2/3] add indexing capabilities to generate a SPN/PTS map on + the fly in m2ts-mode + +--- + gst/mpegtsmux/mpegtsmux.c | 234 ++++++++++++++++++++++++++++++++++++++++++++- + gst/mpegtsmux/mpegtsmux.h | 13 +++ + 2 files changed, 243 insertions(+), 4 deletions(-) + +diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c +index a243e40..d5492a4 100644 +--- a/gst/mpegtsmux/mpegtsmux.c ++++ b/gst/mpegtsmux/mpegtsmux.c +@@ -104,7 +104,8 @@ + ARG_PROG_MAP, + ARG_M2TS_MODE, + ARG_PAT_INTERVAL, +- ARG_PMT_INTERVAL ++ ARG_PMT_INTERVAL, ++ ARG_ALIGNMENT + }; + + static GstStaticPadTemplate mpegtsmux_sink_factory = +@@ -157,6 +158,12 @@ + static void mpegtsdemux_set_header_on_caps (MpegTsMux * mux); + static gboolean mpegtsmux_sink_event (GstPad * pad, GstEvent * event); + static gboolean mpegtsmux_src_event (GstPad * pad, GstEvent * event); ++static void mpegtsmux_set_index (GstElement * element, GstIndex * index); ++static GstIndex *mpegtsmux_get_index (GstElement * element); ++ ++static GstFormat pts_format; ++static GstFormat spn_format; ++guint get_packets_per_buffer (MpegTsMux * mux); + + GST_BOILERPLATE (MpegTsMux, mpegtsmux, GstElement, GST_TYPE_ELEMENT); + +@@ -175,6 +182,10 @@ + "MPEG Transport Stream Muxer", "Codec/Muxer", + "Multiplexes media streams into an MPEG Transport Stream", + "Fluendo <contact@fluendo.com>"); ++ ++ pts_format = ++ gst_format_register ("PTS", "MPEG System Presentation Time Stamp"); ++ spn_format = gst_format_register ("SPN", "Source Packet Number"); + } + + static void +@@ -191,6 +202,9 @@ + gstelement_class->release_pad = mpegtsmux_release_pad; + gstelement_class->change_state = mpegtsmux_change_state; + ++ gstelement_class->set_index = GST_DEBUG_FUNCPTR (mpegtsmux_set_index); ++ gstelement_class->get_index = GST_DEBUG_FUNCPTR (mpegtsmux_get_index); ++ + g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_PROG_MAP, + g_param_spec_boxed ("prog-map", "Program map", + "A GstStructure specifies the mapping from elementary streams to programs", +@@ -213,6 +227,12 @@ + "Set the interval (in ticks of the 90kHz clock) for writing out the PMT table", + 1, G_MAXUINT, TSMUX_DEFAULT_PMT_INTERVAL, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ ++ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_ALIGNMENT, ++ g_param_spec_uint ("alignment", "packet alignment", ++ "Queue this amount of ts/m2ts packets before pushing buffer. On EOS, pad with dummy packets until aligned. Default: 32 for m2ts streams, else disabled.", ++ 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++ + } + + static void +@@ -247,6 +267,15 @@ + mux->streamheader_sent = FALSE; + mux->force_key_unit_event = NULL; + mux->pending_key_unit_ts = GST_CLOCK_TIME_NONE; ++ ++ mux->spn_count = 0; ++ ++ mux->element_index = NULL; ++ mux->element_index_writer_id = -1; ++ ++ mux->arbitrary_align = FALSE; ++ mux->alignment_adapter = gst_adapter_new (); ++ mux->packets_per_buffer = 0; + } + + static void +@@ -288,6 +317,15 @@ + g_list_free (mux->streamheader); + mux->streamheader = NULL; + } ++ if (mux->alignment_adapter) { ++ gst_adapter_clear (mux->alignment_adapter); ++ g_object_unref (mux->alignment_adapter); ++ mux->alignment_adapter = NULL; ++ } ++ ++ if (mux->element_index) ++ gst_object_unref (mux->element_index); ++ + GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); + } + +@@ -331,12 +369,27 @@ + walk = g_slist_next (walk); + } + break; ++ case ARG_ALIGNMENT: ++ mux->packets_per_buffer = g_value_get_uint (value); ++ mux->arbitrary_align = TRUE; ++ break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } + } + ++guint ++get_packets_per_buffer (MpegTsMux * mux) ++{ ++ if (mux->arbitrary_align == TRUE) { ++ return mux->packets_per_buffer; ++ } else if (mux->m2ts_mode) { ++ return BDMV_PACKETS_PER_BUFFER; ++ } ++ return DEFAULT_PACKETS_PER_BUFFER; ++} ++ + static void + gst_mpegtsmux_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec) +@@ -356,6 +409,9 @@ + case ARG_PMT_INTERVAL: + g_value_set_uint (value, mux->pmt_interval); + break; ++ case ARG_ALIGNMENT: ++ g_value_set_uint (value, get_packets_per_buffer (mux)); ++ break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; +@@ -363,6 +419,37 @@ + } + + static void ++mpegtsmux_set_index (GstElement * element, GstIndex * index) ++{ ++ MpegTsMux *mux = GST_MPEG_TSMUX (element); ++ ++ GST_OBJECT_LOCK (mux); ++ if (mux->element_index) ++ gst_object_unref (mux->element_index); ++ mux->element_index = index ? gst_object_ref (index) : NULL; ++ GST_OBJECT_UNLOCK (mux); ++ GST_DEBUG_OBJECT (mux, "Set index %" GST_PTR_FORMAT, mux->element_index); ++ gst_index_add_format (index, mux->element_index_writer_id, pts_format); ++ gst_index_add_format (index, mux->element_index_writer_id, spn_format); ++} ++ ++static GstIndex * ++mpegtsmux_get_index (GstElement * element) ++{ ++ GstIndex *result = NULL; ++ MpegTsMux *mux = GST_MPEG_TSMUX (element); ++ ++ GST_OBJECT_LOCK (mux); ++ if (mux->element_index) ++ result = gst_object_ref (mux->element_index); ++ GST_OBJECT_UNLOCK (mux); ++ ++ GST_DEBUG_OBJECT (mux, "Returning index %" GST_PTR_FORMAT, result); ++ ++ return result; ++} ++ ++static void + release_buffer_cb (guint8 * data, void *user_data) + { + GstBuffer *buf = (GstBuffer *) user_data; +@@ -505,6 +592,24 @@ + ret = GST_FLOW_OK; + } + ++ if (mux->element_index) { ++ gboolean parsed = FALSE; ++ if (ts_data->stream->is_video_stream) { ++ if (gst_structure_get_boolean (s, "parsed", &parsed) && parsed) { ++ if (mux->element_index_writer_id == -1) { ++ gst_index_get_writer_id (mux->element_index, GST_OBJECT (mux), ++ &mux->element_index_writer_id); ++ GST_INFO_OBJECT (mux, ++ "created GstIndex writer_id = %d for PID 0x%04x", ++ mux->element_index_writer_id, ts_data->pid); ++ } ++ } else ++ GST_WARNING_OBJECT (pad, ++ "Indexing capability for PID=0x%04x disabled - parsed input stream is required!", ++ ts_data->pid); ++ } ++ } ++ + beach: + gst_caps_unref (caps); + return ret; +@@ -659,6 +764,105 @@ + return best; + } + ++static GstFlowReturn ++aligned_push (MpegTsMux * mux, GstBuffer * buf) ++{ ++ guint accu_bytes, packet_length; ++ GstBuffer *out_buf; ++ ++ if (get_packets_per_buffer (mux) == 0) { ++ return gst_pad_push (mux->srcpad, buf); ++ } ++ ++ packet_length = mux->m2ts_mode ? M2TS_PACKET_LENGTH : NORMAL_TS_PACKET_LENGTH; ++ gst_adapter_push (mux->alignment_adapter, buf); ++ ++ accu_bytes = gst_adapter_available (mux->alignment_adapter); ++ GST_DEBUG_OBJECT (mux, ++ "Accumulating packet in alignment adapter, accu_bytes=%i", accu_bytes); ++ ++ if (accu_bytes == get_packets_per_buffer (mux) * packet_length) { ++ out_buf = gst_adapter_take_buffer (mux->alignment_adapter, accu_bytes); ++ gst_buffer_set_caps (out_buf, GST_PAD_CAPS (mux->srcpad)); ++ gst_adapter_clear (mux->alignment_adapter); ++ GST_DEBUG_OBJECT (mux, ++ "Accumulated desired amount of packets in alignment unit, handing off %i bytes", ++ accu_bytes); ++ return gst_pad_push (mux->srcpad, out_buf); ++ } else if (accu_bytes > get_packets_per_buffer (mux) * packet_length) { ++ GST_WARNING_OBJECT (mux, "Packet alignment error!"); ++ gst_adapter_clear (mux->alignment_adapter); ++ return GST_FLOW_CUSTOM_ERROR; ++ } ++ ++ return GST_FLOW_OK; ++} ++ ++static void ++mpegtsmux_eos_align (MpegTsMux * mux) ++{ ++ guint accu_bytes, packet_length, packets_needed, dummy_packet_count; ++ guint continuity_counter; ++ unsigned char header[4]; ++ guint p; ++ GstBuffer *buf; ++ guint32 m2ts_header = 0; ++ ++ accu_bytes = gst_adapter_available (mux->alignment_adapter); ++ packet_length = mux->m2ts_mode ? M2TS_PACKET_LENGTH : NORMAL_TS_PACKET_LENGTH; ++ packets_needed = get_packets_per_buffer (mux) - accu_bytes / packet_length; ++ ++ if (get_packets_per_buffer (mux) == 0 || accu_bytes == 0) { ++ return; ++ } ++ ++ GST_DEBUG_OBJECT (mux, ++ "received EOS - %i bytes accumulated in alignment adapter -> %i dummy packets needed for padding!\n", ++ accu_bytes, packets_needed); ++ ++ if (mux->m2ts_mode) { ++ gst_adapter_copy (mux->alignment_adapter, header, ++ accu_bytes - packet_length, 4); ++ m2ts_header = GST_READ_UINT32_BE (header); ++ gst_adapter_copy (mux->alignment_adapter, header, ++ accu_bytes - packet_length + 7, 1); ++ } else { ++ gst_adapter_copy (mux->alignment_adapter, header, ++ accu_bytes - packet_length + 3, 1); ++ } ++ ++ continuity_counter = header[0] & 0xF; ++ ++ for (dummy_packet_count = 0; dummy_packet_count < packets_needed; ++ dummy_packet_count++) { ++ buf = gst_buffer_new_and_alloc (packet_length); ++ if (mux->m2ts_mode) { ++ // monotonically increase m2ts_header ++ m2ts_header++; ++ GST_WRITE_UINT32_BE (GST_BUFFER_DATA (buf), m2ts_header); ++ p = (guint) GST_BUFFER_DATA (buf) + 4; ++ } else { ++ p = (guint) GST_BUFFER_DATA (buf); ++ } ++ GST_WRITE_UINT8 (p++, TSMUX_SYNC_BYTE); ++ // dummy PID ++ GST_WRITE_UINT16_BE (p, 0x1FFF); ++ p += 2; ++ // adaptation field exists | no payload exists | continuity counter ++ GST_WRITE_UINT8 (p++, 0x20 + ((++continuity_counter) & 0xF)); ++ // adaptation field length | flags ++ GST_WRITE_UINT16_BE (p, 0xB700); ++ p += 2; ++ // adaptation field ++ memset ((guint*)p, 0xFF, 0xB6); ++ ++ aligned_push (mux, buf); ++ GST_LOG_OBJECT (mux, ++ "generated dummy packet %i with m2ts_header=0x%x, contiuity=0x%02x\n", ++ dummy_packet_count, m2ts_header, continuity_counter); ++ } ++} ++ + #define COLLECT_DATA_PAD(collect_data) (((GstCollectData *)(collect_data))->pad) + + static MpegTsPadData * +@@ -971,6 +1175,7 @@ + } else { + /* FIXME: Drain all remaining streams */ + /* At EOS */ ++ mpegtsmux_eos_align (mux); + gst_pad_push_event (mux->srcpad, gst_event_new_eos ()); + } + +@@ -1081,7 +1286,7 @@ + GST_LOG_OBJECT (mux, "marking as delta unit"); + GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT); + } else { +- GST_DEBUG_OBJECT (mux, "marking as non-delta unit"); ++ GST_DEBUG_OBJECT (mux, "marking as non-delta unit, spn %i", mux->spn_count); + mux->is_delta = TRUE; + } + } +@@ -1104,6 +1309,8 @@ + return FALSE; + } + ++// mux->spn_count++; ++ + /* copies the TS data of 188 bytes to the m2ts buffer at an offset + of 4 bytes to leave space for writing the timestamp later */ + memcpy (GST_BUFFER_DATA (buf) + 4, data, len); +@@ -1168,13 +1375,25 @@ + break; + gst_buffer_set_caps (out_buf, GST_PAD_CAPS (mux->srcpad)); + GST_BUFFER_TIMESTAMP (out_buf) = MPEG_SYS_TIME_TO_GSTTIME (cur_pcr); ++ ++ mux->spn_count++; ++ ++ if (mux->element_index) { ++ if (!GST_BUFFER_FLAG_IS_SET (out_buf, GST_BUFFER_FLAG_DELTA_UNIT)) { ++ gst_index_add_association (mux->element_index, ++ mux->element_index_writer_id, ++ GST_ASSOCIATION_FLAG_KEY_UNIT, spn_format, ++ mux->spn_count, pts_format, ++ GSTTIME_TO_MPEGTIME (GST_BUFFER_TIMESTAMP (out_buf)), NULL); ++ } ++ } + + /* Write the 4 byte timestamp value, bottom 30 bits only = PCR */ + GST_WRITE_UINT32_BE (GST_BUFFER_DATA (out_buf), cur_pcr & 0x3FFFFFFF); + + GST_LOG_OBJECT (mux, "Outputting a packet of length %d PCR %" + G_GUINT64_FORMAT, M2TS_PACKET_LENGTH, cur_pcr); +- ret = gst_pad_push (mux->srcpad, out_buf); ++ ret = aligned_push (mux, out_buf); + if (G_UNLIKELY (ret != GST_FLOW_OK)) { + mux->last_flow_ret = ret; + return FALSE; +@@ -1190,7 +1409,7 @@ + + GST_LOG_OBJECT (mux, "Outputting a packet of length %d PCR %" + G_GUINT64_FORMAT, M2TS_PACKET_LENGTH, new_pcr); +- ret = gst_pad_push (mux->srcpad, buf); ++ ret = aligned_push (mux, buf); + if (G_UNLIKELY (ret != GST_FLOW_OK)) { + mux->last_flow_ret = ret; + return FALSE; +@@ -1221,7 +1440,7 @@ + + GST_BUFFER_TIMESTAMP (buf) = mux->last_ts; + +- ret = gst_pad_push (mux->srcpad, buf); ++ ret = aligned_push (mux, buf); + if (G_UNLIKELY (ret != GST_FLOW_OK)) { + mux->last_flow_ret = ret; + return FALSE; +@@ -1319,6 +1538,8 @@ + case GST_STATE_CHANGE_READY_TO_NULL: + if (mux->adapter) + gst_adapter_clear (mux->adapter); ++ if (mux->alignment_adapter) ++ gst_adapter_clear (mux->alignment_adapter); + break; + default: + break; +diff --git a/gst/mpegtsmux/mpegtsmux.h b/gst/mpegtsmux/mpegtsmux.h +index 26003a8..1b88a33 100644 +--- a/gst/mpegtsmux/mpegtsmux.h ++++ b/gst/mpegtsmux/mpegtsmux.h +@@ -130,6 +130,14 @@ + gboolean streamheader_sent; + GstClockTime pending_key_unit_ts; + GstEvent *force_key_unit_event; ++ ++ guint32 spn_count; ++ GstIndex *element_index; ++ gint element_index_writer_id; ++ ++ gboolean arbitrary_align; ++ guint packets_per_buffer; ++ GstAdapter *alignment_adapter; + }; + + struct MpegTsMuxClass { +@@ -186,6 +194,9 @@ + #define MAX_PROG_NUMBER 32 + #define DEFAULT_PROG_ID 0 + ++#define DEFAULT_PACKETS_PER_BUFFER 0 ++#define BDMV_PACKETS_PER_BUFFER 32 ++ + G_END_DECLS + + #endif +-- +1.7.5.4 + diff --git a/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-bad-0.10.23/0003-mpegpsdemux_speedup.diff.patch b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-bad-0.10.23/0003-mpegpsdemux_speedup.diff.patch new file mode 100644 index 0000000..48647cf --- /dev/null +++ b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-bad-0.10.23/0003-mpegpsdemux_speedup.diff.patch @@ -0,0 +1,112 @@ +From 9fce0ed5dd37daa6d98d0a4aaed05faafb2e6771 Mon Sep 17 00:00:00 2001 +From: Andreas Oberritter <obi@opendreambox.org> +Date: Wed, 21 Mar 2012 15:55:42 +0100 +Subject: [PATCH 3/3] mpegpsdemux_speedup.diff + +--- + gst/mpegdemux/gstmpegdemux.c | 52 +++++++++++++++++++++++++++++++++++++----- + gst/mpegdemux/gstmpegdemux.h | 4 +++ + 2 files changed, 50 insertions(+), 6 deletions(-) + +diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c +index 8359285..35a7ee9 100644 +--- a/gst/mpegdemux/gstmpegdemux.c ++++ b/gst/mpegdemux/gstmpegdemux.c +@@ -285,7 +285,10 @@ gst_flups_demux_reset (GstFluPSDemux * demux) + if (stream != NULL) { + if (stream->pad) + gst_element_remove_pad (GST_ELEMENT_CAST (demux), stream->pad); +- ++ if (stream->buf) ++ free(stream->buf); ++ if (stream->meta_buf) ++ gst_buffer_unref(stream->meta_buf); + g_free (stream); + demux->streams[i] = NULL; + } +@@ -415,6 +418,15 @@ gst_flups_demux_create_stream (GstFluPSDemux * demux, gint id, gint stream_type) + stream->type = stream_type; + stream->pad = gst_pad_new_from_template (template, name); + stream->segment_thresh = threshold; ++ ++ if (threshold == VIDEO_SEGMENT_THRESHOLD) { ++ stream->buf = malloc(64*1024); ++ stream->buf_pos = 0; ++ stream->meta_buf = gst_buffer_new(); ++ } ++ else ++ stream->buf = 0; ++ + gst_pad_set_event_function (stream->pad, + GST_DEBUG_FUNCPTR (gst_flups_demux_src_event)); + gst_pad_set_query_function (stream->pad, +@@ -466,6 +478,7 @@ gst_flups_demux_send_data (GstFluPSDemux * demux, GstFluPSStream * stream, + GstFlowReturn result; + guint64 timestamp; + guint size; ++ gboolean sent = FALSE; + + if (stream == NULL) + goto no_stream; +@@ -568,11 +581,38 @@ gst_flups_demux_send_data (GstFluPSDemux * demux, GstFluPSStream * stream, + demux->next_pts = G_MAXUINT64; + demux->next_dts = G_MAXUINT64; + +- result = gst_pad_push (stream->pad, buf); +- GST_DEBUG_OBJECT (demux, "pushed stream id 0x%02x type 0x%02x, time: %" +- GST_TIME_FORMAT ", size %d. result: %s", +- stream->id, stream->type, GST_TIME_ARGS (timestamp), +- size, gst_flow_get_name (result)); ++ if (stream->buf && stream->buf_pos && (timestamp != GST_CLOCK_TIME_NONE || stream->buf_pos+size > 64*1024)) { ++ GstBuffer *tmp = gst_buffer_new_and_alloc(stream->buf_pos); ++ gst_buffer_copy_metadata(tmp, stream->meta_buf, GST_BUFFER_COPY_ALL); ++ GST_BUFFER_SIZE(tmp) = stream->buf_pos; ++ memcpy(GST_BUFFER_DATA(tmp), stream->buf, stream->buf_pos); ++ result = gst_pad_push (stream->pad, tmp); ++ GST_DEBUG_OBJECT (demux, "pushed stream id 0x%02x type 0x%02x, time: %" ++ GST_TIME_FORMAT ", size %d. result: %s", ++ stream->id, stream->type, GST_TIME_ARGS (timestamp), ++ stream->buf_pos, gst_flow_get_name (result)); ++ stream->buf_pos = 0; ++ sent = TRUE; ++ } ++ ++ if (!stream->buf || size > 64*1024) { ++ result = gst_pad_push (stream->pad, buf); ++ GST_DEBUG_OBJECT (demux, "pushed stream id 0x%02x type 0x%02x, time: %" ++ GST_TIME_FORMAT ", size %d. result: %s", ++ stream->id, stream->type, GST_TIME_ARGS (timestamp), ++ size, gst_flow_get_name (result)); ++ } ++ else { ++ if (!stream->buf_pos) ++ gst_buffer_copy_metadata(stream->meta_buf, buf, GST_BUFFER_COPY_ALL); ++ ++ memcpy(stream->buf + stream->buf_pos, GST_BUFFER_DATA(buf), size); ++ stream->buf_pos += size; ++ gst_buffer_unref(buf); ++ ++ if (!sent) ++ result = GST_FLOW_OK; ++ } + + return result; + +diff --git a/gst/mpegdemux/gstmpegdemux.h b/gst/mpegdemux/gstmpegdemux.h +index 6cf7aed..5977578 100644 +--- a/gst/mpegdemux/gstmpegdemux.h ++++ b/gst/mpegdemux/gstmpegdemux.h +@@ -92,6 +92,10 @@ struct _GstFluPSStream + gboolean discont; + gboolean notlinked; + gboolean need_segment; ++ ++ GstBuffer *meta_buf; ++ unsigned char *buf; ++ size_t buf_pos; + }; + + struct _GstFluPSDemux +-- +1.7.5.4 + diff --git a/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-bad-0.10.23/orc.m4-fix-location-of-orcc-when-cross-compiling.patch b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-bad-0.10.23/orc.m4-fix-location-of-orcc-when-cross-compiling.patch new file mode 100644 index 0000000..d1942cf --- /dev/null +++ b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-bad-0.10.23/orc.m4-fix-location-of-orcc-when-cross-compiling.patch @@ -0,0 +1,39 @@ +From 114ec19a882192dfcb5f71bb12c811d0a3b7f324 Mon Sep 17 00:00:00 2001 +From: Andreas Oberritter <obi@opendreambox.org> +Date: Tue, 8 May 2012 17:27:55 +0200 +Subject: [PATCH] orc.m4: fix location of orcc when cross-compiling + +* Prepend PKG_CONFIG_SYSROOT to orcc, so configure doesn't + accidentially use an incompatible version of orcc installed + on the build system. + +Signed-off-by: Andreas Oberritter <obi@opendreambox.org> +--- + m4/orc.m4 | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/common/m4/orc.m4 b/common/m4/orc.m4 +index 26b2459..81b111e 100644 +--- a/common/m4/orc.m4 ++++ b/common/m4/orc.m4 +@@ -3,6 +3,8 @@ dnl pkg-config-based checks for Orc + dnl specific: + dnl ORC_CHECK([REQUIRED_VERSION]) + ++m4_pattern_allow(PKG_CONFIG_SYSROOT_DIR) ++ + AC_DEFUN([ORC_CHECK], + [ + ORC_REQ=ifelse([$1], , "0.4.6", [$1]) +@@ -24,7 +26,7 @@ AC_DEFUN([ORC_CHECK], + HAVE_ORC=yes + if test "x$ORCC" = "x" ; then + AC_MSG_CHECKING(for usable orcc) +- ORCC=`$PKG_CONFIG --variable=orcc orc-0.4` ++ ORCC=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=orcc orc-0.4` + dnl check whether the orcc found by pkg-config can be run from the build environment + dnl if this is not the case (e.g. when cross-compiling) fall back to orcc from PATH + AS_IF([$ORCC --version 1> /dev/null 2> /dev/null], [], [ORCC=`which orcc`]) +-- +1.7.9.5 + diff --git a/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.23.bbappend b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.23.bbappend new file mode 100644 index 0000000..94b8221 --- /dev/null +++ b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.23.bbappend @@ -0,0 +1,15 @@ +DEPENDS += "libmms" +PR .= "-vuplus0" + +SRC_URI += " \ + file://0001-mpegtsdemux-fix-bd-streamtype-detection.diff.patch \ + file://0002-add-indexing-capabilities-to-generate-a-SPN-PTS-map-.patch \ + file://0003-mpegpsdemux_speedup.diff.patch \ + file://orc.m4-fix-location-of-orcc-when-cross-compiling.patch \ +" + +EXTRA_OECONF += "--enable-orc --with-plugins=" +# fix "configure: error: cannot run test program while cross compiling" +EXTRA_OECONF += "--disable-mpeg2enc --disable-mplex" + +FILESEXTRAPATHS_prepend := "${THISDIR}/${P}:" diff --git a/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-base-0.10.36/orc.m4-fix-location-of-orcc-when-cross-compiling.patch b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-base-0.10.36/orc.m4-fix-location-of-orcc-when-cross-compiling.patch new file mode 100644 index 0000000..d1942cf --- /dev/null +++ b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-base-0.10.36/orc.m4-fix-location-of-orcc-when-cross-compiling.patch @@ -0,0 +1,39 @@ +From 114ec19a882192dfcb5f71bb12c811d0a3b7f324 Mon Sep 17 00:00:00 2001 +From: Andreas Oberritter <obi@opendreambox.org> +Date: Tue, 8 May 2012 17:27:55 +0200 +Subject: [PATCH] orc.m4: fix location of orcc when cross-compiling + +* Prepend PKG_CONFIG_SYSROOT to orcc, so configure doesn't + accidentially use an incompatible version of orcc installed + on the build system. + +Signed-off-by: Andreas Oberritter <obi@opendreambox.org> +--- + m4/orc.m4 | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/common/m4/orc.m4 b/common/m4/orc.m4 +index 26b2459..81b111e 100644 +--- a/common/m4/orc.m4 ++++ b/common/m4/orc.m4 +@@ -3,6 +3,8 @@ dnl pkg-config-based checks for Orc + dnl specific: + dnl ORC_CHECK([REQUIRED_VERSION]) + ++m4_pattern_allow(PKG_CONFIG_SYSROOT_DIR) ++ + AC_DEFUN([ORC_CHECK], + [ + ORC_REQ=ifelse([$1], , "0.4.6", [$1]) +@@ -24,7 +26,7 @@ AC_DEFUN([ORC_CHECK], + HAVE_ORC=yes + if test "x$ORCC" = "x" ; then + AC_MSG_CHECKING(for usable orcc) +- ORCC=`$PKG_CONFIG --variable=orcc orc-0.4` ++ ORCC=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=orcc orc-0.4` + dnl check whether the orcc found by pkg-config can be run from the build environment + dnl if this is not the case (e.g. when cross-compiling) fall back to orcc from PATH + AS_IF([$ORCC --version 1> /dev/null 2> /dev/null], [], [ORCC=`which orcc`]) +-- +1.7.9.5 + diff --git a/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-base_0.10.36.bbappend b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-base_0.10.36.bbappend new file mode 100644 index 0000000..f27d55a --- /dev/null +++ b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-base_0.10.36.bbappend @@ -0,0 +1,8 @@ +DEPENDS += "cdparanoia orc orc-native" +PR .= "-vuplus0" + +SRC_URI += "file://orc.m4-fix-location-of-orcc-when-cross-compiling.patch" + +EXTRA_OECONF += "--enable-orc" + +FILESEXTRAPATHS_prepend := "${THISDIR}/${P}:" diff --git a/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-good-0.10.31/audioparser-raise-ranks.patch b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-good-0.10.31/audioparser-raise-ranks.patch new file mode 100644 index 0000000..ad73541 --- /dev/null +++ b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-good-0.10.31/audioparser-raise-ranks.patch @@ -0,0 +1,19 @@ +--- gst-plugins-good-0.10.30/gst/audioparsers/plugin.c~ 2012-01-04 21:55:58.816556710 +0100 ++++ gst-plugins-good-0.10.30/gst/audioparsers/plugin.c 2012-01-04 21:55:58.843221178 +0100 +@@ -34,13 +34,13 @@ + gboolean ret; + + ret = gst_element_register (plugin, "aacparse", +- GST_RANK_PRIMARY + 1, GST_TYPE_AAC_PARSE); ++ GST_RANK_PRIMARY + 2, GST_TYPE_AAC_PARSE); + ret &= gst_element_register (plugin, "amrparse", + GST_RANK_PRIMARY + 1, GST_TYPE_AMR_PARSE); + ret &= gst_element_register (plugin, "ac3parse", +- GST_RANK_PRIMARY + 1, GST_TYPE_AC3_PARSE); ++ GST_RANK_PRIMARY + 2, GST_TYPE_AC3_PARSE); + ret &= gst_element_register (plugin, "dcaparse", +- GST_RANK_PRIMARY + 1, GST_TYPE_DCA_PARSE); ++ GST_RANK_PRIMARY + 2, GST_TYPE_DCA_PARSE); + ret &= gst_element_register (plugin, "flacparse", + GST_RANK_PRIMARY + 1, GST_TYPE_FLAC_PARSE); + ret &= gst_element_register (plugin, "mpegaudioparse", diff --git a/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-good-0.10.31/orc.m4-fix-location-of-orcc-when-cross-compiling.patch b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-good-0.10.31/orc.m4-fix-location-of-orcc-when-cross-compiling.patch new file mode 100644 index 0000000..d1942cf --- /dev/null +++ b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-good-0.10.31/orc.m4-fix-location-of-orcc-when-cross-compiling.patch @@ -0,0 +1,39 @@ +From 114ec19a882192dfcb5f71bb12c811d0a3b7f324 Mon Sep 17 00:00:00 2001 +From: Andreas Oberritter <obi@opendreambox.org> +Date: Tue, 8 May 2012 17:27:55 +0200 +Subject: [PATCH] orc.m4: fix location of orcc when cross-compiling + +* Prepend PKG_CONFIG_SYSROOT to orcc, so configure doesn't + accidentially use an incompatible version of orcc installed + on the build system. + +Signed-off-by: Andreas Oberritter <obi@opendreambox.org> +--- + m4/orc.m4 | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/common/m4/orc.m4 b/common/m4/orc.m4 +index 26b2459..81b111e 100644 +--- a/common/m4/orc.m4 ++++ b/common/m4/orc.m4 +@@ -3,6 +3,8 @@ dnl pkg-config-based checks for Orc + dnl specific: + dnl ORC_CHECK([REQUIRED_VERSION]) + ++m4_pattern_allow(PKG_CONFIG_SYSROOT_DIR) ++ + AC_DEFUN([ORC_CHECK], + [ + ORC_REQ=ifelse([$1], , "0.4.6", [$1]) +@@ -24,7 +26,7 @@ AC_DEFUN([ORC_CHECK], + HAVE_ORC=yes + if test "x$ORCC" = "x" ; then + AC_MSG_CHECKING(for usable orcc) +- ORCC=`$PKG_CONFIG --variable=orcc orc-0.4` ++ ORCC=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=orcc orc-0.4` + dnl check whether the orcc found by pkg-config can be run from the build environment + dnl if this is not the case (e.g. when cross-compiling) fall back to orcc from PATH + AS_IF([$ORCC --version 1> /dev/null 2> /dev/null], [], [ORCC=`which orcc`]) +-- +1.7.9.5 + diff --git a/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bbappend b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bbappend new file mode 100644 index 0000000..958007a --- /dev/null +++ b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bbappend @@ -0,0 +1,9 @@ +DEPENDS := "${@oe_filter_out('^(gconf|pulseaudio)$', '${DEPENDS}', d)}" +PR .= "-vuplus0" + +SRC_URI += "file://audioparser-raise-ranks.patch \ + file://orc.m4-fix-location-of-orcc-when-cross-compiling.patch" + +EXTRA_OECONF += "--enable-orc" + +FILESEXTRAPATHS_prepend := "${THISDIR}/${P}:" diff --git a/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-ugly-0.10.19/dvdsubdec-addproperty-singlebuffer.patch b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-ugly-0.10.19/dvdsubdec-addproperty-singlebuffer.patch new file mode 100644 index 0000000..8247a9f --- /dev/null +++ b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-ugly-0.10.19/dvdsubdec-addproperty-singlebuffer.patch @@ -0,0 +1,103 @@ +From: Fraxinas <andreas.frisch@multimedia-labs.de> +Subject: [PATCH] dvdsubdec: add singlebuffer property (fixes bug 619136) + +diff -u a/gst/dvdsub/gstdvdsubdec.c b/gst/dvdsub/gstdvdsubdec.c +--- a/gst/dvdsub/gstdvdsubdec.c 2009-11-05 19:06:16.000000000 +0100 ++++ b/gst/dvdsub/gstdvdsubdec.c 2010-05-26 16:27:06.000000000 +0200 +@@ -41,6 +41,10 @@ + static GstClockTime gst_dvd_sub_dec_get_event_delay (GstDvdSubDec * dec); + static gboolean gst_dvd_sub_dec_sink_event (GstPad * pad, GstEvent * event); + static gboolean gst_dvd_sub_dec_sink_setcaps (GstPad * pad, GstCaps * caps); ++static void gst_dvd_sub_set_property (GObject * object, guint prop_id, ++ const GValue * value, GParamSpec * pspec); ++static void gst_dvd_sub_get_property (GObject * object, guint prop_id, ++ GValue * value, GParamSpec * pspec); + + static GstFlowReturn gst_send_subtitle_frame (GstDvdSubDec * dec, + GstClockTime end_ts); +@@ -100,6 +104,9 @@ + } + RLE_state; + ++#define ARG_SINGLEBUFFER 0x01 ++#define DEFAULT_SINGLEBUFFER FALSE ++ + static void + gst_dvd_sub_dec_base_init (gpointer klass) + { +@@ -123,6 +130,13 @@ + + gobject_class = (GObjectClass *) klass; + ++ gobject_class->set_property = gst_dvd_sub_set_property; ++ gobject_class->get_property = gst_dvd_sub_get_property; ++ ++ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SINGLEBUFFER, ++ g_param_spec_boolean ("singlebuffer", "Single Buffer", "invoke only one single buffer upon changed dvd subpicture. false will output continuous video stream", ++ DEFAULT_SINGLEBUFFER, G_PARAM_READWRITE)); ++ + gobject_class->finalize = gst_dvd_sub_dec_finalize; + } + +@@ -167,6 +181,40 @@ + dec->out_buffer = NULL; + dec->buf_dirty = TRUE; + dec->use_ARGB = FALSE; ++ ++ dec->singlebuffer = DEFAULT_SINGLEBUFFER; ++} ++ ++static void ++gst_dvd_sub_set_property (GObject * object, guint prop_id, ++ const GValue * value, GParamSpec * pspec) ++{ ++ GstDvdSubDec *src; ++ ++ src = GST_DVD_SUB_DEC (object); ++ ++ switch (prop_id) { ++ case ARG_SINGLEBUFFER: ++ src->singlebuffer = g_value_get_boolean (value); ++ break; ++ default: ++ break; ++ } ++} ++ ++static void ++gst_dvd_sub_get_property (GObject * object, guint prop_id, GValue * value, ++ GParamSpec * pspec) ++{ ++ GstDvdSubDec *src; ++ ++ src = GST_DVD_SUB_DEC (object); ++ ++ switch (prop_id) { ++ case ARG_SINGLEBUFFER: ++ g_value_set_boolean (value, src->singlebuffer); ++ break; ++ } + } + + static void +@@ -697,6 +745,8 @@ + dec->out_buffer = out_buf; + dec->buf_dirty = FALSE; + } ++ else if (dec->singlebuffer) ++ goto out; + + out_buf = gst_buffer_create_sub (dec->out_buffer, 0, + GST_BUFFER_SIZE (dec->out_buffer)); +diff -u a/gst/dvdsub/gstdvdsubdec.h b/gst/dvdsub/gstdvdsubdec.h +--- a/gst/dvdsub//gstdvdsubdec.h 2009-05-21 20:45:29.000000000 +0200 ++++ b/gst/dvdsub/gstdvdsubdec.h 2010-05-26 13:39:32.000000000 +0200 +@@ -91,6 +91,8 @@ + + GstBuffer *out_buffer; + gboolean buf_dirty; ++ ++ gboolean singlebuffer; + }; + + struct _GstDvdSubDecClass diff --git a/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-ugly-0.10.19/fix-opencore-amr-1.patch b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-ugly-0.10.19/fix-opencore-amr-1.patch new file mode 100644 index 0000000..042cd9d --- /dev/null +++ b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-ugly-0.10.19/fix-opencore-amr-1.patch @@ -0,0 +1,55 @@ +Upstream-Status: Backport + +From 593ddf4bb9dc3c4d97bdde8d087db42147511274 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim.muller@collabora.co.uk> +Date: Sat, 3 Mar 2012 16:56:13 +0000 +Subject: [PATCH 1/2] configure: get rid of non-pkg-config ways to check for + opencore-amr + +--- + configure.ac | 22 ++++++++++------------ + 1 file changed, 10 insertions(+), 12 deletions(-) + +diff --git a/configure.ac b/configure.ac +index e5be3ed..3c2e341 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -250,12 +250,11 @@ AG_GST_CHECK_FEATURE(A52DEC, [a52dec], a52dec, [ + dnl *** amr-nb *** + translit(dnm, m, l) AM_CONDITIONAL(USE_AMRNB, true) + AG_GST_CHECK_FEATURE(AMRNB, [amrnb library], amrnb, [ +- PKG_CHECK_MODULES(AMRNB, opencore-amrnb, HAVE_AMRNB="yes", +- [ AG_GST_CHECK_LIBHEADER(AMRNB, opencore-amrnb, +- Decoder_Interface_init, $LIBM, +- opencore-amrnb/interf_dec.h, +- AMRNB_LIBS="-lopencore-amrnb") +- ]) ++ PKG_CHECK_MODULES(AMRNB, opencore-amrnb, [ ++ HAVE_AMRNB="yes" ++ ], [ ++ HAVE_AMRNB="no" ++ ]) + AC_SUBST(AMRNB_CFLAGS) + AC_SUBST(AMRNB_LIBS) + ]) +@@ -263,12 +262,11 @@ AG_GST_CHECK_FEATURE(AMRNB, [amrnb library], amrnb, [ + dnl *** amr-wb dec *** + translit(dnm, m, l) AM_CONDITIONAL(USE_AMRWB, true) + AG_GST_CHECK_FEATURE(AMRWB, [amrwb library], amrwbdec, [ +- PKG_CHECK_MODULES(AMRWB, opencore-amrwb, HAVE_AMRWB="yes", +- [ AG_GST_CHECK_LIBHEADER(AMRWB, opencore-amrwb, +- D_IF_decode, , +- opencore-amrwb/dec_if.h, +- AMRWB_LIBS="-lopencore-amrwb") +- ]) ++ PKG_CHECK_MODULES(AMRWB, opencore-amrwb, [ ++ HAVE_AMRWB="yes" ++ ], [ ++ HAVE_AMRWB="no" ++ ]) + AC_SUBST(AMRWB_CFLAGS) + AC_SUBST(AMRWB_LIBS) + ]) +-- +1.7.9.5 + diff --git a/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-ugly-0.10.19/fix-opencore-amr-2.patch b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-ugly-0.10.19/fix-opencore-amr-2.patch new file mode 100644 index 0000000..4828feb --- /dev/null +++ b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-ugly-0.10.19/fix-opencore-amr-2.patch @@ -0,0 +1,105 @@ +Upstream-Status: Backport + +From 425e6e395f6bcaff77d0393126e1253066ddcd8a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim.muller@collabora.co.uk> +Date: Sat, 3 Mar 2012 17:17:31 +0000 +Subject: [PATCH 2/2] amrnb, amrwbdec: fix build with opencore-amr >= 0.1.3 + +In previous versions, the opencore-amr include sub-directory +would be specified in the include path in the CFLAGS, but this +is no longer the case in newer versions, so we need to add those +to our include directives. + +Based on patch by: Christian Morales Vega + +https://bugzilla.gnome.org/show_bug.cgi?id=671123 +--- + configure.ac | 6 ++++++ + ext/amrnb/amrnbdec.h | 5 +++++ + ext/amrnb/amrnbenc.h | 7 ++++++- + ext/amrwbdec/amrwbdec.h | 6 ++++++ + 4 files changed, 23 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 3c2e341..18f2904 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -251,6 +251,9 @@ dnl *** amr-nb *** + translit(dnm, m, l) AM_CONDITIONAL(USE_AMRNB, true) + AG_GST_CHECK_FEATURE(AMRNB, [amrnb library], amrnb, [ + PKG_CHECK_MODULES(AMRNB, opencore-amrnb, [ ++ if $PKG_CONFIG --atleast-version=0.1.3 opencore-amrnb; then ++ AC_DEFINE(HAVE_OPENCORE_AMRNB_0_1_3_OR_LATER, 1, [Defined for newer opencore-amrnb]) ++ fi + HAVE_AMRNB="yes" + ], [ + HAVE_AMRNB="no" +@@ -263,6 +266,9 @@ dnl *** amr-wb dec *** + translit(dnm, m, l) AM_CONDITIONAL(USE_AMRWB, true) + AG_GST_CHECK_FEATURE(AMRWB, [amrwb library], amrwbdec, [ + PKG_CHECK_MODULES(AMRWB, opencore-amrwb, [ ++ if $PKG_CONFIG --atleast-version=0.1.3 opencore-amrwb; then ++ AC_DEFINE(HAVE_OPENCORE_AMRWB_0_1_3_OR_LATER, 1, [Defined for newer opencore-amrwb]) ++ fi + HAVE_AMRWB="yes" + ], [ + HAVE_AMRWB="no" +diff --git a/ext/amrnb/amrnbdec.h b/ext/amrnb/amrnbdec.h +index 1e81839..5fe6982 100644 +--- a/ext/amrnb/amrnbdec.h ++++ b/ext/amrnb/amrnbdec.h +@@ -22,7 +22,12 @@ + + #include <gst/gst.h> + #include <gst/audio/gstaudiodecoder.h> ++ ++#ifdef HAVE_OPENCORE_AMRNB_0_1_3_OR_LATER ++#include <opencore-amrnb/interf_dec.h> ++#else + #include <interf_dec.h> ++#endif + + G_BEGIN_DECLS + +diff --git a/ext/amrnb/amrnbenc.h b/ext/amrnb/amrnbenc.h +index 7f673ac..48a8fe8 100644 +--- a/ext/amrnb/amrnbenc.h ++++ b/ext/amrnb/amrnbenc.h +@@ -21,9 +21,14 @@ + #define __GST_AMRNBENC_H__ + + #include <gst/gst.h> +-#include <interf_enc.h> + #include <gst/audio/gstaudioencoder.h> + ++#ifdef HAVE_OPENCORE_AMRNB_0_1_3_OR_LATER ++#include <opencore-amrnb/interf_enc.h> ++#else ++#include <interf_enc.h> ++#endif ++ + G_BEGIN_DECLS + + #define GST_TYPE_AMRNBENC \ +diff --git a/ext/amrwbdec/amrwbdec.h b/ext/amrwbdec/amrwbdec.h +index c3528fc..6b82ae9 100644 +--- a/ext/amrwbdec/amrwbdec.h ++++ b/ext/amrwbdec/amrwbdec.h +@@ -22,8 +22,14 @@ + + #include <gst/gst.h> + #include <gst/audio/gstaudiodecoder.h> ++ ++#ifdef HAVE_OPENCORE_AMRWB_0_1_3_OR_LATER ++#include <opencore-amrwb/dec_if.h> ++#include <opencore-amrwb/if_rom.h> ++#else + #include <dec_if.h> + #include <if_rom.h> ++#endif + + G_BEGIN_DECLS + +-- +1.7.9.5 + diff --git a/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-ugly-0.10.19/orc.m4-fix-location-of-orcc-when-cross-compiling.patch b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-ugly-0.10.19/orc.m4-fix-location-of-orcc-when-cross-compiling.patch new file mode 100644 index 0000000..d1942cf --- /dev/null +++ b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-ugly-0.10.19/orc.m4-fix-location-of-orcc-when-cross-compiling.patch @@ -0,0 +1,39 @@ +From 114ec19a882192dfcb5f71bb12c811d0a3b7f324 Mon Sep 17 00:00:00 2001 +From: Andreas Oberritter <obi@opendreambox.org> +Date: Tue, 8 May 2012 17:27:55 +0200 +Subject: [PATCH] orc.m4: fix location of orcc when cross-compiling + +* Prepend PKG_CONFIG_SYSROOT to orcc, so configure doesn't + accidentially use an incompatible version of orcc installed + on the build system. + +Signed-off-by: Andreas Oberritter <obi@opendreambox.org> +--- + m4/orc.m4 | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/common/m4/orc.m4 b/common/m4/orc.m4 +index 26b2459..81b111e 100644 +--- a/common/m4/orc.m4 ++++ b/common/m4/orc.m4 +@@ -3,6 +3,8 @@ dnl pkg-config-based checks for Orc + dnl specific: + dnl ORC_CHECK([REQUIRED_VERSION]) + ++m4_pattern_allow(PKG_CONFIG_SYSROOT_DIR) ++ + AC_DEFUN([ORC_CHECK], + [ + ORC_REQ=ifelse([$1], , "0.4.6", [$1]) +@@ -24,7 +26,7 @@ AC_DEFUN([ORC_CHECK], + HAVE_ORC=yes + if test "x$ORCC" = "x" ; then + AC_MSG_CHECKING(for usable orcc) +- ORCC=`$PKG_CONFIG --variable=orcc orc-0.4` ++ ORCC=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=orcc orc-0.4` + dnl check whether the orcc found by pkg-config can be run from the build environment + dnl if this is not the case (e.g. when cross-compiling) fall back to orcc from PATH + AS_IF([$ORCC --version 1> /dev/null 2> /dev/null], [], [ORCC=`which orcc`]) +-- +1.7.9.5 + diff --git a/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-ugly_0.10.19.bbappend b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-ugly_0.10.19.bbappend new file mode 100644 index 0000000..581f4b2 --- /dev/null +++ b/meta-openvuplus/recipes-multimedia/gstreamer/gst-plugins-ugly_0.10.19.bbappend @@ -0,0 +1,11 @@ +DEPENDS += "libcdio opencore-amr" +PR .= "-vuplus0" + +SRC_URI += "file://dvdsubdec-addproperty-singlebuffer.patch \ + file://fix-opencore-amr-1.patch \ + file://fix-opencore-amr-2.patch \ + file://orc.m4-fix-location-of-orcc-when-cross-compiling.patch" + +EXTRA_OECONF += "--enable-orc --with-plugins=" + +FILESEXTRAPATHS_prepend := "${THISDIR}/${P}:" |