diff options
-rw-r--r-- | gst/isomp4/qtdemux.c | 37 | ||||
-rw-r--r-- | gst/isomp4/qtdemux.h | 8 |
2 files changed, 35 insertions, 10 deletions
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index d4f4c99c7..27f6775a5 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -415,13 +415,22 @@ struct _QtDemuxCencSampleSetInfo GPtrArray *crypto_info; }; -enum QtDemuxState +static const gchar * +qt_demux_state_string (enum QtDemuxState state) { - QTDEMUX_STATE_INITIAL, /* Initial state (haven't got the header yet) */ - QTDEMUX_STATE_HEADER, /* Parsing the header */ - QTDEMUX_STATE_MOVIE, /* Parsing/Playing the media data */ - QTDEMUX_STATE_BUFFER_MDAT /* Buffering the mdat atom */ -}; + switch (state) { + case QTDEMUX_STATE_INITIAL: + return "<INITIAL>"; + case QTDEMUX_STATE_HEADER: + return "<HEADER>"; + case QTDEMUX_STATE_MOVIE: + return "<MOVIE>"; + case QTDEMUX_STATE_BUFFER_MDAT: + return "<BUFFER_MDAT>"; + default: + return "<UNKNOWN>"; + } +} static GNode *qtdemux_tree_get_child_by_type (GNode * node, guint32 fourcc); static GNode *qtdemux_tree_get_child_by_type_full (GNode * node, @@ -5656,8 +5665,8 @@ gst_qtdemux_loop (GstPad * pad) qtdemux = GST_QTDEMUX (gst_pad_get_parent (pad)); cur_offset = qtdemux->offset; - GST_LOG_OBJECT (qtdemux, "loop at position %" G_GUINT64_FORMAT ", state %d", - cur_offset, qtdemux->state); + GST_LOG_OBJECT (qtdemux, "loop at position %" G_GUINT64_FORMAT ", state %s", + cur_offset, qt_demux_state_string (qtdemux->state)); switch (qtdemux->state) { case QTDEMUX_STATE_INITIAL: @@ -6021,6 +6030,13 @@ gst_qtdemux_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * inbuf) demux = GST_QTDEMUX (parent); + GST_DEBUG_OBJECT (demux, + "Received buffer pts:%" GST_TIME_FORMAT " dts:%" GST_TIME_FORMAT + " offset:%" G_GUINT64_FORMAT " size:%" G_GSIZE_FORMAT, + GST_TIME_ARGS (GST_BUFFER_PTS (inbuf)), + GST_TIME_ARGS (GST_BUFFER_DTS (inbuf)), GST_BUFFER_OFFSET (inbuf), + gst_buffer_get_size (inbuf)); + if (GST_BUFFER_FLAG_IS_SET (inbuf, GST_BUFFER_FLAG_DISCONT)) { gint i; @@ -6066,8 +6082,9 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force) (ret == GST_FLOW_OK || (ret == GST_FLOW_NOT_LINKED && force))) { GST_DEBUG_OBJECT (demux, - "state:%d , demux->neededbytes:%d, demux->offset:%" G_GUINT64_FORMAT, - demux->state, demux->neededbytes, demux->offset); + "state:%s , demux->neededbytes:%d, demux->offset:%" G_GUINT64_FORMAT, + qt_demux_state_string (demux->state), demux->neededbytes, + demux->offset); switch (demux->state) { case QTDEMUX_STATE_INITIAL:{ diff --git a/gst/isomp4/qtdemux.h b/gst/isomp4/qtdemux.h index 0b9a4f399..40dd3a735 100644 --- a/gst/isomp4/qtdemux.h +++ b/gst/isomp4/qtdemux.h @@ -54,6 +54,14 @@ typedef struct _GstQTDemux GstQTDemux; typedef struct _GstQTDemuxClass GstQTDemuxClass; typedef struct _QtDemuxStream QtDemuxStream; +enum QtDemuxState +{ + QTDEMUX_STATE_INITIAL, /* Initial state (haven't got the header yet) */ + QTDEMUX_STATE_HEADER, /* Parsing the header */ + QTDEMUX_STATE_MOVIE, /* Parsing/Playing the media data */ + QTDEMUX_STATE_BUFFER_MDAT /* Buffering the mdat atom */ +}; + struct _GstQTDemux { GstElement element; |