mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-27 14:31:01 +00:00
gst/: Inline refcounting.. not sure why it wasn't before.
Original commit message from CVS: * gst/gstcaps.c: (gst_caps_intersect): * gst/gstclock.c: (gst_clock_id_ref), (gst_clock_id_unref), (gst_clock_id_compare_func), (gst_clock_id_wait), (gst_clock_id_wait_async), (gst_clock_init), (gst_clock_adjust_unlocked), (gst_clock_get_time): * gst/gstinfo.c: * gst/gstobject.c: (gst_object_class_init), (gst_object_ref), (gst_object_unref), (gst_object_sink), (gst_object_dispose), (gst_object_dispatch_properties_changed), (gst_object_set_name), (gst_object_set_parent), (gst_object_unparent), (gst_object_check_uniqueness), (gst_object_get_path_string): * gst/gstutils.c: (gst_element_finish_preroll), (gst_element_get_compatible_pad_filtered), (gst_element_link_pads_filtered), (gst_element_unlink), (gst_pad_use_fixed_caps), (gst_pad_get_fixed_caps_func): * gst/gstutils.h: Inline refcounting.. not sure why it wasn't before. Added use_fixed_caps method to change default getcaps behaviour.
This commit is contained in:
parent
6f40edb7e1
commit
743c2402f4
7 changed files with 90 additions and 0 deletions
22
ChangeLog
22
ChangeLog
|
@ -1,3 +1,25 @@
|
||||||
|
2005-02-03 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* gst/gstcaps.c: (gst_caps_intersect):
|
||||||
|
* gst/gstclock.c: (gst_clock_id_ref), (gst_clock_id_unref),
|
||||||
|
(gst_clock_id_compare_func), (gst_clock_id_wait),
|
||||||
|
(gst_clock_id_wait_async), (gst_clock_init),
|
||||||
|
(gst_clock_adjust_unlocked), (gst_clock_get_time):
|
||||||
|
* gst/gstinfo.c:
|
||||||
|
* gst/gstobject.c: (gst_object_class_init), (gst_object_ref),
|
||||||
|
(gst_object_unref), (gst_object_sink), (gst_object_dispose),
|
||||||
|
(gst_object_dispatch_properties_changed), (gst_object_set_name),
|
||||||
|
(gst_object_set_parent), (gst_object_unparent),
|
||||||
|
(gst_object_check_uniqueness), (gst_object_get_path_string):
|
||||||
|
* gst/gstutils.c: (gst_element_finish_preroll),
|
||||||
|
(gst_element_get_compatible_pad_filtered),
|
||||||
|
(gst_element_link_pads_filtered), (gst_element_unlink),
|
||||||
|
(gst_pad_use_fixed_caps), (gst_pad_get_fixed_caps_func):
|
||||||
|
* gst/gstutils.h:
|
||||||
|
Inline refcounting.. not sure why it wasn't before.
|
||||||
|
Added use_fixed_caps method to change default getcaps
|
||||||
|
behaviour.
|
||||||
|
|
||||||
2005-02-01 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
2005-02-01 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
||||||
* gst/gstelement.h:
|
* gst/gstelement.h:
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
#include "gst_private.h"
|
#include "gst_private.h"
|
||||||
|
#include "gstatomic_impl.h"
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
//#define DEBUG_REFCOUNT
|
//#define DEBUG_REFCOUNT
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include "gstclock.h"
|
#include "gstclock.h"
|
||||||
#include "gstinfo.h"
|
#include "gstinfo.h"
|
||||||
#include "gstmemchunk.h"
|
#include "gstmemchunk.h"
|
||||||
|
#include "gstatomic_impl.h"
|
||||||
|
|
||||||
#ifndef GST_DISABLE_TRACE
|
#ifndef GST_DISABLE_TRACE
|
||||||
/* #define GST_WITH_ALLOC_TRACE */
|
/* #define GST_WITH_ALLOC_TRACE */
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
#include "gstpad.h"
|
#include "gstpad.h"
|
||||||
#include "gstscheduler.h"
|
#include "gstscheduler.h"
|
||||||
#include "gst_private.h"
|
#include "gst_private.h"
|
||||||
|
#include "gstatomic_impl.h"
|
||||||
#ifdef HAVE_VALGRIND
|
#ifdef HAVE_VALGRIND
|
||||||
#include <valgrind/valgrind.h>
|
#include <valgrind/valgrind.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include "gstobject.h"
|
#include "gstobject.h"
|
||||||
#include "gstmarshal.h"
|
#include "gstmarshal.h"
|
||||||
#include "gstinfo.h"
|
#include "gstinfo.h"
|
||||||
|
#include "gstatomic_impl.h"
|
||||||
|
|
||||||
#ifndef GST_DISABLE_TRACE
|
#ifndef GST_DISABLE_TRACE
|
||||||
#include "gsttrace.h"
|
#include "gsttrace.h"
|
||||||
|
|
|
@ -1338,6 +1338,68 @@ gst_pad_can_link (GstPad * srcpad, GstPad * sinkpad)
|
||||||
return gst_pad_can_link_filtered (srcpad, sinkpad, NULL);
|
return gst_pad_can_link_filtered (srcpad, sinkpad, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_pad_use_fixed_caps:
|
||||||
|
* @pad: the pad to use
|
||||||
|
*
|
||||||
|
* A helper function you can use that sets the
|
||||||
|
* @gst_pad_get_fixed_caps_func as the gstcaps function for the
|
||||||
|
* pad. This way the function will always return the negotiated caps
|
||||||
|
* or in case the pad is not negotiated, the padtemplate caps.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gst_pad_use_fixed_caps (GstPad * pad)
|
||||||
|
{
|
||||||
|
gst_pad_set_getcaps_function (pad, gst_pad_get_fixed_caps_func);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_pad_get_fixed_caps_func:
|
||||||
|
* @pad: the pad to use
|
||||||
|
*
|
||||||
|
* A helper function you can use as a GetCaps function that
|
||||||
|
* will return the currently negotiated caps or the padtemplate
|
||||||
|
* when NULL.
|
||||||
|
*
|
||||||
|
* Returns: The currently negotiated caps or the padtemplate.
|
||||||
|
*/
|
||||||
|
GstCaps *
|
||||||
|
gst_pad_get_fixed_caps_func (GstPad * pad)
|
||||||
|
{
|
||||||
|
GstCaps *result;
|
||||||
|
GstRealPad *realpad;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GST_IS_REAL_PAD (pad), NULL);
|
||||||
|
|
||||||
|
realpad = GST_REAL_PAD_CAST (pad);
|
||||||
|
|
||||||
|
if (GST_RPAD_CAPS (realpad)) {
|
||||||
|
result = GST_RPAD_CAPS (realpad);
|
||||||
|
|
||||||
|
GST_CAT_DEBUG (GST_CAT_CAPS,
|
||||||
|
"using pad caps %p %" GST_PTR_FORMAT, result, result);
|
||||||
|
|
||||||
|
result = gst_caps_ref (result);
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
if (GST_PAD_PAD_TEMPLATE (realpad)) {
|
||||||
|
GstPadTemplate *templ = GST_PAD_PAD_TEMPLATE (realpad);
|
||||||
|
|
||||||
|
result = GST_PAD_TEMPLATE_CAPS (templ);
|
||||||
|
GST_CAT_DEBUG (GST_CAT_CAPS,
|
||||||
|
"using pad template %p with caps %p %" GST_PTR_FORMAT, templ, result,
|
||||||
|
result);
|
||||||
|
|
||||||
|
result = gst_caps_ref (result);
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
GST_CAT_DEBUG (GST_CAT_CAPS, "pad has no caps");
|
||||||
|
result = gst_caps_new_empty ();
|
||||||
|
|
||||||
|
done:
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_object_default_error:
|
* gst_object_default_error:
|
||||||
* @object: a #GObject that signalled the error.
|
* @object: a #GObject that signalled the error.
|
||||||
|
|
|
@ -265,6 +265,8 @@ void gst_element_class_install_std_props (GstElementClass * klass,
|
||||||
gboolean gst_pad_can_link (GstPad *srcpad, GstPad *sinkpad);
|
gboolean gst_pad_can_link (GstPad *srcpad, GstPad *sinkpad);
|
||||||
gboolean gst_pad_can_link_filtered (GstPad *srcpad, GstPad *sinkpad, const GstCaps *filtercaps);
|
gboolean gst_pad_can_link_filtered (GstPad *srcpad, GstPad *sinkpad, const GstCaps *filtercaps);
|
||||||
|
|
||||||
|
void gst_pad_use_fixed_caps (GstPad *pad);
|
||||||
|
GstCaps* gst_pad_get_fixed_caps_func (GstPad *pad);
|
||||||
|
|
||||||
/* bin functions */
|
/* bin functions */
|
||||||
void gst_bin_add_many (GstBin *bin, GstElement *element_1, ...);
|
void gst_bin_add_many (GstBin *bin, GstElement *element_1, ...);
|
||||||
|
|
Loading…
Reference in a new issue