Backporting some HEAD changes, mostly docs and stuff.

Original commit message from CVS:
Backporting some HEAD changes, mostly docs and stuff.
This commit is contained in:
Wim Taymans 2005-03-08 14:27:43 +00:00
parent eb6c9dd801
commit c10560ebec
38 changed files with 709 additions and 179 deletions

View file

@ -1,3 +1,62 @@
2005-03-08 Wim Taymans <wim@fluendo.com>
* MAINTAINERS:
* README:
* autogen.sh:
* configure.ac:
* gst/gst.c: (gst_init_get_popt_table), (init_post):
* gst/gst_private.h:
* gst/gstbin.c: (gst_bin_remove_func), (gst_bin_iterate_sinks),
(gst_bin_get_by_name), (gst_bin_get_by_interface),
(gst_bin_iterate_all_by_interface):
* gst/gstbin.h:
* gst/gstbuffer.c:
* gst/gstbuffer.h:
* gst/gstcaps.c: (gst_static_caps_get), (gst_caps_append),
(gst_caps_copy_nth), (gst_caps_intersect):
* gst/gstcaps.h:
* gst/gstclock.h:
* gst/gstdata.h:
* gst/gstelement.c: (gst_element_release_request_pad),
(gst_element_message_full), (gst_element_get_state_func),
(gst_element_lost_state):
* gst/gstelementfactory.c: (gst_element_factory_create):
* gst/gsterror.c: (_gst_resource_errors_init),
(_gst_stream_errors_init), (gst_error_get_message):
* gst/gsterror.h:
* gst/gstinfo.c: (_gst_debug_init), (gst_debug_log_default),
(gst_debug_remove_log_function),
(gst_debug_remove_log_function_by_data):
* gst/gstinfo.h:
* gst/gstmessage.h:
* 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/gstpad.c: (gst_real_pad_init):
* gst/gstplugin.c: (gst_plugin_get_version):
* gst/gstplugin.h:
* gst/gstpluginfeature.c: (gst_plugin_feature_ensure_loaded):
* gst/gstprobe.c: (_gst_probe_copy), (gst_probe_get_type),
(gst_probe_new), (gst_probe_perform),
(gst_probe_dispatcher_add_probe),
(gst_probe_dispatcher_remove_probe),
(gst_probe_dispatcher_dispatch):
* gst/gstprobe.h:
* gst/gstregistry.h:
* gst/gststructure.c: (gst_structure_copy_conditional):
* gst/gsttag.h:
* gst/gsttypes.h:
* gst/gstutils.c:
* gst/gstvalue.c: (gst_string_wrap),
(gst_value_deserialize_string):
* gst/gstvalue.h:
* gst/gstversion.h.in:
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_dump_byte_array):
* tools/gst-inspect.c: (print_children_info):
Backporting some HEAD changes, mostly docs and stuff.
2005-03-07 Andy Wingo <wingo@pobox.com> 2005-03-07 Andy Wingo <wingo@pobox.com>
* check/gst/gstobject.c (test_fake_object_name): The object *does* * check/gst/gstobject.c (test_fake_object_name): The object *does*

View file

@ -1,10 +1,11 @@
GStreamer is currently maintained by the consensus of a number GStreamer is currently maintained by the consensus of a number
of people, including, but not limited to: of people, including, but not limited to:
Wim Taymans <wim@fluendo.com>
David Schleef <ds@schleef.org> David Schleef <ds@schleef.org>
Benjamin Otte <in7y118@public.uni-hamburg.de> Benjamin Otte <in7y118@public.uni-hamburg.de>
Ronald Bultje <rbultje@ronald.bitfreak.net> Ronald Bultje <rbultje@ronald.bitfreak.net>
Thomas Vander Stichele <thomas@apestaart.org> Thomas Vander Stichele <thomas@fluendo.com>
Maintainer-related issues should be addressed to: Maintainer-related issues should be addressed to:

2
README
View file

@ -67,6 +67,6 @@ some build scripts like that.
When you have done this once, you can use autoregen.sh to re-autogen with When you have done this once, you can use autoregen.sh to re-autogen with
the last passed options as a handy shortcut. Use it. the last passed options as a handy shortcut. Use it.
After the autogen.sh stage, you can follow the directions listed in After the autogen.sh stage, you can follow the directions listed in
"COMPILING FROM SOURCE" "COMPILING FROM SOURCE"

View file

@ -67,7 +67,7 @@ if test -f po/Makefile.in.in;
then then
patch -p0 -R < common/gettext.patch patch -p0 -R < common/gettext.patch
fi fi
tool_run "$autopoint --force" tool_run "$autopoint" "--force" "patch -p0 < common/gettext.patch"
patch -p0 < common/gettext.patch patch -p0 < common/gettext.patch
# aclocal # aclocal

View file

@ -324,15 +324,6 @@ dnl ######################################################################
dnl FIXME: simplify all this down using a few m4 macros dnl FIXME: simplify all this down using a few m4 macros
AC_ARG_ENABLE(libmmx,
AC_HELP_STRING([--enable-libmmx],[use libmmx, if available]),
[case "${enableval}" in
yes) USE_LIBMMX=$HAVE_LIBMMX ;;
no) USE_LIBMMX=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-libmmx) ;;
esac],
[USE_LIBMMX=$HAVE_LIBMMX]) dnl Default value
AC_ARG_ENABLE(fast-stack-trash, AC_ARG_ENABLE(fast-stack-trash,
AC_HELP_STRING([--enable-fast-stack-trash],[use fast memory allocator (i586 or above)]), AC_HELP_STRING([--enable-fast-stack-trash],[use fast memory allocator (i586 or above)]),
[case "${enableval}" in [case "${enableval}" in
@ -443,7 +434,14 @@ esac],
[USE_DEBUG=yes]) dnl Default value [USE_DEBUG=yes]) dnl Default value
dnl valgrind inclusion dnl valgrind inclusion
USE_VALGRIND="$USE_DEBUG" AC_ARG_ENABLE(valgrind,
AC_HELP_STRING([--disable-valgrind],[disable run-time valgrind detection]),
[case "${enableval}" in
yes) USE_VALGRIND="$USE_DEBUG" ;;
no) USE_VALGRIND=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind) ;;
esac],
[USE_VALGRIND="$USE_DEBUG"]) dnl Default value
VALGRIND_REQ="2.1" VALGRIND_REQ="2.1"
if test "x$USE_VALGRIND" = xyes; then if test "x$USE_VALGRIND" = xyes; then
@ -463,10 +461,6 @@ dnl ################################################
dnl These should be "USE_*" instead of "HAVE_*", but some packages expect dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
dnl HAVE_ and it is likely to be easier to stick with the old name dnl HAVE_ and it is likely to be easier to stick with the old name
if test "x$USE_LIBMMX" = xyes; then
AC_DEFINE(HAVE_LIBMMX, 1, [Define if libmmx is available])
fi
if test "x$USE_FAST_STACK_TRASH" = xyes; then if test "x$USE_FAST_STACK_TRASH" = xyes; then
AC_DEFINE(USE_FAST_STACK_TRASH, 1, [Define if we should use i586 optimized stack functions]) AC_DEFINE(USE_FAST_STACK_TRASH, 1, [Define if we should use i586 optimized stack functions])
fi fi

View file

