diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-10-27 17:23:46 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-10-27 17:24:16 +0200 |
commit | 338b18ac633306cf624089dc4e6c6293013537f9 (patch) | |
tree | 818eda6cb6353b86a35b0ad185e85aead8c6ffbd | |
parent | a23202562acfa39dc0e3fc95cc21131da781b931 (diff) |
player: Require scaletempo >= 1.6.1 for audio pitch preserving during trick modes
Fixes https://github.com/sdroege/gst-player/issues/118
-rw-r--r-- | lib/gst/player/gstplayer.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/gst/player/gstplayer.c b/lib/gst/player/gstplayer.c index e6b5b7a..aa266e3 100644 --- a/lib/gst/player/gstplayer.c +++ b/lib/gst/player/gstplayer.c @@ -2382,7 +2382,14 @@ gst_player_main (gpointer data) scaletempo = gst_element_factory_make ("scaletempo", NULL); if (scaletempo) { - g_object_set (self->playbin, "audio-filter", scaletempo, NULL); + if (gst_plugin_feature_check_version (GST_PLUGIN_FEATURE + (gst_element_get_factory (scaletempo)), 1, 6, 1)) { + g_object_set (self->playbin, "audio-filter", scaletempo, NULL); + } else { + gst_object_unref (scaletempo); + g_warning ("GstPlayer: scaletempo >= 1.6.1 is needed for preserving " + "audio pitch during trick modes"); + } } else { g_warning ("GstPlayer: scaletempo element not available. Audio pitch " "will not be preserved during trick modes"); |