From: Edward Hervey Date: Mon, 31 Oct 2016 09:08:04 +0000 (+0100) Subject: adaptivedemux: Add a macro to know if we are in trickmode-keyunit X-Git-Tag: 1.19.3~507^2~5261 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=453227771570820f2dc5565c520bc6f593edc041;p=platform%2Fupstream%2Fgstreamer.git adaptivedemux: Add a macro to know if we are in trickmode-keyunit Reduces the amount of lines of code in subclasses --- diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.h b/gst-libs/gst/adaptivedemux/gstadaptivedemux.h index 8301714..d59fa0e 100644 --- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.h +++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.h @@ -59,6 +59,8 @@ G_BEGIN_DECLS */ #define GST_ADAPTIVE_DEMUX_SINK_PAD(obj) (((GstAdaptiveDemux *) (obj))->sinkpad) +#define GST_ADAPTIVE_DEMUX_IN_TRICKMODE_KEY_UNITS(obj) ((((GstAdaptiveDemux*)(obj))->segment.flags & GST_SEGMENT_FLAG_TRICKMODE_KEY_UNITS) == GST_SEGMENT_FLAG_TRICKMODE_KEY_UNITS) + #define GST_ADAPTIVE_DEMUX_STREAM_PAD(obj) (((GstAdaptiveDemuxStream *) (obj))->pad) #define GST_ADAPTIVE_DEMUX_STREAM_NEED_HEADER(obj) (((GstAdaptiveDemuxStream *) (obj))->need_header)