[meego-commits] 24088: Changes to devel:tv:1.2/gst-plugins-flumpegdemux
zwu28
no_reply at build.meego.com
Thu Sep 22 09:33:25 UTC 2011
Hi,
I have made the following changes to gst-plugins-flumpegdemux in project devel:tv:1.2. Please review and accept ASAP.
Thank You,
zwu28
[This message was auto-generated]
---
Request #24088:
submit: home:zwu28:branches:devel:tv:1.2/gst-plugins-flumpegdemux(r3)(noupdate) -> devel:tv:1.2/gst-plugins-flumpegdemux
Message:
Issue no-more-pad signal when all elementary stream found to help start playing dvb quickly.
State: new 2011-09-22T02:22:20 zwu28
Comment: None
changes files:
--------------
--- gst-plugins-flumpegdemux.changes
+++ gst-plugins-flumpegdemux.changes
@@ -0,0 +1,3 @@
+* Thu Sep 22 2011 Zhiwen Wu <zhiwen.wu at intel.com> - 0.10.58
+- Issue no-more-pad signal when all elementary stream found to help start play dvb more quickly.
+
spec files:
-----------
other changes:
--------------
++++++ gst-fluendo-mpegdemux-0.10.58.tar.bz2
--- src/gstmpegtsdemux.c
+++ src/gstmpegtsdemux.c
@@ -200,6 +200,8 @@
static FluTsPmtInfo *fluts_demux_build_pmt_info (GstFluTSDemux * demux,
guint16 pmt_pid);
+static gboolean gst_fluts_demux_no_more_pads (GstFluTSDemux *demux);
+
static GstElementClass *parent_class = NULL;
@@ -1256,6 +1258,12 @@
/* activate and add */
gst_pad_set_active (srcpad, TRUE);
gst_element_add_pad (GST_ELEMENT_CAST (demux), srcpad);
+ if (gst_fluts_demux_no_more_pads (demux)) {
+ GST_DEBUG_OBJECT (demux, "all elementary pads added, issue no-more-pads signal");
+ gst_element_no_more_pads ((GstElement *) demux);
+ }
+ demux->need_no_more_pads = TRUE;
+
demux->need_no_more_pads = TRUE;
stream->discont = TRUE;
@@ -3454,3 +3462,43 @@
return TRUE;
}
+
+gboolean
+gst_fluts_demux_no_more_pads (GstFluTSDemux *demux)
+{
+ gint i;
+ GstFluTSPMT *PMT = NULL;
+ GstFluTSStream *stream = NULL;
+
+ g_return_val_if_fail (demux, FALSE);
+
+
+ //check the elementary stream from pmt
+ if (demux->current_PMT == 0 || demux->streams[demux->current_PMT] == NULL)
+ return FALSE;
+
+ PMT = &(demux->streams[demux->current_PMT]->PMT);
+
+ for (i = 0; i < PMT->entries->len; i++) {
+ GstFluTSPMTEntry *cur_entry = &g_array_index (PMT->entries, GstFluTSPMTEntry, i);
+ stream = demux->streams[cur_entry->PID];
+ if (!stream->pad) {
+ return FALSE;
+ }
+ }
+
+ if (!demux->elementary_pids || demux->nb_elementary_pids == 0) {
+ //no es pids provided
+ return TRUE;
+ }
+
+ //check extra stream created by PROP_ES_PIDS property
+ for (i = 0; i < demux->nb_elementary_pids; i++) {
+ stream = demux->streams[demux->elementary_pids[i]];
+ if (!stream->pad) {
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+}
More information about the MeeGo-commits
mailing list