Commit 21a02e76 authored by Mathieu Duponchelle's avatar Mathieu Duponchelle 🐸 Committed by Mathieu Duponchelle

gstsegment: Add GST_SEEK_FLAG_TRICKMODE_FORWARD_PREDICTED

This is generally useful, and mandated by the ONVIF streaming
spec, section 6.5.3

<https://www.onvif.org/specs/stream/ONVIF-Streaming-Spec.pdf>
parent cc9c3c31
......@@ -354,6 +354,8 @@ gst_segment_do_seek (GstSegment * segment, gdouble rate,
segment->flags |= GST_SEGMENT_FLAG_TRICKMODE_KEY_UNITS;
if ((flags & GST_SEEK_FLAG_TRICKMODE_NO_AUDIO) != 0)
segment->flags |= GST_SEGMENT_FLAG_TRICKMODE_NO_AUDIO;
if ((flags & GST_SEEK_FLAG_TRICKMODE_FORWARD_PREDICTED) != 0)
segment->flags |= GST_SEGMENT_FLAG_TRICKMODE_FORWARD_PREDICTED;
segment->rate = rate;
segment->applied_rate = 1.0;
......
......@@ -73,6 +73,11 @@ typedef enum {
* playback, request that elements only decode keyframes
* and skip all other content, for formats that have
* keyframes. (Since: 1.6)
* @GST_SEEK_FLAG_TRICKMODE_FORWARD_PREDICTED: When doing fast forward or fast reverse
* playback, request that elements only decode keyframes and
* forward predicted frames and skip all other content (for example
* B-Frames), for formats that have keyframes and forward predicted
* frames. (Since: 1.18)
* @GST_SEEK_FLAG_TRICKMODE_NO_AUDIO: when doing fast forward or fast reverse
* playback, request that audio decoder elements skip
* decoding and output only gap events or silence. (Since: 1.6)
......@@ -137,6 +142,7 @@ typedef enum {
/* Careful to restart next flag with 1<<7 here */
GST_SEEK_FLAG_TRICKMODE_KEY_UNITS = (1 << 7),
GST_SEEK_FLAG_TRICKMODE_NO_AUDIO = (1 << 8),
GST_SEEK_FLAG_TRICKMODE_FORWARD_PREDICTED = (1 << 9),
} GstSeekFlags;
/**
......@@ -148,6 +154,8 @@ typedef enum {
* @GST_SEGMENT_FLAG_SEGMENT: send SEGMENT_DONE instead of EOS
* @GST_SEGMENT_FLAG_TRICKMODE_KEY_UNITS: Decode only keyframes, where
* possible (Since: 1.6)
* @GST_SEGMENT_FLAG_TRICKMODE_FORWARD_PREDICTED: Decode only keyframes or forward
* predicted frames, where possible (Since: 1.18)
* @GST_SEGMENT_FLAG_TRICKMODE_NO_AUDIO: Do not decode any audio, where
* possible (Since: 1.6)
* @GST_SEGMENT_FLAG_SKIP: Deprecated backward compatibility flag, replaced
......@@ -166,6 +174,7 @@ typedef enum { /*< flags >*/
GST_SEGMENT_FLAG_SKIP = GST_SEEK_FLAG_TRICKMODE,
GST_SEGMENT_FLAG_SEGMENT = GST_SEEK_FLAG_SEGMENT,
GST_SEGMENT_FLAG_TRICKMODE_KEY_UNITS = GST_SEEK_FLAG_TRICKMODE_KEY_UNITS,
GST_SEGMENT_FLAG_TRICKMODE_FORWARD_PREDICTED = GST_SEEK_FLAG_TRICKMODE_FORWARD_PREDICTED,
GST_SEGMENT_FLAG_TRICKMODE_NO_AUDIO = GST_SEEK_FLAG_TRICKMODE_NO_AUDIO
} GstSegmentFlags;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment