mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
9c9f60777a
Original commit message from CVS: * gst/playback/gstplay-enum.c: (register_gst_autoplug_select_result), (gst_autoplug_select_result_get_type), (register_gst_play_flags), (gst_play_flags_get_type): * gst/playback/gstplay-enum.h: Add enums for configuration flags. * gst/playback/gstplaybin2.c: (gst_play_bin_class_init), (init_group), (gst_play_bin_init), (gst_play_bin_set_property), (gst_play_bin_get_property), (no_more_pads_cb), (autoplug_select_cb), (gst_play_bin_change_state): Merge mode with flags. Add more property getters/setters, defaults and docs. Add properties to get number of audio/video/text streams. Create sink object in _init so that we can always rely on it being there. * gst/playback/gstplaysink.c: (gst_play_sink_init), (gen_video_chain), (gen_audio_chain), (gen_vis_chain), (activate_vis), (gst_play_sink_reconfigure), (gst_play_sink_set_flags), (gst_play_sink_get_flags), (gst_play_sink_change_state): * gst/playback/gstplaysink.h: Use flags to configure the sink pipelines. Add tee before audio pipeline so that we can use it for visualisations. Start working on integrating visualisations. Remove mode, we can do everything with the flags now. Add method to configue the sink pipeline.
75 lines
2.4 KiB
C
75 lines
2.4 KiB
C
/* GStreamer
|
|
* Copyright (C) <2007> Wim Taymans <wim.taymans@gmail.com>
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Library General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Library General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Library General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
* Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
#include "gstplay-enum.h"
|
|
|
|
#define C_ENUM(v) ((gint) v)
|
|
#define C_FLAGS(v) ((guint) v)
|
|
|
|
static void
|
|
register_gst_autoplug_select_result (GType * id)
|
|
{
|
|
static const GEnumValue values[] = {
|
|
{C_ENUM (GST_AUTOPLUG_SELECT_TRY), "GST_AUTOPLUG_SELECT_TRY", "try"},
|
|
{C_ENUM (GST_AUTOPLUG_SELECT_EXPOSE), "GST_AUTOPLUG_SELECT_EXPOSE",
|
|
"expose"},
|
|
{C_ENUM (GST_AUTOPLUG_SELECT_SKIP), "GST_AUTOPLUG_SELECT_SKIP", "skip"},
|
|
{0, NULL, NULL}
|
|
};
|
|
*id = g_enum_register_static ("GstAutoplugSelectResult", values);
|
|
}
|
|
|
|
GType
|
|
gst_autoplug_select_result_get_type (void)
|
|
{
|
|
static GType id;
|
|
static GOnce once = G_ONCE_INIT;
|
|
|
|
g_once (&once, (GThreadFunc) register_gst_autoplug_select_result, &id);
|
|
return id;
|
|
}
|
|
|
|
static void
|
|
register_gst_play_flags (GType * id)
|
|
{
|
|
static const GFlagsValue values[] = {
|
|
{C_FLAGS (GST_PLAY_FLAG_VIDEO), "Render the video stream", "video"},
|
|
{C_FLAGS (GST_PLAY_FLAG_AUDIO), "Render the audio stream", "audio"},
|
|
{C_FLAGS (GST_PLAY_FLAG_TEXT), "Render subtitles", "text"},
|
|
{C_FLAGS (GST_PLAY_FLAG_VIS),
|
|
"Render visualisation when no video is present", "vis"},
|
|
{C_FLAGS (GST_PLAY_FLAG_SOFT_VOLUME), "Use software volume", "soft-volume"},
|
|
{C_FLAGS (GST_PLAY_FLAG_NATIVE_AUDIO), "Only use native audio formats",
|
|
"native-audio"},
|
|
{C_FLAGS (GST_PLAY_FLAG_NATIVE_VIDEO), "Only use native video formats",
|
|
"native-video"},
|
|
{0, NULL, NULL}
|
|
};
|
|
*id = g_flags_register_static ("GstPlayFlags", values);
|
|
}
|
|
|
|
GType
|
|
gst_play_flags_get_type (void)
|
|
{
|
|
static GType id;
|
|
static GOnce once = G_ONCE_INIT;
|
|
|
|
g_once (&once, (GThreadFunc) register_gst_play_flags, &id);
|
|
return id;
|
|
}
|