static void
gst_gio_base_sink_class_init (GstGioBaseSinkClass * klass)
{
- GObjectClass *gobject_class;
- GstElementClass *gstelement_class;
- GstBaseSinkClass *gstbasesink_class;
-
- gobject_class = (GObjectClass *) klass;
- gstelement_class = (GstElementClass *) klass;
- gstbasesink_class = (GstBaseSinkClass *) klass;
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+ GstBaseSinkClass *gstbasesink_class = (GstBaseSinkClass *) klass;
gobject_class->finalize = gst_gio_base_sink_finalize;
if (!success && !gst_gio_error (sink, "g_output_stream_close", &err, NULL)) {
GST_ELEMENT_WARNING (sink, RESOURCE, CLOSE, (NULL),
- ("g_ooutput_stream_close failed: %s", err->message));
+ ("gio_output_stream_close failed: %s", err->message));
g_clear_error (&err);
} else if (!success) {
GST_ELEMENT_WARNING (sink, RESOURCE, CLOSE, (NULL),
(gst_gio_base_sink_get_type())
#define GST_GIO_BASE_SINK(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GIO_BASE_SINK,GstGioBaseSink))
+#define GST_GIO_BASE_SINK_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_GIO_BASE_SINK, GstGioBaseSinkClass))
#define GST_GIO_BASE_SINK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GIO_BASE_SINK,GstGioBaseSinkClass))
#define GST_IS_GIO_BASE_SINK(obj) \
static void
gst_gio_base_src_class_init (GstGioBaseSrcClass * klass)
{
- GObjectClass *gobject_class;
- GstElementClass *gstelement_class;
- GstBaseSrcClass *gstbasesrc_class;
-
- gobject_class = (GObjectClass *) klass;
- gstelement_class = (GstElementClass *) klass;
- gstbasesrc_class = (GstBaseSrcClass *) klass;
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+ GstBaseSrcClass *gstbasesrc_class = (GstBaseSrcClass *) klass;
gobject_class->finalize = gst_gio_base_src_finalize;
enum
{
- ARG_0,
- ARG_LOCATION,
- ARG_FILE
+ PROP_0,
+ PROP_LOCATION,
+ PROP_FILE
};
GST_BOILERPLATE_FULL (GstGioSink, gst_gio_sink, GstGioBaseSink,
static void
gst_gio_sink_class_init (GstGioSinkClass * klass)
{
- GObjectClass *gobject_class;
- GstElementClass *gstelement_class;
- GstBaseSinkClass *gstbasesink_class;
-
- gobject_class = (GObjectClass *) klass;
- gstelement_class = (GstElementClass *) klass;
- gstbasesink_class = (GstBaseSinkClass *) klass;
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+ GstBaseSinkClass *gstbasesink_class = (GstBaseSinkClass *) klass;
gobject_class->finalize = gst_gio_sink_finalize;
gobject_class->set_property = gst_gio_sink_set_property;
gobject_class->get_property = gst_gio_sink_get_property;
- g_object_class_install_property (gobject_class, ARG_LOCATION,
+ g_object_class_install_property (gobject_class, PROP_LOCATION,
g_param_spec_string ("location", "Location", "URI location to write to",
NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
*
* Since: 0.10.20
**/
- g_object_class_install_property (gobject_class, ARG_FILE,
+ g_object_class_install_property (gobject_class, PROP_FILE,
g_param_spec_object ("file", "File", "GFile to write to",
G_TYPE_FILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
GstGioSink *sink = GST_GIO_SINK (object);
switch (prop_id) {
- case ARG_LOCATION:{
+ case PROP_LOCATION:{
const gchar *uri = NULL;
if (GST_STATE (sink) == GST_STATE_PLAYING ||
GST_OBJECT_UNLOCK (GST_OBJECT (sink));
break;
}
- case ARG_FILE:
+ case PROP_FILE:
if (GST_STATE (sink) == GST_STATE_PLAYING ||
GST_STATE (sink) == GST_STATE_PAUSED) {
GST_WARNING
GstGioSink *sink = GST_GIO_SINK (object);
switch (prop_id) {
- case ARG_LOCATION:{
+ case PROP_LOCATION:{
gchar *uri;
GST_OBJECT_LOCK (GST_OBJECT (sink));
GST_OBJECT_UNLOCK (GST_OBJECT (sink));
break;
}
- case ARG_FILE:
+ case PROP_FILE:
GST_OBJECT_LOCK (GST_OBJECT (sink));
g_value_set_object (value, sink->file);
GST_OBJECT_UNLOCK (GST_OBJECT (sink));
enum
{
- ARG_0,
- ARG_LOCATION,
- ARG_FILE
+ PROP_0,
+ PROP_LOCATION,
+ PROP_FILE
};
GST_BOILERPLATE_FULL (GstGioSrc, gst_gio_src, GstGioBaseSrc,
static void
gst_gio_src_class_init (GstGioSrcClass * klass)
{
- GObjectClass *gobject_class;
- GstBaseSrcClass *gstbasesrc_class;
- GstGioBaseSrcClass *gstgiobasesrc_class;
-
- gobject_class = (GObjectClass *) klass;
- gstbasesrc_class = (GstBaseSrcClass *) klass;
- gstgiobasesrc_class = (GstGioBaseSrcClass *) klass;
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+ GstBaseSrcClass *gstbasesrc_class = (GstBaseSrcClass *) klass;
+ GstGioBaseSrcClass *gstgiobasesrc_class = (GstGioBaseSrcClass *) klass;
gobject_class->finalize = gst_gio_src_finalize;
gobject_class->set_property = gst_gio_src_set_property;
gobject_class->get_property = gst_gio_src_get_property;
- g_object_class_install_property (gobject_class, ARG_LOCATION,
+ g_object_class_install_property (gobject_class, PROP_LOCATION,
g_param_spec_string ("location", "Location", "URI location to read from",
NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
*
* Since: 0.10.20
**/
- g_object_class_install_property (gobject_class, ARG_FILE,
+ g_object_class_install_property (gobject_class, PROP_FILE,
g_param_spec_object ("file", "File", "GFile to read from",
G_TYPE_FILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
GstGioSrc *src = GST_GIO_SRC (object);
switch (prop_id) {
- case ARG_LOCATION:{
+ case PROP_LOCATION:{
const gchar *uri = NULL;
if (GST_STATE (src) == GST_STATE_PLAYING ||
GST_OBJECT_UNLOCK (GST_OBJECT (src));
break;
}
- case ARG_FILE:
+ case PROP_FILE:
if (GST_STATE (src) == GST_STATE_PLAYING ||
GST_STATE (src) == GST_STATE_PAUSED) {
GST_WARNING
GstGioSrc *src = GST_GIO_SRC (object);
switch (prop_id) {
- case ARG_LOCATION:{
+ case PROP_LOCATION:{
gchar *uri;
GST_OBJECT_LOCK (GST_OBJECT (src));
GST_OBJECT_UNLOCK (GST_OBJECT (src));
break;
}
- case ARG_FILE:
+ case PROP_FILE:
GST_OBJECT_LOCK (GST_OBJECT (src));
g_value_set_object (value, src->file);
GST_OBJECT_UNLOCK (GST_OBJECT (src));
gst_gio_src_check_get_range (GstBaseSrc * base_src)
{
GstGioSrc *src = GST_GIO_SRC (base_src);
-
gchar *scheme;
if (src->file == NULL)
enum
{
- ARG_0,
- ARG_STREAM
+ PROP_0,
+ PROP_STREAM
};
GST_BOILERPLATE (GstGioStreamSink, gst_gio_stream_sink, GstGioBaseSink,
static void
gst_gio_stream_sink_base_init (gpointer gclass)
{
- static GstElementDetails element_details = {
- "GIO stream sink",
- "Sink",
- "Write to any GIO stream",
- "Sebastian Dröge <sebastian.droege@collabora.co.uk>"
- };
GstElementClass *element_class = GST_ELEMENT_CLASS (gclass);
GST_DEBUG_CATEGORY_INIT (gst_gio_stream_sink_debug, "gio_stream_sink", 0,
"GIO stream sink");
- gst_element_class_set_details (element_class, &element_details);
+ gst_element_class_set_details_simple (element_class, "GIO stream sink",
+ "Sink",
+ "Write to any GIO stream",
+ "Sebastian Dröge <sebastian.droege@collabora.co.uk>");
}
static void
gst_gio_stream_sink_class_init (GstGioStreamSinkClass * klass)
{
- GObjectClass *gobject_class;
- GstElementClass *gstelement_class;
- GstBaseSinkClass *gstbasesink_class;
-
- gobject_class = (GObjectClass *) klass;
- gstelement_class = (GstElementClass *) klass;
- gstbasesink_class = (GstBaseSinkClass *) klass;
+ GObjectClass *gobject_class = (GObjectClass *) klass;
gobject_class->finalize = gst_gio_stream_sink_finalize;
gobject_class->set_property = gst_gio_stream_sink_set_property;
gobject_class->get_property = gst_gio_stream_sink_get_property;
- g_object_class_install_property (gobject_class, ARG_STREAM,
+ g_object_class_install_property (gobject_class, PROP_STREAM,
g_param_spec_object ("stream", "Stream", "Stream to write to",
G_TYPE_OUTPUT_STREAM, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}
GstGioStreamSink *sink = GST_GIO_STREAM_SINK (object);
switch (prop_id) {
- case ARG_STREAM:{
+ case PROP_STREAM:{
GObject *stream;
if (GST_STATE (sink) == GST_STATE_PLAYING ||
- GST_STATE (sink) == GST_STATE_PAUSED)
+ GST_STATE (sink) == GST_STATE_PAUSED) {
+ GST_WARNING
+ ("Setting a new stream not supported in PLAYING or PAUSED state");
break;
+ }
stream = g_value_dup_object (value);
if (G_IS_OUTPUT_STREAM (stream))
GstGioStreamSink *sink = GST_GIO_STREAM_SINK (object);
switch (prop_id) {
- case ARG_STREAM:
+ case PROP_STREAM:
g_value_set_object (value, GST_GIO_BASE_SINK (sink)->stream);
break;
default:
static void
gst_gio_stream_src_base_init (gpointer gclass)
{
- static GstElementDetails element_details = {
- "GIO stream source",
- "Source",
- "Read from any GIO stream",
- "Sebastian Dröge <sebastian.droege@collabora.co.uk>"
- };
GstElementClass *element_class = GST_ELEMENT_CLASS (gclass);
GST_DEBUG_CATEGORY_INIT (gst_gio_stream_src_debug, "gio_stream_src", 0,
"GIO source");
- gst_element_class_set_details (element_class, &element_details);
+ gst_element_class_set_details_simple (element_class, "GIO stream source",
+ "Source",
+ "Read from any GIO stream",
+ "Sebastian Dröge <sebastian.droege@collabora.co.uk>");
}
static void
gst_gio_stream_src_class_init (GstGioStreamSrcClass * klass)
{
- GObjectClass *gobject_class;
- GstGioBaseSrcClass *gstgiobasesrc_class;
-
- gobject_class = (GObjectClass *) klass;
- gstgiobasesrc_class = (GstGioBaseSrcClass *) klass;
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+ GstGioBaseSrcClass *gstgiobasesrc_class = (GstGioBaseSrcClass *) klass;
gobject_class->finalize = gst_gio_stream_src_finalize;
gobject_class->set_property = gst_gio_stream_src_set_property;