@ -189,7 +189,7 @@ gst_init_get_popt_table (void)
{"gst-plugin-load", NUL, POPT_ARG_STRING | POPT_ARGFLAG_STRIP, NULL, {"gst-plugin-load", NUL, POPT_ARG_STRING | POPT_ARGFLAG_STRIP, NULL,
ARG_PLUGIN_LOAD, ARG_PLUGIN_LOAD,
N_("Comma-separated list of plugins to preload in addition to the " N_("Comma-separated list of plugins to preload in addition to the "
"list stored in envronment variable GST_PLUGIN_PATH"), "list stored in environment variable GST_PLUGIN_PATH"),
N_("PLUGINS")}, N_("PLUGINS")},
{"gst-disable-segtrap", NUL, POPT_ARG_NONE | POPT_ARGFLAG_STRIP, NULL, {"gst-disable-segtrap", NUL, POPT_ARG_NONE | POPT_ARGFLAG_STRIP, NULL,
ARG_SEGTRAP_DISABLE, ARG_SEGTRAP_DISABLE,
@ -584,6 +584,7 @@ init_post (void)
_gst_format_initialize (); _gst_format_initialize ();
_gst_query_type_initialize (); _gst_query_type_initialize ();
gst_object_get_type (); gst_object_get_type ();
gst_probe_get_type ();
gst_pad_get_type (); gst_pad_get_type ();
gst_real_pad_get_type (); gst_real_pad_get_type ();
gst_ghost_pad_get_type (); gst_ghost_pad_get_type ();

View file

@ -78,6 +78,8 @@ extern GstDebugCategory *GST_CAT_EVENT;
extern GstDebugCategory *GST_CAT_MESSAGE; extern GstDebugCategory *GST_CAT_MESSAGE;
extern GstDebugCategory *GST_CAT_PARAMS; extern GstDebugCategory *GST_CAT_PARAMS;
extern GstDebugCategory *GST_CAT_CALL_TRACE; extern GstDebugCategory *GST_CAT_CALL_TRACE;
extern GstDebugCategory *GST_CAT_SIGNAL;
extern GstDebugCategory *GST_CAT_PROBE;
#else #else
@ -109,6 +111,8 @@ extern GstDebugCategory *GST_CAT_CALL_TRACE;
#define GST_CAT_MESSAGE NULL #define GST_CAT_MESSAGE NULL
#define GST_CAT_PARAMS NULL #define GST_CAT_PARAMS NULL
#define GST_CAT_CALL_TRACE NULL #define GST_CAT_CALL_TRACE NULL
#define GST_CAT_SIGNAL NULL
#define GST_CAT_PROBE NULL
#endif #endif

View file

@ -466,6 +466,7 @@ gst_bin_remove_func (GstBin * bin, GstElement * element)
gst_object_unparent (GST_OBJECT (element)); gst_object_unparent (GST_OBJECT (element));
g_signal_emit (G_OBJECT (bin), gst_bin_signals[ELEMENT_REMOVED], 0, element); g_signal_emit (G_OBJECT (bin), gst_bin_signals[ELEMENT_REMOVED], 0, element);
/* element is really out of our control now */
gst_object_unref (GST_OBJECT (element)); gst_object_unref (GST_OBJECT (element));
return TRUE; return TRUE;
@ -717,6 +718,7 @@ gst_bin_iterate_sinks (GstBin * bin)
children = gst_bin_iterate_elements (bin); children = gst_bin_iterate_elements (bin);
result = gst_iterator_filter (children, result = gst_iterator_filter (children,
(GCompareFunc) bin_element_is_sink, bin); (GCompareFunc) bin_element_is_sink, bin);
gst_iterator_free (children);
return result; return result;
} }
@ -1051,6 +1053,7 @@ gst_bin_get_by_name (GstBin * bin, const gchar * name)
children = gst_bin_iterate_recurse (bin); children = gst_bin_iterate_recurse (bin);
result = gst_iterator_find_custom (children, result = gst_iterator_find_custom (children,
(GCompareFunc) compare_name, (gpointer) name); (GCompareFunc) compare_name, (gpointer) name);
gst_iterator_free (children);
return GST_ELEMENT_CAST (result); return GST_ELEMENT_CAST (result);
} }
@ -1092,7 +1095,6 @@ gst_bin_get_by_name_recurse_up (GstBin * bin, const gchar * name)
return result; return result;
} }
static gint static gint
compare_interface (GstElement * element, gpointer interface) compare_interface (GstElement * element, gpointer interface)
{ {
@ -1136,6 +1138,7 @@ gst_bin_get_by_interface (GstBin * bin, GType interface)
children = gst_bin_iterate_recurse (bin); children = gst_bin_iterate_recurse (bin);
result = gst_iterator_find_custom (children, (GCompareFunc) compare_interface, result = gst_iterator_find_custom (children, (GCompareFunc) compare_interface,
GINT_TO_POINTER (interface)); GINT_TO_POINTER (interface));
gst_iterator_free (children);
return GST_ELEMENT_CAST (result); return GST_ELEMENT_CAST (result);
} }
@ -1164,6 +1167,7 @@ gst_bin_iterate_all_by_interface (GstBin * bin, GType interface)
children = gst_bin_iterate_recurse (bin); children = gst_bin_iterate_recurse (bin);
result = gst_iterator_filter (children, (GCompareFunc) compare_interface, result = gst_iterator_filter (children, (GCompareFunc) compare_interface,
GINT_TO_POINTER (interface)); GINT_TO_POINTER (interface));
gst_iterator_free (children);
return result; return result;
} }

View file

@ -39,8 +39,28 @@ GST_EXPORT GType _gst_bin_type;
#define GST_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_BIN, GstBinClass)) #define GST_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_BIN, GstBinClass))
#define GST_BIN_CAST(obj) ((GstBin*)(obj)) #define GST_BIN_CAST(obj) ((GstBin*)(obj))
/**
* GstBinFlags:
* @GST_BIN_FLAG_MANAGER: this bin is a manager of child elements, i.e.
* a pipeline or thread.
* @GST_BIN_SELF_SCHEDULABLE: the bin iterates itself.
* @GST_BIN_FLAG_PREFER_COTHREADS: we prefer to have cothreads when its
* an option, over chain-based.
* @GST_BIN_FLAG_FIXED_CLOCK: bin has one clock that cannot be changed.
* @GST_BIN_STATE_LOCKED: indicator that we are in a non-recursive
* state-change on the bin, or that kids should not change parent state.
* Both are internally used to prevent infinitely recursive loops of
* state changes. Since they are mutually exclusive and serve the same
* purpose, we use the same flag for them.
* @GST_BIN_FLAG_LAST: the last enum in the series of flags in a bin,
* derived classes can use this as first value in a list of flags.
*
* GstBinFlags are a set of flags specific to bins. Most are set/used
* internally. They can be checked using the GST_FLAG_IS_SET () macro,
* and (un)set using GST_FLAG_SET () and GST_FLAG_UNSET ().
*/
typedef enum { typedef enum {
GST_BIN_FLAG_FIXED_CLOCK, GST_BIN_FLAG_FIXED_CLOCK = GST_ELEMENT_FLAG_LAST,
/* padding */ /* padding */
GST_BIN_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 5 GST_BIN_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 5

View file

@ -114,6 +114,7 @@ gst_buffer_default_free (GstBuffer * buffer)
gst_buffer_free_chunk (buffer); gst_buffer_free_chunk (buffer);
} }
/** /**
* gst_buffer_default_copy: * gst_buffer_default_copy:
* @buffer: a #GstBuffer to make a copy of. * @buffer: a #GstBuffer to make a copy of.

View file

@ -81,10 +81,11 @@ extern GType _gst_buffer_type;
* @GST_BUFFER_ORIGINAL: buffer is not a copy of another buffer. * @GST_BUFFER_ORIGINAL: buffer is not a copy of another buffer.
* @GST_BUFFER_DONTFREE: do not try to free the data when this buffer is * @GST_BUFFER_DONTFREE: do not try to free the data when this buffer is
* unreferenced. * unreferenced.
* @GST_BUFFER_PREROLL: The buffer is part of the preroll phase and should not * @GST_BUFFER_KEY_UNIT: the buffer holds a key unit, a unit that can be
* be displayed. * decoded independently of other buffers.
* @GST_BUFFER_DISCONT: The buffer is the first after a discontinuity in the * This flag has been deprecated, see #GST_BUFFER_DELTA_UNIT.
* stream. * @GST_BUFFER_DONTKEEP: the buffer should not be ref()ed, but copied instead
* before doing anything with it (for specially allocated hw buffers and such)
* @GST_BUFFER_IN_CAPS: the buffer has been added as a field in a #GstCaps. * @GST_BUFFER_IN_CAPS: the buffer has been added as a field in a #GstCaps.
* @GST_BUFFER_GAP: the buffer has been created to fill a gap in the stream. * @GST_BUFFER_GAP: the buffer has been created to fill a gap in the stream.
* @GST_BUFFER_DELTA_UNIT: this unit cannot be decoded independently. * @GST_BUFFER_DELTA_UNIT: this unit cannot be decoded independently.

View file

@ -196,7 +196,7 @@ gst_caps_new_full_valist (GstStructure * structure, va_list var_args)
/** /**
* gst_caps_copy: * gst_caps_copy:
* @caps: the caps structure to copy * @caps: the #GstCaps to copy
* *
* Creates a new #GstCaps as a copy of the old @caps. The new caps will have a * Creates a new #GstCaps as a copy of the old @caps. The new caps will have a
* refcount of 1, owned by the caller. The structures are copied as well. * refcount of 1, owned by the caller. The structures are copied as well.
@ -355,7 +355,6 @@ gst_static_caps_get (GstStaticCaps * static_caps)
GstCaps *caps = (GstCaps *) static_caps; GstCaps *caps = (GstCaps *) static_caps;
gboolean ret; gboolean ret;
if (caps->type == 0) { if (caps->type == 0) {
caps->type = GST_TYPE_CAPS; caps->type = GST_TYPE_CAPS;
/* initialize the caps to a refcount of 1 so the caps can be writable... */ /* initialize the caps to a refcount of 1 so the caps can be writable... */
@ -407,7 +406,11 @@ gst_caps_append (GstCaps * caps1, GstCaps * caps2)
g_return_if_fail (IS_WRITABLE (caps1)); g_return_if_fail (IS_WRITABLE (caps1));
g_return_if_fail (IS_WRITABLE (caps2)); g_return_if_fail (IS_WRITABLE (caps2));
#ifdef USE_POISONING
CAPS_POISON (caps2);
#endif
if (gst_caps_is_any (caps1) || gst_caps_is_any (caps2)) { if (gst_caps_is_any (caps1) || gst_caps_is_any (caps2)) {
/* FIXME: this leaks */
caps1->flags |= GST_CAPS_FLAGS_ANY; caps1->flags |= GST_CAPS_FLAGS_ANY;
for (i = caps2->structs->len - 1; i >= 0; i--) { for (i = caps2->structs->len - 1; i >= 0; i--) {
structure = gst_caps_remove_and_get_structure (caps2, i); structure = gst_caps_remove_and_get_structure (caps2, i);
@ -421,7 +424,6 @@ gst_caps_append (GstCaps * caps1, GstCaps * caps2)
gst_caps_append_structure (caps1, structure); gst_caps_append_structure (caps1, structure);
} }
} }
gst_caps_unref (caps2); /* guaranteed to free it */ gst_caps_unref (caps2); /* guaranteed to free it */
} }
@ -474,11 +476,11 @@ gst_caps_remove_structure (GstCaps * caps, guint idx)
/** /**
* gst_caps_split_one: * gst_caps_split_one:
* @caps: * @caps: a #GstCaps
* *
* This function is not implemented. * This function is not implemented.
* *
* Returns: * Returns: NULL
*/ */
GstCaps * GstCaps *
gst_caps_split_one (GstCaps * caps) gst_caps_split_one (GstCaps * caps)
@ -974,7 +976,6 @@ gst_caps_intersect (const GstCaps * caps1, const GstCaps * caps2)
j--; j--;
} }
} }
gst_caps_do_simplify (dest); gst_caps_do_simplify (dest);
return dest; return dest;
} }

View file

@ -40,8 +40,10 @@ G_BEGIN_DECLS
#define GST_CAPS_IS_SIMPLE(caps) (gst_caps_get_size(caps) == 1) #define GST_CAPS_IS_SIMPLE(caps) (gst_caps_get_size(caps) == 1)
#define gst_caps_is_simple(caps) GST_CAPS_IS_SIMPLE(caps) #define gst_caps_is_simple(caps) GST_CAPS_IS_SIMPLE(caps)
#ifndef GST_DISABLE_DEPRECATED
#define GST_DEBUG_CAPS(string, caps) \ #define GST_DEBUG_CAPS(string, caps) \
GST_DEBUG ( string "%s: " GST_PTR_FORMAT, caps) GST_DEBUG ( string "%s: " GST_PTR_FORMAT, caps)
#endif
#define GST_STATIC_CAPS(string) \ #define GST_STATIC_CAPS(string) \
{ \ { \
@ -146,6 +148,12 @@ void gst_caps_replace (GstCaps
gchar * gst_caps_to_string (const GstCaps *caps); gchar * gst_caps_to_string (const GstCaps *caps);
GstCaps * gst_caps_from_string (const gchar *string); GstCaps * gst_caps_from_string (const gchar *string);
gboolean gst_caps_structure_fixate_field_nearest_int (GstStructure *structure,
const char *field_name,
int target);
gboolean gst_caps_structure_fixate_field_nearest_double (GstStructure *structure,
const char *field_name,
double target);
G_END_DECLS G_END_DECLS

View file

@ -204,7 +204,6 @@ GstClockReturn gst_clock_id_wait_async (GstClockID id,
gpointer user_data); gpointer user_data);
void gst_clock_id_unschedule (GstClockID id); void gst_clock_id_unschedule (GstClockID id);
G_END_DECLS G_END_DECLS
#endif /* __GST_CLOCK_H__ */ #endif /* __GST_CLOCK_H__ */

View file

@ -26,7 +26,6 @@
#include <gobject/gvaluecollector.h> #include <gobject/gvaluecollector.h>
#include "gstelement.h" #include "gstelement.h"
#include "gstmarshal.h" #include "gstmarshal.h"
#include "gsterror.h" #include "gsterror.h"
#include "gstevent.h" #include "gstevent.h"
@ -243,6 +242,8 @@ gst_element_release_request_pad (GstElement * element, GstPad * pad)
if (oclass->release_pad) if (oclass->release_pad)
(oclass->release_pad) (element, pad); (oclass->release_pad) (element, pad);
else
gst_element_remove_pad (element, pad);
} }
/** /**
@ -1429,7 +1430,7 @@ void gst_element_message_full
if ((text == NULL) || (text[0] == 0)) { if ((text == NULL) || (text[0] == 0)) {
/* text could have come from g_strdup_printf (""); */ /* text could have come from g_strdup_printf (""); */
g_free (text); g_free (text);
sent_text = gst_error_get_text (domain, code); sent_text = gst_error_get_message (domain, code);
} else } else
sent_text = text; sent_text = text;

View file

@ -27,7 +27,9 @@
#include "gstregistrypool.h" #include "gstregistrypool.h"
#include "gstinfo.h" #include "gstinfo.h"
#include "gsturi.h" #include "gsturi.h"
#ifndef GST_DISABLE_REGISTRY
#include "registries/gstxmlregistry.h" /* g_critical in gst_element_factory_create */ #include "registries/gstxmlregistry.h" /* g_critical in gst_element_factory_create */
#endif
GST_DEBUG_CATEGORY_STATIC (element_factory_debug); GST_DEBUG_CATEGORY_STATIC (element_factory_debug);
#define GST_CAT_DEFAULT element_factory_debug #define GST_CAT_DEFAULT element_factory_debug
@ -296,6 +298,7 @@ gst_element_factory_create (GstElementFactory * factory, const gchar * name)
GST_INFO ("creating \"%s\"", GST_PLUGIN_FEATURE_NAME (factory)); GST_INFO ("creating \"%s\"", GST_PLUGIN_FEATURE_NAME (factory));
if (factory->type == 0) { if (factory->type == 0) {
#ifndef GST_DISABLE_REGISTRY
GstPlugin *plugin = GST_PLUGIN_FEATURE (factory)->manager; GstPlugin *plugin = GST_PLUGIN_FEATURE (factory)->manager;
g_critical g_critical
@ -304,6 +307,10 @@ gst_element_factory_create (GstElementFactory * factory, const gchar * name)
gst_plugin_get_name (plugin), gst_plugin_get_filename (plugin), gst_plugin_get_name (plugin), gst_plugin_get_filename (plugin),
GST_IS_XML_REGISTRY (plugin->manager) ? GST_XML_REGISTRY (plugin-> GST_IS_XML_REGISTRY (plugin->manager) ? GST_XML_REGISTRY (plugin->
manager)->location : "Unknown"); manager)->location : "Unknown");
#else
g_critical ("Factory for `%s' has no type",
GST_PLUGIN_FEATURE_NAME (factory));
#endif
return NULL; return NULL;
} }
@ -317,6 +324,7 @@ gst_element_factory_create (GstElementFactory * factory, const gchar * name)
g_type_class_unref (oclass); g_type_class_unref (oclass);
if (name)
gst_object_set_name (GST_OBJECT (element), name); gst_object_set_name (GST_OBJECT (element), name);
return element; return element;

View file

@ -28,11 +28,10 @@
#define TABLE(t, d, a, b) t[GST_ ## d ## _ERROR_ ## a] = g_strdup (b) #define TABLE(t, d, a, b) t[GST_ ## d ## _ERROR_ ## a] = g_strdup (b)
#define QUARK_FUNC(string) \ #define QUARK_FUNC(string) \
GQuark gst_ ## string ## _error_quark (void) { \ GQuark gst_ ## string ## _error_quark (void) { \
static GQuark q; \ static GQuark quark; \
if (!q) \ if (!quark) \
q = g_quark_from_static_string ("gst-" # string "-error-quark"); \ quark = g_quark_from_static_string ("gst-" # string "-error-quark"); \
return q; \ return quark; }
}
GType GType
gst_g_error_get_type (void) gst_g_error_get_type (void)
@ -111,7 +110,7 @@ _gst_resource_errors_init (void)
t = g_new0 (gchar *, GST_RESOURCE_ERROR_NUM_ERRORS); t = g_new0 (gchar *, GST_RESOURCE_ERROR_NUM_ERRORS);
TABLE (t, RESOURCE, FAILED, TABLE (t, RESOURCE, FAILED,
N_("GStreamer encountered a general supporting library error.")); N_("GStreamer encountered a general resource error."));
TABLE (t, RESOURCE, TOO_LAZY, TABLE (t, RESOURCE, TOO_LAZY,
N_("GStreamer developers were too lazy to assign an error code " N_("GStreamer developers were too lazy to assign an error code "
"to this error. Please file a bug.")); "to this error. Please file a bug."));
@ -141,7 +140,7 @@ _gst_stream_errors_init (void)
t = g_new0 (gchar *, GST_STREAM_ERROR_NUM_ERRORS); t = g_new0 (gchar *, GST_STREAM_ERROR_NUM_ERRORS);
TABLE (t, STREAM, FAILED, TABLE (t, STREAM, FAILED,
N_("GStreamer encountered a general supporting library error.")); N_("GStreamer encountered a general stream error."));
TABLE (t, STREAM, TOO_LAZY, TABLE (t, STREAM, TOO_LAZY,
N_("GStreamer developers were too lazy to assign an error code " N_("GStreamer developers were too lazy to assign an error code "
"to this error. Please file a bug.")); "to this error. Please file a bug."));
@ -162,30 +161,29 @@ _gst_stream_errors_init (void)
return t; return t;
} }
QUARK_FUNC (core); QUARK_FUNC (core)
QUARK_FUNC (library); QUARK_FUNC (library)
QUARK_FUNC (resource); QUARK_FUNC (resource)
QUARK_FUNC (stream); QUARK_FUNC (stream)
/** /**
* gst_error_get_text: * gst_error_get_message:
* @domain: the GStreamer error domain this error belongs to. * @domain: the GStreamer error domain this error belongs to.
* @code: the error code belonging to the domain. * @code: the error code belonging to the domain.
* *
* Returns: a newly allocated string describing the error text in the * Returns: a newly allocated string describing the error message in the
* current locale. * current locale.
*/ */
gchar * gchar *gst_error_get_message (GQuark domain, gint code)
gst_error_get_text (GQuark domain, gint code)
{ {
static gchar **gst_core_errors = NULL; static gchar **gst_core_errors = NULL;
static gchar **gst_library_errors = NULL; static gchar **gst_library_errors = NULL;
static gchar **gst_resource_errors = NULL; static gchar **gst_resource_errors = NULL;
static gchar **gst_stream_errors = NULL; static gchar **gst_stream_errors = NULL;
gchar *text = NULL; gchar *message = NULL;
/* initialize error text tables if necessary */ /* initialize error message tables if necessary */
if (gst_core_errors == NULL) if (gst_core_errors == NULL)
gst_core_errors = _gst_core_errors_init (); gst_core_errors = _gst_core_errors_init ();
if (gst_library_errors == NULL) if (gst_library_errors == NULL)
@ -197,23 +195,23 @@ gst_error_get_text (GQuark domain, gint code)
if (domain == GST_CORE_ERROR) if (domain == GST_CORE_ERROR)
text = gst_core_errors[code]; message = gst_core_errors[code];
else if (domain == GST_LIBRARY_ERROR) else if (domain == GST_LIBRARY_ERROR)
text = gst_library_errors[code]; message = gst_library_errors[code];
else if (domain == GST_RESOURCE_ERROR) else if (domain == GST_RESOURCE_ERROR)
text = gst_resource_errors[code]; message = gst_resource_errors[code];
else if (domain == GST_STREAM_ERROR) else if (domain == GST_STREAM_ERROR)
text = gst_stream_errors[code]; message = gst_stream_errors[code];
else { else {
g_warning ("No error texts for domain %s", g_quark_to_string (domain)); g_warning ("No error messages for domain %s", g_quark_to_string (domain));
return g_strdup_printf (_("No error text for domain %s."), return g_strdup_printf (_("No error message for domain %s."),
g_quark_to_string (domain)); g_quark_to_string (domain));
} }
if (text) if (message)
return g_strdup (_(text)); return g_strdup (_(message));
else else
return return
g_strdup_printf (_ g_strdup_printf (_
("No standard error text for domain %s and code %d."), ("No standard error message for domain %s and code %d."),
g_quark_to_string (domain), code); g_quark_to_string (domain), code);
} }

View file

@ -196,7 +196,7 @@ typedef enum
#define GST_ERROR_SYSTEM ("system error: %s", g_strerror (errno)) #define GST_ERROR_SYSTEM ("system error: %s", g_strerror (errno))
GType gst_g_error_get_type (void); GType gst_g_error_get_type (void);
gchar *gst_error_get_text (GQuark domain, gint code); gchar *gst_error_get_message (GQuark domain, gint code);
GQuark gst_stream_error_quark (void); GQuark gst_stream_error_quark (void);
GQuark gst_core_error_quark (void); GQuark gst_core_error_quark (void);
GQuark gst_resource_error_quark (void); GQuark gst_resource_error_quark (void);

View file

@ -48,6 +48,8 @@
/* underscore is to prevent conflict with GST_CAT_DEBUG define */ /* underscore is to prevent conflict with GST_CAT_DEBUG define */
GST_DEBUG_CATEGORY_STATIC (_GST_CAT_DEBUG); GST_DEBUG_CATEGORY_STATIC (_GST_CAT_DEBUG);
/* time of initialization, so we get useful debugging output times */
GstClockTime start_time;
#if 0 #if 0
#if defined __sgi__ #if defined __sgi__
@ -158,6 +160,8 @@ GstDebugCategory *GST_CAT_MESSAGE = NULL;
GstDebugCategory *GST_CAT_PARAMS = NULL; GstDebugCategory *GST_CAT_PARAMS = NULL;
GstDebugCategory *GST_CAT_CALL_TRACE = NULL; GstDebugCategory *GST_CAT_CALL_TRACE = NULL;
GstDebugCategory *GST_CAT_SEEK = NULL; GstDebugCategory *GST_CAT_SEEK = NULL;
GstDebugCategory *GST_CAT_SIGNAL = NULL;
GstDebugCategory *GST_CAT_PROBE = NULL;
/* FIXME: export this? */ /* FIXME: export this? */
gboolean gboolean
@ -203,9 +207,15 @@ __gst_in_valgrind (void)
void void
_gst_debug_init (void) _gst_debug_init (void)
{ {
GTimeVal current;
gst_atomic_int_init (&__default_level, GST_LEVEL_DEFAULT); gst_atomic_int_init (&__default_level, GST_LEVEL_DEFAULT);
gst_atomic_int_init (&__use_color, 1); gst_atomic_int_init (&__use_color, 1);
/* get time we started for debugging messages */
g_get_current_time (&current);
start_time = GST_TIMEVAL_TO_TIME (current);
#ifdef HAVE_PRINTF_EXTENSION #ifdef HAVE_PRINTF_EXTENSION
register_printf_function (GST_PTR_FORMAT[0], _gst_info_printf_extension, register_printf_function (GST_PTR_FORMAT[0], _gst_info_printf_extension,
_gst_info_printf_extension_arginfo); _gst_info_printf_extension_arginfo);
@ -240,7 +250,7 @@ _gst_debug_init (void)
GST_DEBUG_BOLD | GST_DEBUG_FG_MAGENTA, NULL); GST_DEBUG_BOLD | GST_DEBUG_FG_MAGENTA, NULL);
/* FIXME: remove GST_CAT_DATAFLOW in 0.9 */ /* FIXME: remove GST_CAT_DATAFLOW in 0.9 */
GST_CAT_DATAFLOW = _gst_debug_category_new ("GST_DATAFLOW", GST_CAT_DATAFLOW = _gst_debug_category_new ("GST_DATAFLOW",
GST_DEBUG_BOLD | GST_DEBUG_FG_GREEN, NULL); GST_DEBUG_BOLD | GST_DEBUG_FG_GREEN, "dataflow inside pads");
GST_CAT_BUFFER = _gst_debug_category_new ("GST_BUFFER", GST_CAT_BUFFER = _gst_debug_category_new ("GST_BUFFER",
GST_DEBUG_BOLD | GST_DEBUG_FG_GREEN, NULL); GST_DEBUG_BOLD | GST_DEBUG_FG_GREEN, NULL);
GST_CAT_CAPS = _gst_debug_category_new ("GST_CAPS", GST_CAT_CAPS = _gst_debug_category_new ("GST_CAPS",
@ -281,7 +291,12 @@ _gst_debug_init (void)
GST_CAT_CALL_TRACE = _gst_debug_category_new ("GST_CALL_TRACE", GST_CAT_CALL_TRACE = _gst_debug_category_new ("GST_CALL_TRACE",
GST_DEBUG_BOLD, NULL); GST_DEBUG_BOLD, NULL);
GST_CAT_SEEK = _gst_debug_category_new ("GST_SEEK", GST_CAT_SEEK = _gst_debug_category_new ("GST_SEEK",
0, "plugins reacting to seek events"); GST_DEBUG_BOLD | GST_DEBUG_FG_BLUE, "plugins reacting to seek events");
GST_CAT_SIGNAL = _gst_debug_category_new ("GST_SIGNAL",
GST_DEBUG_BOLD | GST_DEBUG_FG_WHITE | GST_DEBUG_BG_RED, NULL);
GST_CAT_PROBE = _gst_debug_category_new ("GST_PROBE",
GST_DEBUG_BOLD | GST_DEBUG_FG_GREEN, "pad probes");
/* print out the valgrind message if we're in valgrind */ /* print out the valgrind message if we're in valgrind */
__gst_in_valgrind (); __gst_in_valgrind ();
@ -490,6 +505,7 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level,
gchar *pidcolor; gchar *pidcolor;
gint pid; gint pid;
GTimeVal now; GTimeVal now;
GstClockTime elapsed;
if (level > gst_debug_category_get_threshold (category)) if (level > gst_debug_category_get_threshold (category))
return; return;
@ -512,10 +528,11 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level,
obj = object ? gst_debug_print_object (object) : g_strdup (""); obj = object ? gst_debug_print_object (object) : g_strdup ("");
g_get_current_time (&now); g_get_current_time (&now);
elapsed = GST_TIMEVAL_TO_TIME (now) - start_time;
g_printerr ("%s (%p - %" GST_TIME_FORMAT g_printerr ("%s (%p - %" GST_TIME_FORMAT
") %s%15s%s(%s%5d%s) %s%s(%d):%s:%s%s %s\n", ") %s%15s%s(%s%5d%s) %s%s(%d):%s:%s%s %s\n",
gst_debug_level_get_name (level), g_thread_self (), gst_debug_level_get_name (level), g_thread_self (),
GST_TIME_ARGS (GST_TIMEVAL_TO_TIME (now)), color, GST_TIME_ARGS (elapsed), color,
gst_debug_category_get_name (category), clear, pidcolor, pid, clear, gst_debug_category_get_name (category), clear, pidcolor, pid, clear,
color, file, line, function, obj, clear, gst_debug_message_get (message)); color, file, line, function, obj, clear, gst_debug_message_get (message));
@ -1112,6 +1129,17 @@ _gst_info_printf_extension_arginfo (const struct printf_info *info, size_t n,
#endif /* HAVE_PRINTF_EXTENSION */ #endif /* HAVE_PRINTF_EXTENSION */
#else /* !GST_DISABLE_GST_DEBUG */ #else /* !GST_DISABLE_GST_DEBUG */
guint
gst_debug_remove_log_function (GstLogFunction func)
{
return 0;
}
guint
gst_debug_remove_log_function_by_data (gpointer data)
{
return 0;
}
gboolean gboolean
__gst_in_valgrind (void) __gst_in_valgrind (void)

View file

@ -617,9 +617,9 @@ G_CONST_RETURN gchar *
#define gst_debug_get_default_threshold() (GST_LEVEL_NONE) #define gst_debug_get_default_threshold() (GST_LEVEL_NONE)
#define gst_debug_level_get_name(level) ("NONE") #define gst_debug_level_get_name(level) ("NONE")
#define gst_debug_add_log_function(func,data) (FALSE) #define gst_debug_add_log_function(func,data) /* NOP */
#define gst_debug_remove_log_function(func) (0) guint gst_debug_remove_log_function (GstLogFunction func);
#define gst_debug_remove_log_function_by_data(data) (0) guint gst_debug_remove_log_function_by_data (gpointer data);
#define gst_debug_set_active(active) /* NOP */ #define gst_debug_set_active(active) /* NOP */
#define gst_debug_is_active() (FALSE) #define gst_debug_is_active() (FALSE)
#define gst_debug_set_colored(colored) /* NOP */ #define gst_debug_set_colored(colored) /* NOP */

View file

@ -124,15 +124,15 @@ GstMessage * gst_message_new_eos (GstObject * src);
GstMessage * gst_message_new_error (GstObject * src, GError * error, gchar * debug); GstMessage * gst_message_new_error (GstObject * src, GError * error, gchar * debug);
GstMessage * gst_message_new_warning (GstObject * src, GError * error, gchar * debug); GstMessage * gst_message_new_warning (GstObject * src, GError * error, gchar * debug);
GstMessage * gst_message_new_tag (GstObject * src, GstTagList * tag_list); GstMessage * gst_message_new_tag (GstObject * src, GstTagList * tag_list);
GstMessage * gst_message_new_state_changed (GstObject * src, GstElementState old, GstMessage * gst_message_new_state_changed (GstObject * src, GstElementState old_state,
GstElementState new); GstElementState new_state);
GstMessage * gst_message_new_application (GstStructure *structure); GstMessage * gst_message_new_application (GstStructure *structure);
const GstStructure * gst_message_get_structure (GstMessage *message); const GstStructure * gst_message_get_structure (GstMessage *message);
void gst_message_parse_tag (GstMessage *message, GstTagList **tag_list); void gst_message_parse_tag (GstMessage *message, GstTagList **tag_list);
void gst_message_parse_state_changed (GstMessage *message, GstElementState *old, void gst_message_parse_state_changed (GstMessage *message, GstElementState *old_state,
GstElementState *new); GstElementState *new_state);
void gst_message_parse_error (GstMessage *message, GError **gerror, gchar **debug); void gst_message_parse_error (GstMessage *message, GError **gerror, gchar **debug);
void gst_message_parse_warning (GstMessage *message, GError **gerror, gchar **debug); void gst_message_parse_warning (GstMessage *message, GError **gerror, gchar **debug);

View file

@ -235,6 +235,7 @@ gst_real_pad_class_init (GstRealPadClass * klass)
static void static void
gst_real_pad_init (GstRealPad * pad) gst_real_pad_init (GstRealPad * pad)
{ {
pad->direction = GST_PAD_UNKNOWN;
pad->peer = NULL; pad->peer = NULL;
pad->chainfunc = NULL; pad->chainfunc = NULL;
@ -2184,6 +2185,7 @@ gst_pad_get_pad_template_caps (GstPad * pad)
return gst_static_caps_get (&anycaps); return gst_static_caps_get (&anycaps);
} }
/** /**
* gst_pad_get_peer: * gst_pad_get_peer:
* @pad: a #GstPad to get the peer of. * @pad: a #GstPad to get the peer of.

View file

@ -578,6 +578,22 @@ gst_plugin_get_filename (GstPlugin * plugin)
return plugin->filename; return plugin->filename;
} }
/**
* gst_plugin_get_version:
* @plugin: plugin to get the version of
*
* get the version of the plugin
*
* Returns: the version of the plugin
*/
G_CONST_RETURN gchar *
gst_plugin_get_version (GstPlugin * plugin)
{
g_return_val_if_fail (plugin != NULL, NULL);
return plugin->desc.version;
}
/** /**
* gst_plugin_get_license: * gst_plugin_get_license:
* @plugin: plugin to get the license of * @plugin: plugin to get the license of
@ -874,9 +890,9 @@ gst_plugin_load (const gchar * name)
* @name: name of library to load * @name: name of library to load
* *
* Load the named library. Name should be given as * Load the named library. Name should be given as
* &quot;liblibrary.so&quot;. * &quot;liblibrary.so&quot;. (exception to this rule is 'riff', which .so name is 'gstriff')
* *
* Returns: whether the library was loaded or not * Returns: whether the library was loaded or not (and returns TRUE if it was already loaded)
*/ */
gboolean gboolean
gst_library_load (const gchar * name) gst_library_load (const gchar * name)

View file

@ -130,6 +130,7 @@ void _gst_plugin_register_static (GstPluginDesc *desc);
G_CONST_RETURN gchar* gst_plugin_get_name (GstPlugin *plugin); G_CONST_RETURN gchar* gst_plugin_get_name (GstPlugin *plugin);
G_CONST_RETURN gchar* gst_plugin_get_description (GstPlugin *plugin); G_CONST_RETURN gchar* gst_plugin_get_description (GstPlugin *plugin);
G_CONST_RETURN gchar* gst_plugin_get_filename (GstPlugin *plugin); G_CONST_RETURN gchar* gst_plugin_get_filename (GstPlugin *plugin);
G_CONST_RETURN gchar* gst_plugin_get_version (GstPlugin *plugin);
G_CONST_RETURN gchar* gst_plugin_get_license (GstPlugin *plugin); G_CONST_RETURN gchar* gst_plugin_get_license (GstPlugin *plugin);
G_CONST_RETURN gchar* gst_plugin_get_package (GstPlugin *plugin); G_CONST_RETURN gchar* gst_plugin_get_package (GstPlugin *plugin);
G_CONST_RETURN gchar* gst_plugin_get_origin (GstPlugin *plugin); G_CONST_RETURN gchar* gst_plugin_get_origin (GstPlugin *plugin);

View file

@ -91,11 +91,13 @@ gboolean
gst_plugin_feature_ensure_loaded (GstPluginFeature * feature) gst_plugin_feature_ensure_loaded (GstPluginFeature * feature)
{ {
GstPlugin *plugin; GstPlugin *plugin;
static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
g_return_val_if_fail (feature != NULL, FALSE); g_return_val_if_fail (feature != NULL, FALSE);
g_return_val_if_fail (GST_IS_PLUGIN_FEATURE (feature), FALSE); g_return_val_if_fail (GST_IS_PLUGIN_FEATURE (feature), FALSE);
plugin = (GstPlugin *) (feature->manager); plugin = (GstPlugin *) (feature->manager);
g_static_mutex_lock (&mutex);
if (plugin && !gst_plugin_is_loaded (plugin)) { if (plugin && !gst_plugin_is_loaded (plugin)) {
#ifndef GST_DISABLE_REGISTRY #ifndef GST_DISABLE_REGISTRY
@ -104,12 +106,21 @@ gst_plugin_feature_ensure_loaded (GstPluginFeature * feature)
"loading plugin %s for feature", plugin->desc.name); "loading plugin %s for feature", plugin->desc.name);
if (gst_registry_load_plugin (GST_REGISTRY (plugin->manager), if (gst_registry_load_plugin (GST_REGISTRY (plugin->manager),
plugin) != GST_REGISTRY_OK) plugin) != GST_REGISTRY_OK) {
return FALSE; g_static_mutex_unlock (&mutex);
} else
#endif /* GST_DISABLE_REGISTRY */
return FALSE; return FALSE;
} }
} else {
g_static_mutex_unlock (&mutex);
return FALSE;
}
#else /* GST_DISABLE_REGISTRY */
g_static_mutex_unlock (&mutex);
return FALSE;
#endif
}
g_static_mutex_unlock (&mutex);
return TRUE; return TRUE;
} }

