s/Dparam/DParam/ <taaz> i'll whine about an irrelevant thing: Dparam vs DParam. though Dparam is more consistantly s...

Original commit message from CVS:
s/Dparam/DParam/ <taaz> i'll whine about an irrelevant thing: Dparam vs DParam.  though Dparam is more consistantly screwed up with everything else ;)
This commit is contained in:
Steve Baker 2001-09-10 17:20:45 +00:00
parent 9347e2e4c6
commit 4fefa734d6
7 changed files with 138 additions and 147 deletions

View file

@ -159,7 +159,7 @@ static void
gst_sinesrc_init (GstSineSrc *src)
{
GstElement *element = GST_ELEMENT(src);
GstDparamManager *dpman;
GstDParamManager *dpman;
src->srcpad = gst_pad_new_from_template (
GST_PADTEMPLATE_GET (sinesrc_src_factory), "src");
@ -215,7 +215,7 @@ gst_sinesrc_get(GstPad *pad)
{
GstSineSrc *src;
GstBuffer *buf;
GstDparamManager *dpman;
GstDParamManager *dpman;
gint16 *samples;
gint i=0, frame_countdown;

View file

@ -23,12 +23,12 @@
#include "gstdparam.h"
static void gst_dparam_class_init (GstDparamClass *klass);
static void gst_dparam_base_class_init (GstDparamClass *klass);
static void gst_dparam_init (GstDparam *dparam);
static void gst_dparam_class_init (GstDParamClass *klass);
static void gst_dparam_base_class_init (GstDParamClass *klass);
static void gst_dparam_init (GstDParam *dparam);
static void gst_dparam_do_update_realtime (GstDparam *dparam, gint64 timestamp);
static GstDparamPoint* gst_dparam_get_point_realtime (GstDparam *dparam, gint64 timestamp);
static void gst_dparam_do_update_realtime (GstDParam *dparam, gint64 timestamp);
static GValue** gst_dparam_get_point_realtime (GstDParam *dparam, gint64 timestamp);
GType
gst_dparam_get_type(void) {
@ -36,23 +36,23 @@ gst_dparam_get_type(void) {
if (!dparam_type) {
static const GTypeInfo dparam_info = {
sizeof(GstDparamClass),
sizeof(GstDParamClass),
(GBaseInitFunc)gst_dparam_base_class_init,
NULL,
(GClassInitFunc)gst_dparam_class_init,
NULL,
NULL,
sizeof(GstDparam),
sizeof(GstDParam),
0,
(GInstanceInitFunc)gst_dparam_init,
};
dparam_type = g_type_register_static(GST_TYPE_OBJECT, "GstDparam", &dparam_info, 0);
dparam_type = g_type_register_static(GST_TYPE_OBJECT, "GstDParam", &dparam_info, 0);
}
return dparam_type;
}
static void
gst_dparam_base_class_init (GstDparamClass *klass)
gst_dparam_base_class_init (GstDParamClass *klass)
{
GObjectClass *gobject_class;
@ -61,14 +61,14 @@ gst_dparam_base_class_init (GstDparamClass *klass)
}
static void
gst_dparam_class_init (GstDparamClass *klass)
gst_dparam_class_init (GstDParamClass *klass)
{
GObjectClass *gobject_class;
GstDparamClass *dparam_class;
GstDParamClass *dparam_class;
GstObjectClass *gstobject_class;
gobject_class = (GObjectClass*)klass;
dparam_class = (GstDparamClass*)klass;
dparam_class = (GstDParamClass*)klass;
gstobject_class = (GstObjectClass*) klass;
//gstobject_class->save_thyself = gst_dparam_save_thyself;
@ -76,7 +76,7 @@ gst_dparam_class_init (GstDparamClass *klass)
}
static void
gst_dparam_init (GstDparam *dparam)
gst_dparam_init (GstDParam *dparam)
{
g_return_if_fail (dparam != NULL);
GST_DPARAM_VALUE(dparam) = NULL;
@ -86,12 +86,12 @@ gst_dparam_init (GstDparam *dparam)
/**
* gst_dparam_new:
*
* Returns: a new instance of GstDparam
* Returns: a new instance of GstDParam
*/
GstDparam*
GstDParam*
gst_dparam_new ()
{
GstDparam *dparam;
GstDParam *dparam;
dparam = g_object_new (gst_dparam_get_type (), NULL);
dparam->do_update_func = gst_dparam_do_update_realtime;
@ -104,12 +104,12 @@ gst_dparam_new ()
/**
* gst_dparam_set_parent
* @dparam: GstDparam instance
* @parent: the GstDparamManager that this dparam belongs to
* @dparam: GstDParam instance
* @parent: the GstDParamManager that this dparam belongs to
*
*/
void
gst_dparam_set_parent (GstDparam *dparam, GstObject *parent)
gst_dparam_set_parent (GstDParam *dparam, GstObject *parent)
{
g_return_if_fail (dparam != NULL);
g_return_if_fail (GST_IS_DPARAM (dparam));
@ -132,10 +132,10 @@ gst_dparam_set_parent (GstDparam *dparam, GstObject *parent)
*
* Returns: an newly created point containing an array of GValues
*/
GstDparamPoint*
GValue**
gst_dparam_new_point(gint64 timestamp, GType type, ...)
{
GstDparamPoint *point;
GValue **point;
GValue *value;
guint x;
gint values_length = 0;
@ -148,9 +148,7 @@ gst_dparam_new_point(gint64 timestamp, GType type, ...)
}
va_end (var_args);
point = g_new0(GstDparamPoint,1);
point->values = g_new0(GValue*,values_length + 1);
point->timestamp = timestamp;
point = g_new0(GValue*,values_length + 1);
va_start (var_args, type);
for (x=0 ; x < values_length ; x++){
@ -158,10 +156,10 @@ gst_dparam_new_point(gint64 timestamp, GType type, ...)
if (type != G_TYPE_NONE){
g_value_init(value, type);
}
point->values[x] = value;
point[x] = value;
type = va_arg (var_args, GType);
}
point->values[values_length] = NULL;
point[values_length] = NULL;
va_end (var_args);
GST_DEBUG(GST_CAT_PARAMS, "point with %d values created\n", values_length);
@ -170,18 +168,18 @@ gst_dparam_new_point(gint64 timestamp, GType type, ...)
}
static void
gst_dparam_do_update_realtime (GstDparam *dparam, gint64 timestamp)
gst_dparam_do_update_realtime (GstDParam *dparam, gint64 timestamp)
{
GST_DEBUG(GST_CAT_PARAMS, "updating point for %s(%p)\n",GST_DPARAM_NAME (dparam),dparam);
GST_DPARAM_LOCK(dparam);
GST_DPARAM_READY_FOR_UPDATE(dparam) = FALSE;
g_value_copy(dparam->point->values[0], GST_DPARAM_VALUE(dparam));
g_value_copy(dparam->point[0], GST_DPARAM_VALUE(dparam));
GST_DPARAM_UNLOCK(dparam);
}
static GstDparamPoint*
gst_dparam_get_point_realtime (GstDparam *dparam, gint64 timestamp)
static GValue**
gst_dparam_get_point_realtime (GstDParam *dparam, gint64 timestamp)
{
GST_DEBUG(GST_CAT_PARAMS, "getting point for %s(%p)\n",GST_DPARAM_NAME (dparam),dparam);
return dparam->point;

View file

@ -31,7 +31,7 @@ extern "C" {
#define GST_TYPE_DPARAM (gst_dparam_get_type ())
#define GST_DPARAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DPARAM,GstDparam))
#define GST_DPARAM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DPARAM,GstDparam))
#define GST_DPARAM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DPARAM,GstDParam))
#define GST_IS_DPARAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DPARAM))
#define GST_IS_DPARAM_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DPARAM))
@ -65,61 +65,54 @@ typedef enum {
GST_DPARAM_CLOSEST_AFTER,
GST_DPARAM_CLOSEST_BEFORE,
GST_DPARAM_EXACT,
} GstDparamSearchFlag;
} GstDParamSearchFlag;
typedef enum {
GST_DPARAM_NOT_FOUND = 0,
GST_DPARAM_FOUND_EXACT,
GST_DPARAM_FOUND_CLOSEST,
} GstDparamSearchResult;
} GstDParamSearchResult;
typedef struct _GstDparam GstDparam;
typedef struct _GstDparamClass GstDparamClass;
typedef struct _GstDparamModel GstDparamModel;
typedef struct _GstDparamPoint GstDparamPoint;
typedef struct _GstDParam GstDParam;
typedef struct _GstDParamClass GstDParamClass;
typedef struct _GstDParamModel GstDParamModel;
typedef GstDparamPoint* (*GstDparamInsertPointFunction) (GstDparam *dparam, guint64 timestamp);
typedef void (*GstDparamRemovePointFunction) (GstDparam *dparam, GstDparamPoint* point);
typedef GstDparamPoint* (*GstDparamGetPointFunction) (GstDparam *dparam, gint64 timestamp);
typedef GstDparamSearchResult (*GstDparamFindPointFunction) (GstDparam *dparam, gint64 *timestamp, GstDparamSearchFlag search_flag);
typedef GValue** (*GstDParamInsertPointFunction) (GstDParam *dparam, guint64 timestamp);
typedef void (*GstDParamRemovePointFunction) (GstDParam *dparam, GValue** point);
typedef GValue** (*GstDParamGetPointFunction) (GstDParam *dparam, gint64 timestamp);
typedef GstDParamSearchResult (*GstDParamFindPointFunction) (GstDParam *dparam, gint64 *timestamp, GstDParamSearchFlag search_flag);
typedef void (*GstDparamDoUpdateFunction) (GstDparam *dparam, gint64 timestamp);
typedef void (*GstDParamDoUpdateFunction) (GstDParam *dparam, gint64 timestamp);
struct _GstDparam {
struct _GstDParam {
GstObject object;
GstDparamGetPointFunction get_point_func;
GstDparamFindPointFunction find_point_func;
GstDParamGetPointFunction get_point_func;
GstDParamFindPointFunction find_point_func;
GstDparamDoUpdateFunction do_update_func;
GstDParamDoUpdateFunction do_update_func;
GstDparamInsertPointFunction insert_point_func;
GstDparamRemovePointFunction remove_point_func;
GstDParamInsertPointFunction insert_point_func;
GstDParamRemovePointFunction remove_point_func;
GMutex *lock;
GValue *value;
GstDparamPoint *point;
GValue **point;
gint64 next_update_timestamp;
gboolean ready_for_update;
};
struct _GstDparamClass {
struct _GstDParamClass {
GstObjectClass parent_class;
/* signal callbacks */
};
struct _GstDparamPoint {
GValue **values;
gint64 timestamp;
};
GType gst_dparam_get_type (void);
GstDparam* gst_dparam_new ();
void gst_dparam_set_parent (GstDparam *dparam, GstObject *parent);
GstDparamPoint* gst_dparam_new_point(gint64 timestamp, GType type, ...);
GstDParam* gst_dparam_new ();
void gst_dparam_set_parent (GstDParam *dparam, GstObject *parent);
GValue** gst_dparam_new_point(gint64 timestamp, GType type, ...);
#ifdef __cplusplus
}

View file

@ -25,14 +25,14 @@
#include <gst/gstelement.h>
static void gst_dpman_base_class_init (GstDparamManagerClass *klass);
static void gst_dpman_class_init (GstDparamManagerClass *klass);
static void gst_dpman_init (GstDparamManager *dpman);
static void gst_dpman_state_change (GstElement *element, gint state, GstDparamManager *dpman);
static void gst_dpman_caps_changed (GstPad *pad, GstCaps *caps, GstDparamManager *dpman);
static guint gst_dpman_first_countdown_synchronous(GstDparamManager *dpman, guint frames, gint64 timestamp);
static guint gst_dpman_first_countdown_noop(GstDparamManager *dpman, guint frames, gint64 timestamp);
static guint gst_dpman_countdown_noop(GstDparamManager *dpman, guint frame_count);
static void gst_dpman_base_class_init (GstDParamManagerClass *klass);
static void gst_dpman_class_init (GstDParamManagerClass *klass);
static void gst_dpman_init (GstDParamManager *dpman);
static void gst_dpman_state_change (GstElement *element, gint state, GstDParamManager *dpman);
static void gst_dpman_caps_changed (GstPad *pad, GstCaps *caps, GstDParamManager *dpman);
static guint gst_dpman_first_countdown_synchronous(GstDParamManager *dpman, guint frames, gint64 timestamp);
static guint gst_dpman_first_countdown_noop(GstDParamManager *dpman, guint frames, gint64 timestamp);
static guint gst_dpman_countdown_noop(GstDParamManager *dpman, guint frame_count);
GType
gst_dpman_get_type (void)
@ -41,23 +41,23 @@ gst_dpman_get_type (void)
if (!dpman_type) {
static const GTypeInfo dpman_info = {
sizeof(GstDparamManagerClass),
sizeof(GstDParamManagerClass),
(GBaseInitFunc)gst_dpman_base_class_init,
NULL,
(GClassInitFunc)gst_dpman_class_init,
NULL,
NULL,
sizeof(GstDparamManager),
sizeof(GstDParamManager),
0,
(GInstanceInitFunc)gst_dpman_init,
};
dpman_type = g_type_register_static(GST_TYPE_OBJECT, "GstDparamManager", &dpman_info, 0);
dpman_type = g_type_register_static(GST_TYPE_OBJECT, "GstDParamManager", &dpman_info, 0);
}
return dpman_type;
}
static void
gst_dpman_base_class_init (GstDparamManagerClass *klass)
gst_dpman_base_class_init (GstDParamManagerClass *klass)
{
GObjectClass *gobject_class;
@ -66,7 +66,7 @@ gst_dpman_base_class_init (GstDparamManagerClass *klass)
}
static void
gst_dpman_class_init (GstDparamManagerClass *klass)
gst_dpman_class_init (GstDParamManagerClass *klass)
{
GstObjectClass *gstobject_class;
GObjectClass *gobject_class;
@ -86,7 +86,7 @@ gst_dpman_class_init (GstDparamManagerClass *klass)
}
static void
gst_dpman_init (GstDparamManager *dpman)
gst_dpman_init (GstDParamManager *dpman)
{
GST_DPMAN_DPARAMS(dpman) = g_hash_table_new(g_str_hash,g_str_equal);
GST_DPMAN_DPARAMS_LIST(dpman) = NULL;
@ -100,15 +100,15 @@ gst_dpman_init (GstDparamManager *dpman)
/**
* gst_dpman_new:
* @name: name of the GstDparamManager instance
* @name: name of the GstDParamManager instance
* @parent: element which created this instance
*
* Returns: a new instance of GstDparamManager
* Returns: a new instance of GstDParamManager
*/
GstDparamManager*
GstDParamManager*
gst_dpman_new (gchar *name, GstElement *parent)
{
GstDparamManager *dpman;
GstDParamManager *dpman;
g_return_val_if_fail (name != NULL, NULL);
@ -123,8 +123,8 @@ gst_dpman_new (gchar *name, GstElement *parent)
/**
* gst_dpman_add_required_dparam:
* @dpman: GstDparamManager instance
* @dparam_name: a parameter name unique to this GstDparamManager
* @dpman: GstDParamManager instance
* @dparam_name: a parameter name unique to this GstDParamManager
* @type: the GValue type that this parameter will store
* @update_func: callback to update the element with the new value
* @update_data: will be included in the call to update_func
@ -132,13 +132,13 @@ gst_dpman_new (gchar *name, GstElement *parent)
* Returns: true if it was successfully added
*/
gboolean
gst_dpman_add_required_dparam (GstDparamManager *dpman,
gst_dpman_add_required_dparam (GstDParamManager *dpman,
gchar *dparam_name,
GType type,
GstDpmUpdateFunction update_func,
gpointer update_data)
{
GstDparamWrapper* dpwrap;
GstDParamWrapper* dpwrap;
g_return_val_if_fail (dpman != NULL, FALSE);
g_return_val_if_fail (GST_IS_DPMAN (dpman), FALSE);
@ -149,7 +149,7 @@ gst_dpman_add_required_dparam (GstDparamManager *dpman,
GST_DEBUG(GST_CAT_PARAMS,"adding required dparam: %s\n", dparam_name);
dpwrap = g_new0(GstDparamWrapper,1);
dpwrap = g_new0(GstDParamWrapper,1);
dpwrap->dparam_name = dparam_name;
dpwrap->update_func = update_func;
dpwrap->update_data = update_data;
@ -164,14 +164,14 @@ gst_dpman_add_required_dparam (GstDparamManager *dpman,
/**
* gst_dpman_remove_required_dparam:
* @dpman: GstDparamManager instance
* @dpman: GstDParamManager instance
* @dparam_name: the name of an existing parameter
*
*/
void
gst_dpman_remove_required_dparam (GstDparamManager *dpman, gchar *dparam_name)
gst_dpman_remove_required_dparam (GstDParamManager *dpman, gchar *dparam_name)
{
GstDparamWrapper* dpwrap;
GstDParamWrapper* dpwrap;
g_return_if_fail (dpman != NULL);
g_return_if_fail (GST_IS_DPMAN (dpman));
@ -193,16 +193,16 @@ gst_dpman_remove_required_dparam (GstDparamManager *dpman, gchar *dparam_name)
/**
* gst_dpman_attach_dparam:
* @dpman: GstDparamManager instance
* @dpman: GstDParamManager instance
* @dparam_name: a name previously added with gst_dpman_add_required_dparam
* @dparam: GstDparam instance to attach
* @dparam: GstDParam instance to attach
*
* Returns: true if it was successfully attached
*/
gboolean
gst_dpman_attach_dparam (GstDparamManager *dpman, gchar *dparam_name, GstDparam *dparam)
gst_dpman_attach_dparam (GstDParamManager *dpman, gchar *dparam_name, GstDParam *dparam)
{
GstDparamWrapper* dpwrap;
GstDParamWrapper* dpwrap;
g_return_val_if_fail (dpman != NULL, FALSE);
g_return_val_if_fail (GST_IS_DPMAN (dpman), FALSE);
@ -226,14 +226,14 @@ gst_dpman_attach_dparam (GstDparamManager *dpman, gchar *dparam_name, GstDparam
/**
* gst_dpman_dettach_dparam:
* @dpman: GstDparamManager instance
* @dparam_name: the name of a parameter with a previously attached GstDparam
* @dpman: GstDParamManager instance
* @dparam_name: the name of a parameter with a previously attached GstDParam
*
*/
void
gst_dpman_dettach_dparam (GstDparamManager *dpman, gchar *dparam_name)
gst_dpman_dettach_dparam (GstDParamManager *dpman, gchar *dparam_name)
{
GstDparamWrapper* dpwrap;
GstDParamWrapper* dpwrap;
g_return_if_fail (dpman != NULL);
g_return_if_fail (GST_IS_DPMAN (dpman));
@ -253,15 +253,15 @@ gst_dpman_dettach_dparam (GstDparamManager *dpman, gchar *dparam_name)
/**
* gst_dpman_get_dparam:
* @dpman: GstDparamManager instance
* @dpman: GstDParamManager instance
* @name: the name of an existing dparam instance
*
* Returns: the dparam with the given name - or NULL otherwise
*/
GstDparam *
gst_dpman_get_dparam (GstDparamManager *dpman, gchar *name)
GstDParam *
gst_dpman_get_dparam (GstDParamManager *dpman, gchar *name)
{
GstDparamWrapper* dpwrap;
GstDParamWrapper* dpwrap;
g_return_val_if_fail (dpman != NULL, NULL);
g_return_val_if_fail (GST_IS_DPMAN (dpman), NULL);
@ -275,7 +275,7 @@ gst_dpman_get_dparam (GstDparamManager *dpman, gchar *name)
/**
* gst_dpman_register_mode
* @klass: GstDparamManagerClass class instance
* @klass: GstDParamManagerClass class instance
* @modename: the unique name of the new mode
* @firstcountdownfunc: the function which will be called before each buffer is processed
* @countdownfunc: the function which may be called throughout the processing of a buffer
@ -284,7 +284,7 @@ gst_dpman_get_dparam (GstDparamManager *dpman, gchar *name)
*
*/
void
gst_dpman_register_mode (GstDparamManagerClass *klass,
gst_dpman_register_mode (GstDParamManagerClass *klass,
gchar *modename,
GstDpmModeFirstCountdownFunction firstcountdownfunc,
GstDpmModeCountdownFunction countdownfunc,
@ -310,22 +310,22 @@ gst_dpman_register_mode (GstDparamManagerClass *klass,
/**
* gst_dpman_set_mode
* @dpman: GstDparamManager instance
* @dpman: GstDParamManager instance
* @modename: the name of the mode to use
*
* Returns: TRUE if the mode was set, FALSE otherwise
*/
gboolean
gst_dpman_set_mode(GstDparamManager *dpman, gchar *modename)
gst_dpman_set_mode(GstDParamManager *dpman, gchar *modename)
{
GstDpmMode *mode=NULL;
GstDparamManagerClass *oclass;
GstDParamManagerClass *oclass;
g_return_val_if_fail (dpman != NULL, FALSE);
g_return_val_if_fail (GST_IS_DPMAN (dpman), FALSE);
g_return_val_if_fail (modename != NULL, FALSE);
oclass = (GstDparamManagerClass*)(G_OBJECT_GET_CLASS(dpman));
oclass = (GstDParamManagerClass*)(G_OBJECT_GET_CLASS(dpman));
mode = g_hash_table_lookup(oclass->modes, modename);
g_return_val_if_fail (mode != NULL, FALSE);
@ -345,12 +345,12 @@ gst_dpman_set_mode(GstDparamManager *dpman, gchar *modename)
/**
* gst_dpman_set_parent
* @dpman: GstDparamManager instance
* @parent: the element that this GstDparamManager belongs to
* @dpman: GstDParamManager instance
* @parent: the element that this GstDParamManager belongs to
*
*/
void
gst_dpman_set_parent (GstDparamManager *dpman, GstElement *parent)
gst_dpman_set_parent (GstDParamManager *dpman, GstElement *parent)
{
g_return_if_fail (dpman != NULL);
g_return_if_fail (GST_IS_DPMAN (dpman));
@ -364,12 +364,12 @@ gst_dpman_set_parent (GstDparamManager *dpman, GstElement *parent)
/**
* gst_dpman_set_rate_change_pad
* @dpman: GstDparamManager instance
* @dpman: GstDParamManager instance
* @pad: the pad which may have a "rate" caps property
*
*/
void
gst_dpman_set_rate_change_pad(GstDparamManager *dpman, GstPad *pad)
gst_dpman_set_rate_change_pad(GstDParamManager *dpman, GstPad *pad)
{
g_return_if_fail (dpman != NULL);
g_return_if_fail (GST_IS_DPMAN (dpman));
@ -381,11 +381,11 @@ gst_dpman_set_rate_change_pad(GstDparamManager *dpman, GstPad *pad)
}
static void
gst_dpman_state_change (GstElement *element, gint state, GstDparamManager *dpman)
gst_dpman_state_change (GstElement *element, gint state, GstDParamManager *dpman)
{
GSList *dwraps;
GstDparam *dparam;
GstDparamWrapper *dpwrap;
GstDParam *dparam;
GstDParamWrapper *dpwrap;
if (state == GST_STATE_PLAYING) return;
GST_DEBUG(GST_CAT_PARAMS, "initialising params\n");
@ -396,7 +396,7 @@ gst_dpman_state_change (GstElement *element, gint state, GstDparamManager *dpman
// force all params to be updated
dwraps = GST_DPMAN_DPARAMS_LIST(dpman);
while (dwraps){
dpwrap = (GstDparamWrapper*)dwraps->data;
dpwrap = (GstDParamWrapper*)dwraps->data;
dparam = dpwrap->dparam;
if (dparam){
@ -407,7 +407,7 @@ gst_dpman_state_change (GstElement *element, gint state, GstDparamManager *dpman
}
static void
gst_dpman_caps_changed (GstPad *pad, GstCaps *caps, GstDparamManager *dpman)
gst_dpman_caps_changed (GstPad *pad, GstCaps *caps, GstDParamManager *dpman)
{
g_return_if_fail (caps != NULL);
g_return_if_fail (dpman != NULL);
@ -419,11 +419,11 @@ gst_dpman_caps_changed (GstPad *pad, GstCaps *caps, GstDparamManager *dpman)
}
static guint
gst_dpman_first_countdown_synchronous(GstDparamManager *dpman, guint frames, gint64 timestamp)
gst_dpman_first_countdown_synchronous(GstDParamManager *dpman, guint frames, gint64 timestamp)
{
GSList *dwraps;
GstDparam *dparam;
GstDparamWrapper *dpwrap;
GstDParam *dparam;
GstDParamWrapper *dpwrap;
g_return_val_if_fail (dpman != NULL, frames);
g_return_val_if_fail (GST_IS_DPMAN (dpman), frames);
@ -431,7 +431,7 @@ gst_dpman_first_countdown_synchronous(GstDparamManager *dpman, guint frames, gin
// now check whether any passive dparams are ready for an update
dwraps = GST_DPMAN_DPARAMS_LIST(dpman);
while (dwraps){
dpwrap = (GstDparamWrapper*)dwraps->data;
dpwrap = (GstDParamWrapper*)dwraps->data;
dparam = dpwrap->dparam;
if (dparam && (GST_DPARAM_READY_FOR_UPDATE(dparam) ||
@ -446,13 +446,13 @@ gst_dpman_first_countdown_synchronous(GstDparamManager *dpman, guint frames, gin
}
static guint
gst_dpman_first_countdown_noop(GstDparamManager *dpman, guint frames, gint64 timestamp)
gst_dpman_first_countdown_noop(GstDParamManager *dpman, guint frames, gint64 timestamp)
{
return frames;
}
static guint
gst_dpman_countdown_noop(GstDparamManager *dpman, guint frame_count)
gst_dpman_countdown_noop(GstDParamManager *dpman, guint frame_count)
{
return 0;
}

View file

@ -30,8 +30,8 @@ extern "C" {
#endif /* __cplusplus */
#define GST_TYPE_DPMAN (gst_dpman_get_type ())
#define GST_DPMAN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DPMAN,GstDparamManager))
#define GST_DPMAN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DPMAN,GstDparamManager))
#define GST_DPMAN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DPMAN,GstDParamManager))
#define GST_DPMAN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DPMAN,GstDParamManager))
#define GST_IS_DPMAN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DPMAN))
#define GST_IS_DPMAN_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DPMAN))
@ -45,19 +45,19 @@ extern "C" {
#define GST_DPMAN_MODE_DATA(dpman) ((dpman)->mode_data)
#define GST_DPMAN_RATE(dpman) ((dpman)->rate)
typedef struct _GstDparamManager GstDparamManager;
typedef struct _GstDparamManagerClass GstDparamManagerClass;
typedef struct _GstDParamManager GstDParamManager;
typedef struct _GstDParamManagerClass GstDParamManagerClass;
typedef struct _GstDpmMode GstDpmMode;
typedef struct _GstDparamWrapper GstDparamWrapper;
typedef struct _GstDParamWrapper GstDParamWrapper;
typedef guint (*GstDpmModeFirstCountdownFunction) (GstDparamManager *dpman, guint frames, gint64 timestamp);
typedef guint (*GstDpmModeCountdownFunction) (GstDparamManager *dpman, guint frame_count);
typedef void (*GstDpmModeSetupFunction) (GstDparamManager *dpman);
typedef void (*GstDpmModeTeardownFunction) (GstDparamManager *dpman);
typedef guint (*GstDpmModeFirstCountdownFunction) (GstDParamManager *dpman, guint frames, gint64 timestamp);
typedef guint (*GstDpmModeCountdownFunction) (GstDParamManager *dpman, guint frame_count);
typedef void (*GstDpmModeSetupFunction) (GstDParamManager *dpman);
typedef void (*GstDpmModeTeardownFunction) (GstDParamManager *dpman);
typedef void (*GstDpmUpdateFunction) (GValue *value, gpointer data);
struct _GstDparamManager {
struct _GstDParamManager {
GstObject object;
GHashTable *dparams;
@ -71,7 +71,7 @@ struct _GstDparamManager {
guint rate;
};
struct _GstDparamManagerClass {
struct _GstDParamManagerClass {
GstObjectClass parent_class;
GHashTable *modes;
@ -85,10 +85,10 @@ struct _GstDpmMode {
GstDpmModeTeardownFunction teardownfunc;
};
struct _GstDparamWrapper {
struct _GstDParamWrapper {
gchar *dparam_name;
GValue *value;
GstDparam *dparam;
GstDParam *dparam;
GstDpmUpdateFunction update_func;
gpointer update_data;
};
@ -108,23 +108,23 @@ struct _GstDparamWrapper {
#define GST_DPMAN_DO_UPDATE(dpwrap) ((dpwrap->update_func)(dpwrap->value, dpwrap->update_data))
GType gst_dpman_get_type (void);
GstDparamManager* gst_dpman_new (gchar *name, GstElement *parent);
void gst_dpman_set_parent (GstDparamManager *dpman, GstElement *parent);
GstDParamManager* gst_dpman_new (gchar *name, GstElement *parent);
void gst_dpman_set_parent (GstDParamManager *dpman, GstElement *parent);
gboolean gst_dpman_add_required_dparam (GstDparamManager *dpman,
gboolean gst_dpman_add_required_dparam (GstDParamManager *dpman,
gchar *dparam_name,
GType type,
GstDpmUpdateFunction update_func,
gpointer update_data);
void gst_dpman_remove_required_dparam (GstDparamManager *dpman, gchar *dparam_name);
gboolean gst_dpman_attach_dparam (GstDparamManager *dpman, gchar *dparam_name, GstDparam *dparam);
void gst_dpman_dettach_dparam (GstDparamManager *dpman, gchar *dparam_name);
GstDparam* gst_dpman_get_dparam(GstDparamManager *dpman, gchar *name);
void gst_dpman_remove_required_dparam (GstDParamManager *dpman, gchar *dparam_name);
gboolean gst_dpman_attach_dparam (GstDParamManager *dpman, gchar *dparam_name, GstDParam *dparam);
void gst_dpman_dettach_dparam (GstDParamManager *dpman, gchar *dparam_name);
GstDParam* gst_dpman_get_dparam(GstDParamManager *dpman, gchar *name);
void gst_dpman_set_rate_change_pad(GstDparamManager *dpman, GstPad *pad);
void gst_dpman_set_rate_change_pad(GstDParamManager *dpman, GstPad *pad);
gboolean gst_dpman_set_mode(GstDparamManager *dpman, gchar *modename);
void gst_dpman_register_mode (GstDparamManagerClass *klass,
gboolean gst_dpman_set_mode(GstDParamManager *dpman, gchar *modename);
void gst_dpman_register_mode (GstDParamManagerClass *klass,
gchar *modename,
GstDpmModeFirstCountdownFunction firstcountdownfunc,
GstDpmModeCountdownFunction countdownfunc,

View file

@ -150,7 +150,7 @@ struct _GstElement {
GstElement *manager;
GstSchedule *sched;
GstDparamManager *dpman;
GstDParamManager *dpman;
};
struct _GstElementClass {

View file

@ -159,7 +159,7 @@ static void
gst_sinesrc_init (GstSineSrc *src)
{
GstElement *element = GST_ELEMENT(src);
GstDparamManager *dpman;
GstDParamManager *dpman;
src->srcpad = gst_pad_new_from_template (
GST_PADTEMPLATE_GET (sinesrc_src_factory), "src");
@ -215,7 +215,7 @@ gst_sinesrc_get(GstPad *pad)
{
GstSineSrc *src;
GstBuffer *buf;
GstDparamManager *dpman;
GstDParamManager *dpman;
gint16 *samples;
gint i=0, frame_countdown;