mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 16:21:17 +00:00
ext/mpeg2dec/gstmpeg2dec.*: Add some debugging to timestamp handling.
Original commit message from CVS: * ext/mpeg2dec/gstmpeg2dec.c: (handle_slice): * ext/mpeg2dec/gstmpeg2dec.h: Add some debugging to timestamp handling. Make sure we don't convert invalid timestamps.
This commit is contained in:
parent
3a38311f01
commit
af08dc2cae
3 changed files with 20 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
|||
2006-10-10 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* ext/mpeg2dec/gstmpeg2dec.c: (handle_slice):
|
||||
* ext/mpeg2dec/gstmpeg2dec.h:
|
||||
Add some debugging to timestamp handling.
|
||||
Make sure we don't convert invalid timestamps.
|
||||
|
||||
2006-10-09 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_sink_event),
|
||||
|
|
|
@ -774,12 +774,19 @@ handle_slice (GstMpeg2dec * mpeg2dec, const mpeg2_info_t * info)
|
|||
time = GST_CLOCK_TIME_NONE;
|
||||
|
||||
#if MPEG2_RELEASE < MPEG2_VERSION(0,4,0)
|
||||
if (picture->flags & PIC_FLAG_PTS)
|
||||
if (picture->flags & PIC_FLAG_PTS) {
|
||||
time = MPEG_TIME_TO_GST_TIME (picture->pts);
|
||||
GST_DEBUG_OBJECT (mpeg2dec, "picture pts %" G_GUINT64_FORMAT
|
||||
", time %" GST_TIME_FORMAT, picture->pts, GST_TIME_ARGS (time));
|
||||
}
|
||||
#else
|
||||
if (picture->flags & PIC_FLAG_TAGS)
|
||||
time = MPEG_TIME_TO_GST_TIME ((GstClockTime) (picture->
|
||||
tag2) << 32 | picture->tag);
|
||||
if (picture->flags & PIC_FLAG_TAGS) {
|
||||
guint64 pts = (((guint64) picture->tag2) << 32) | picture->tag;
|
||||
|
||||
time = MPEG_TIME_TO_GST_TIME (pts);
|
||||
GST_DEBUG_OBJECT (mpeg2dec, "picture tags %" G_GUINT64_FORMAT
|
||||
", time %" GST_TIME_FORMAT, pts, GST_TIME_ARGS (time));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (time == GST_CLOCK_TIME_NONE) {
|
||||
|
|
|
@ -38,8 +38,8 @@ G_BEGIN_DECLS
|
|||
#define GST_IS_MPEG2DEC_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MPEG2DEC))
|
||||
|
||||
#define MPEG_TIME_TO_GST_TIME(time) (((time) * (GST_MSECOND/10)) / 9LL)
|
||||
#define GST_TIME_TO_MPEG_TIME(time) (((time) * 9LL) / (GST_MSECOND/10))
|
||||
#define MPEG_TIME_TO_GST_TIME(time) ((time) == -1 ? -1 : ((time) * (GST_MSECOND/10)) / 9LL)
|
||||
#define GST_TIME_TO_MPEG_TIME(time) ((time) == -1 ? -1 : ((time) * 9LL) / (GST_MSECOND/10))
|
||||
|
||||
typedef struct _GstMpeg2dec GstMpeg2dec;
|
||||
typedef struct _GstMpeg2decClass GstMpeg2decClass;
|
||||
|
|
Loading…
Reference in a new issue