View file

@ -20,10 +20,29 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#include "gst_private.h" #include "gst_private.h"
#include "gstprobe.h" #include "gstprobe.h"
static GstProbe *
_gst_probe_copy (const GstProbe * src)
{
return gst_probe_new (src->single_shot, src->callback, src->user_data);
}
GType
gst_probe_get_type (void)
{
static GType gst_probe_type = 0;
if (!gst_probe_type) {
gst_probe_type = g_boxed_type_register_static ("GstProbe",
(GBoxedCopyFunc) _gst_probe_copy, (GBoxedFreeFunc) gst_probe_destroy);
}
return gst_probe_type;
}
/** /**
* gst_probe_new: * gst_probe_new:
* @single_shot: TRUE if a single shot probe is required * @single_shot: TRUE if a single shot probe is required
@ -50,6 +69,8 @@ gst_probe_new (gboolean single_shot,
probe->callback = callback; probe->callback = callback;
probe->user_data = user_data; probe->user_data = user_data;
GST_CAT_DEBUG (GST_CAT_PROBE, "created probe %p", probe);
return probe; return probe;
} }
@ -57,7 +78,7 @@ gst_probe_new (gboolean single_shot,
* gst_probe_destroy: * gst_probe_destroy:
* @probe: The probe to destroy * @probe: The probe to destroy
* *
* Free the memeory associated with the probe. * Free the memory associated with the probe.
*/ */
void void
gst_probe_destroy (GstProbe * probe) gst_probe_destroy (GstProbe * probe)
@ -87,6 +108,8 @@ gst_probe_perform (GstProbe * probe, GstData ** data)
g_return_val_if_fail (probe, res); g_return_val_if_fail (probe, res);
GST_CAT_DEBUG (GST_CAT_PROBE, "performing probe %p", probe);
if (probe->callback) if (probe->callback)
res = probe->callback (probe, data, probe->user_data); res = probe->callback (probe, data, probe->user_data);
@ -177,6 +200,9 @@ gst_probe_dispatcher_add_probe (GstProbeDispatcher * disp, GstProbe * probe)
g_return_if_fail (disp); g_return_if_fail (disp);
g_return_if_fail (probe); g_return_if_fail (probe);
GST_CAT_DEBUG (GST_CAT_PROBE, "adding probe %p to dispatcher %p", probe,
disp);
disp->probes = g_slist_prepend (disp->probes, probe); disp->probes = g_slist_prepend (disp->probes, probe);
} }
@ -193,6 +219,9 @@ gst_probe_dispatcher_remove_probe (GstProbeDispatcher * disp, GstProbe * probe)
g_return_if_fail (disp); g_return_if_fail (disp);
g_return_if_fail (probe); g_return_if_fail (probe);
GST_CAT_DEBUG (GST_CAT_PROBE, "removing probe %p from dispatcher %p",
probe, disp);
disp->probes = g_slist_remove (disp->probes, probe); disp->probes = g_slist_remove (disp->probes, probe);
} }
@ -213,6 +242,9 @@ gst_probe_dispatcher_dispatch (GstProbeDispatcher * disp, GstData ** data)
g_return_val_if_fail (disp, res); g_return_val_if_fail (disp, res);
GST_CAT_DEBUG (GST_CAT_PROBE, "dispatching data %p on dispatcher %p",
*data, disp);
walk = disp->probes; walk = disp->probes;
while (walk) { while (walk) {
GstProbe *probe = (GstProbe *) walk->data; GstProbe *probe = (GstProbe *) walk->data;
@ -220,7 +252,9 @@ gst_probe_dispatcher_dispatch (GstProbeDispatcher * disp, GstData ** data)
walk = g_slist_next (walk); walk = g_slist_next (walk);
res &= gst_probe_perform (probe, data); res &= gst_probe_perform (probe, data);
if (probe->single_shot) { /* it might have disappeared in the callback */
if (disp->active &&
g_slist_find (disp->probes, probe) && probe->single_shot) {
disp->probes = g_slist_remove (disp->probes, probe); disp->probes = g_slist_remove (disp->probes, probe);
/* do not free the probe here as it cannot be made threadsafe */ /* do not free the probe here as it cannot be made threadsafe */

View file

@ -29,8 +29,12 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_PROBE (gst_probe_get_type())
#define GST_PROBE(object) ((GstProbe *) object)
typedef struct _GstProbe GstProbe; typedef struct _GstProbe GstProbe;
GType gst_probe_get_type (void) G_GNUC_CONST;
/* the callback should return FALSE if the data should be discarded */ /* the callback should return FALSE if the data should be discarded */
typedef gboolean (*GstProbeCallback) (GstProbe *probe, typedef gboolean (*GstProbeCallback) (GstProbe *probe,
GstData **data, GstData **data,
@ -71,6 +75,5 @@ gboolean gst_probe_dispatcher_dispatch (GstProbeDispatcher *disp, GstData **da
G_END_DECLS G_END_DECLS
#endif /* __GST_PROBE_H__ */
#endif /* __GST_PAD_H__ */

View file

@ -36,14 +36,23 @@
/* compatibility for pre-POSIX defines */ /* compatibility for pre-POSIX defines */
#ifdef S_IRUSR #ifdef S_IRUSR
#if defined(_WIN32) && defined(__MINGW32__)
#define REGISTRY_DIR_PERMS (S_ISGID | \
S_IRUSR | S_IWUSR | S_IXUSR)
#else
#define REGISTRY_DIR_PERMS (S_ISGID | \ #define REGISTRY_DIR_PERMS (S_ISGID | \
S_IRUSR | S_IWUSR | S_IXUSR | \ S_IRUSR | S_IWUSR | S_IXUSR | \
S_IRGRP | S_IXGRP | \ S_IRGRP | S_IXGRP | \
S_IROTH | S_IXOTH) S_IROTH | S_IXOTH)
#endif
#define REGISTRY_TMPFILE_PERMS (S_IRUSR | S_IWUSR) #define REGISTRY_TMPFILE_PERMS (S_IRUSR | S_IWUSR)
#if defined(_WIN32) && defined(__MINGW32__)
#define REGISTRY_FILE_PERMS (S_IRUSR | S_IWUSR
#else
#define REGISTRY_FILE_PERMS (S_IRUSR | S_IWUSR | \ #define REGISTRY_FILE_PERMS (S_IRUSR | S_IWUSR | \
S_IRGRP | S_IWGRP | \ S_IRGRP | S_IWGRP | \
S_IROTH | S_IWOTH) S_IROTH | S_IWOTH)
#endif
#else #else
#define REGISTRY_DIR_PERMS (S_ISGID | \ #define REGISTRY_DIR_PERMS (S_ISGID | \
S_IREAD | S_IWRITE | S_IEXEC) S_IREAD | S_IWRITE | S_IEXEC)

