mpegtsbase/tsdemux: Cleanups and comments

This commit is contained in:
Edward Hervey 2011-07-16 13:47:45 +02:00
parent 9f1511e998
commit a00900367a
3 changed files with 12 additions and 5 deletions

View file

@ -72,9 +72,12 @@ struct _MpegTSBaseProgram
};
typedef enum {
BASE_MODE_SCANNING,
BASE_MODE_SEEKING,
BASE_MODE_STREAMING,
/* PULL MODE */
BASE_MODE_SCANNING, /* Looking for PAT/PMT */
BASE_MODE_SEEKING, /* Seeking */
BASE_MODE_STREAMING, /* Normal mode (pushing out data) */
/* PUSH MODE */
BASE_MODE_PUSHING
} MpegTSBaseMode;
@ -134,6 +137,7 @@ struct _MpegTSBaseClass {
void (*reset) (MpegTSBase *base);
GstFlowReturn (*push) (MpegTSBase *base, MpegTSPacketizerPacket *packet, MpegTSPacketizerSection * section);
gboolean (*push_event) (MpegTSBase *base, GstEvent * event);
/* program_started gets called when program's pmt arrives for first time */
void (*program_started) (MpegTSBase *base, MpegTSBaseProgram *program);
/* program_stopped gets called when pat no longer has program's pmt */

View file

@ -110,6 +110,7 @@ struct _TSDemuxStream
GstBufferListIterator *currentit;
GList *currentlist;
/* Current PTS for this stream */
GstClockTime pts;
};
@ -305,6 +306,7 @@ static void
gst_ts_demux_reset (MpegTSBase * base)
{
GstTSDemux *demux = (GstTSDemux *) base;
if (demux->index) {
g_array_free (demux->index, TRUE);
demux->index = NULL;
@ -2409,5 +2411,5 @@ gst_ts_demux_plugin_init (GstPlugin * plugin)
"MPEG transport stream demuxer");
return gst_element_register (plugin, "tsdemux",
GST_RANK_SECONDARY, GST_TYPE_TS_DEMUX);
GST_RANK_PRIMARY + 42, GST_TYPE_TS_DEMUX);
}

View file

@ -70,6 +70,7 @@ struct _GstTSDemux
MpegTSBaseProgram *program; /* Current program */
guint current_program_number;
gboolean need_newsegment;
/* Downstream segment */
GstSegment segment;
GstClockTime duration; /* Total duration */