mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-04 21:55:55 +00:00
plugins/elements/gstfakesrc.*: Added format property to control the format of the newsegment events.
Original commit message from CVS: * plugins/elements/gstfakesrc.c: (gst_fake_src_class_init), (gst_fake_src_init), (gst_fake_src_set_property), (gst_fake_src_get_property), (gst_fake_src_start): * plugins/elements/gstfakesrc.h: Added format property to control the format of the newsegment events. API: GstFakeSrc:format
This commit is contained in:
parent
bdb641c570
commit
ae658f35dd
|
@ -1,3 +1,12 @@
|
||||||
|
2008-05-07 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
|
* plugins/elements/gstfakesrc.c: (gst_fake_src_class_init),
|
||||||
|
(gst_fake_src_init), (gst_fake_src_set_property),
|
||||||
|
(gst_fake_src_get_property), (gst_fake_src_start):
|
||||||
|
* plugins/elements/gstfakesrc.h:
|
||||||
|
Added format property to control the format of the newsegment events.
|
||||||
|
API: GstFakeSrc:format
|
||||||
|
|
||||||
2008-05-06 Sebastian Dröge <slomo@circular-chaos.org>
|
2008-05-06 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
* win32/common/libgstreamer.def:
|
* win32/common/libgstreamer.def:
|
||||||
|
|
|
@ -90,6 +90,7 @@ enum
|
||||||
#define DEFAULT_PARENTSIZE 4096*10
|
#define DEFAULT_PARENTSIZE 4096*10
|
||||||
#define DEFAULT_CAN_ACTIVATE_PULL TRUE
|
#define DEFAULT_CAN_ACTIVATE_PULL TRUE
|
||||||
#define DEFAULT_CAN_ACTIVATE_PUSH TRUE
|
#define DEFAULT_CAN_ACTIVATE_PUSH TRUE
|
||||||
|
#define DEFAULT_FORMAT GST_FORMAT_BYTES
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -111,7 +112,9 @@ enum
|
||||||
PROP_LAST_MESSAGE,
|
PROP_LAST_MESSAGE,
|
||||||
PROP_CAN_ACTIVATE_PULL,
|
PROP_CAN_ACTIVATE_PULL,
|
||||||
PROP_CAN_ACTIVATE_PUSH,
|
PROP_CAN_ACTIVATE_PUSH,
|
||||||
PROP_IS_LIVE
|
PROP_IS_LIVE,
|
||||||
|
PROP_FORMAT,
|
||||||
|
PROP_LAST,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* not implemented
|
/* not implemented
|
||||||
|
@ -325,6 +328,17 @@ gst_fake_src_class_init (GstFakeSrcClass * klass)
|
||||||
g_param_spec_boolean ("is-live", "Is this a live source",
|
g_param_spec_boolean ("is-live", "Is this a live source",
|
||||||
"True if the element cannot produce data in PAUSED", FALSE,
|
"True if the element cannot produce data in PAUSED", FALSE,
|
||||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
|
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
|
||||||
|
/**
|
||||||
|
* GstFakeSrc:format
|
||||||
|
*
|
||||||
|
* Set the format of the newsegment events to produce.
|
||||||
|
*
|
||||||
|
* Since: 0.10.20
|
||||||
|
*/
|
||||||
|
g_object_class_install_property (gobject_class, PROP_FORMAT,
|
||||||
|
g_param_spec_enum ("format", "Format",
|
||||||
|
"The format of the segment events", GST_TYPE_FORMAT,
|
||||||
|
DEFAULT_FORMAT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstFakeSrc::handoff:
|
* GstFakeSrc::handoff:
|
||||||
|
@ -367,6 +381,7 @@ gst_fake_src_init (GstFakeSrc * fakesrc, GstFakeSrcClass * g_class)
|
||||||
fakesrc->last_message = NULL;
|
fakesrc->last_message = NULL;
|
||||||
fakesrc->datarate = DEFAULT_DATARATE;
|
fakesrc->datarate = DEFAULT_DATARATE;
|
||||||
fakesrc->sync = DEFAULT_SYNC;
|
fakesrc->sync = DEFAULT_SYNC;
|
||||||
|
fakesrc->format = DEFAULT_FORMAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -501,6 +516,9 @@ gst_fake_src_set_property (GObject * object, guint prop_id,
|
||||||
case PROP_IS_LIVE:
|
case PROP_IS_LIVE:
|
||||||
gst_base_src_set_live (basesrc, g_value_get_boolean (value));
|
gst_base_src_set_live (basesrc, g_value_get_boolean (value));
|
||||||
break;
|
break;
|
||||||
|
case PROP_FORMAT:
|
||||||
|
src->format = g_value_get_enum (value);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
@ -573,6 +591,9 @@ gst_fake_src_get_property (GObject * object, guint prop_id, GValue * value,
|
||||||
case PROP_IS_LIVE:
|
case PROP_IS_LIVE:
|
||||||
g_value_set_boolean (value, gst_base_src_is_live (basesrc));
|
g_value_set_boolean (value, gst_base_src_is_live (basesrc));
|
||||||
break;
|
break;
|
||||||
|
case PROP_FORMAT:
|
||||||
|
g_value_set_enum (value, src->format);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
@ -835,6 +856,8 @@ gst_fake_src_start (GstBaseSrc * basesrc)
|
||||||
src->pattern_byte = 0x00;
|
src->pattern_byte = 0x00;
|
||||||
src->bytes_sent = 0;
|
src->bytes_sent = 0;
|
||||||
|
|
||||||
|
gst_base_src_set_format (basesrc, src->format);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -147,6 +147,7 @@ struct _GstFakeSrc {
|
||||||
gboolean signal_handoffs;
|
gboolean signal_handoffs;
|
||||||
gboolean dump;
|
gboolean dump;
|
||||||
gboolean can_activate_pull;
|
gboolean can_activate_pull;
|
||||||
|
GstFormat format;
|
||||||
|
|
||||||
guint64 bytes_sent;
|
guint64 bytes_sent;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue