adaptivedemux: Add a macro to know if we are in trickmode-keyunit

Reduces the amount of lines of code in subclasses
This commit is contained in:
Edward Hervey 2016-10-31 10:08:04 +01:00 committed by Edward Hervey
parent 47abc9a09c
commit 4532277715

View file

@ -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)