mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
There was a floating doubt on the way visualization is written. We use 'z' everywhere now. Both in gst-player and lib...
Original commit message from CVS: There was a floating doubt on the way visualization is written. We use 'z' everywhere now. Both in gst-player and libgstplay
This commit is contained in:
parent
554690f45a
commit
5f22a7605a
5 changed files with 38 additions and 39 deletions
|
@ -290,26 +290,26 @@ gst_gconf_get_default_video_src (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_gconf_get_default_visualisation_element:
|
* gst_gconf_get_default_visualization_element:
|
||||||
*
|
*
|
||||||
* Render visualisation bin from GStreamer GConf key : "default/visualisation".
|
* Render visualization bin from GStreamer GConf key : "default/visualization".
|
||||||
* If key is invalid goom is used as default visualisation element.
|
* If key is invalid goom is used as default visualization element.
|
||||||
*
|
*
|
||||||
* Returns: a #GstElement containing the visualisation bin, or NULL if
|
* Returns: a #GstElement containing the visualization bin, or NULL if
|
||||||
* everything failed.
|
* everything failed.
|
||||||
*/
|
*/
|
||||||
GstElement *
|
GstElement *
|
||||||
gst_gconf_get_default_visualisation_element (void)
|
gst_gconf_get_default_visualization_element (void)
|
||||||
{
|
{
|
||||||
GstElement *ret = gst_gconf_render_bin_from_key ("default/visualisation");
|
GstElement *ret = gst_gconf_render_bin_from_key ("default/visualization");
|
||||||
|
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
ret = gst_element_factory_make ("goom", NULL);
|
ret = gst_element_factory_make ("goom", NULL);
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
g_warning ("No GConf default visualisation plugin key and goom doesn't work");
|
g_warning ("No GConf default visualization plugin key and goom doesn't work");
|
||||||
else
|
else
|
||||||
g_print ("GConf visualisation plugin not found, using goom");
|
g_print ("GConf visualization plugin not found, using goom");
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -329,4 +329,3 @@ GstPluginDesc plugin_desc = {
|
||||||
"gstgconf",
|
"gstgconf",
|
||||||
plugin_init
|
plugin_init
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,6 @@ GstElement * gst_gconf_get_default_video_sink (void);
|
||||||
GstElement * gst_gconf_get_default_audio_sink (void);
|
GstElement * gst_gconf_get_default_audio_sink (void);
|
||||||
GstElement * gst_gconf_get_default_video_src (void);
|
GstElement * gst_gconf_get_default_video_src (void);
|
||||||
GstElement * gst_gconf_get_default_audio_src (void);
|
GstElement * gst_gconf_get_default_audio_src (void);
|
||||||
GstElement * gst_gconf_get_default_visualisation_element (void);
|
GstElement * gst_gconf_get_default_visualization_element (void);
|
||||||
|
|
||||||
#endif /* GST_GCONF_H */
|
#endif /* GST_GCONF_H */
|
||||||
|
|
|
@ -746,7 +746,7 @@ gst_play_seek_to_time (GstPlay * play, gint64 time_nanos)
|
||||||
guint8 prev_state;
|
guint8 prev_state;
|
||||||
gboolean audio_seek_worked = FALSE;
|
gboolean audio_seek_worked = FALSE;
|
||||||
gboolean video_seek_worked = FALSE;
|
gboolean video_seek_worked = FALSE;
|
||||||
gboolean visualisation_seek_worked = FALSE;
|
gboolean visualization_seek_worked = FALSE;
|
||||||
|
|
||||||
g_return_if_fail (play != NULL);
|
g_return_if_fail (play != NULL);
|
||||||
g_return_if_fail (GST_IS_PLAY (play));
|
g_return_if_fail (GST_IS_PLAY (play));
|
||||||
|
@ -777,11 +777,11 @@ gst_play_seek_to_time (GstPlay * play, gint64 time_nanos)
|
||||||
audio_seek_worked =
|
audio_seek_worked =
|
||||||
gst_element_send_event (play->audio_sink_element, s_event);
|
gst_element_send_event (play->audio_sink_element, s_event);
|
||||||
}
|
}
|
||||||
if (play->visualisation_sink_element != NULL)
|
if (play->visualization_sink_element != NULL)
|
||||||
{
|
{
|
||||||
gst_event_ref (s_event);
|
gst_event_ref (s_event);
|
||||||
visualisation_seek_worked =
|
visualization_seek_worked =
|
||||||
gst_element_send_event (play->visualisation_sink_element, s_event);
|
gst_element_send_event (play->visualization_sink_element, s_event);
|
||||||
}
|
}
|
||||||
if (play->video_sink_element != NULL)
|
if (play->video_sink_element != NULL)
|
||||||
{
|
{
|
||||||
|
@ -817,9 +817,9 @@ gst_play_need_new_video_window (GstPlay * play)
|
||||||
g_object_set (G_OBJECT (play->video_sink_element),
|
g_object_set (G_OBJECT (play->video_sink_element),
|
||||||
"need_new_window", TRUE, NULL);
|
"need_new_window", TRUE, NULL);
|
||||||
}
|
}
|
||||||
if (GST_IS_ELEMENT (play->visualisation_sink_element))
|
if (GST_IS_ELEMENT (play->visualization_sink_element))
|
||||||
{
|
{
|
||||||
g_object_set (G_OBJECT (play->visualisation_sink_element),
|
g_object_set (G_OBJECT (play->visualization_sink_element),
|
||||||
"need_new_window", TRUE, NULL);
|
"need_new_window", TRUE, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,7 +112,7 @@ struct _GstPlay
|
||||||
GstElement *video_sink_element;
|
GstElement *video_sink_element;
|
||||||
GstElement *audio_sink;
|
GstElement *audio_sink;
|
||||||
GstElement *audio_sink_element;
|
GstElement *audio_sink_element;
|
||||||
GstElement *visualisation_sink_element;
|
GstElement *visualization_sink_element;
|
||||||
|
|
||||||
GstDParamManager *vol_dpman;
|
GstDParamManager *vol_dpman;
|
||||||
GstDParam *vol_dparam;
|
GstDParam *vol_dparam;
|
||||||
|
@ -199,14 +199,14 @@ gboolean gst_play_get_mute (GstPlay * play);
|
||||||
gboolean gst_play_set_data_src (GstPlay * play, GstElement * data_src);
|
gboolean gst_play_set_data_src (GstPlay * play, GstElement * data_src);
|
||||||
gboolean gst_play_set_video_sink (GstPlay * play, GstElement * video_sink);
|
gboolean gst_play_set_video_sink (GstPlay * play, GstElement * video_sink);
|
||||||
gboolean
|
gboolean
|
||||||
gst_play_set_visualisation_video_sink (GstPlay * play,
|
gst_play_set_visualization_video_sink (GstPlay * play,
|
||||||
GstElement * video_sink);
|
GstElement * video_sink);
|
||||||
gboolean gst_play_set_audio_sink (GstPlay * play, GstElement * audio_sink);
|
gboolean gst_play_set_audio_sink (GstPlay * play, GstElement * audio_sink);
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
gst_play_set_visualisation_element (GstPlay * play, GstElement * element);
|
gst_play_set_visualization_element (GstPlay * play, GstElement * element);
|
||||||
|
|
||||||
gboolean gst_play_connect_visualisation (GstPlay * play, gboolean connect);
|
gboolean gst_play_connect_visualization (GstPlay * play, gboolean connect);
|
||||||
|
|
||||||
GType gst_play_get_type (void);
|
GType gst_play_get_type (void);
|
||||||
|
|
||||||
|
|
|
@ -180,7 +180,7 @@ gst_play_audiot_set_audio (GstPlay * play, GstElement * audio_sink)
|
||||||
audio_sink,
|
audio_sink,
|
||||||
GST_PLAY_SINK_TYPE_AUDIO);
|
GST_PLAY_SINK_TYPE_AUDIO);
|
||||||
|
|
||||||
play->visualisation_sink_element = gst_play_get_sink_element (play,
|
play->visualization_sink_element = gst_play_get_sink_element (play,
|
||||||
audio_sink,
|
audio_sink,
|
||||||
GST_PLAY_SINK_TYPE_VIDEO);
|
GST_PLAY_SINK_TYPE_VIDEO);
|
||||||
|
|
||||||
|
@ -326,7 +326,7 @@ gst_play_audioht_set_audio (GstPlay * play, GstElement * audio_sink)
|
||||||
audio_sink,
|
audio_sink,
|
||||||
GST_PLAY_SINK_TYPE_AUDIO);
|
GST_PLAY_SINK_TYPE_AUDIO);
|
||||||
|
|
||||||
play->visualisation_sink_element = gst_play_get_sink_element (play,
|
play->visualization_sink_element = gst_play_get_sink_element (play,
|
||||||
audio_sink,
|
audio_sink,
|
||||||
GST_PLAY_SINK_TYPE_VIDEO);
|
GST_PLAY_SINK_TYPE_VIDEO);
|
||||||
|
|
||||||
|
@ -618,7 +618,7 @@ gst_play_video_set_audio (GstPlay * play, GstElement * audio_sink)
|
||||||
audio_sink,
|
audio_sink,
|
||||||
GST_PLAY_SINK_TYPE_AUDIO);
|
GST_PLAY_SINK_TYPE_AUDIO);
|
||||||
|
|
||||||
play->visualisation_sink_element = gst_play_get_sink_element (play,
|
play->visualization_sink_element = gst_play_get_sink_element (play,
|
||||||
audio_sink,
|
audio_sink,
|
||||||
GST_PLAY_SINK_TYPE_VIDEO);
|
GST_PLAY_SINK_TYPE_VIDEO);
|
||||||
|
|
||||||
|
@ -734,8 +734,8 @@ gst_play_video_vis_setup (GstPlay * play, GError ** error)
|
||||||
gst_element_get_pad (audio_queue, "sink"),
|
gst_element_get_pad (audio_queue, "sink"),
|
||||||
"sink");
|
"sink");
|
||||||
|
|
||||||
/* Creating video part of the visualisation bin
|
/* Creating video part of the visualization bin
|
||||||
{ queue ! (visualisation) ! colorspace ! (videosink) }
|
{ queue ! (visualization) ! colorspace ! (videosink) }
|
||||||
*/
|
*/
|
||||||
|
|
||||||
vis_video_thread = gst_thread_new ("vis_video_thread");
|
vis_video_thread = gst_thread_new ("vis_video_thread");
|
||||||
|
@ -929,16 +929,16 @@ gst_play_video_vis_set_video (GstPlay * play, GstElement * video_sink)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_play_set_visualisation_video_sink:
|
* gst_play_set_visualization_video_sink:
|
||||||
* @play: a #GstPlay.
|
* @play: a #GstPlay.
|
||||||
* @video_sink: a #GstElement.
|
* @video_sink: a #GstElement.
|
||||||
*
|
*
|
||||||
* Set @video_sink as the visualisation video sink element of @play.
|
* Set @video_sink as the visualization video sink element of @play.
|
||||||
*
|
*
|
||||||
* Returns: TRUE if call succeeded.
|
* Returns: TRUE if call succeeded.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gst_play_set_visualisation_video_sink (GstPlay * play,
|
gst_play_set_visualization_video_sink (GstPlay * play,
|
||||||
GstElement * video_sink)
|
GstElement * video_sink)
|
||||||
{
|
{
|
||||||
GstElement *video_mate, *video_bin, *vis_video_sink;
|
GstElement *video_mate, *video_bin, *vis_video_sink;
|
||||||
|
@ -964,26 +964,26 @@ gst_play_set_visualisation_video_sink (GstPlay * play,
|
||||||
|
|
||||||
g_hash_table_replace (play->other_elements, "vis_video_sink", video_sink);
|
g_hash_table_replace (play->other_elements, "vis_video_sink", video_sink);
|
||||||
|
|
||||||
play->visualisation_sink_element = gst_play_get_sink_element (play,
|
play->visualization_sink_element = gst_play_get_sink_element (play,
|
||||||
video_sink,
|
video_sink,
|
||||||
GST_PLAY_SINK_TYPE_VIDEO);
|
GST_PLAY_SINK_TYPE_VIDEO);
|
||||||
|
|
||||||
if (play->visualisation_sink_element != NULL)
|
if (play->visualization_sink_element != NULL)
|
||||||
{
|
{
|
||||||
g_signal_connect (G_OBJECT (play->visualisation_sink_element),
|
g_signal_connect (G_OBJECT (play->visualization_sink_element),
|
||||||
"have_video_out",
|
"have_video_out",
|
||||||
G_CALLBACK (callback_video_have_vis_video_out), play);
|
G_CALLBACK (callback_video_have_vis_video_out), play);
|
||||||
g_signal_connect (G_OBJECT (play->visualisation_sink_element),
|
g_signal_connect (G_OBJECT (play->visualization_sink_element),
|
||||||
"have_size",
|
"have_size",
|
||||||
G_CALLBACK (callback_video_have_vis_size), play);
|
G_CALLBACK (callback_video_have_vis_size), play);
|
||||||
g_object_set (G_OBJECT (play->visualisation_sink_element),
|
g_object_set (G_OBJECT (play->visualization_sink_element),
|
||||||
"need_new_window", TRUE, "toplevel", FALSE, NULL);
|
"need_new_window", TRUE, "toplevel", FALSE, NULL);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_play_set_visualisation_element:
|
* gst_play_set_visualization_element:
|
||||||
* @play: a #GstPlay.
|
* @play: a #GstPlay.
|
||||||
* @element: a #GstElement.
|
* @element: a #GstElement.
|
||||||
*
|
*
|
||||||
|
@ -992,7 +992,7 @@ gst_play_set_visualisation_video_sink (GstPlay * play,
|
||||||
* Returns: TRUE if call succeeded.
|
* Returns: TRUE if call succeeded.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gst_play_set_visualisation_element (GstPlay * play, GstElement * element)
|
gst_play_set_visualization_element (GstPlay * play, GstElement * element)
|
||||||
{
|
{
|
||||||
GstElement *video_queue, *video_colorspace;
|
GstElement *video_queue, *video_colorspace;
|
||||||
GstElement *vis_element, *vis_video_bin;
|
GstElement *vis_element, *vis_video_bin;
|
||||||
|
@ -1024,17 +1024,17 @@ gst_play_set_visualisation_element (GstPlay * play, GstElement * element)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_play_connect_visualisation:
|
* gst_play_connect_visualization:
|
||||||
* @play: a #GstPlay.
|
* @play: a #GstPlay.
|
||||||
* @connect: a #gboolean indicating wether or not
|
* @connect: a #gboolean indicating wether or not
|
||||||
* visualisation should be connected.
|
* visualization should be connected.
|
||||||
*
|
*
|
||||||
* Connect or disconnect visualisation bin in @play.
|
* Connect or disconnect visualization bin in @play.
|
||||||
*
|
*
|
||||||
* Returns: TRUE if call succeeded.
|
* Returns: TRUE if call succeeded.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gst_play_connect_visualisation (GstPlay * play, gboolean connect)
|
gst_play_connect_visualization (GstPlay * play, gboolean connect)
|
||||||
{
|
{
|
||||||
GstPad *tee_vis_pad, *vis_video_thread_pad;
|
GstPad *tee_vis_pad, *vis_video_thread_pad;
|
||||||
GstElement *vis_video_thread;
|
GstElement *vis_video_thread;
|
||||||
|
|
Loading…
Reference in a new issue