From 444b1691884cf6334b282195fe56524ea28a864b Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Tue, 29 Mar 2011 15:39:07 +0200 Subject: [PATCH] basevideodecoder: add some header commentary --- gst-libs/gst/video/gstbasevideodecoder.h | 80 ++++++++++++++---------- 1 file changed, 48 insertions(+), 32 deletions(-) diff --git a/gst-libs/gst/video/gstbasevideodecoder.h b/gst-libs/gst/video/gstbasevideodecoder.h index 6727fbbb81..3c6ca76189 100644 --- a/gst-libs/gst/video/gstbasevideodecoder.h +++ b/gst-libs/gst/video/gstbasevideodecoder.h @@ -56,9 +56,10 @@ G_BEGIN_DECLS #define GST_BASE_VIDEO_DECODER_SRC_NAME "src" /** - * * GST_BASE_VIDEO_DECODER_FLOW_NEED_DATA: - * * - * */ + * GST_BASE_VIDEO_DECODER_FLOW_NEED_DATA: + * + * Returned while parsing to indicate more data is needed. + **/ #define GST_BASE_VIDEO_DECODER_FLOW_NEED_DATA GST_FLOW_CUSTOM_SUCCESS @@ -69,39 +70,54 @@ struct _GstBaseVideoDecoder { GstBaseVideoCodec base_video_codec; - /*< private >*/ - GstAdapter *input_adapter; - GstAdapter *output_adapter; - - gboolean have_sync; - gboolean discont; - - gboolean sink_clipping; - gboolean do_byte_time; - - gboolean have_src_caps; - - GstVideoFrame *current_frame; - - int distance_from_sync; - int reorder_depth; + /*< protected >*/ + gboolean sink_clipping; + gboolean do_byte_time; + gboolean packetized; - GstClockTime timestamp_offset; + /* parse tracking */ + /* input data */ + GstAdapter *input_adapter; + /* assembles current frame */ + GstAdapter *output_adapter; - guint64 input_offset; - guint64 frame_offset; - GstClockTime last_timestamp; - - guint64 base_picture_number; - - int field_index; - - gboolean packetized; - - GList *timestamps; + /*< private >*/ + /* FIXME move to real private part ? + * (and introduce a context ?) */ + /* ... being tracked here; + * only available during parsing */ + /* FIXME remove and add parameter to method */ + GstVideoFrame *current_frame; + /* relative offset of input data */ + guint64 input_offset; + /* relative offset of frame */ + guint64 frame_offset; + /* tracking ts and offsets */ + GList *timestamps; + /* whether parsing is in sync */ + gboolean have_sync; + + /* maybe sort-of protected ? */ + + /* need mark discont */ + gboolean discont; + /* src caps set */ + gboolean have_src_caps; + + /* combine to yield (presentation) ts */ + GstClockTime timestamp_offset; + int field_index; + + /* last outgoing ts */ + GstClockTime last_timestamp; + + /* no comment ... */ + guint64 base_picture_number; + int reorder_depth; + int distance_from_sync; /* FIXME before moving to base */ - void *padding[GST_PADDING_LARGE]; + void *padding[GST_PADDING_LARGE]; }; struct _GstBaseVideoDecoderClass -- 2.34.1