View file

@ -226,39 +226,209 @@ GstTagList * gst_event_tag_get_list (GstEvent * tag_event);
/* GStreamer core tags (need to be discussed) */ /* GStreamer core tags (need to be discussed) */
/**
* GST_TAG_TITLE:
*
* commonly used title
*/
#define GST_TAG_TITLE "title" #define GST_TAG_TITLE "title"
/**
* GST_TAG_ARTIST:
*
* person(s) responsible for the recording
*/
#define GST_TAG_ARTIST "artist" #define GST_TAG_ARTIST "artist"
/**
* GST_TAG_ALBUM:
*
* album containing this data
*/
#define GST_TAG_ALBUM "album" #define GST_TAG_ALBUM "album"
/**
* GST_TAG_DATE:
*
* date the data was created (in Julian calendar days)
*/
#define GST_TAG_DATE "date" #define GST_TAG_DATE "date"
/**
* GST_TAG_GENRE:
*
* genre this data belongs to
*/
#define GST_TAG_GENRE "genre" #define GST_TAG_GENRE "genre"
/**
* GST_TAG_COMMENT:
*
* free text commenting the data
*/
#define GST_TAG_COMMENT "comment" #define GST_TAG_COMMENT "comment"
/**
* GST_TAG_TRACK_NUMBER:
*
* track number inside a collection
*/
#define GST_TAG_TRACK_NUMBER "track-number" #define GST_TAG_TRACK_NUMBER "track-number"
/**
* GST_TAG_TRACK_COUNT:
*
* count of tracks inside collection this track belongs to
*/
#define GST_TAG_TRACK_COUNT "track-count" #define GST_TAG_TRACK_COUNT "track-count"
/**
* GST_TAG_ALBUM_VOLUME_NUMBER:
*
* disc number inside a collection
*/
#define GST_TAG_ALBUM_VOLUME_NUMBER "album-disc-number" #define GST_TAG_ALBUM_VOLUME_NUMBER "album-disc-number"
/**
* GST_TAG_ALBUM_VOLUME_COUNT:
*
* count of discs inside collection this disc belongs to
*/
#define GST_TAG_ALBUM_VOLUME_COUNT "album-disc-count" #define GST_TAG_ALBUM_VOLUME_COUNT "album-disc-count"
/**
* GST_TAG_LOCATION:
*
* original location of file as a URI
*/
#define GST_TAG_LOCATION "location" #define GST_TAG_LOCATION "location"
/**
* GST_TAG_DESCRIPTION:
*
* short text describing the content of the data
*/
#define GST_TAG_DESCRIPTION "description" #define GST_TAG_DESCRIPTION "description"
/**
* GST_TAG_VERSION:
*
* version of this data
*/
#define GST_TAG_VERSION "version" #define GST_TAG_VERSION "version"
/**
* GST_TAG_ISRC:
*
* International Standard Recording Code - see http://www.ifpi.org/isrc/
*/
#define GST_TAG_ISRC "isrc" #define GST_TAG_ISRC "isrc"
/**
* GST_TAG_ORGANIZATION:
*
* organization
*/
#define GST_TAG_ORGANIZATION "organization" #define GST_TAG_ORGANIZATION "organization"
/**
* GST_TAG_COPYRIGHT:
*
* copyright notice of the data
*/
#define GST_TAG_COPYRIGHT "copyright" #define GST_TAG_COPYRIGHT "copyright"
/**
* GST_TAG_CONTACT:
*
* contact information
*/
#define GST_TAG_CONTACT "contact" #define GST_TAG_CONTACT "contact"
/**
* GST_TAG_LICENSE:
*
* license of data
*/
#define GST_TAG_LICENSE "license" #define GST_TAG_LICENSE "license"
/**
* GST_TAG_PERFORMER:
*
* person(s) performing
*/
#define GST_TAG_PERFORMER "performer" #define GST_TAG_PERFORMER "performer"
/**
* GST_TAG_DURATION:
*
* length in GStreamer time units (nanoseconds)
*/
#define GST_TAG_DURATION "duration" #define GST_TAG_DURATION "duration"
/**
* GST_TAG_CODEC:
*
* codec the data is stored in
*/
#define GST_TAG_CODEC "codec" #define GST_TAG_CODEC "codec"
/**
* GST_TAG_VIDEO_CODEC:
*
* codec the video data is stored in
*/
#define GST_TAG_VIDEO_CODEC "video-codec" #define GST_TAG_VIDEO_CODEC "video-codec"
/**
* GST_TAG_AUDIO_CODEC:
*
* codec the audio data is stored in
*/
#define GST_TAG_AUDIO_CODEC "audio-codec" #define GST_TAG_AUDIO_CODEC "audio-codec"
/**
* GST_TAG_BITRATE:
*
* exact or average bitrate in bits/s
*/
#define GST_TAG_BITRATE "bitrate" #define GST_TAG_BITRATE "bitrate"
/**
* GST_TAG_NOMINAL_BITRATE:
*
* nominal bitrate in bits/s
*/
#define GST_TAG_NOMINAL_BITRATE "nominal-bitrate" #define GST_TAG_NOMINAL_BITRATE "nominal-bitrate"
/**
* GST_TAG_MINIMUM_BITRATE:
*
* minimum bitrate in bits/s
*/
#define GST_TAG_MINIMUM_BITRATE "minimum-bitrate" #define GST_TAG_MINIMUM_BITRATE "minimum-bitrate"
/**
* GST_TAG_MAXIMUM_BITRATE:
*
* maximum bitrate in bits/s
*/
#define GST_TAG_MAXIMUM_BITRATE "maximum-bitrate" #define GST_TAG_MAXIMUM_BITRATE "maximum-bitrate"
/**
* GST_TAG_SERIAL:
*
* serial number of track
*/
#define GST_TAG_SERIAL "serial" #define GST_TAG_SERIAL "serial"
/**
* GST_TAG_ENCODER:
*
* encoder used to encode this stream
*/
#define GST_TAG_ENCODER "encoder" #define GST_TAG_ENCODER "encoder"
/**
* GST_TAG_ENCODER_VERSION:
*
* version of the encoder used to encode this stream
*/
#define GST_TAG_ENCODER_VERSION "encoder-version" #define GST_TAG_ENCODER_VERSION "encoder-version"
/**
* GST_TAG_TRACK_GAIN:
*
* track gain in db
*/
#define GST_TAG_TRACK_GAIN "replaygain-track-gain" #define GST_TAG_TRACK_GAIN "replaygain-track-gain"
/**
* GST_TAG_TRACK_PEAK:
*
* peak of the track
*/
#define GST_TAG_TRACK_PEAK "replaygain-track-peak" #define GST_TAG_TRACK_PEAK "replaygain-track-peak"
/**
* GST_TAG_ALBUM_GAIN:
*
* album gain in db
*/
#define GST_TAG_ALBUM_GAIN "replaygain-album-gain" #define GST_TAG_ALBUM_GAIN "replaygain-album-gain"
/**
* GST_TAG_ALBUM_PEAK:
*
* peak of the album
*/
#define GST_TAG_ALBUM_PEAK "replaygain-album-peak" #define GST_TAG_ALBUM_PEAK "replaygain-album-peak"
G_END_DECLS G_END_DECLS

