diff options
author | Bastien Nocera <hadess@hadess.net> | 2022-11-25 12:10:32 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2022-11-30 10:33:30 +0100 |
commit | 1ec231d65867a144b9cefd40edfbf921a19ef120 (patch) | |
tree | c5d58a7f8e22f65ddfbfd14d94a23d8729ca496c /src/backend | |
parent | 405bc84b687d8f5259db19fe049ec9610e99cd15 (diff) | |
download | totem-1ec231d65867a144b9cefd40edfbf921a19ef120.tar.gz |
backend: Move min/max playback rates to constants
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/bacon-video-widget.c | 4 | ||||
-rw-r--r-- | src/backend/bacon-video-widget.h | 14 |
2 files changed, 16 insertions, 2 deletions
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c index f232fd17f..5acdebc6d 100644 --- a/src/backend/bacon-video-widget.c +++ b/src/backend/bacon-video-widget.c @@ -5735,9 +5735,9 @@ bacon_video_widget_set_rate (BaconVideoWidget *bvw, return TRUE; /* set upper and lower limit for rate */ - if (new_rate < 0.5) + if (new_rate < BVW_MIN_RATE) return retval; - if (new_rate > 2.0) + if (new_rate > BVW_MAX_RATE) return retval; if (gst_element_query_position (bvw->play, GST_FORMAT_TIME, &cur)) { diff --git a/src/backend/bacon-video-widget.h b/src/backend/bacon-video-widget.h index 3964c6118..8cf483a97 100644 --- a/src/backend/bacon-video-widget.h +++ b/src/backend/bacon-video-widget.h @@ -138,6 +138,20 @@ void bacon_video_widget_set_user_agent (BaconVideoWidget *bvw, void bacon_video_widget_set_referrer (BaconVideoWidget *bvw, const char *referrer); +/** + * BVW_MIN_RATE: + * + * The minimum playback rate as a float. + */ +#define BVW_MIN_RATE 0.5 + +/** + * BVW_MAX_RATE: + * + * The maximum playback rate as a float. + */ +#define BVW_MAX_RATE 2.0 + gboolean bacon_video_widget_set_rate (BaconVideoWidget *bvw, gfloat new_rate); gfloat bacon_video_widget_get_rate (BaconVideoWidget *bvw); |