mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
first commit in the branch to test
Original commit message from CVS: first commit in the branch to test
This commit is contained in:
parent
70521179a7
commit
99d26b49c2
25 changed files with 50 additions and 258 deletions
50
ChangeLog
50
ChangeLog
|
@ -1,53 +1,3 @@
|
|||
2005-02-22 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* docs/libs/tmpl/gstcontrol.sgml:
|
||||
* docs/libs/tmpl/gstdparam.sgml:
|
||||
* docs/libs/tmpl/gstdplinint.sgml:
|
||||
* docs/libs/tmpl/gstdpman.sgml:
|
||||
* docs/libs/tmpl/gstdpsmooth.sgml:
|
||||
* docs/libs/tmpl/gstunitconvert.sgml:
|
||||
more docs for the state of dparams
|
||||
|
||||
2005-02-19 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||
|
||||
* gst/gstelementfactory.c: (gst_element_factory_create):
|
||||
* gst/gstobject.c: (gst_object_init),
|
||||
(gst_object_set_name_default), (gst_object_set_name):
|
||||
name objects by default, not in gst_element_factory_create. Allows
|
||||
using elements created with g_object_new. (fixes #167283)
|
||||
|
||||
2005-02-19 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||
|
||||
* gst/gstinfo.c: (_gst_debug_init), (gst_debug_log_default):
|
||||
make the time that debugging functions print relative to when
|
||||
gst_init was called
|
||||
|
||||
2005-02-18 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* gst/gsttaginterface.c:
|
||||
Fix inline docs: tag setter vararg functions are NULL-terminated,
|
||||
GST_TAG_INVALID doesn't exist any more.
|
||||
|
||||
2005-02-18 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
||||
|
||||
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_dump_byte_array):
|
||||
Allocate the 1 byte more memory that was forgotten!!!!!
|
||||
fixes memory corruption on 64bit platforms
|
||||
|
||||
2005-02-15 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* docs/pwg/building-pads.xml:
|
||||
* docs/pwg/intro-basics.xml:
|
||||
fixed a few typos, relabeled introductionary list of types
|
||||
* docs/random/ensonic/dparams.txt:
|
||||
more notes abut dparam changes
|
||||
* libs/gst/control/dparam.c: (gst_dparam_attach):
|
||||
* libs/gst/control/dparammanager.c:
|
||||
* libs/gst/control/dparammanager.h:
|
||||
- many comments and notes on dparam implementation
|
||||
- new dparams are were not initialized to the default value
|
||||
from param spec
|
||||
|
||||
2005-02-14 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
submitted by: Peter Astakhov
|
||||
|
|
1
README
1
README
|
@ -69,4 +69,3 @@ the last passed options as a handy shortcut. Use it.
|
|||
|
||||
After the autogen.sh stage, you can follow the directions listed in
|
||||
"COMPILING FROM SOURCE"
|
||||
|
||||
|
|
|
@ -6,25 +6,15 @@ dynamic parameter functionality.
|
|||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
This library provides a manager component (#GstDParamManager) that maintains a
|
||||
list of dynamically controlable parameters for a #GstElement.
|
||||
This library provides a Manager that maintains a list of dynamically
|
||||
controlable parameters for a GstElement.
|
||||
Just think of a volume slider in a mixer.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
#GstElement instances wanting to provide dynamic parameters, need to provide
|
||||
a #GParamSpec and an update method. The application that will later use the
|
||||
control parameter, will create a #DParam instance and attach that to use
|
||||
provided #GParamSpec and update method.
|
||||
The control library provides several #DParam implementations that can be used
|
||||
interchangably. The base on just updated the parameter, while others can smooth
|
||||
the control changes.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To use this library in a application one needs to add some code to initialize it.
|
||||
To use this library one needs to add some code to initialize it.
|
||||
<example>
|
||||
<title>Adding the control library to an application (step 1)</title>
|
||||
<title>Adding the control library to a project</title>
|
||||
<programlisting>
|
||||
...
|
||||
&hash;include <gst/gst.h>
|
||||
|
@ -35,37 +25,7 @@ gst_control_init(&argc,&argv);
|
|||
...
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
The next step is to get hold of the #GstDParamManager instance of a #GstElement
|
||||
and set the working mode of the manager.
|
||||
<example>
|
||||
<title>Adding the control library to an application (step 2)</title>
|
||||
<programlisting>
|
||||
dparam_manager=gst_dpman_get_manager(element);
|
||||
gst_dpman_set_mode(dparam_manager, "synchronous");
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Finally one need to attach a new #DParam to the paramter spec.
|
||||
<example>
|
||||
<title>Adding the control library to an application (step 3)</title>
|
||||
<programlisting>
|
||||
pspec=gst_dpman_get_param_spec(dparam_manager,"volume");
|
||||
dparam=gst_dparam_new(G_PARAM_SPEC_VALUE_TYPE(pspec));
|
||||
gst_dpman_attach_dparam(dparam_manager,g_param_spec_get_name(pspecs),dparam);
|
||||
</programlisting>
|
||||
</example>
|
||||
For a full example look at the <file>gst-plugins/gst/sine/demo-dparams.c</file>
|
||||
</para>
|
||||
<para>
|
||||
To add dparam support to a plugin look at <file>gst-plugins/gst/sine/gstsinesrc.c</file>
|
||||
or <file>gst-plugins/gst/volume/gstvolume.c</file>.
|
||||
The key concept is to call GST_DPMAN_PREPROCESS() before processing data and to
|
||||
wrap the data processing (chain or loop function) by GST_DPMAN_PROCESS().
|
||||
This allows the manager to interupt processing to apply new control values.
|
||||
The next step is to get hold of the GstDParamManager instance of a GstElement.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
|
@ -73,9 +33,6 @@ This allows the manager to interupt processing to apply new control values.
|
|||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_control_init ##### -->
|
||||
<para>
|
||||
|
||||
|
|
|
@ -27,9 +27,6 @@ network connections also need a protocol to do this.
|
|||
#GstBuffer, #GstCaps, #GstEvent
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### ENUM GstDPHeaderFlag ##### -->
|
||||
<para>
|
||||
|
||||
|
|
|
@ -6,8 +6,7 @@ dynamic parameter instance
|
|||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
This base class for dynamic parameters will update parameters as they are.
|
||||
Subclasses of this do more advanced updates like smoothing parameter changes.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
|
@ -15,9 +14,6 @@ Subclasses of this do more advanced updates like smoothing parameter changes.
|
|||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GstDParam ##### -->
|
||||
<para>
|
||||
|
||||
|
|
|
@ -14,9 +14,6 @@ linear interpolation dynamic parameter
|
|||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GstDParamLinInterp ##### -->
|
||||
<para>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ dynamic parameter manager
|
|||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The manager provides a set of functions to work with #GstElements and their #GstDParams.
|
||||
The manager bings all functions to work with #GstElements and their #GstDParams.
|
||||
One can find out which dparams an element has, get the parameter specs and
|
||||
pick a control change rate.
|
||||
</para>
|
||||
|
@ -20,9 +20,6 @@ are for applications that use elements with dparams.
|
|||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GstDParamManager ##### -->
|
||||
<para>
|
||||
|
||||
|
|
|
@ -14,9 +14,6 @@ realtime smoothed dynamic parameter
|
|||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GstDParamSmooth ##### -->
|
||||
<para>
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ gst_my_filter_link (GstPad *pad,
|
|||
<sect1 id="section-pads-getcapsfn" xreflabel="The getcaps function">
|
||||
<title>The getcaps function</title>
|
||||
<para>
|
||||
The <function>_getcaps ()</function> function is used to request the list
|
||||
The <function>_getcaps ()</function> funtion is used to request the list
|
||||
of supported formats and properties from the element. In some cases, this
|
||||
will be equal to the formats provided by the pad template, in which case
|
||||
this function can be omitted. In some cases, too, it will not depend on
|
||||
|
@ -184,9 +184,8 @@ gst_my_filter_getcaps (GstPad *pad)
|
|||
<sect1 id="section-pads-explicitcaps" xreflabel="Explicit caps">
|
||||
<title>Explicit caps</title>
|
||||
<para>
|
||||
Obviously, many elements will not need the complex mechanism described in
|
||||
the previous sections, because they are much simpler than that.
|
||||
Such elements only support one format, or their format
|
||||
Obviously, many elements will not need this complex mechanism, because they
|
||||
are much simpler than that. They only support one format, or their format
|
||||
is fixed but the contents of the format depend on the stream or something
|
||||
else. In those cases, <emphasis>explicit caps</emphasis> are an easy way
|
||||
of handling caps. Explicit caps are an easy way of specifying one, fixed,
|
||||
|
|
|
@ -279,8 +279,8 @@
|
|||
included in <xref linkend="section-types-definitions"/>.
|
||||
</para>
|
||||
|
||||
<table frame="all" id="table-basictypes" xreflabel="Table of Example Types">
|
||||
<title>Table of Example Types</title>
|
||||
<table frame="all" id="table-basictypes" xreflabel="Table of Basic Types">
|
||||
<title>Table of Basic Types</title>
|
||||
<tgroup cols="6" align="left" colsep="1" rowsep="1">
|
||||
|
||||
<thead>
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
$Id$
|
||||
|
||||
* cleanup of dparams
|
||||
* library "namespace"
|
||||
* even though it is long try to stick to the prefix "dparam" for the whole library
|
||||
* e.g. avoid namespace clashes with "dataprotocol" which is using "dp" as well :-(
|
||||
* use a new namespace "ctrl" for control
|
||||
* resolve g_return_if_fail() into GST_WARNING and return()
|
||||
in cases where the caller has to handle the problem
|
||||
* rename
|
||||
|
@ -15,20 +13,13 @@ $Id$
|
|||
dparam_mode_synchronous
|
||||
dparam_mode_asynchronous
|
||||
dparam_mode_disabled
|
||||
* split dparam manager api (like e.g. GConf does it)
|
||||
* plugin api : GstCtrlManagerServer
|
||||
* application api : GstCtrlManagerClient
|
||||
* remove "value-changed" signal from DParam?
|
||||
* one can connect to e.g. "notify::value-double" as well
|
||||
* dparam update callback needs to pass more info
|
||||
* GstElement as the first arg
|
||||
* GstDPram as the second arg
|
||||
* split dparam manager api
|
||||
* plugin api
|
||||
* application api
|
||||
|
||||
* documentation
|
||||
* state of unitconvert
|
||||
* state of sychronous params
|
||||
* dpman_set/get_rate
|
||||
if element_sampling_rate is 44100 and dpman_rate is 22050, dparams are updated twice a second
|
||||
|
||||
* dparams ng
|
||||
* concept for global, voice params
|
||||
|
@ -36,8 +27,4 @@ $Id$
|
|||
different parameter sets (sound synthesizers, effects)
|
||||
* based on gobject params, so that e.g. the GUI can connect to "notify:param"
|
||||
events and update the GUI
|
||||
* implement timelined dparams via queues
|
||||
* the queue contains dparams and timestamps
|
||||
* GST_DPARAM_DO_UPDATE() checks the head of the queue for events that are due now
|
||||
and sets the values
|
||||
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
$Id$
|
||||
|
||||
Could schedulers do a little profiling?
|
||||
|
||||
* scheduler keeps a list of usecs the process function of each element was
|
||||
running
|
||||
* process functions are: loop, chain, get
|
||||
* scheduler keeps a sum of all times
|
||||
* each gst-element has a profile_percentage field
|
||||
|
||||
* when going to play
|
||||
* scheduler sets sum and all usecs in the list to 0
|
||||
* when handling an element
|
||||
* remember old usecs t_old
|
||||
* take time t1
|
||||
* call elements processing function
|
||||
* take time t2
|
||||
* t_new=t2-t1
|
||||
* sum+=(t_new-t_old)
|
||||
* profile_percentage=t_new/sum;
|
||||
* should the percentage be averaged?
|
||||
* profile_percentage=(profile_percentage+(t_new/sum))/2.0;
|
||||
|
||||
* the profile_percentage shows how much CPU time the element uses in relation
|
||||
to the whole pipeline
|
||||
|
|
@ -324,7 +324,6 @@ gst_element_factory_create (GstElementFactory * factory, const gchar * name)
|
|||
|
||||
g_type_class_unref (oclass);
|
||||
|
||||
if (name)
|
||||
gst_object_set_name (GST_OBJECT (element), name);
|
||||
|
||||
return element;
|
||||
|
|
|
@ -47,8 +47,6 @@
|
|||
|
||||
/* underscore is to prevent conflict with GST_CAT_DEBUG define */
|
||||
GST_DEBUG_CATEGORY_STATIC (_GST_CAT_DEBUG);
|
||||
/* time of initialization, so we get useful debugging output times */
|
||||
GstClockTime start_time;
|
||||
|
||||
#if 0
|
||||
#if defined __sgi__
|
||||
|
@ -205,15 +203,9 @@ __gst_in_valgrind (void)
|
|||
void
|
||||
_gst_debug_init (void)
|
||||
{
|
||||
GTimeVal current;
|
||||
|
||||
gst_atomic_int_init (&__default_level, GST_LEVEL_DEFAULT);
|
||||
gst_atomic_int_init (&__use_color, 1);
|
||||
|
||||
/* get time we started for debugging messages */
|
||||
g_get_current_time (¤t);
|
||||
start_time = GST_TIMEVAL_TO_TIME (current);
|
||||
|
||||
#ifdef HAVE_PRINTF_EXTENSION
|
||||
register_printf_function (GST_PTR_FORMAT[0], _gst_info_printf_extension,
|
||||
_gst_info_printf_extension_arginfo);
|
||||
|
@ -502,7 +494,6 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level,
|
|||
gchar *pidcolor;
|
||||
gint pid;
|
||||
GTimeVal now;
|
||||
GstClockTime elapsed;
|
||||
|
||||
if (level > gst_debug_category_get_threshold (category))
|
||||
return;
|
||||
|
@ -525,11 +516,10 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level,
|
|||
obj = object ? gst_debug_print_object (object) : g_strdup ("");
|
||||
|
||||
g_get_current_time (&now);
|
||||
elapsed = GST_TIMEVAL_TO_TIME (now) - start_time;
|
||||
g_printerr ("%s (%p - %" GST_TIME_FORMAT
|
||||
") %s%15s%s(%s%5d%s) %s%s(%d):%s:%s%s %s\n",
|
||||
gst_debug_level_get_name (level), g_thread_self (),
|
||||
GST_TIME_ARGS (elapsed), color,
|
||||
GST_TIME_ARGS (GST_TIMEVAL_TO_TIME (now)), color,
|
||||
gst_debug_category_get_name (category), clear, pidcolor, pid, clear,
|
||||
color, file, line, function, obj, clear, gst_debug_message_get (message));
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ static guint gst_signal_object_signals[SO_LAST_SIGNAL] = { 0 };
|
|||
#endif
|
||||
|
||||
static void gst_object_class_init (GstObjectClass * klass);
|
||||
static void gst_object_init (GTypeInstance * instance, gpointer g_class);
|
||||
static void gst_object_init (GstObject * object);
|
||||
|
||||
#ifndef GST_DISABLE_TRACE
|
||||
static GObject *gst_object_constructor (GType type,
|
||||
|
@ -89,9 +89,6 @@ static void gst_object_dispatch_properties_changed (GObject * object,
|
|||
static void gst_object_dispose (GObject * object);
|
||||
static void gst_object_finalize (GObject * object);
|
||||
|
||||
static void gst_object_set_name_default (GstObject * object,
|
||||
const gchar * type_name);
|
||||
|
||||
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
|
||||
static void gst_object_real_restore_thyself (GstObject * object,
|
||||
xmlNodePtr self);
|
||||
|
@ -113,7 +110,7 @@ gst_object_get_type (void)
|
|||
NULL,
|
||||
sizeof (GstObject),
|
||||
0,
|
||||
gst_object_init,
|
||||
(GInstanceInitFunc) gst_object_init,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -180,14 +177,11 @@ gst_object_class_init (GstObjectClass * klass)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_object_init (GTypeInstance * instance, gpointer g_class)
|
||||
gst_object_init (GstObject * object)
|
||||
{
|
||||
GstObject *object = GST_OBJECT (instance);
|
||||
|
||||
object->lock = g_mutex_new ();
|
||||
object->parent = NULL;
|
||||
object->name = NULL;
|
||||
gst_object_set_name_default (object, G_OBJECT_CLASS_NAME (g_class));
|
||||
|
||||
object->flags = 0;
|
||||
GST_FLAG_SET (object, GST_FLOATING);
|
||||
|
@ -439,10 +433,13 @@ gst_object_default_deep_notify (GObject * object, GstObject * orig,
|
|||
}
|
||||
|
||||
static void
|
||||
gst_object_set_name_default (GstObject * object, const gchar * type_name)
|
||||
gst_object_set_name_default (GstObject * object)
|
||||
{
|
||||
gint count;
|
||||
gchar *name, *tmp;
|
||||
const gchar *type_name;
|
||||
|
||||
type_name = G_OBJECT_TYPE_NAME (object);
|
||||
|
||||
/* to ensure guaranteed uniqueness across threads, only one thread
|
||||
* may ever assign a name */
|
||||
|
@ -490,7 +487,7 @@ gst_object_set_name (GstObject * object, const gchar * name)
|
|||
if (name != NULL)
|
||||
object->name = g_strdup (name);
|
||||
else
|
||||
gst_object_set_name_default (object, G_OBJECT_TYPE_NAME (object));
|
||||
gst_object_set_name_default (object);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -657,7 +657,6 @@ restart:
|
|||
GstScheduler *sched;
|
||||
|
||||
GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "interrupted");
|
||||
queue->interrupt = FALSE;
|
||||
GST_QUEUE_MUTEX_UNLOCK;
|
||||
sched = gst_pad_get_scheduler (queue->sinkpad);
|
||||
if (!sched || gst_scheduler_interrupt (sched, GST_ELEMENT (queue))) {
|
||||
|
@ -784,7 +783,6 @@ restart:
|
|||
GstScheduler *sched;
|
||||
|
||||
GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "interrupted");
|
||||
queue->interrupt = FALSE;
|
||||
GST_QUEUE_MUTEX_UNLOCK;
|
||||
sched = gst_pad_get_scheduler (queue->srcpad);
|
||||
if (!sched || gst_scheduler_interrupt (sched, GST_ELEMENT (queue)))
|
||||
|
|
|
@ -132,7 +132,7 @@ gst_tag_setter_merge (GstTagSetter * setter, const GstTagList * list,
|
|||
* @...: more tag / value pairs to set
|
||||
*
|
||||
* Adds the given tag / value pairs on the setter using the given merge mode.
|
||||
* The list must be terminated with %NULL.
|
||||
* The list must be terminated with GST_TAG_INVALID.
|
||||
*/
|
||||
void
|
||||
gst_tag_setter_add (GstTagSetter * setter, GstTagMergeMode mode,
|
||||
|
@ -156,7 +156,7 @@ gst_tag_setter_add (GstTagSetter * setter, GstTagMergeMode mode,
|
|||
* @...: more tag / GValue pairs to set
|
||||
*
|
||||
* Adds the given tag / GValue pairs on the setter using the given merge mode.
|
||||
* The list must be terminated with %NULL.
|
||||
* The list must be terminated with GST_TAG_INVALID.
|
||||
*/
|
||||
void
|
||||
gst_tag_setter_add_values (GstTagSetter * setter, GstTagMergeMode mode,
|
||||
|
@ -180,7 +180,7 @@ gst_tag_setter_add_values (GstTagSetter * setter, GstTagMergeMode mode,
|
|||
* @var_args: tag / value pairs to set
|
||||
*
|
||||
* Adds the given tag / value pairs on the setter using the given merge mode.
|
||||
* The list must be terminated with %NULL.
|
||||
* The list must be terminated with GST_TAG_INVALID.
|
||||
*/
|
||||
void
|
||||
gst_tag_setter_add_valist (GstTagSetter * setter, GstTagMergeMode mode,
|
||||
|
@ -206,7 +206,7 @@ gst_tag_setter_add_valist (GstTagSetter * setter, GstTagMergeMode mode,
|
|||
* @var_args: tag / GValue pairs to set
|
||||
*
|
||||
* Adds the given tag / GValue pairs on the setter using the given merge mode.
|
||||
* The list must be terminated with %NULL.
|
||||
* The list must be terminated with GST_TAG_INVALID.
|
||||
*/
|
||||
void
|
||||
gst_tag_setter_add_valist_values (GstTagSetter * setter, GstTagMergeMode mode,
|
||||
|
|
|
@ -132,7 +132,7 @@ gst_tag_setter_merge (GstTagSetter * setter, const GstTagList * list,
|
|||
* @...: more tag / value pairs to set
|
||||
*
|
||||
* Adds the given tag / value pairs on the setter using the given merge mode.
|
||||
* The list must be terminated with %NULL.
|
||||
* The list must be terminated with GST_TAG_INVALID.
|
||||
*/
|
||||
void
|
||||
gst_tag_setter_add (GstTagSetter * setter, GstTagMergeMode mode,
|
||||
|
@ -156,7 +156,7 @@ gst_tag_setter_add (GstTagSetter * setter, GstTagMergeMode mode,
|
|||
* @...: more tag / GValue pairs to set
|
||||
*
|
||||
* Adds the given tag / GValue pairs on the setter using the given merge mode.
|
||||
* The list must be terminated with %NULL.
|
||||
* The list must be terminated with GST_TAG_INVALID.
|
||||
*/
|
||||
void
|
||||
gst_tag_setter_add_values (GstTagSetter * setter, GstTagMergeMode mode,
|
||||
|
@ -180,7 +180,7 @@ gst_tag_setter_add_values (GstTagSetter * setter, GstTagMergeMode mode,
|
|||
* @var_args: tag / value pairs to set
|
||||
*
|
||||
* Adds the given tag / value pairs on the setter using the given merge mode.
|
||||
* The list must be terminated with %NULL.
|
||||
* The list must be terminated with GST_TAG_INVALID.
|
||||
*/
|
||||
void
|
||||
gst_tag_setter_add_valist (GstTagSetter * setter, GstTagMergeMode mode,
|
||||
|
@ -206,7 +206,7 @@ gst_tag_setter_add_valist (GstTagSetter * setter, GstTagMergeMode mode,
|
|||
* @var_args: tag / GValue pairs to set
|
||||
*
|
||||
* Adds the given tag / GValue pairs on the setter using the given merge mode.
|
||||
* The list must be terminated with %NULL.
|
||||
* The list must be terminated with GST_TAG_INVALID.
|
||||
*/
|
||||
void
|
||||
gst_tag_setter_add_valist_values (GstTagSetter * setter, GstTagMergeMode mode,
|
||||
|
|
|
@ -419,7 +419,7 @@ gst_thread_change_state (GstElement * element)
|
|||
GstThread *thread;
|
||||
GstElementStateReturn ret;
|
||||
gint transition;
|
||||
gboolean is_self, reverting = FALSE;
|
||||
gboolean is_self;
|
||||
|
||||
g_return_val_if_fail (GST_IS_THREAD (element), GST_STATE_FAILURE);
|
||||
|
||||
|
@ -432,9 +432,7 @@ gst_thread_change_state (GstElement * element)
|
|||
/* boolean to check if we called the state change in the same thread as
|
||||
* the iterate thread */
|
||||
is_self = (thread == gst_thread_get_current ());
|
||||
transition = GST_STATE_TRANSITION (element);
|
||||
|
||||
revert:
|
||||
GST_LOG_OBJECT (thread, "grabbing lock");
|
||||
g_mutex_lock (thread->lock);
|
||||
|
||||
|
@ -445,22 +443,20 @@ revert:
|
|||
/* do not try to grab the lock if this method is called from the
|
||||
* same thread as the iterate thread, the lock might be held and we
|
||||
* might deadlock */
|
||||
if (!is_self && !reverting)
|
||||
if (!is_self)
|
||||
g_mutex_lock (thread->iterate_lock);
|
||||
|
||||
switch (transition) {
|
||||
case GST_STATE_NULL_TO_READY:{
|
||||
GError *err = NULL;
|
||||
transition = GST_STATE_TRANSITION (element);
|
||||
|
||||
switch (transition) {
|
||||
case GST_STATE_NULL_TO_READY:
|
||||
/* create the thread */
|
||||
GST_FLAG_UNSET (thread, GST_THREAD_STATE_REAPING);
|
||||
GST_LOG_OBJECT (element, "grabbing lock");
|
||||
thread->thread_id = g_thread_create_full (gst_thread_main_loop,
|
||||
thread, STACK_SIZE, FALSE, TRUE, thread->priority, &err);
|
||||
thread, STACK_SIZE, FALSE, TRUE, thread->priority, NULL);
|
||||
if (!thread->thread_id) {
|
||||
GST_ERROR_OBJECT (element, "g_thread_create_full failed: %s",
|
||||
err->message);
|
||||
g_error_free (err);
|
||||
GST_ERROR_OBJECT (element, "g_thread_create_full failed");
|
||||
goto error_out;
|
||||
}
|
||||
GST_LOG_OBJECT (element, "GThread created");
|
||||
|
@ -468,7 +464,6 @@ revert:
|
|||
/* wait for it to 'spin up' */
|
||||
g_cond_wait (thread->cond, thread->lock);
|
||||
break;
|
||||
}
|
||||
case GST_STATE_READY_TO_PAUSED:
|
||||
break;
|
||||
case GST_STATE_PAUSED_TO_PLAYING:
|
||||
|
@ -534,15 +529,8 @@ revert:
|
|||
GST_LOG_OBJECT (thread, "unlocking lock");
|
||||
g_mutex_unlock (thread->lock);
|
||||
|
||||
if (reverting) {
|
||||
goto error_out_unlocked;
|
||||
} else if (GST_ELEMENT_CLASS (parent_class)->change_state) {
|
||||
if (GST_ELEMENT_CLASS (parent_class)->change_state) {
|
||||
ret = GST_ELEMENT_CLASS (parent_class)->change_state (GST_ELEMENT (thread));
|
||||
if (ret == GST_STATE_FAILURE) {
|
||||
reverting = TRUE;
|
||||
transition = ((transition & 0xff) << 8) | (transition >> 8);
|
||||
goto revert;
|
||||
}
|
||||
} else {
|
||||
ret = GST_STATE_SUCCESS;
|
||||
}
|
||||
|
@ -570,7 +558,6 @@ error_out:
|
|||
|
||||
g_mutex_unlock (thread->lock);
|
||||
|
||||
error_out_unlocked:
|
||||
if (!is_self)
|
||||
g_mutex_unlock (thread->iterate_lock);
|
||||
|
||||
|
|
|
@ -321,7 +321,6 @@ void
|
|||
gst_dparam_attach (GstDParam * dparam, GstDParamManager * manager,
|
||||
GParamSpec * param_spec, gchar * unit_name)
|
||||
{
|
||||
GValue value = { 0, };
|
||||
|
||||
g_return_if_fail (dparam != NULL);
|
||||
g_return_if_fail (GST_IS_DPARAM (dparam));
|
||||
|
@ -340,29 +339,6 @@ gst_dparam_attach (GstDParam * dparam, GstDParamManager * manager,
|
|||
GST_DPARAM_IS_LOG (dparam) = gst_unitconv_unit_is_logarithmic (unit_name);
|
||||
GST_DEBUG ("attaching %s to dparam %p", GST_DPARAM_NAME (dparam), dparam);
|
||||
|
||||
// get default value from param-spec and set in dparam
|
||||
g_value_init (&value, param_spec->value_type);
|
||||
g_param_value_set_default (param_spec, &value);
|
||||
switch (G_PARAM_SPEC_VALUE_TYPE (param_spec)) {
|
||||
case G_TYPE_FLOAT:
|
||||
dparam->value_float = g_value_get_float (&value);
|
||||
break;
|
||||
|
||||
case G_TYPE_DOUBLE:
|
||||
dparam->value_double = g_value_get_double (&value);
|
||||
break;
|
||||
|
||||
case G_TYPE_INT:
|
||||
dparam->value_int = g_value_get_int (&value);
|
||||
break;
|
||||
|
||||
case G_TYPE_INT64:
|
||||
dparam->value_int64 = g_value_get_int64 (&value);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -674,7 +674,7 @@ gst_dpman_bypass_dparam (GstDParamManager * dpman, const gchar * dparam_name)
|
|||
g_return_if_fail (dpwrap != NULL);
|
||||
|
||||
if (dpwrap->dparam != NULL) {
|
||||
GST_WARNING ("Bypassing attached dparam '%s'. It will be detached",
|
||||
g_warning ("Bypassing attached dparam '%s'. It will be detached",
|
||||
dparam_name);
|
||||
gst_dpman_detach_dparam (dpman, dparam_name);
|
||||
}
|
||||
|
@ -860,7 +860,7 @@ gst_dpman_preprocess_asynchronous (GstDParamManager * dpman, guint frames,
|
|||
|
||||
|
||||
if (GST_DPMAN_RATE (dpman) == 0) {
|
||||
GST_WARNING ("The element hasn't given GstDParamManager a frame rate");
|
||||
g_warning ("The element hasn't given GstDParamManager a frame rate");
|
||||
return FALSE;
|
||||
}
|
||||
dpman->rate_ratio = (guint) (1000000000LL / (gint64) GST_DPMAN_RATE (dpman));
|
||||
|
@ -975,14 +975,14 @@ gst_dpman_process_asynchronous (GstDParamManager * dpman, guint frame_count)
|
|||
GST_DEBUG ("in gst_dpman_process_asynchronous");
|
||||
|
||||
if (frame_count >= dpman->num_frames) {
|
||||
GST_WARNING ("there is no more buffer to process");
|
||||
g_warning ("there is no more buffer to process");
|
||||
dpman->next_update_frame = dpman->num_frames;
|
||||
dpman->frames_to_process = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (frame_count != dpwrap->next_update_frame) {
|
||||
GST_WARNING ("frame count %u does not match update frame %u",
|
||||
g_warning ("frame count %u does not match update frame %u",
|
||||
frame_count, dpwrap->next_update_frame);
|
||||
}
|
||||
|
||||
|
@ -1065,7 +1065,7 @@ gst_dpman_preprocess_noop (GstDParamManager * dpman, guint frames,
|
|||
static gboolean
|
||||
gst_dpman_process_noop (GstDParamManager * dpman, guint frame_count)
|
||||
{
|
||||
GST_WARNING
|
||||
g_warning
|
||||
("gst_dpman_process_noop should never be called - something might be wrong with your processing loop");
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -134,9 +134,6 @@ struct _GstDParamAsyncToUpdate {
|
|||
(dpman->next_update_frame < dpman->num_frames \
|
||||
&& (GST_DPMAN_PROCESSFUNC(dpman)(dpman, frame_count))))
|
||||
|
||||
/* FIXME: this should pass dpwrap->dparam as the first arg
|
||||
* the first arg in callback is usually object that triggered the callback
|
||||
*/
|
||||
#define GST_DPMAN_CALLBACK_UPDATE(dpwrap, value) ((dpwrap->update_func)(value, dpwrap->update_data))
|
||||
|
||||
void _gst_dpman_initialize(void);
|
||||
|
|
|
@ -83,7 +83,7 @@ gst_dp_dump_byte_array (guint8 * array, guint length)
|
|||
{
|
||||
int i;
|
||||
int n = 8; /* number of bytes per line */
|
||||
gchar *line = g_malloc (3 * n + 1);
|
||||
gchar *line = g_malloc (3 * n);
|
||||
|
||||
GST_LOG ("dumping byte array of length %d", length);
|
||||
for (i = 0; i < length; ++i) {
|
||||
|
|
|
@ -657,7 +657,6 @@ restart:
|
|||
GstScheduler *sched;
|
||||
|
||||
GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "interrupted");
|
||||
queue->interrupt = FALSE;
|
||||
GST_QUEUE_MUTEX_UNLOCK;
|
||||
sched = gst_pad_get_scheduler (queue->sinkpad);
|
||||
if (!sched || gst_scheduler_interrupt (sched, GST_ELEMENT (queue))) {
|
||||
|
@ -784,7 +783,6 @@ restart:
|
|||
GstScheduler *sched;
|
||||
|
||||
GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "interrupted");
|
||||
queue->interrupt = FALSE;
|
||||
GST_QUEUE_MUTEX_UNLOCK;
|
||||
sched = gst_pad_get_scheduler (queue->srcpad);
|
||||
if (!sched || gst_scheduler_interrupt (sched, GST_ELEMENT (queue)))
|
||||
|
|
|
@ -23,7 +23,7 @@ For a complete description of possible PIPELINE-DESCRIPTIONS see above under
|
|||
.B \-\-help
|
||||
Print help synopsis and available FLAGS
|
||||
.TP 8
|
||||
.B \-v, \-\-verbose
|
||||
.B \-v, \-\-silent
|
||||
Output status information
|
||||
.TP 8
|
||||
.B \-XTYPE, \-\-exclude=TYPE,
|
||||
|
|
Loading…
Reference in a new issue