}
G_DEFINE_TYPE_WITH_CODE (GESAsset, ges_asset, G_TYPE_OBJECT,
+ G_ADD_PRIVATE (GESAsset)
G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE, async_initable_iface_init)
G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, initable_iface_init)
G_IMPLEMENT_INTERFACE (GES_TYPE_META_CONTAINER, NULL));
ges_asset_class_init (GESAssetClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESAssetPrivate));
object_class->get_property = ges_asset_get_property;
object_class->set_property = ges_asset_set_property;
void
ges_asset_init (GESAsset * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_ASSET, GESAssetPrivate);
+ self->priv = ges_asset_get_instance_private (self);
self->priv->state = ASSET_INITIALIZING;
self->priv->proxied_asset_id = NULL;
#include "ges-audio-source.h"
#include "ges-layer.h"
-G_DEFINE_ABSTRACT_TYPE (GESAudioSource, ges_audio_source, GES_TYPE_SOURCE);
-
struct _GESAudioSourcePrivate
{
GstElement *capsfilter;
GESTrack *current_track;
};
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GESAudioSource, ges_audio_source,
+ GES_TYPE_SOURCE);
+
static void
_sync_element_to_layer_property_float (GESTrackElement * trksrc,
GstElement * element, const gchar * meta, const gchar * propname)
GESTrackElementClass *track_class = GES_TRACK_ELEMENT_CLASS (klass);
GESAudioSourceClass *audio_source_class = GES_AUDIO_SOURCE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESAudioSourcePrivate));
-
gobject_class->dispose = ges_audio_source_dispose;
track_class->nleobject_factorytype = "nlesource";
track_class->create_element = ges_audio_source_create_element;
static void
ges_audio_source_init (GESAudioSource * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_AUDIO_SOURCE, GESAudioSourcePrivate);
+ self->priv = ges_audio_source_get_instance_private (self);
}
#include "ges-track-element.h"
#include "ges-audio-test-source.h"
-G_DEFINE_TYPE (GESAudioTestSource, ges_audio_test_source,
- GES_TYPE_AUDIO_SOURCE);
#define DEFAULT_VOLUME 1.0
struct _GESAudioTestSourcePrivate
PROP_0,
};
+G_DEFINE_TYPE_WITH_PRIVATE (GESAudioTestSource, ges_audio_test_source,
+ GES_TYPE_AUDIO_SOURCE);
+
static void ges_audio_test_source_get_property (GObject * object, guint
property_id, GValue * value, GParamSpec * pspec);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESAudioSourceClass *source_class = GES_AUDIO_SOURCE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESAudioTestSourcePrivate));
-
object_class->get_property = ges_audio_test_source_get_property;
object_class->set_property = ges_audio_test_source_set_property;
static void
ges_audio_test_source_init (GESAudioTestSource * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_AUDIO_TEST_SOURCE, GESAudioTestSourcePrivate);
-
+ self->priv = ges_audio_test_source_get_instance_private (self);
self->priv->freq = 440;
self->priv->volume = DEFAULT_VOLUME;
}
gpointer nothing;
};
-G_DEFINE_TYPE (GESAudioTrack, ges_audio_track, GES_TYPE_TRACK);
+G_DEFINE_TYPE_WITH_PRIVATE (GESAudioTrack, ges_audio_track, GES_TYPE_TRACK);
/****************************************************
* Private methods and utils *
static void
ges_audio_track_init (GESAudioTrack * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self), GES_TYPE_AUDIO_TRACK,
- GESAudioTrackPrivate);
+ self->priv = ges_audio_track_get_instance_private (self);
}
static void
/* GESTrackClass *parent_class = GES_TRACK_CLASS (klass);
*/
- g_type_class_add_private (klass, sizeof (GESAudioTrackPrivate));
-
object_class->finalize = ges_audio_track_finalize;
GES_TRACK_CLASS (klass)->get_mixing_element = ges_smart_adder_new;
#include <gst/controller/gstdirectcontrolbinding.h>
-G_DEFINE_TYPE (GESAudioTransition, ges_audio_transition, GES_TYPE_TRANSITION);
-
struct _GESAudioTransitionPrivate
{
/* these enable volume interpolation. Unlike video, both inputs are adjusted
PROP_0,
};
+G_DEFINE_TYPE_WITH_PRIVATE (GESAudioTransition, ges_audio_transition,
+ GES_TYPE_TRANSITION);
#define fast_element_link(a,b) gst_element_link_pads_full((a),"src",(b),"sink",GST_PAD_LINK_CHECK_NOTHING)
GObjectClass *object_class;
GESTrackElementClass *toclass;
- g_type_class_add_private (klass, sizeof (GESAudioTransitionPrivate));
-
object_class = G_OBJECT_CLASS (klass);
toclass = GES_TRACK_ELEMENT_CLASS (klass);
ges_audio_transition_init (GESAudioTransition * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_AUDIO_TRANSITION, GESAudioTransitionPrivate);
+ self->priv = ges_audio_transition_get_instance_private (self);
}
static void
}
G_DEFINE_TYPE_WITH_CODE (GESAudioUriSource, ges_audio_uri_source,
- GES_TYPE_AUDIO_SOURCE,
+ GES_TYPE_AUDIO_SOURCE, G_ADD_PRIVATE (GESAudioUriSource)
G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE,
ges_extractable_interface_init));
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESAudioSourceClass *source_class = GES_AUDIO_SOURCE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESAudioUriSourcePrivate));
-
object_class->get_property = ges_audio_uri_source_get_property;
object_class->set_property = ges_audio_uri_source_set_property;
object_class->dispose = ges_audio_uri_source_dispose;
static void
ges_audio_uri_source_init (GESAudioUriSource * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_AUDIO_URI_SOURCE, GESAudioUriSourcePrivate);
+ self->priv = ges_audio_uri_source_get_instance_private (self);
g_signal_connect (self, "notify::track",
G_CALLBACK (ges_audio_uri_source_track_set_cb), NULL);
#include "ges-internal.h"
#include "ges-types.h"
-G_DEFINE_ABSTRACT_TYPE (GESBaseEffectClip, ges_base_effect_clip,
- GES_TYPE_OPERATION_CLIP);
-
struct _GESBaseEffectClipPrivate
{
void *nothing;
};
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GESBaseEffectClip, ges_base_effect_clip,
+ GES_TYPE_OPERATION_CLIP);
static void
ges_base_effect_clip_class_init (GESBaseEffectClipClass * klass)
{
- g_type_class_add_private (klass, sizeof (GESBaseEffectClipPrivate));
-
}
static void
ges_base_effect_clip_init (GESBaseEffectClip * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_BASE_EFFECT_CLIP, GESBaseEffectClipPrivate);
+ self->priv = ges_base_effect_clip_get_instance_private (self);
}
#include "ges-track-element.h"
#include "ges-base-effect.h"
-G_DEFINE_ABSTRACT_TYPE (GESBaseEffect, ges_base_effect, GES_TYPE_OPERATION);
-
struct _GESBaseEffectPrivate
{
void *nothing;
};
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GESBaseEffect, ges_base_effect,
+ GES_TYPE_OPERATION);
+
static void
ges_base_effect_class_init (GESBaseEffectClass * klass)
{
- g_type_class_add_private (klass, sizeof (GESBaseEffectPrivate));
}
static void
ges_base_effect_init (GESBaseEffect * self)
{
- self->priv =
- G_TYPE_INSTANCE_GET_PRIVATE (self, GES_TYPE_BASE_EFFECT,
- GESBaseEffectPrivate);
+ self->priv = ges_base_effect_get_instance_private (self);
}
void *nothing;
};
-G_DEFINE_ABSTRACT_TYPE (GESBaseTransitionClip, ges_base_transition_clip,
- GES_TYPE_OPERATION_CLIP);
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GESBaseTransitionClip,
+ ges_base_transition_clip, GES_TYPE_OPERATION_CLIP);
static void
ges_base_transition_clip_class_init (GESBaseTransitionClipClass * klass)
{
- g_type_class_add_private (klass, sizeof (GESBaseTransitionClipPrivate));
}
static void
ges_base_transition_clip_init (GESBaseTransitionClip * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_BASE_TRANSITION_CLIP, GESBaseTransitionClipPrivate);
+ self->priv = ges_base_transition_clip_get_instance_private (self);
}
#define GST_CAT_DEFAULT base_xml_formatter
#define parent_class ges_base_xml_formatter_parent_class
-G_DEFINE_ABSTRACT_TYPE (GESBaseXmlFormatter, ges_base_xml_formatter,
- GES_TYPE_FORMATTER);
#define _GET_PRIV(o)\
(((GESBaseXmlFormatter*) o)->priv)
static guint signals[LAST_SIGNAL];
*/
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GESBaseXmlFormatter,
+ ges_base_xml_formatter, GES_TYPE_FORMATTER);
+
static GMarkupParseContext *
create_parser_context (GESBaseXmlFormatter * self, const gchar * uri,
GError ** error)
{
GESBaseXmlFormatterPrivate *priv;
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_BASE_XML_FORMATTER, GESBaseXmlFormatterPrivate);
+ self->priv = ges_base_xml_formatter_get_instance_private (self);
priv = self->priv;
GESFormatterClass *formatter_klass = GES_FORMATTER_CLASS (self_class);
GObjectClass *object_class = G_OBJECT_CLASS (self_class);
- g_type_class_add_private (self_class, sizeof (GESBaseXmlFormatterPrivate));
object_class->dispose = _dispose;
object_class->finalize = _finalize;
#include "ges-clip-asset.h"
-G_DEFINE_TYPE (GESClipAsset, ges_clip_asset, GES_TYPE_ASSET);
#define GES_CLIP_ASSET_GET_PRIVATE(o)\
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GES_TYPE_CLIP_ASSET, \
GESClipAssetPrivate))
static GParamSpec *properties[PROP_LAST];
+G_DEFINE_TYPE_WITH_PRIVATE (GESClipAsset, ges_clip_asset, GES_TYPE_ASSET);
+
/***********************************************
* *
* GObject vmetods implemenation *
static void
ges_clip_asset_init (GESClipAsset * self)
{
- self->priv = GES_CLIP_ASSET_GET_PRIVATE (self);
+ self->priv = ges_clip_asset_get_instance_private (self);
}
static void
{
GObjectClass *object_class = G_OBJECT_CLASS (self_class);
- g_type_class_add_private (self_class, sizeof (GESClipAssetPrivate));
object_class->constructed = _constructed;
object_class->get_property = _get_property;
object_class->set_property = _set_property;
static gboolean _trim (GESTimelineElement * element, GstClockTime start);
static void _compute_height (GESContainer * container);
-G_DEFINE_ABSTRACT_TYPE (GESClip, ges_clip, GES_TYPE_CONTAINER);
-
typedef enum
{
GES_CLIP_IS_SPLITTING = (1 << 0),
static GParamSpec *properties[PROP_LAST];
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GESClip, ges_clip, GES_TYPE_CONTAINER);
+
/****************************************************
* Listen to our children *
****************************************************/
GESContainerClass *container_class = GES_CONTAINER_CLASS (klass);
GESTimelineElementClass *element_class = GES_TIMELINE_ELEMENT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESClipPrivate));
-
object_class->get_property = ges_clip_get_property;
object_class->set_property = ges_clip_set_property;
object_class->finalize = ges_clip_finalize;
static void
ges_clip_init (GESClip * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_CLIP, GESClipPrivate);
+ self->priv = ges_clip_get_instance_private (self);
/* FIXME, check why it was done this way _DURATION (self) = GST_SECOND; */
self->priv->layer = NULL;
self->priv->nb_effects = 0;
};
-G_DEFINE_TYPE (GESCommandLineFormatter, ges_command_line_formatter,
+G_DEFINE_TYPE_WITH_PRIVATE (GESCommandLineFormatter, ges_command_line_formatter,
GES_TYPE_FORMATTER);
static gboolean
}
static void
-ges_command_line_formatter_init (GESCommandLineFormatter *
- ges_command_line_formatter)
+ges_command_line_formatter_init (GESCommandLineFormatter * formatter)
{
- ges_command_line_formatter->priv =
- G_TYPE_INSTANCE_GET_PRIVATE (ges_command_line_formatter,
- GES_TYPE_COMMAND_LINE_FORMATTER, GESCommandLineFormatterPrivate);
-
- /* TODO: Add initialization code here */
+ formatter->priv = ges_command_line_formatter_get_instance_private (formatter);
}
static void
ges_command_line_formatter_finalize (GObject * object)
{
- /* TODO: Add deinitalization code here */
-
G_OBJECT_CLASS (ges_command_line_formatter_parent_class)->finalize (object);
}
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESFormatterClass *formatter_klass = GES_FORMATTER_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESCommandLineFormatterPrivate));
-
object_class->finalize = ges_command_line_formatter_finalize;
formatter_klass->can_load_uri = _can_load;
#include <string.h>
-#define _GET_PRIV(o) (G_TYPE_INSTANCE_GET_PRIVATE (self, GES_TYPE_CONTAINER, GESContainerPrivate))
-
-G_DEFINE_ABSTRACT_TYPE (GESContainer, ges_container, GES_TYPE_TIMELINE_ELEMENT);
-
GST_DEBUG_CATEGORY_STATIC (ges_container_debug);
#undef GST_CAT_DEFAULT
#define GST_CAT_DEFAULT ges_container_debug
static GParamSpec *properties[PROP_LAST];
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GESContainer, ges_container,
+ GES_TYPE_TIMELINE_ELEMENT);
+
/************************
* Private methods *
************************/
GST_DEBUG_CATEGORY_INIT (ges_container_debug, "gescontainer",
GST_DEBUG_FG_YELLOW, "ges container");
- g_type_class_add_private (klass, sizeof (GESContainerPrivate));
-
object_class->get_property = _get_property;
object_class->set_property = _set_property;
object_class->dispose = _dispose;
static void
ges_container_init (GESContainer * self)
{
- self->priv = _GET_PRIV (self);
+ self->priv = ges_container_get_instance_private (self);
/* FIXME, check why default was GST_SECOND? (before the existend of
* ges-container)
#include "ges-track-element.h"
#include "ges-internal.h"
-G_DEFINE_TYPE (GESEffectAsset, ges_effect_asset, GES_TYPE_TRACK_ELEMENT_ASSET);
-
struct _GESEffectAssetPrivate
{
gpointer nothing;
};
-
+G_DEFINE_TYPE_WITH_PRIVATE (GESEffectAsset, ges_effect_asset,
+ GES_TYPE_TRACK_ELEMENT_ASSET);
static void
_fill_track_type (GESAsset * asset)
static void
ges_effect_asset_init (GESEffectAsset * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_EFFECT_ASSET, GESEffectAssetPrivate);
+ self->priv = ges_effect_asset_get_instance_private (self);
}
static void
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESAssetClass *asset_class = GES_ASSET_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESEffectAssetPrivate));
-
object_class->finalize = ges_effect_asset_finalize;
object_class->constructed = ges_effect_asset_constructed;
asset_class->extract = _extract;
#include "ges-internal.h"
#include "ges-types.h"
-G_DEFINE_TYPE (GESEffectClip, ges_effect_clip, GES_TYPE_BASE_EFFECT_CLIP);
-
struct _GESEffectClipPrivate
{
gchar *video_bin_description;
gchar *audio_bin_description;
};
+G_DEFINE_TYPE_WITH_PRIVATE (GESEffectClip, ges_effect_clip,
+ GES_TYPE_BASE_EFFECT_CLIP);
+
enum
{
PROP_0,
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESClipClass *timobj_class = GES_CLIP_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESEffectClipPrivate));
-
object_class->get_property = ges_effect_clip_get_property;
object_class->set_property = ges_effect_clip_set_property;
object_class->finalize = ges_effect_clip_finalize;
static void
ges_effect_clip_init (GESEffectClip * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_EFFECT_CLIP, GESEffectClipPrivate);
-
+ self->priv = ges_effect_clip_get_instance_private (self);
}
static GESTrackElement *
static void ges_extractable_interface_init (GESExtractableInterface * iface);
-G_DEFINE_TYPE_WITH_CODE (GESEffect,
- ges_effect, GES_TYPE_BASE_EFFECT,
- G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE,
- ges_extractable_interface_init));
static void ges_effect_dispose (GObject * object);
static void ges_effect_finalize (GObject * object);
PROP_BIN_DESCRIPTION,
};
+G_DEFINE_TYPE_WITH_CODE (GESEffect,
+ ges_effect, GES_TYPE_BASE_EFFECT, G_ADD_PRIVATE (GESEffect)
+ G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE,
+ ges_extractable_interface_init));
+
static gchar *
extractable_check_id (GType type, const gchar * id, GError ** error)
{
obj_bg_class = GES_TRACK_ELEMENT_CLASS (klass);
element_class = GES_TIMELINE_ELEMENT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESEffectPrivate));
-
object_class->get_property = ges_effect_get_property;
object_class->set_property = ges_effect_set_property;
object_class->dispose = ges_effect_dispose;
static void
ges_effect_init (GESEffect * self)
{
- self->priv =
- G_TYPE_INSTANCE_GET_PRIVATE (self, GES_TYPE_EFFECT, GESEffectPrivate);
+ self->priv = ges_effect_get_instance_private (self);
}
static void
/* TODO Add a GCancellable somewhere in the API */
static void ges_extractable_interface_init (GESExtractableInterface * iface);
-G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GESFormatter, ges_formatter,
- G_TYPE_INITIALLY_UNOWNED, G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE,
- ges_extractable_interface_init));
-
struct _GESFormatterPrivate
{
gpointer nothing;
};
+G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GESFormatter, ges_formatter,
+ G_TYPE_INITIALLY_UNOWNED, G_ADD_PRIVATE (GESFormatter)
+ G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE,
+ ges_extractable_interface_init));
+
static void ges_formatter_dispose (GObject * object);
static gboolean default_can_load_uri (GESFormatter * dummy_instance,
const gchar * uri, GError ** error);
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESFormatterPrivate));
-
object_class->dispose = ges_formatter_dispose;
klass->can_load_uri = default_can_load_uri;
static void
ges_formatter_init (GESFormatter * object)
{
- object->priv = G_TYPE_INSTANCE_GET_PRIVATE (object,
- GES_TYPE_FORMATTER, GESFormatterPrivate);
+ object->priv = ges_formatter_get_instance_private (object);
object->project = NULL;
}
#include <string.h>
#define parent_class ges_group_parent_class
-G_DEFINE_TYPE (GESGroup, ges_group, GES_TYPE_CONTAINER);
-
#define GES_CHILDREN_INIBIT_SIGNAL_EMISSION (GES_CHILDREN_LAST + 1)
#define GES_GROUP_SIGNALS_IDS_DATA_KEY_FORMAT "ges-group-signals-ids-%p"
static GParamSpec *properties[PROP_LAST] = { NULL, };
+G_DEFINE_TYPE_WITH_PRIVATE (GESGroup, ges_group, GES_TYPE_CONTAINER);
+
/****************************************************
* Our listening of children *
****************************************************/
GESContainerClass *container_class = GES_CONTAINER_CLASS (klass);
GESTimelineElementClass *element_class = GES_TIMELINE_ELEMENT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESGroupPrivate));
-
object_class->get_property = ges_group_get_property;
object_class->set_property = ges_group_set_property;
static void
ges_group_init (GESGroup * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_GROUP, GESGroupPrivate);
+ self->priv = ges_group_get_instance_private (self);
self->priv->setting_value = FALSE;
}
#include "ges-track-element.h"
#include "ges-image-source.h"
-G_DEFINE_TYPE (GESImageSource, ges_image_source, GES_TYPE_VIDEO_SOURCE);
struct _GESImageSourcePrivate
{
PROP_URI
};
+G_DEFINE_TYPE_WITH_PRIVATE (GESImageSource, ges_image_source,
+ GES_TYPE_VIDEO_SOURCE);
static void
ges_image_source_get_property (GObject * object, guint property_id,
GValue * value, GParamSpec * pspec)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESVideoSourceClass *source_class = GES_VIDEO_SOURCE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESImageSourcePrivate));
-
object_class->get_property = ges_image_source_get_property;
object_class->set_property = ges_image_source_set_property;
object_class->dispose = ges_image_source_dispose;
static void
ges_image_source_init (GESImageSource * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_IMAGE_SOURCE, GESImageSourcePrivate);
+ self->priv = ges_image_source_get_instance_private (self);
}
/**
static void ges_meta_container_interface_init
(GESMetaContainerInterface * iface);
-G_DEFINE_TYPE_WITH_CODE (GESLayer, ges_layer,
- G_TYPE_INITIALLY_UNOWNED, G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE, NULL)
- G_IMPLEMENT_INTERFACE (GES_TYPE_META_CONTAINER,
- ges_meta_container_interface_init));
-
struct _GESLayerPrivate
{
/*< private > */
static guint ges_layer_signals[LAST_SIGNAL] = { 0 };
+G_DEFINE_TYPE_WITH_CODE (GESLayer, ges_layer,
+ G_TYPE_INITIALLY_UNOWNED, G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE, NULL)
+ G_ADD_PRIVATE (GESLayer)
+ G_IMPLEMENT_INTERFACE (GES_TYPE_META_CONTAINER,
+ ges_meta_container_interface_init));
+
/* GObject standard vmethods */
static void
ges_layer_get_property (GObject * object, guint property_id,
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESLayerPrivate));
-
object_class->get_property = ges_layer_get_property;
object_class->set_property = ges_layer_set_property;
object_class->dispose = ges_layer_dispose;
static void
ges_layer_init (GESLayer * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_LAYER, GESLayerPrivate);
+ self->priv = ges_layer_get_instance_private (self);
self->priv->priority = 0;
self->priv->auto_transition = FALSE;
iface->check_id = ges_extractable_check_id;
}
-G_DEFINE_TYPE_WITH_CODE (GESMultiFileSource, ges_multi_file_source,
- GES_TYPE_VIDEO_SOURCE,
- G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE,
- ges_extractable_interface_init));
-
struct _GESMultiFileSourcePrivate
{
/* Dummy variable */
PROP_URI
};
+G_DEFINE_TYPE_WITH_CODE (GESMultiFileSource, ges_multi_file_source,
+ GES_TYPE_VIDEO_SOURCE, G_ADD_PRIVATE (GESMultiFileSource)
+ G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE,
+ ges_extractable_interface_init));
+
static void
ges_multi_file_source_get_property (GObject * object, guint property_id,
GValue * value, GParamSpec * pspec)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESVideoSourceClass *source_class = GES_VIDEO_SOURCE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESMultiFileSourcePrivate));
-
object_class->get_property = ges_multi_file_source_get_property;
object_class->set_property = ges_multi_file_source_set_property;
object_class->dispose = ges_multi_file_source_dispose;
static void
ges_multi_file_source_init (GESMultiFileSource * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_MULTI_FILE_SOURCE, GESMultiFileSourcePrivate);
+ self->priv = ges_multi_file_source_get_instance_private (self);
}
/**
#include "ges-internal.h"
#include "ges-operation-clip.h"
-G_DEFINE_ABSTRACT_TYPE (GESOperationClip, ges_operation_clip, GES_TYPE_CLIP);
-
struct _GESOperationClipPrivate
{
void *nada;
};
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GESOperationClip, ges_operation_clip,
+ GES_TYPE_CLIP);
+
static void
ges_operation_clip_class_init (GESOperationClipClass * klass)
{
- g_type_class_add_private (klass, sizeof (GESOperationClipPrivate));
}
static void
ges_operation_clip_init (GESOperationClip * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_OPERATION_CLIP, GESOperationClipPrivate);
+ self->priv = ges_operation_clip_get_instance_private (self);
}
#include "ges-track-element.h"
#include "ges-operation.h"
-G_DEFINE_ABSTRACT_TYPE (GESOperation, ges_operation, GES_TYPE_TRACK_ELEMENT);
-
struct _GESOperationPrivate
{
/* Dummy variable */
void *nothing;
};
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GESOperation, ges_operation,
+ GES_TYPE_TRACK_ELEMENT);
+
static void
ges_operation_class_init (GESOperationClass * klass)
{
GESTrackElementClass *track_class = GES_TRACK_ELEMENT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESOperationPrivate));
-
track_class->nleobject_factorytype = "nleoperation";
}
static void
ges_operation_init (GESOperation * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_OPERATION, GESOperationPrivate);
+ self->priv = ges_operation_get_instance_private (self);
}
#include "ges-operation-clip.h"
#include "ges-overlay-clip.h"
-G_DEFINE_ABSTRACT_TYPE (GESOverlayClip, ges_overlay_clip,
- GES_TYPE_OPERATION_CLIP);
-
struct _GESOverlayClipPrivate
{
/* Dummy variable */
void *nothing;
};
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GESOverlayClip, ges_overlay_clip,
+ GES_TYPE_OPERATION_CLIP);
+
static void
ges_overlay_clip_class_init (GESOverlayClipClass * klass)
{
- g_type_class_add_private (klass, sizeof (GESOverlayClipPrivate));
}
static void
ges_overlay_clip_init (GESOverlayClip * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_OVERLAY_CLIP, GESOverlayClipPrivate);
+ self->priv = ges_overlay_clip_get_instance_private (self);
}
}
G_DEFINE_TYPE_WITH_CODE (GESPipeline, ges_pipeline,
- GST_TYPE_PIPELINE,
+ GST_TYPE_PIPELINE, G_ADD_PRIVATE (GESPipeline)
G_IMPLEMENT_INTERFACE (GST_TYPE_VIDEO_OVERLAY, video_overlay_init));
static void
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESPipelinePrivate));
-
GST_DEBUG_CATEGORY_INIT (ges_pipeline_debug, "gespipeline",
GST_DEBUG_FG_YELLOW, "ges pipeline");
ges_pipeline_init (GESPipeline * self)
{
GST_INFO_OBJECT (self, "Creating new 'playsink'");
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_PIPELINE, GESPipelinePrivate);
+ self->priv = ges_pipeline_get_instance_private (self);
self->priv->playsink =
gst_element_factory_make ("playsink", "internal-sinks");
#define VERSION "0.2"
#define DOUBLE_VERSION 0.2
-G_DEFINE_TYPE (GESPitiviFormatter, ges_pitivi_formatter, GES_TYPE_FORMATTER);
-
#undef GST_CAT_DEFAULT
GST_DEBUG_CATEGORY_STATIC (ges_pitivi_formatter_debug);
#define GST_CAT_DEFAULT ges_pitivi_formatter_debug
guint nb_sources;
};
+G_DEFINE_TYPE_WITH_PRIVATE (GESPitiviFormatter, ges_pitivi_formatter,
+ GES_TYPE_FORMATTER);
+
+
static void
list_table_destroyer (gpointer key, gpointer value, void *unused)
{
object_class = G_OBJECT_CLASS (klass);
formatter_klass = GES_FORMATTER_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESPitiviFormatterPrivate));
formatter_klass->can_load_uri = pitivi_can_load_uri;
formatter_klass->save_to_uri = NULL;
{
GESPitiviFormatterPrivate *priv;
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_PITIVI_FORMATTER, GESPitiviFormatterPrivate);
+ self->priv = ges_pitivi_formatter_get_instance_private (self);
priv = self->priv;
/* TODO We should rely on both extractable_type and @id to identify
* a Asset, not only @id
*/
-G_DEFINE_TYPE (GESProject, ges_project, GES_TYPE_ASSET);
-
struct _GESProjectPrivate
{
GHashTable *assets;
LAST_SIGNAL
};
+G_DEFINE_TYPE_WITH_PRIVATE (GESProject, ges_project, GES_TYPE_ASSET);
+
static guint _signals[LAST_SIGNAL] = { 0 };
static guint nb_projects = 0;
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESProjectPrivate));
-
klass->asset_added = NULL;
klass->missing_uri = ges_missing_uri_default;
klass->loading_error = NULL;
ges_project_init (GESProject * project)
{
GESProjectPrivate *priv = project->priv =
- G_TYPE_INSTANCE_GET_PRIVATE (project,
- GES_TYPE_PROJECT, GESProjectPrivate);
+ ges_project_get_instance_private (project);
priv->uri = NULL;
priv->formatters = NULL;
PROP_0,
};
-G_DEFINE_TYPE (GESSourceClip, ges_source_clip, GES_TYPE_CLIP);
+G_DEFINE_TYPE_WITH_PRIVATE (GESSourceClip, ges_source_clip, GES_TYPE_CLIP);
static void
ges_source_clip_get_property (GObject * object, guint property_id,
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESSourceClipPrivate));
-
object_class->get_property = ges_source_clip_get_property;
object_class->set_property = ges_source_clip_set_property;
object_class->finalize = ges_source_clip_finalize;
static void
ges_source_clip_init (GESSourceClip * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_SOURCE_CLIP, GESSourceClipPrivate);
+ self->priv = ges_source_clip_get_instance_private (self);
}
#include "ges-source.h"
#include "ges-layer.h"
#include "gstframepositioner.h"
-
-G_DEFINE_TYPE (GESSource, ges_source, GES_TYPE_TRACK_ELEMENT);
-
struct _GESSourcePrivate
{
/* Dummy variable */
GstFramePositioner *positioner;
};
+G_DEFINE_TYPE_WITH_PRIVATE (GESSource, ges_source, GES_TYPE_TRACK_ELEMENT);
+
/******************************
* Internal helper methods *
******************************/
{
GESTrackElementClass *track_class = GES_TRACK_ELEMENT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESSourcePrivate));
-
track_class->nleobject_factorytype = "nlesource";
track_class->create_element = NULL;
}
static void
ges_source_init (GESSource * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_SOURCE, GESSourcePrivate);
+ self->priv = ges_source_get_instance_private (self);
}
#include "ges-audio-test-source.h"
#include <string.h>
-G_DEFINE_TYPE (GESTestClip, ges_test_clip, GES_TYPE_SOURCE_CLIP);
-
#define DEFAULT_VOLUME 1.0
#define DEFAULT_VPATTERN GES_VIDEO_TEST_PATTERN_SMPTE
PROP_VOLUME,
};
+G_DEFINE_TYPE_WITH_PRIVATE (GESTestClip, ges_test_clip, GES_TYPE_SOURCE_CLIP);
+
static GESTrackElement
* ges_test_clip_create_track_element (GESClip * clip, GESTrackType type);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESClipClass *timobj_class = GES_CLIP_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESTestClipPrivate));
-
object_class->get_property = ges_test_clip_get_property;
object_class->set_property = ges_test_clip_set_property;
static void
ges_test_clip_init (GESTestClip * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_TEST_CLIP, GESTestClipPrivate);
+ self->priv = ges_test_clip_get_instance_private (self);
self->priv->freq = 0;
self->priv->volume = 0;
#include "ges-text-overlay.h"
#include <string.h>
-G_DEFINE_TYPE (GESTextOverlayClip, ges_text_overlay_clip,
- GES_TYPE_OVERLAY_CLIP);
#define DEFAULT_PROP_TEXT ""
#define DEFAULT_PROP_FONT_DESC "Serif 36"
PROP_YPOS,
};
+G_DEFINE_TYPE_WITH_PRIVATE (GESTextOverlayClip, ges_text_overlay_clip,
+ GES_TYPE_OVERLAY_CLIP);
+
static GESTrackElement
* ges_text_overlay_clip_create_track_element (GESClip * clip,
GESTrackType type);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESClipClass *timobj_class = GES_CLIP_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESTextOverlayClipPrivate));
-
object_class->get_property = ges_text_overlay_clip_get_property;
object_class->set_property = ges_text_overlay_clip_set_property;
object_class->dispose = ges_text_overlay_clip_dispose;
static void
ges_text_overlay_clip_init (GESTextOverlayClip * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_OVERLAY_TEXT_CLIP, GESTextOverlayClipPrivate);
+ self->priv = ges_text_overlay_clip_get_instance_private (self);
GES_TIMELINE_ELEMENT (self)->duration = 0;
/* Not 100% needed since gobject contents are memzero'd when created */
#include "ges-title-source.h"
#include "ges-text-overlay.h"
-G_DEFINE_TYPE (GESTextOverlay, ges_text_overlay, GES_TYPE_OPERATION);
-
struct _GESTextOverlayPrivate
{
gchar *text;
PROP_0,
};
+G_DEFINE_TYPE_WITH_PRIVATE (GESTextOverlay, ges_text_overlay,
+ GES_TYPE_OPERATION);
+
static void ges_text_overlay_dispose (GObject * object);
static void ges_text_overlay_finalize (GObject * object);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESTrackElementClass *bg_class = GES_TRACK_ELEMENT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESTextOverlayPrivate));
-
object_class->get_property = ges_text_overlay_get_property;
object_class->set_property = ges_text_overlay_set_property;
object_class->dispose = ges_text_overlay_dispose;
static void
ges_text_overlay_init (GESTextOverlay * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_TEXT_OVERLAY, GESTextOverlayPrivate);
+ self->priv = ges_text_overlay_get_instance_private (self);
self->priv->text = NULL;
self->priv->font_desc = NULL;
iface->set_asset = extractable_set_asset;
}
-G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GESTimelineElement, ges_timeline_element,
- G_TYPE_INITIALLY_UNOWNED,
- G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE, ges_extractable_interface_init)
- G_IMPLEMENT_INTERFACE (GES_TYPE_META_CONTAINER, NULL));
-
enum
{
PROP_0,
GESTimelineElement *self;
} EmitDeepNotifyInIdleData;
+G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GESTimelineElement, ges_timeline_element,
+ G_TYPE_INITIALLY_UNOWNED, G_ADD_PRIVATE (GESTimelineElement)
+ G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE, ges_extractable_interface_init)
+ G_IMPLEMENT_INTERFACE (GES_TYPE_META_CONTAINER, NULL));
+
static void
_set_child_property (GESTimelineElement * self G_GNUC_UNUSED, GObject * child,
GParamSpec * pspec, GValue * value)
static void
ges_timeline_element_init (GESTimelineElement * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_TIMELINE_ELEMENT, GESTimelineElementPrivate);
+ self->priv = ges_timeline_element_get_instance_private (self);
self->priv->serialize = TRUE;
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESTimelineElementPrivate));
-
object_class->get_property = _get_property;
object_class->set_property = _set_property;
static void ges_meta_container_interface_init
(GESMetaContainerInterface * iface);
-G_DEFINE_TYPE_WITH_CODE (GESTimeline, ges_timeline, GST_TYPE_BIN,
- G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE, ges_extractable_interface_init)
- G_IMPLEMENT_INTERFACE (GES_TYPE_META_CONTAINER,
- ges_meta_container_interface_init));
-
-
GST_DEBUG_CATEGORY_STATIC (ges_timeline_debug);
#undef GST_CAT_DEFAULT
#define GST_CAT_DEFAULT ges_timeline_debug
LAST_SIGNAL
};
+G_DEFINE_TYPE_WITH_CODE (GESTimeline, ges_timeline, GST_TYPE_BIN,
+ G_ADD_PRIVATE (GESTimeline)
+ G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE, ges_extractable_interface_init)
+ G_IMPLEMENT_INTERFACE (GES_TYPE_META_CONTAINER,
+ ges_meta_container_interface_init));
+
static GstBinClass *parent_class;
static guint ges_timeline_signals[LAST_SIGNAL] = { 0 };
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GstBinClass *bin_class = GST_BIN_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESTimelinePrivate));
-
GST_DEBUG_CATEGORY_INIT (ges_timeline_debug, "gestimeline",
GST_DEBUG_FG_YELLOW, "ges timeline");
{
GESTimelinePrivate *priv = self->priv;
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_TIMELINE, GESTimelinePrivate);
+ self->priv = ges_timeline_get_instance_private (self);
priv = self->priv;
self->layers = NULL;
#include "ges-title-source.h"
#include <string.h>
-G_DEFINE_TYPE (GESTitleClip, ges_title_clip, GES_TYPE_SOURCE_CLIP);
-
#define DEFAULT_TEXT ""
#define DEFAULT_FONT_DESC "Serif 36"
#define GES_TITLE_CLIP_VALIGN_TYPE (ges_title_clip_valign_get_type())
PROP_YPOS,
};
+G_DEFINE_TYPE_WITH_PRIVATE (GESTitleClip, ges_title_clip, GES_TYPE_SOURCE_CLIP);
+
static GESTrackElement
* ges_title_clip_create_track_element (GESClip * clip, GESTrackType type);
GESClipClass *clip_class = GES_CLIP_CLASS (klass);
GESContainerClass *container_class = GES_CONTAINER_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESTitleClipPrivate));
-
object_class->get_property = ges_title_clip_get_property;
object_class->set_property = ges_title_clip_set_property;
object_class->dispose = ges_title_clip_dispose;
static void
ges_title_clip_init (GESTitleClip * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_TITLE_CLIP, GESTitleClipPrivate);
+ self->priv = ges_title_clip_get_instance_private (self);
GES_TIMELINE_ELEMENT (self)->duration = 0;
/* Not 100% required since a new gobject's content will always be memzero'd */
#define DEFAULT_TEXT ""
#define DEFAULT_FONT_DESC "Serif 36"
-G_DEFINE_TYPE (GESTitleSource, ges_title_source, GES_TYPE_VIDEO_SOURCE);
-
struct _GESTitleSourcePrivate
{
gchar *text;
GstElement *background_el;
};
+G_DEFINE_TYPE_WITH_PRIVATE (GESTitleSource, ges_title_source,
+ GES_TYPE_VIDEO_SOURCE);
+
enum
{
PROP_0,
GESTimelineElementClass *timeline_element_class =
GES_TIMELINE_ELEMENT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESTitleSourcePrivate));
-
object_class->get_property = ges_title_source_get_property;
object_class->set_property = ges_title_source_set_property;
object_class->dispose = ges_title_source_dispose;
static void
ges_title_source_init (GESTitleSource * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_TITLE_SOURCE, GESTitleSourcePrivate);
+ self->priv = ges_title_source_get_instance_private (self);
self->priv->text = g_strdup (DEFAULT_TEXT);
self->priv->font_desc = g_strdup (DEFAULT_FONT_DESC);
static GParamSpec *properties[PROP_LAST];
-G_DEFINE_TYPE (GESTrackElementAsset, ges_track_element_asset, GES_TYPE_ASSET);
-
struct _GESTrackElementAssetPrivate
{
GESTrackType type;
};
+G_DEFINE_TYPE_WITH_PRIVATE (GESTrackElementAsset, ges_track_element_asset,
+ GES_TYPE_ASSET);
+
static void
_get_property (GObject * object, guint property_id,
GValue * value, GParamSpec * pspec)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESTrackElementAssetPrivate));
-
object_class->get_property = _get_property;
object_class->set_property = _set_property;
{
GESTrackElementAssetPrivate *priv;
- priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_TRACK_ELEMENT_ASSET, GESTrackElementAssetPrivate);
+ priv = self->priv = ges_track_element_asset_get_instance_private (self);
priv->type = GES_TRACK_TYPE_UNKNOWN;
#include "ges-clip.h"
#include "ges-meta-container.h"
-G_DEFINE_ABSTRACT_TYPE (GESTrackElement, ges_track_element,
- GES_TYPE_TIMELINE_ELEMENT);
-
struct _GESTrackElementPrivate
{
GESTrackType track_type;
static guint ges_track_element_signals[LAST_SIGNAL] = { 0 };
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GESTrackElement, ges_track_element,
+ GES_TYPE_TIMELINE_ELEMENT);
+
static GstElement *ges_track_element_create_gnl_object_func (GESTrackElement *
object);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESTimelineElementClass *element_class = GES_TIMELINE_ELEMENT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESTrackElementPrivate));
-
object_class->get_property = ges_track_element_get_property;
object_class->set_property = ges_track_element_set_property;
object_class->dispose = ges_track_element_dispose;
static void
ges_track_element_init (GESTrackElement * self)
{
- GESTrackElementPrivate *priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_TRACK_ELEMENT, GESTrackElementPrivate);
+ GESTrackElementPrivate *priv = self->priv =
+ ges_track_element_get_instance_private (self);
/* Sane default values */
GES_TIMELINE_ELEMENT_START (self) = 0;
#include "ges-video-track.h"
#include "ges-audio-track.h"
-G_DEFINE_TYPE_WITH_CODE (GESTrack, ges_track, GST_TYPE_BIN,
- G_IMPLEMENT_INTERFACE (GES_TYPE_META_CONTAINER, NULL));
-
static GstStaticPadTemplate ges_track_src_pad_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
static GParamSpec *properties[ARG_LAST];
+G_DEFINE_TYPE_WITH_CODE (GESTrack, ges_track, GST_TYPE_BIN,
+ G_ADD_PRIVATE (GESTrack)
+ G_IMPLEMENT_INTERFACE (GES_TYPE_META_CONTAINER, NULL));
+
+
static void composition_duration_cb (GstElement * composition, GParamSpec * arg
G_GNUC_UNUSED, GESTrack * obj);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GstElementClass *gstelement_class = (GstElementClass *) klass;
- g_type_class_add_private (klass, sizeof (GESTrackPrivate));
-
gstelement_class->change_state = GST_DEBUG_FUNCPTR (ges_track_change_state);
object_class->get_property = ges_track_get_property;
static void
ges_track_init (GESTrack * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_TRACK, GESTrackPrivate);
+ self->priv = ges_track_get_instance_private (self);
self->priv->composition = gst_element_factory_make ("nlecomposition", NULL);
self->priv->capsfilter = gst_element_factory_make ("capsfilter", NULL);
G_DEFINE_TYPE_WITH_CODE (GESTransitionClip,
ges_transition_clip, GES_TYPE_BASE_TRANSITION_CLIP,
+ G_ADD_PRIVATE (GESTransitionClip)
G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE,
ges_extractable_interface_init));
GESClipClass *timobj_class = GES_CLIP_CLASS (klass);
GESContainerClass *container_class = GES_CONTAINER_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESTransitionClipPrivate));
-
object_class->get_property = ges_transition_clip_get_property;
object_class->set_property = ges_transition_clip_set_property;
ges_transition_clip_init (GESTransitionClip * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_TRANSITION_CLIP, GESTransitionClipPrivate);
+ self->priv = ges_transition_clip_get_instance_private (self);
self->vtype = GES_VIDEO_STANDARD_TRANSITION_TYPE_NONE;
self->priv->vtype_name = NULL;
#include <ges/ges.h>
#include "ges-internal.h"
-G_DEFINE_ABSTRACT_TYPE (GESTransition, ges_transition, GES_TYPE_OPERATION);
-
struct _GESTransitionPrivate
{
/* Dummy variable */
void *nothing;
};
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GESTransition, ges_transition,
+ GES_TYPE_OPERATION);
+
static void
ges_transition_class_init (GESTransitionClass * klass)
{
- g_type_class_add_private (klass, sizeof (GESTransitionPrivate));
}
static void
ges_transition_init (GESTransition * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_TRANSITION, GESTransitionPrivate);
+ self->priv = ges_transition_get_instance_private (self);
}
initable_iface->init = NULL;
}
-G_DEFINE_TYPE_WITH_CODE (GESUriClipAsset, ges_uri_clip_asset,
- GES_TYPE_CLIP_ASSET,
- G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, initable_iface_init));
-
/* TODO: We should monitor files here, and add some way of reporting changes
* to user
*/
const gchar *uri;
};
+G_DEFINE_TYPE_WITH_CODE (GESUriClipAsset, ges_uri_clip_asset,
+ GES_TYPE_CLIP_ASSET, G_ADD_PRIVATE (GESUriClipAsset)
+ G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, initable_iface_init));
static void
ges_uri_clip_asset_get_property (GObject * object, guint property_id,
GstClockTime timeout;
const gchar *timeout_str;
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESUriClipAssetPrivate));
object_class->get_property = ges_uri_clip_asset_get_property;
object_class->set_property = ges_uri_clip_asset_set_property;
{
GESUriClipAssetPrivate *priv;
- priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_URI_CLIP_ASSET, GESUriClipAssetPrivate);
+ priv = self->priv = ges_uri_clip_asset_get_instance_private (self);
priv->info = NULL;
priv->duration = GST_CLOCK_TIME_NONE;
* by #GESUriClipAsset-s.
*/
-G_DEFINE_TYPE (GESUriSourceAsset, ges_uri_source_asset,
+G_DEFINE_TYPE_WITH_PRIVATE (GESUriSourceAsset, ges_uri_source_asset,
GES_TYPE_TRACK_ELEMENT_ASSET);
static GESExtractable *
static void
ges_uri_source_asset_class_init (GESUriSourceAssetClass * klass)
{
- g_type_class_add_private (klass, sizeof (GESUriSourceAssetPrivate));
-
GES_ASSET_CLASS (klass)->extract = _extract;
}
{
GESUriSourceAssetPrivate *priv;
- priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_URI_SOURCE_ASSET, GESUriSourceAssetPrivate);
+ priv = self->priv = ges_uri_source_asset_get_instance_private (self);
priv->sinfo = NULL;
priv->parent_asset = NULL;
#define parent_class ges_uri_clip_parent_class
-G_DEFINE_TYPE_WITH_CODE (GESUriClip, ges_uri_clip,
- GES_TYPE_SOURCE_CLIP,
- G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE,
- ges_extractable_interface_init));
-
GESExtractableInterface *parent_extractable_iface;
struct _GESUriClipPrivate
PROP_SUPPORTED_FORMATS,
};
+G_DEFINE_TYPE_WITH_CODE (GESUriClip, ges_uri_clip,
+ GES_TYPE_SOURCE_CLIP, G_ADD_PRIVATE (GESUriClip)
+ G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE,
+ ges_extractable_interface_init));
static GList *ges_uri_clip_create_track_elements (GESClip *
clip, GESTrackType type);
GESClipClass *timobj_class = GES_CLIP_CLASS (klass);
GESTimelineElementClass *element_class = GES_TIMELINE_ELEMENT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESUriClipPrivate));
-
object_class->get_property = ges_uri_clip_get_property;
object_class->set_property = ges_uri_clip_set_property;
object_class->finalize = ges_uri_clip_finalize;
static void
ges_uri_clip_init (GESUriClip * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_URI_CLIP, GESUriClipPrivate);
+ self->priv = ges_uri_clip_get_instance_private (self);
/* Setting the duration to -1 by default. */
GES_TIMELINE_ELEMENT (self)->duration = GST_CLOCK_TIME_NONE;
#include "gstframepositioner.h"
#define parent_class ges_video_source_parent_class
-G_DEFINE_ABSTRACT_TYPE (GESVideoSource, ges_video_source, GES_TYPE_SOURCE);
struct _GESVideoSourcePrivate
{
GstElement *capsfilter;
};
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GESVideoSource, ges_video_source,
+ GES_TYPE_SOURCE);
+
/* TrackElement VMethods */
static gboolean
GESTimelineElementClass *element_class = GES_TIMELINE_ELEMENT_CLASS (klass);
GESVideoSourceClass *video_source_class = GES_VIDEO_SOURCE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESVideoSourcePrivate));
-
element_class->set_priority = _set_priority;
element_class->lookup_child = _lookup_child;
static void
ges_video_source_init (GESVideoSource * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_VIDEO_SOURCE, GESVideoSourcePrivate);
+ self->priv = ges_video_source_get_instance_private (self);
self->priv->positioner = NULL;
self->priv->capsfilter = NULL;
}
#include "ges-track-element.h"
#include "ges-video-test-source.h"
-G_DEFINE_TYPE (GESVideoTestSource, ges_video_test_source,
- GES_TYPE_VIDEO_SOURCE);
-
#define DEFAULT_VPATTERN GES_VIDEO_TEST_PATTERN_SMPTE
struct _GESVideoTestSourcePrivate
GESVideoTestPattern pattern;
};
+G_DEFINE_TYPE_WITH_PRIVATE (GESVideoTestSource, ges_video_test_source,
+ GES_TYPE_VIDEO_SOURCE);
+
static GstElement *ges_video_test_source_create_source (GESTrackElement * self);
static void
{
GESVideoSourceClass *source_class = GES_VIDEO_SOURCE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESVideoTestSourcePrivate));
-
source_class->create_source = ges_video_test_source_create_source;
}
static void
ges_video_test_source_init (GESVideoTestSource * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_VIDEO_TEST_SOURCE, GESVideoTestSourcePrivate);
+ self->priv = ges_video_test_source_get_instance_private (self);
self->priv->pattern = DEFAULT_VPATTERN;
}
gpointer nothing;
};
-#define GES_VIDEO_TRACK_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GES_TYPE_VIDEO_TRACK, GESVideoTrackPrivate))
-
-G_DEFINE_TYPE (GESVideoTrack, ges_video_track, GES_TYPE_TRACK);
+G_DEFINE_TYPE_WITH_PRIVATE (GESVideoTrack, ges_video_track, GES_TYPE_TRACK);
static void
_sync_capsfilter_with_track (GESTrack * track, GstElement * capsfilter)
/* GESTrackClass *parent_class = GES_TRACK_CLASS (klass);
*/
- g_type_class_add_private (klass, sizeof (GESVideoTrackPrivate));
-
object_class->finalize = ges_video_track_finalize;
GES_TRACK_CLASS (klass)->get_mixing_element = ges_smart_mixer_new;
#include <gst/controller/gstdirectcontrolbinding.h>
#define parent_class ges_video_transition_parent_class
-G_DEFINE_TYPE (GESVideoTransition, ges_video_transition, GES_TYPE_TRANSITION);
static inline void
ges_video_transition_set_border_internal (GESVideoTransition * self,
static GParamSpec *properties[PROP_LAST];
+G_DEFINE_TYPE_WITH_PRIVATE (GESVideoTransition, ges_video_transition,
+ GES_TYPE_TRANSITION);
+
#define fast_element_link(a,b) gst_element_link_pads_full((a),"src",(b),"sink",GST_PAD_LINK_CHECK_NOTHING)
static GObject *link_element_to_mixer_with_smpte (GstBin * bin,
GESTrackElementClass *toclass;
GESTimelineElementClass *element_class = GES_TIMELINE_ELEMENT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESVideoTransitionPrivate));
-
object_class = G_OBJECT_CLASS (klass);
object_class->get_property = ges_video_transition_get_property;
static void
ges_video_transition_init (GESVideoTransition * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_VIDEO_TRANSITION, GESVideoTransitionPrivate);
+ self->priv = ges_video_transition_get_instance_private (self);
self->priv->crossfade_control_source = NULL;
self->priv->smpte_control_source = NULL;
}
G_DEFINE_TYPE_WITH_CODE (GESVideoUriSource, ges_video_uri_source,
- GES_TYPE_VIDEO_SOURCE,
+ GES_TYPE_VIDEO_SOURCE, G_ADD_PRIVATE (GESVideoUriSource)
G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE,
ges_extractable_interface_init));
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESVideoSourceClass *source_class = GES_VIDEO_SOURCE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GESVideoUriSourcePrivate));
-
object_class->get_property = ges_video_uri_source_get_property;
object_class->set_property = ges_video_uri_source_set_property;
object_class->dispose = ges_video_uri_source_dispose;
static void
ges_video_uri_source_init (GESVideoUriSource * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_VIDEO_URI_SOURCE, GESVideoUriSourcePrivate);
+ self->priv = ges_video_uri_source_get_instance_private (self);
g_signal_connect (self, "notify::track",
G_CALLBACK (ges_video_uri_source_track_set_cb), NULL);
#include "ges-internal.h"
#define parent_class ges_xml_formatter_parent_class
-G_DEFINE_TYPE (GESXmlFormatter, ges_xml_formatter, GES_TYPE_BASE_XML_FORMATTER);
-
#define API_VERSION 0
#define MINOR_VERSION 4
#define VERSION 0.4
#define COLLECT_STR_OPT (G_MARKUP_COLLECT_STRING | G_MARKUP_COLLECT_OPTIONAL)
-#define _GET_PRIV(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GES_TYPE_XML_FORMATTER, GESXmlFormatterPrivate))
+#define _GET_PRIV(o) (((GESXmlFormatter*)o)->priv)
struct _GESXmlFormatterPrivate
{
guint min_version;
};
+G_DEFINE_TYPE_WITH_PRIVATE (GESXmlFormatter, ges_xml_formatter,
+ GES_TYPE_BASE_XML_FORMATTER);
+
static inline void
_parse_ges_element (GMarkupParseContext * context, const gchar * element_name,
const gchar ** attribute_names, const gchar ** attribute_values,
static void
ges_xml_formatter_init (GESXmlFormatter * self)
{
- GESXmlFormatterPrivate *priv = _GET_PRIV (self);
+ GESXmlFormatterPrivate *priv = ges_xml_formatter_get_instance_private (self);
priv->project_opened = FALSE;
priv->element_id = g_hash_table_new (g_direct_hash, g_direct_equal);
basexmlformatter_class = GES_BASE_XML_FORMATTER_CLASS (self_class);
- g_type_class_add_private (self_class, sizeof (GESXmlFormatterPrivate));
object_class->get_property = _get_property;
object_class->set_property = _set_property;
object_class->dispose = _dispose;
#define _do_init \
GST_DEBUG_CATEGORY_INIT (nlecomposition_debug,"nlecomposition", GST_DEBUG_FG_BLUE | GST_DEBUG_BOLD, "GNonLin Composition");
#define nle_composition_parent_class parent_class
-G_DEFINE_TYPE_WITH_CODE (NleComposition, nle_composition, NLE_TYPE_OBJECT,
- _do_init);
enum
{
static GParamSpec *nleobject_properties[NLEOBJECT_PROP_LAST];
+G_DEFINE_TYPE_WITH_CODE (NleComposition, nle_composition, NLE_TYPE_OBJECT,
+ G_ADD_PRIVATE (NleComposition)
+ _do_init);
+
#define OBJECT_IN_ACTIVE_SEGMENT(comp,element) \
((NLE_OBJECT_START(element) < comp->priv->current_stack_stop) && \
(NLE_OBJECT_STOP(element) >= comp->priv->current_stack_start))
gstbin_class = (GstBinClass *) klass;
nleobject_class = (NleObjectClass *) klass;
- g_type_class_add_private (klass, sizeof (NleCompositionPrivate));
-
gst_element_class_set_static_metadata (gstelement_class,
"GNonLin Composition", "Filter/Editor", "Combines NLE objects",
"Wim Taymans <wim.taymans@gmail.com>, Edward Hervey <bilboed@bilboed.com>,"
GST_OBJECT_FLAG_SET (comp, NLE_OBJECT_SOURCE);
GST_OBJECT_FLAG_SET (comp, NLE_OBJECT_COMPOSITION);
- priv = G_TYPE_INSTANCE_GET_PRIVATE (comp, NLE_TYPE_COMPOSITION,
- NleCompositionPrivate);
+ priv = nle_composition_get_instance_private (comp);
priv->objects_start = NULL;
priv->objects_stop = NULL;
#define _do_init \
GST_DEBUG_CATEGORY_INIT (nlesource, "nlesource", GST_DEBUG_FG_BLUE | GST_DEBUG_BOLD, "GNonLin Source Element");
#define nle_source_parent_class parent_class
-G_DEFINE_TYPE_WITH_CODE (NleSource, nle_source, NLE_TYPE_OBJECT, _do_init);
-
struct _NleSourcePrivate
{
gboolean dispose_has_run;
gulong probeid;
};
+G_DEFINE_TYPE_WITH_CODE (NleSource, nle_source, NLE_TYPE_OBJECT,
+ G_ADD_PRIVATE (NleSource)
+ _do_init);
+
+
static gboolean nle_source_prepare (NleObject * object);
static gboolean nle_source_send_event (GstElement * element, GstEvent * event);
static gboolean nle_source_add_element (GstBin * bin, GstElement * element);
gstbin_class = (GstBinClass *) klass;
nleobject_class = (NleObjectClass *) klass;
- g_type_class_add_private (klass, sizeof (NleSourcePrivate));
-
gst_element_class_set_static_metadata (gstelement_class, "GNonLin Source",
"Filter/Editor",
"Manages source elements",
{
GST_OBJECT_FLAG_SET (source, NLE_OBJECT_SOURCE);
source->element = NULL;
- source->priv =
- G_TYPE_INSTANCE_GET_PRIVATE (source, NLE_TYPE_SOURCE, NleSourcePrivate);
+ source->priv = nle_source_get_instance_private (source);
GST_DEBUG_OBJECT (source, "Setting GstBin async-handling to TRUE");
g_object_set (G_OBJECT (source), "async-handling", TRUE, NULL);
ParsedOptions parsed_options;
};
-G_DEFINE_TYPE (GESLauncher, ges_launcher, G_TYPE_APPLICATION);
+G_DEFINE_TYPE_WITH_PRIVATE (GESLauncher, ges_launcher, G_TYPE_APPLICATION);
static const gchar *HELP_SUMMARY =
"ges-launch-1.0 creates a multimedia timeline and plays it back,\n"
G_APPLICATION_CLASS (klass)->local_command_line = _local_command_line;
G_APPLICATION_CLASS (klass)->startup = _startup;
G_APPLICATION_CLASS (klass)->shutdown = _shutdown;
- g_type_class_add_private (klass, sizeof (GESLauncherPrivate));
}
static void
ges_launcher_init (GESLauncher * self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GES_TYPE_LAUNCHER, GESLauncherPrivate);
+ self->priv = ges_launcher_get_instance_private (self);
self->priv->parsed_options.track_types =
GES_TRACK_TYPE_AUDIO | GES_TRACK_TYPE_VIDEO;
}