};
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;
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 */
void (*stream_removed) (MpegTSBase *base, MpegTSBaseStream *stream);
/* find_timestamps is called to find PCR */
- GstFlowReturn (*find_timestamps) (MpegTSBase * base, guint64 initoff, guint64 *offset);
+ GstFlowReturn (*find_timestamps) (MpegTSBase * base, guint64 initoff, guint64 *offset);
/* seek is called to wait for seeking */
GstFlowReturn (*seek) (MpegTSBase * base, GstEvent * event, guint16 pid);
GstBufferListIterator *currentit;
GList *currentlist;
+ /* Current PTS for this stream */
GstClockTime pts;
};
gst_ts_demux_reset (MpegTSBase * base)
{
GstTSDemux *demux = (GstTSDemux *) base;
+
if (demux->index) {
g_array_free (demux->index, TRUE);
demux->index = NULL;
"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);
}
MpegTSBaseProgram *program; /* Current program */
guint current_program_number;
gboolean need_newsegment;
+ /* Downstream segment */
GstSegment segment;
GstClockTime duration; /* Total duration */