gst-play: Fix trick-mode handling.

The instant-rate value in the TrickMode enum is a
flag, but the other values are not. Move instant-rate
to the end of the enum and give it a value large enough
for it to be used without modifying the trick-mode
setting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1788>
This commit is contained in:
Jan Schmidt 2022-01-22 01:30:57 +11:00 committed by GStreamer Marge Bot
parent 19b638debe
commit 1726361622

View file

@ -61,8 +61,14 @@ typedef enum
GST_PLAY_TRICK_MODE_DEFAULT_NO_AUDIO,
GST_PLAY_TRICK_MODE_KEY_UNITS,
GST_PLAY_TRICK_MODE_KEY_UNITS_NO_AUDIO,
GST_PLAY_TRICK_MODE_INSTANT_RATE,
GST_PLAY_TRICK_MODE_LAST
GST_PLAY_TRICK_MODE_LAST,
/* The instant-rate setting is a flag,
* applied on top of the trick-mode enum value.
* It needs to have a 2^n value bigger than
* any of the enum values so setting it
* won't affect the trickmode value */
GST_PLAY_TRICK_MODE_INSTANT_RATE = (1 << 3)
} GstPlayTrickMode;
typedef enum