/* i think everything is already zero'd, but oh well*/
for (i=0;i<NUM_PRIVATE_1_PADS;i++) {
mpeg_demux->private_1_pad[i] = NULL;
- mpeg_demux->private_1_offset[i] = 0;
+ mpeg_demux->private_1_PTS[i] = 0;
}
for (i=0;i<NUM_SUBTITLE_PADS;i++) {
mpeg_demux->subtitle_pad[i] = NULL;
/* if we don't know what it is, bail */
if (outpad == NULL) {
GST_DEBUG (0,"mpeg_demux::parse_packet: unknown packet id 0x%02X !!", id);
- /* return total number of bytes */
return FALSE;
}
/* FIXME, this should be done in parse_syshead */
if ((*outpad) == NULL) {
GST_DEBUG (0,"mpeg_demux::parse_packet: unexpected packet id 0x%02X!!", id);
- /* return total number of bytes */
return FALSE;
}
/* scrap first 4 bytes (so-called "mystery AC3 tag") */
headerlen += 4;
datalen -= 4;
+ if (pts == -1)
+ pts = mpeg_demux->private_1_PTS[ps_id_code - 0x80];
+ else
+ mpeg_demux->private_1_PTS[ps_id_code - 0x80] = pts;
}
else if ((ps_id_code >= 0x20) && (ps_id_code <= 0x2f)) {
GST_DEBUG (0,"mpeg_demux: we have a subtitle_stream packet, track %d",
gst_pad_push((*outpad),outbuf);
}
- /* return total number of bytes */
return TRUE;
}
gint16 STD_buffer_size_bound;
};
+typedef struct _GstMPEG1StreamContext GstMPEG1StreamContext;
+
+struct _GstMPEGStreamContext {
+ GstPad *pad;
+ guint64 pts;
+};
+
struct _GstMPEGDemux {
GstMPEGParse parent;
/* stream output pads */
GstPad *private_1_pad[NUM_PRIVATE_1_PADS]; /* up to 8 ac3 audio tracks */
- gulong private_1_offset[NUM_PRIVATE_1_PADS];
+ gulong private_1_PTS[NUM_PRIVATE_1_PADS];
GstPad *subtitle_pad[NUM_SUBTITLE_PADS];
gulong subtitle_offset[NUM_SUBTITLE_PADS];