mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
capssetter: Some minor cleanup
This commit is contained in:
parent
0a2a0fc344
commit
860d5e7efe
2 changed files with 11 additions and 20 deletions
|
@ -133,30 +133,28 @@ gst_caps_setter_base_init (gpointer g_class)
|
||||||
static void
|
static void
|
||||||
gst_caps_setter_class_init (GstCapsSetterClass * g_class)
|
gst_caps_setter_class_init (GstCapsSetterClass * g_class)
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class;
|
GObjectClass *gobject_class = (GObjectClass *) g_class;
|
||||||
GstBaseTransformClass *trans_class;
|
GstBaseTransformClass *trans_class = (GstBaseTransformClass *) g_class;
|
||||||
|
|
||||||
gobject_class = G_OBJECT_CLASS (g_class);
|
|
||||||
trans_class = GST_BASE_TRANSFORM_CLASS (g_class);
|
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_INIT (caps_setter_debug, "capssetter", 0, "capssetter");
|
GST_DEBUG_CATEGORY_INIT (caps_setter_debug, "capssetter", 0, "capssetter");
|
||||||
|
|
||||||
gobject_class->set_property = gst_caps_setter_set_property;
|
gobject_class->set_property = gst_caps_setter_set_property;
|
||||||
gobject_class->get_property = gst_caps_setter_get_property;
|
gobject_class->get_property = gst_caps_setter_get_property;
|
||||||
|
|
||||||
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_caps_setter_finalize);
|
gobject_class->finalize = gst_caps_setter_finalize;
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_CAPS,
|
g_object_class_install_property (gobject_class, PROP_CAPS,
|
||||||
g_param_spec_boxed ("caps", "Merge caps",
|
g_param_spec_boxed ("caps", "Merge caps",
|
||||||
"Merge these caps (thereby overwriting) in the stream",
|
"Merge these caps (thereby overwriting) in the stream",
|
||||||
GST_TYPE_CAPS, G_PARAM_READWRITE));
|
GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
g_object_class_install_property (gobject_class, PROP_JOIN,
|
g_object_class_install_property (gobject_class, PROP_JOIN,
|
||||||
g_param_spec_boolean ("join", "Join",
|
g_param_spec_boolean ("join", "Join",
|
||||||
"Match incoming caps' mime-type to mime-type of provided caps",
|
"Match incoming caps' mime-type to mime-type of provided caps",
|
||||||
DEFAULT_JOIN, G_PARAM_READWRITE));
|
DEFAULT_JOIN, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
g_object_class_install_property (gobject_class, PROP_REPLACE,
|
g_object_class_install_property (gobject_class, PROP_REPLACE,
|
||||||
g_param_spec_boolean ("replace", "Replace",
|
g_param_spec_boolean ("replace", "Replace",
|
||||||
"Drop fields of incoming caps", DEFAULT_REPLACE, G_PARAM_READWRITE));
|
"Drop fields of incoming caps", DEFAULT_REPLACE,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
trans_class->transform_size =
|
trans_class->transform_size =
|
||||||
GST_DEBUG_FUNCPTR (gst_caps_setter_transform_size);
|
GST_DEBUG_FUNCPTR (gst_caps_setter_transform_size);
|
||||||
|
@ -198,14 +196,12 @@ static GstCaps *
|
||||||
gst_caps_setter_transform_caps (GstBaseTransform * trans,
|
gst_caps_setter_transform_caps (GstBaseTransform * trans,
|
||||||
GstPadDirection direction, GstCaps * caps)
|
GstPadDirection direction, GstCaps * caps)
|
||||||
{
|
{
|
||||||
GstCapsSetter *filter;
|
GstCapsSetter *filter = GST_CAPS_SETTER (trans);
|
||||||
GstCaps *ret, *filter_caps;
|
GstCaps *ret, *filter_caps;
|
||||||
GstStructure *structure, *merge;
|
GstStructure *structure, *merge;
|
||||||
const gchar *name;
|
const gchar *name;
|
||||||
gint i, j;
|
gint i, j;
|
||||||
|
|
||||||
filter = GST_CAPS_SETTER (trans);
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (trans, "receiving caps: %" GST_PTR_FORMAT, caps);
|
GST_DEBUG_OBJECT (trans, "receiving caps: %" GST_PTR_FORMAT, caps);
|
||||||
|
|
||||||
ret = gst_caps_copy (caps);
|
ret = gst_caps_copy (caps);
|
||||||
|
@ -265,10 +261,7 @@ static void
|
||||||
gst_caps_setter_set_property (GObject * object, guint prop_id,
|
gst_caps_setter_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec)
|
const GValue * value, GParamSpec * pspec)
|
||||||
{
|
{
|
||||||
GstCapsSetter *filter;
|
GstCapsSetter *filter = GST_CAPS_SETTER (object);
|
||||||
|
|
||||||
g_return_if_fail (GST_IS_CAPS_SETTER (object));
|
|
||||||
filter = GST_CAPS_SETTER (object);
|
|
||||||
|
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case PROP_CAPS:{
|
case PROP_CAPS:{
|
||||||
|
@ -325,10 +318,7 @@ static void
|
||||||
gst_caps_setter_get_property (GObject * object, guint prop_id, GValue * value,
|
gst_caps_setter_get_property (GObject * object, guint prop_id, GValue * value,
|
||||||
GParamSpec * pspec)
|
GParamSpec * pspec)
|
||||||
{
|
{
|
||||||
GstCapsSetter *filter;
|
GstCapsSetter *filter = GST_CAPS_SETTER (object);
|
||||||
|
|
||||||
g_return_if_fail (GST_IS_CAPS_SETTER (object));
|
|
||||||
filter = GST_CAPS_SETTER (object);
|
|
||||||
|
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case PROP_CAPS:
|
case PROP_CAPS:
|
||||||
|
|
|
@ -45,6 +45,7 @@ struct _GstCapsSetter
|
||||||
{
|
{
|
||||||
GstBaseTransform parent;
|
GstBaseTransform parent;
|
||||||
|
|
||||||
|
/* < private > */
|
||||||
/* properties */
|
/* properties */
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
gboolean join;
|
gboolean join;
|
||||||
|
|
Loading…
Reference in a new issue