View file

@ -226,39 +226,209 @@ GstTagList * gst_event_tag_get_list (GstEvent * tag_event);
/* GStreamer core tags (need to be discussed) */ /* GStreamer core tags (need to be discussed) */
/**
* GST_TAG_TITLE:
*
* commonly used title
*/
#define GST_TAG_TITLE "title" #define GST_TAG_TITLE "title"
/**
* GST_TAG_ARTIST:
*
* person(s) responsible for the recording
*/
#define GST_TAG_ARTIST "artist" #define GST_TAG_ARTIST "artist"
/**
* GST_TAG_ALBUM:
*
* album containing this data
*/
#define GST_TAG_ALBUM "album" #define GST_TAG_ALBUM "album"
/**
* GST_TAG_DATE:
*
* date the data was created (in Julian calendar days)
*/
#define GST_TAG_DATE "date" #define GST_TAG_DATE "date"
/**
* GST_TAG_GENRE:
*
* genre this data belongs to
*/
#define GST_TAG_GENRE "genre" #define GST_TAG_GENRE "genre"
/**
* GST_TAG_COMMENT:
*
* free text commenting the data
*/
#define GST_TAG_COMMENT "comment" #define GST_TAG_COMMENT "comment"
/**
* GST_TAG_TRACK_NUMBER:
*
* track number inside a collection
*/
#define GST_TAG_TRACK_NUMBER "track-number" #define GST_TAG_TRACK_NUMBER "track-number"
/**
* GST_TAG_TRACK_COUNT:
*
* count of tracks inside collection this track belongs to
*/
#define GST_TAG_TRACK_COUNT "track-count" #define GST_TAG_TRACK_COUNT "track-count"
/**
* GST_TAG_ALBUM_VOLUME_NUMBER:
*
* disc number inside a collection
*/
#define GST_TAG_ALBUM_VOLUME_NUMBER "album-disc-number" #define GST_TAG_ALBUM_VOLUME_NUMBER "album-disc-number"
/**
* GST_TAG_ALBUM_VOLUME_COUNT:
*
* count of discs inside collection this disc belongs to
*/
#define GST_TAG_ALBUM_VOLUME_COUNT "album-disc-count" #define GST_TAG_ALBUM_VOLUME_COUNT "album-disc-count"
/**
* GST_TAG_LOCATION:
*
* original location of file as a URI
*/
#define GST_TAG_LOCATION "location" #define GST_TAG_LOCATION "location"
/**
* GST_TAG_DESCRIPTION:
*
* short text describing the content of the data
*/
#define GST_TAG_DESCRIPTION "description" #define GST_TAG_DESCRIPTION "description"
/**
* GST_TAG_VERSION:
*
* version of this data
*/
#define GST_TAG_VERSION "version" #define GST_TAG_VERSION "version"
/**
* GST_TAG_ISRC:
*
* International Standard Recording Code - see http://www.ifpi.org/isrc/
*/
#define GST_TAG_ISRC "isrc" #define GST_TAG_ISRC "isrc"
/**
* GST_TAG_ORGANIZATION:
*
* organization
*/
#define GST_TAG_ORGANIZATION "organization" #define GST_TAG_ORGANIZATION "organization"
/**
* GST_TAG_COPYRIGHT:
*
* copyright notice of the data
*/
#define GST_TAG_COPYRIGHT "copyright" #define GST_TAG_COPYRIGHT "copyright"
/**
* GST_TAG_CONTACT:
*
* contact information
*/
#define GST_TAG_CONTACT "contact" #define GST_TAG_CONTACT "contact"
/**
* GST_TAG_LICENSE:
*
* license of data
*/
#define GST_TAG_LICENSE "license" #define GST_TAG_LICENSE "license"
/**
* GST_TAG_PERFORMER:
*
* person(s) performing
*/
#define GST_TAG_PERFORMER "performer" #define GST_TAG_PERFORMER "performer"
/**
* GST_TAG_DURATION:
*
* length in GStreamer time units (nanoseconds)
*/
#define GST_TAG_DURATION "duration" #define GST_TAG_DURATION "duration"
/**
* GST_TAG_CODEC:
*
* codec the data is stored in
*/
#define GST_TAG_CODEC "codec" #define GST_TAG_CODEC "codec"
/**
* GST_TAG_VIDEO_CODEC:
*
* codec the video data is stored in
*/
#define GST_TAG_VIDEO_CODEC "video-codec" #define GST_TAG_VIDEO_CODEC "video-codec"
/**
* GST_TAG_AUDIO_CODEC:
*
* codec the audio data is stored in
*/
#define GST_TAG_AUDIO_CODEC "audio-codec" #define GST_TAG_AUDIO_CODEC "audio-codec"
/**
* GST_TAG_BITRATE:
*
* exact or average bitrate in bits/s
*/
#define GST_TAG_BITRATE "bitrate" #define GST_TAG_BITRATE "bitrate"
/**
* GST_TAG_NOMINAL_BITRATE:
*
* nominal bitrate in bits/s
*/
#define GST_TAG_NOMINAL_BITRATE "nominal-bitrate" #define GST_TAG_NOMINAL_BITRATE "nominal-bitrate"
/**
* GST_TAG_MINIMUM_BITRATE:
*
* minimum bitrate in bits/s
*/
#define GST_TAG_MINIMUM_BITRATE "minimum-bitrate" #define GST_TAG_MINIMUM_BITRATE "minimum-bitrate"
/**
* GST_TAG_MAXIMUM_BITRATE:
*
* maximum bitrate in bits/s
*/
#define GST_TAG_MAXIMUM_BITRATE "maximum-bitrate" #define GST_TAG_MAXIMUM_BITRATE "maximum-bitrate"
/**
* GST_TAG_SERIAL:
*
* serial number of track
*/
#define GST_TAG_SERIAL "serial" #define GST_TAG_SERIAL "serial"
/**
* GST_TAG_ENCODER:
*
* encoder used to encode this stream
*/
#define GST_TAG_ENCODER "encoder" #define GST_TAG_ENCODER "encoder"
/**
* GST_TAG_ENCODER_VERSION:
*
* version of the encoder used to encode this stream
*/
#define GST_TAG_ENCODER_VERSION "encoder-version" #define GST_TAG_ENCODER_VERSION "encoder-version"
/**
* GST_TAG_TRACK_GAIN:
*
* track gain in db
*/
#define GST_TAG_TRACK_GAIN "replaygain-track-gain" #define GST_TAG_TRACK_GAIN "replaygain-track-gain"
/**
* GST_TAG_TRACK_PEAK:
*
* peak of the track
*/
#define GST_TAG_TRACK_PEAK "replaygain-track-peak" #define GST_TAG_TRACK_PEAK "replaygain-track-peak"
/**
* GST_TAG_ALBUM_GAIN:
*
* album gain in db
*/
#define GST_TAG_ALBUM_GAIN "replaygain-album-gain" #define GST_TAG_ALBUM_GAIN "replaygain-album-gain"
/**
* GST_TAG_ALBUM_PEAK:
*
* peak of the album
*/
#define GST_TAG_ALBUM_PEAK "replaygain-album-peak" #define GST_TAG_ALBUM_PEAK "replaygain-album-peak"
G_END_DECLS G_END_DECLS

View file

@ -43,8 +43,7 @@ typedef struct _GstSchedulerClass GstSchedulerClass;
typedef struct _GstEvent GstEvent; typedef struct _GstEvent GstEvent;
typedef struct _GstMessage GstMessage; typedef struct _GstMessage GstMessage;
typedef enum typedef enum {
{
GST_STATE_VOID_PENDING = 0, GST_STATE_VOID_PENDING = 0,
GST_STATE_NULL = (1 << 0), GST_STATE_NULL = (1 << 0),
GST_STATE_READY = (1 << 1), GST_STATE_READY = (1 << 1),
@ -52,22 +51,19 @@ typedef enum
GST_STATE_PLAYING = (1 << 3) GST_STATE_PLAYING = (1 << 3)
} GstElementState; } GstElementState;
typedef enum typedef enum {
{
GST_STATE_FAILURE = 0, GST_STATE_FAILURE = 0,
GST_STATE_SUCCESS = 1, GST_STATE_SUCCESS = 1,
GST_STATE_ASYNC = 2, GST_STATE_ASYNC = 2
} GstElementStateReturn; } GstElementStateReturn;
typedef enum typedef enum {
{
GST_RESULT_OK, GST_RESULT_OK,
GST_RESULT_NOK, GST_RESULT_NOK,
GST_RESULT_NOT_IMPL GST_RESULT_NOT_IMPL
} GstResult; } GstResult;
typedef enum typedef enum {
{
GST_RANK_NONE = 0, GST_RANK_NONE = 0,
GST_RANK_MARGINAL = 64, GST_RANK_MARGINAL = 64,
GST_RANK_SECONDARY = 128, GST_RANK_SECONDARY = 128,
@ -78,4 +74,5 @@ typedef enum
#define GST_PADDING_INIT { 0 } #define GST_PADDING_INIT { 0 }
G_END_DECLS G_END_DECLS
#endif /* __GST_TYPES_H__ */ #endif /* __GST_TYPES_H__ */

View file

@ -370,66 +370,6 @@ gst_print_element_args (GString * buf, gint indent, GstElement * element)
g_free (specs); g_free (specs);
} }
GstFlowReturn
gst_element_abort_preroll (GstElement * element)
{
GstFlowReturn result = GST_FLOW_OK;
/* grab state change lock */
GST_STATE_LOCK (element);
/* if we are going to PAUSED, we can abort the state change */
if (GST_STATE_TRANSITION (element) == GST_STATE_READY_TO_PAUSED) {
gst_element_abort_state (GST_ELEMENT (element));
}
GST_STATE_UNLOCK (element);
return result;
}
/* call with stream lock held */
GstFlowReturn
gst_element_finish_preroll (GstElement * element, GstPad * pad)
{
GstFlowReturn result = GST_FLOW_OK;
/* grab state change lock */
GST_STATE_LOCK (element);
/* if we are going to PAUSED, we can commit the state change */
if (GST_STATE_PENDING (element) == GST_STATE_PAUSED) {
gst_element_commit_state (GST_ELEMENT (element));
}
/* if we are paused we need to wait for playing to continue */
if (GST_STATE (element) == GST_STATE_PAUSED) {
GST_CAT_DEBUG (GST_CAT_STATES,
"element %s wants to finish preroll", GST_ELEMENT_NAME (element));
/* here we wait for the next state change */
while (GST_STATE (element) == GST_STATE_PAUSED) {
if (GST_RPAD_IS_FLUSHING (pad) || !GST_RPAD_IS_ACTIVE (pad)) {
GST_CAT_DEBUG (GST_CAT_STATES, "pad is flushing");
result = GST_FLOW_UNEXPECTED;
goto done;
}
GST_CAT_DEBUG (GST_CAT_STATES, "waiting for next state change");
GST_STATE_WAIT (element);
GST_CAT_DEBUG (GST_CAT_STATES, " got state change");
}
/* check if we got playing */
if (GST_STATE (element) != GST_STATE_PLAYING) {
/* not playing, we can't accept the buffer */
result = GST_FLOW_WRONG_STATE;
}
GST_CAT_DEBUG (GST_CAT_STATES, "done preroll");
}
done:
GST_STATE_UNLOCK (element);
return result;
}
/** /**
* gst_element_get_compatible_pad_template: * gst_element_get_compatible_pad_template:
* @element: a #GstElement to get a compatible pad template for. * @element: a #GstElement to get a compatible pad template for.

View file

@ -1241,6 +1241,8 @@ gst_string_wrap (const char *s)
len = 0; len = 0;
t = s; t = s;
if (!s)
return g_strdup ("");
while (*t) { while (*t) {
if (GST_ASCII_IS_STRING (*t)) { if (GST_ASCII_IS_STRING (*t)) {
len++; len++;
@ -1332,6 +1334,8 @@ static gboolean
gst_value_deserialize_string (GValue * dest, const char *s) gst_value_deserialize_string (GValue * dest, const char *s)
{ {
if (*s != '"') { if (*s != '"') {
if (!g_utf8_validate (s, -1, NULL))
return FALSE;
g_value_set_string (dest, s); g_value_set_string (dest, s);
return TRUE; return TRUE;
} else { } else {
@ -2027,10 +2031,15 @@ gst_value_register_union_func (GType type1, GType type2, GstValueUnionFunc func)
/** /**
* gst_value_can_intersect: * gst_value_can_intersect:
* @value1: * @value1: a value to intersect
* @value2: * @value2: another value to intersect
* *
* Returns: * Determines if intersecting two values will produce a valid result.
* Two values will produce a valid intersection if they have the same
* type, or if there is a method (registered by
* #gst_value_register_intersection_func) to calculate the intersection.
*
* Returns: TRUE if the values can intersect
*/ */
gboolean gboolean
gst_value_can_intersect (const GValue * value1, const GValue * value2) gst_value_can_intersect (const GValue * value1, const GValue * value2)
@ -2057,11 +2066,15 @@ gst_value_can_intersect (const GValue * value1, const GValue * value2)
/** /**
* gst_value_intersect: * gst_value_intersect:
* @dest: the destination value for intersection * @dest: a uninitialized #GValue that will hold the calculated
* intersection value
* @value1: a value to intersect * @value1: a value to intersect
* @value2: another value to intersect * @value2: another value to intersect
* *
* Calculates the intersection of the two values. * Calculates the intersection of two values. If the values have
* a non-empty intersection, the value representing the intersection
* is placed in @dest. If the intersection is non-empty, @dest is
* not modified.
* *
* Returns: TRUE if the intersection is non-empty * Returns: TRUE if the intersection is non-empty
*/ */
@ -2104,10 +2117,26 @@ gst_value_intersect (GValue * dest, const GValue * value1,
/** /**
* gst_value_register_intersection_func: * gst_value_register_intersection_func:
* @type1: * @type1: the first type to intersect
* @type2: * @type2: the second type to intersect
* @func: * @func: the intersection function
* *
* Registers a function that is called to calculate the intersection
* of the values having the types @type1 and @type2.
*/
/**
* GstValueIntersectFunc:
* @dest: a uninitialized #GValue that will hold the calculated
* intersection value
* @value1: a value to intersect
* @value2: another value to intersect
*
* Functions having this type calculate the intersection of @value1
* and @value2. If the intersection is non-empty, the result is
* placed in @dest and TRUE is returned. If the intersection is
* empty, @dest is unmodified and FALSE is returned.
*
* Returns: TRUE if the intersection is non-empty, FALSE otherwise
*/ */
void void
gst_value_register_intersect_func (GType type1, GType type2, gst_value_register_intersect_func (GType type1, GType type2,
@ -2236,8 +2265,22 @@ gst_value_register_subtract_func (GType minuend_type, GType subtrahend_type,
/** /**
* gst_value_register: * gst_value_register:
* @table: * @table: structure containing functions to register
* *
* Registers functions to perform calculations on #GValues of a given
* type.
*/
/**
* GstValueTable:
* @type: GType that the functions operate on.
* @compare: A function that compares two values of this type.
* @serialize: A function that transforms a value of this type to a
* string. Strings created by this function must be unique and should
* be human readable.
* @deserialize: A function that transforms a string to a value of
* this type. This function must transform strings created by the
* serialize function back to the original value. This function may
* optionally transform other strings into values.
*/ */
void void
gst_value_register (const GstValueTable * table) gst_value_register (const GstValueTable * table)
@ -2247,9 +2290,11 @@ gst_value_register (const GstValueTable * table)
/** /**
* gst_value_init_and_copy: * gst_value_init_and_copy:
* @dest: * @dest: the target value
* @src: * @src: the source value
* *
* Initialises the target value to be of the same type as source and then copies
* the contents from source to target.
*/ */
void void
gst_value_init_and_copy (GValue * dest, const GValue * src) gst_value_init_and_copy (GValue * dest, const GValue * src)

View file

@ -77,6 +77,7 @@ struct _GstValueTable {
GstValueSerializeFunc serialize; GstValueSerializeFunc serialize;
GstValueDeserializeFunc deserialize; GstValueDeserializeFunc deserialize;
/*< private >*/
void *_gst_reserved [GST_PADDING]; void *_gst_reserved [GST_PADDING];
}; };

View file

@ -24,6 +24,8 @@
#ifndef __GST_VERSION_H__ #ifndef __GST_VERSION_H__
#define __GST_VERSION_H__ #define __GST_VERSION_H__
G_BEGIN_DECLS
/* /*
* Use these only when you want to know what GStreamer version your stuff was * Use these only when you want to know what GStreamer version your stuff was
* compiled against. * compiled against.
@ -36,4 +38,6 @@
void gst_version (guint *major, guint *minor, guint *micro); void gst_version (guint *major, guint *minor, guint *micro);
G_END_DECLS
#endif /* __GST_VERSION_H__ */ #endif /* __GST_VERSION_H__ */

View file

@ -83,7 +83,7 @@ gst_dp_dump_byte_array (guint8 * array, guint length)
{ {
int i; int i;
int n = 8; /* number of bytes per line */ int n = 8; /* number of bytes per line */
gchar *line = g_malloc (3 * n); gchar *line = g_malloc (3 * n + 1);
GST_LOG ("dumping byte array of length %d", length); GST_LOG ("dumping byte array of length %d", length);
for (i = 0; i < length; ++i) { for (i = 0; i < length; ++i) {

View file

@ -822,7 +822,6 @@ print_children_info (GstElement * element)
if (!GST_IS_BIN (element)) if (!GST_IS_BIN (element))
return; return;
//children = (GList *) gst_bin_get_list (GST_BIN (element));
children = (GList *) GST_BIN (element)->children; children = (GList *) GST_BIN (element)->children;
if (children) { if (children) {
n_print ("\n"); n_print ("\n");