-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clapper-gtk: video: Use "scaletempo" by default
Do not require applications to import GStreamer and their devs to learn its basics just to set this single element. Similarly as ClapperGtkVideo sets "clappersink" during construction, it can also set "scaletempo" as this is the most common choice for an audio filter. Elements can still be changed like before if desired by setting corresponding player properties.
- Loading branch information
Showing
2 changed files
with
13 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1108,6 +1108,11 @@ _fading_overlay_revealed_cb (GtkRevealer *revealer, | |
* | ||
* Creates a new #ClapperGtkVideo instance. | ||
* | ||
* Newly created video widget will also set some default GStreamer elements | ||
* on its [[email protected]]. This includes Clapper own video sink and | ||
* a "scaletempo" element as audio filter. Both can still be changed after | ||
* construction by setting corresponding player properties. | ||
* | ||
* Returns: a new video #GtkWidget. | ||
*/ | ||
GtkWidget * | ||
|
@@ -1397,7 +1402,7 @@ static void | |
clapper_gtk_video_constructed (GObject *object) | ||
{ | ||
ClapperGtkVideo *self = CLAPPER_GTK_VIDEO_CAST (object); | ||
GstElement *vsink = gst_element_factory_make ("clappersink", NULL); | ||
GstElement *afilter, *vsink; | ||
ClapperQueue *queue; | ||
|
||
self->player = clapper_player_new (); | ||
|
@@ -1408,6 +1413,8 @@ clapper_gtk_video_constructed (GObject *object) | |
g_signal_connect (self->player, "notify::video-sink", | ||
G_CALLBACK (_video_sink_changed_cb), self); | ||
|
||
vsink = gst_element_factory_make ("clappersink", NULL); | ||
|
||
/* FIXME: This is a temporary workaround for lack | ||
* of DMA_DRM negotiation support in sink itself */ | ||
if (G_LIKELY (vsink != NULL)) { | ||
|
@@ -1422,9 +1429,13 @@ clapper_gtk_video_constructed (GObject *object) | |
vsink = bin; | ||
} | ||
} | ||
|
||
clapper_player_set_video_sink (self->player, vsink); | ||
} | ||
|
||
clapper_player_set_video_sink (self->player, vsink); | ||
afilter = gst_element_factory_make ("scaletempo", NULL); | ||
if (G_LIKELY (afilter != NULL)) | ||
clapper_player_set_audio_filter (self->player, afilter); | ||
|
||
g_signal_connect (self->player, "error", | ||
G_CALLBACK (_player_error_cb), self); | ||
|