Commit 9c9f6077 authored by Wim Taymans's avatar Wim Taymans

gst/playback/gstplay-enum.*: Add enums for configuration flags.

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.
parent ba9e0cc8
2008-01-07 Wim Taymans <wim.taymans@collabora.co.uk>
* 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.
2008-01-06 Tim-Philipp Müller <tim at centricular dot net>
* tests/check/pipelines/theoraenc.c: (check_buffer_is_header),
......@@ -20,6 +20,7 @@
#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)
......@@ -43,3 +44,32 @@ gst_autoplug_select_result_get_type (void)
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;
}
......@@ -41,6 +41,34 @@ typedef enum {
#define GST_TYPE_AUTOPLUG_SELECT_RESULT (gst_autoplug_select_result_get_type())
GType gst_autoplug_select_result_get_type (void);
/**
* GstPlayFlags:
* @GST_PLAY_FLAG_VIDEO: Enable rendering of the video stream
* @GST_PLAY_FLAG_AUDIO: Enable rendering of the audio stream
* @GST_PLAY_FLAG_TEXT: Enable rendering of subtitles
* @GST_PLAY_FLAG_VIS: Enable rendering of visualisations when there is
* no video stream.
* @GST_PLAY_FLAG_SOFT_VOLUME: Use software volume
* @GST_PLAY_FLAG_NATIVE_AUDIO: only allow native audio formats, this omits
* configuration of audioconvert and audioresample.
* @GST_PLAY_FLAG_NATIVE_VIDEO: only allow native video formats, this omits
* configuration of ffmpegcolorspace and videoscale.
*
* Extra flags to configure the behaviour of the sinks.
*/
typedef enum {
GST_PLAY_FLAG_VIDEO = (1 << 0),
GST_PLAY_FLAG_AUDIO = (1 << 1),
GST_PLAY_FLAG_TEXT = (1 << 2),
GST_PLAY_FLAG_VIS = (1 << 3),
GST_PLAY_FLAG_SOFT_VOLUME = (1 << 4),
GST_PLAY_FLAG_NATIVE_AUDIO = (1 << 5),
GST_PLAY_FLAG_NATIVE_VIDEO = (1 << 6)
} GstPlayFlags;
#define GST_TYPE_PLAY_FLAGS (gst_play_flags_get_type())
GType gst_play_flags_get_type (void);
G_END_DECLS
#endif /* __GST_PLAY_ENUM_H__ */
This diff is collapsed.
This diff is collapsed.
......@@ -22,6 +22,8 @@
#include <gst/gst.h>
#include "gstplay-enum.h"
G_BEGIN_DECLS
#define GST_TYPE_PLAY_SINK \
......@@ -35,22 +37,6 @@ G_BEGIN_DECLS
#define GST_IS_PLAY_SINK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PLAY_SINK))
/**
* GstPlaySinkMode:
* @GST_PLAY_SINK_MODE_VIDEO:
* @GST_PLAY_SINK_MODE_AUDIO:
* @GST_PLAY_SINK_MODE_TEXT:
* @GST_PLAY_SINK_MODE_VIS:
*
* Features to enable in the sink.
*/
typedef enum {
GST_PLAY_SINK_MODE_VIDEO = (1 << 0),
GST_PLAY_SINK_MODE_AUDIO = (1 << 1),
GST_PLAY_SINK_MODE_TEXT = (1 << 2),
GST_PLAY_SINK_MODE_VIS = (1 << 3)
} GstPlaySinkMode;
/**
* GstPlaySinkType:
* @GST_PLAY_SINK_TYPE_AUDIO: A non-raw audio pad
......@@ -71,22 +57,6 @@ typedef enum {
GST_PLAY_SINK_TYPE_LAST = 5
} GstPlaySinkType;
/**
* GstPlaySinkFlags:
* @GST_PLAY_SINK_FLAG_SOFT_VOLUME: Use software volume in the sink
* @GST_PLAY_SINK_FLAG_NATIVE_AUDIO: only allow native audio formats, this omits
* configuration of audioconvert and audioresample.
* @GST_PLAY_SINK_FLAG_NATIVE_VIDEO: only allow native video formats, this omits
* configuration of ffmpegcolorspace and videoscale.
*
* Extra flags to configure the behaviour of the sinks.
*/
typedef enum {
GST_PLAY_SINK_FLAG_SOFT_VOLUME = (1 << 0),
GST_PLAY_SINK_FLAG_NATIVE_AUDIO = (1 << 1),
GST_PLAY_SINK_FLAG_NATIVE_VIDEO = (1 << 2)
} GstPlaySinkFlags;
typedef struct _GstPlaySink GstPlaySink;
typedef struct _GstPlaySinkClass GstPlaySinkClass;
......@@ -99,11 +69,10 @@ void gst_play_sink_set_video_sink (GstPlaySink * playsink, GstElemen
void gst_play_sink_set_audio_sink (GstPlaySink * playsink, GstElement * sink);
void gst_play_sink_set_vis_plugin (GstPlaySink * playsink, GstElement * vis);
gboolean gst_play_sink_set_flags (GstPlaySink * playsink, GstPlaySinkFlags flags);
GstPlaySinkFlags gst_play_sink_get_flags (GstPlaySink * playsink);
gboolean gst_play_sink_set_flags (GstPlaySink * playsink, GstPlayFlags flags);
GstPlayFlags gst_play_sink_get_flags (GstPlaySink * playsink);
gboolean gst_play_sink_set_mode (GstPlaySink *playsink, GstPlaySinkMode mode);
GstPlaySinkMode gst_play_sink_get_mode (GstPlaySink *playsink);
gboolean gst_play_sink_reconfigure (GstPlaySink * playsink);
G_END_DECLS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment