2004-01-20 14:09:42 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
* 2000 Wim Taymans <wtay@chello.be>
|
|
|
|
* 2004 Thomas Vander Stichele <thomas@apestaart.org>
|
|
|
|
*
|
|
|
|
* gst-inspect.c: tool to inspect the GStreamer registry
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2003-06-29 14:05:49 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2001-01-03 07:38:45 +00:00
|
|
|
#include <gst/gst.h>
|
2004-02-03 11:23:59 +00:00
|
|
|
|
|
|
|
#include "gst/gst-i18n-app.h"
|
|
|
|
|
2001-01-04 10:47:39 +00:00
|
|
|
#include <string.h>
|
2004-02-03 11:23:59 +00:00
|
|
|
#include <locale.h>
|
2004-06-14 11:04:06 +00:00
|
|
|
#include <glib/gprintf.h>
|
|
|
|
|
|
|
|
static char *_name;
|
|
|
|
|
|
|
|
static int print_element_info (GstElementFactory * factory,
|
|
|
|
gboolean print_names);
|
|
|
|
|
|
|
|
void
|
|
|
|
n_print (const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list args;
|
|
|
|
gint retval;
|
|
|
|
|
|
|
|
if (_name)
|
|
|
|
g_print (_name);
|
|
|
|
|
|
|
|
va_start (args, format);
|
|
|
|
retval = g_vprintf (format, args);
|
|
|
|
va_end (args);
|
|
|
|
}
|
2001-01-03 07:38:45 +00:00
|
|
|
|
2004-04-29 01:44:13 +00:00
|
|
|
static gboolean
|
2005-03-07 18:27:42 +00:00
|
|
|
print_field (GQuark field, const GValue * value, gpointer pfx)
|
2004-04-29 01:44:13 +00:00
|
|
|
{
|
|
|
|
gchar *str = gst_value_serialize (value);
|
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%s %15s: %s\n", (gchar *) pfx, g_quark_to_string (field), str);
|
2004-04-29 01:44:13 +00:00
|
|
|
g_free (str);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
static void
|
2004-03-13 15:27:01 +00:00
|
|
|
print_caps (const GstCaps * caps, const gchar * pfx)
|
2001-08-21 20:16:48 +00:00
|
|
|
{
|
2004-04-29 01:44:13 +00:00
|
|
|
guint i;
|
|
|
|
|
|
|
|
g_return_if_fail (caps != NULL);
|
|
|
|
|
|
|
|
if (gst_caps_is_any (caps)) {
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%sANY\n", pfx);
|
2004-04-29 01:44:13 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (gst_caps_is_empty (caps)) {
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%sEMPTY\n", pfx);
|
2004-04-29 01:44:13 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (i = 0; i < gst_caps_get_size (caps); i++) {
|
|
|
|
GstStructure *structure = gst_caps_get_structure (caps, i);
|
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%s%s\n", pfx, gst_structure_get_name (structure));
|
2004-04-29 01:44:13 +00:00
|
|
|
gst_structure_foreach (structure, print_field, (gpointer) pfx);
|
|
|
|
}
|
2002-09-17 21:32:26 +00:00
|
|
|
}
|
|
|
|
|
2005-05-09 10:53:13 +00:00
|
|
|
#if 0
|
2003-03-16 20:06:02 +00:00
|
|
|
static void
|
2004-03-13 15:27:01 +00:00
|
|
|
print_formats (const GstFormat * formats)
|
2002-07-24 21:13:30 +00:00
|
|
|
{
|
|
|
|
while (formats && *formats) {
|
2002-09-29 17:17:28 +00:00
|
|
|
const GstFormatDefinition *definition;
|
|
|
|
|
|
|
|
definition = gst_format_get_details (*formats);
|
|
|
|
if (definition)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("\t\t(%d):\t%s (%s)\n", *formats,
|
2004-03-15 19:27:17 +00:00
|
|
|
definition->nick, definition->description);
|
2002-07-30 19:25:24 +00:00
|
|
|
else
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("\t\t(%d):\tUnknown format\n", *formats);
|
2002-07-30 19:25:24 +00:00
|
|
|
|
2002-07-24 21:13:30 +00:00
|
|
|
formats++;
|
|
|
|
}
|
|
|
|
}
|
2005-05-09 10:53:13 +00:00
|
|
|
#endif
|
2002-07-24 21:13:30 +00:00
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
static void
|
2004-03-13 15:27:01 +00:00
|
|
|
print_query_types (const GstQueryType * types)
|
2003-01-07 20:49:46 +00:00
|
|
|
{
|
|
|
|
while (types && *types) {
|
|
|
|
const GstQueryTypeDefinition *definition;
|
|
|
|
|
|
|
|
definition = gst_query_type_get_details (*types);
|
|
|
|
if (definition)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("\t\t(%d):\t%s (%s)\n", *types,
|
2004-03-15 19:27:17 +00:00
|
|
|
definition->nick, definition->description);
|
2003-01-07 20:49:46 +00:00
|
|
|
else
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("\t\t(%d):\tUnknown query format\n", *types);
|
2003-01-07 20:49:46 +00:00
|
|
|
|
|
|
|
types++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-05-23 17:52:54 +00:00
|
|
|
#ifndef GST_DISABLE_ENUMTYPES
|
2005-05-09 10:53:13 +00:00
|
|
|
#if 0
|
2003-03-16 20:06:02 +00:00
|
|
|
static void
|
2004-03-13 15:27:01 +00:00
|
|
|
print_event_masks (const GstEventMask * masks)
|
2002-07-24 21:13:30 +00:00
|
|
|
{
|
|
|
|
GType event_type;
|
|
|
|
GEnumClass *klass;
|
|
|
|
GType event_flags;
|
|
|
|
GFlagsClass *flags_class = NULL;
|
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
event_type = gst_event_type_get_type ();
|
2002-07-24 21:13:30 +00:00
|
|
|
klass = (GEnumClass *) g_type_class_ref (event_type);
|
|
|
|
|
|
|
|
while (masks && masks->type) {
|
|
|
|
GEnumValue *value;
|
|
|
|
gint flags = 0, index = 0;
|
|
|
|
|
|
|
|
switch (masks->type) {
|
|
|
|
case GST_EVENT_SEEK:
|
2004-03-15 19:27:17 +00:00
|
|
|
flags = masks->flags;
|
|
|
|
event_flags = gst_seek_type_get_type ();
|
|
|
|
flags_class = (GFlagsClass *) g_type_class_ref (event_flags);
|
|
|
|
break;
|
2002-07-24 21:13:30 +00:00
|
|
|
default:
|
2004-03-15 19:27:17 +00:00
|
|
|
break;
|
2002-07-24 21:13:30 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2002-07-24 21:13:30 +00:00
|
|
|
value = g_enum_get_value (klass, masks->type);
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("\t\t%s ", value->value_nick);
|
2002-07-24 21:13:30 +00:00
|
|
|
|
|
|
|
while (flags) {
|
|
|
|
GFlagsValue *value;
|
|
|
|
|
|
|
|
if (flags & 1) {
|
2004-03-15 19:27:17 +00:00
|
|
|
value = g_flags_get_first_value (flags_class, 1 << index);
|
2002-07-24 21:13:30 +00:00
|
|
|
|
2004-03-15 19:27:17 +00:00
|
|
|
if (value)
|
|
|
|
g_print ("| %s ", value->value_nick);
|
|
|
|
else
|
|
|
|
g_print ("| ? ");
|
2002-07-24 21:13:30 +00:00
|
|
|
}
|
|
|
|
flags >>= 1;
|
|
|
|
index++;
|
|
|
|
}
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("\n");
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2002-07-24 21:13:30 +00:00
|
|
|
masks++;
|
|
|
|
}
|
2004-05-23 17:52:54 +00:00
|
|
|
}
|
2005-05-09 10:53:13 +00:00
|
|
|
#endif
|
2004-05-23 17:52:54 +00:00
|
|
|
#else
|
|
|
|
static void
|
|
|
|
print_event_masks (const GstEventMask * masks)
|
|
|
|
{
|
|
|
|
}
|
2003-02-10 20:32:32 +00:00
|
|
|
#endif
|
2004-05-23 17:52:54 +00:00
|
|
|
|
|
|
|
static char *
|
|
|
|
get_rank_name (gint rank)
|
|
|
|
{
|
|
|
|
switch (rank) {
|
|
|
|
case GST_RANK_NONE:
|
|
|
|
return "none";
|
|
|
|
case GST_RANK_MARGINAL:
|
|
|
|
return "marginal";
|
|
|
|
case GST_RANK_SECONDARY:
|
|
|
|
return "secondary";
|
|
|
|
case GST_RANK_PRIMARY:
|
|
|
|
return "primary";
|
|
|
|
default:
|
|
|
|
return "unknown";
|
|
|
|
}
|
2002-07-24 21:13:30 +00:00
|
|
|
}
|
|
|
|
|
2001-07-25 21:40:42 +00:00
|
|
|
static void
|
2004-05-23 17:52:54 +00:00
|
|
|
print_factory_details_info (GstElementFactory * factory)
|
|
|
|
{
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("Factory Details:\n");
|
|
|
|
n_print (" Long name:\t%s\n", factory->details.longname);
|
|
|
|
n_print (" Class:\t%s\n", factory->details.klass);
|
|
|
|
n_print (" Description:\t%s\n", factory->details.description);
|
|
|
|
n_print (" Author(s):\t%s\n", factory->details.author);
|
|
|
|
n_print (" Rank:\t\t%s (%d)\n",
|
2004-05-23 17:52:54 +00:00
|
|
|
get_rank_name (GST_PLUGIN_FEATURE (factory)->rank),
|
|
|
|
GST_PLUGIN_FEATURE (factory)->rank);
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("\n");
|
2004-05-23 17:52:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
print_hierarchy (GType type, gint level, gint * maxlevel)
|
2001-07-25 21:40:42 +00:00
|
|
|
{
|
|
|
|
GType parent;
|
|
|
|
gint i;
|
|
|
|
|
|
|
|
parent = g_type_parent (type);
|
|
|
|
|
|
|
|
*maxlevel = *maxlevel + 1;
|
|
|
|
level++;
|
|
|
|
|
|
|
|
if (parent)
|
2004-05-23 17:52:54 +00:00
|
|
|
print_hierarchy (parent, level, maxlevel);
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
if (_name)
|
|
|
|
g_print (_name);
|
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
for (i = 1; i < *maxlevel - level; i++)
|
|
|
|
g_print (" ");
|
|
|
|
if (*maxlevel - level)
|
2001-07-25 21:40:42 +00:00
|
|
|
g_print (" +----");
|
|
|
|
|
|
|
|
g_print ("%s\n", g_type_name (type));
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2001-07-25 21:40:42 +00:00
|
|
|
if (level == 1)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("\n");
|
2001-07-25 21:40:42 +00:00
|
|
|
}
|
|
|
|
|
2002-05-08 20:40:48 +00:00
|
|
|
static void
|
2004-05-23 17:52:54 +00:00
|
|
|
print_element_properties_info (GstElement * element)
|
2002-05-08 20:40:48 +00:00
|
|
|
{
|
|
|
|
GParamSpec **property_specs;
|
GCC 4 fixen.
Original commit message from CVS:
2005-05-04 Andy Wingo <wingo@pobox.com>
* check/Makefile.am:
* docs/gst/tmpl/gstatomic.sgml:
* docs/gst/tmpl/gstplugin.sgml:
* gst/base/gstbasesink.c: (gst_basesink_activate):
* gst/base/gstbasesrc.c: (gst_basesrc_class_init),
(gst_basesrc_init), (gst_basesrc_set_dataflow_funcs),
(gst_basesrc_query), (gst_basesrc_set_property),
(gst_basesrc_get_property), (gst_basesrc_check_get_range),
(gst_basesrc_activate):
* gst/base/gstbasesrc.h:
* gst/base/gstbasetransform.c: (gst_base_transform_sink_activate),
(gst_base_transform_src_activate):
* gst/elements/gstelements.c:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_set_property), (gst_fakesrc_get_property):
* gst/elements/gsttee.c: (gst_tee_sink_activate):
* gst/elements/gsttypefindelement.c: (find_element_get_length),
(gst_type_find_element_checkgetrange),
(gst_type_find_element_activate):
* gst/gstbin.c: (gst_bin_save_thyself), (gst_bin_restore_thyself):
* gst/gstcaps.c: (gst_caps_do_simplify), (gst_caps_save_thyself),
(gst_caps_load_thyself):
* gst/gstelement.c: (gst_element_pads_activate),
(gst_element_save_thyself), (gst_element_restore_thyself):
* gst/gstpad.c: (gst_pad_load_and_link), (gst_pad_save_thyself),
(gst_ghost_pad_save_thyself), (gst_pad_check_pull_range):
* gst/gstpad.h:
* gst/gstxml.c: (gst_xml_write), (gst_xml_parse_doc),
(gst_xml_parse_file), (gst_xml_parse_memory),
(gst_xml_get_element), (gst_xml_make_element):
* gst/indexers/gstfileindex.c: (gst_file_index_load),
(_file_index_id_save_xml), (gst_file_index_commit):
* gst/registries/gstlibxmlregistry.c: (read_string), (read_uint),
(read_enum), (load_pad_template), (load_feature), (load_plugin),
(load_paths):
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_caps),
(gst_dp_packet_from_event), (gst_dp_caps_from_packet):
* tools/gst-complete.c: (main):
* tools/gst-compprep.c: (main):
* tools/gst-inspect.c: (print_element_properties_info):
* tools/gst-launch.c: (xmllaunch_parse_cmdline):
* tools/gst-xmlinspect.c: (print_element_properties):
GCC 4 fixen.
2005-05-04 21:29:44 +00:00
|
|
|
guint num_properties;
|
|
|
|
gint i;
|
2002-09-19 18:14:09 +00:00
|
|
|
gboolean readable;
|
2003-07-25 14:31:15 +00:00
|
|
|
const char *string_val;
|
2003-03-16 20:06:02 +00:00
|
|
|
|
|
|
|
property_specs = g_object_class_list_properties
|
2004-03-13 15:27:01 +00:00
|
|
|
(G_OBJECT_GET_CLASS (element), &num_properties);
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("\n");
|
|
|
|
n_print ("Element Properties:\n");
|
2002-05-08 20:40:48 +00:00
|
|
|
|
|
|
|
for (i = 0; i < num_properties; i++) {
|
|
|
|
GValue value = { 0, };
|
|
|
|
GParamSpec *param = property_specs[i];
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2002-09-19 18:14:09 +00:00
|
|
|
readable = FALSE;
|
2002-05-08 20:40:48 +00:00
|
|
|
|
2002-09-19 18:14:09 +00:00
|
|
|
g_value_init (&value, param->value_type);
|
2002-05-08 20:40:48 +00:00
|
|
|
if (param->flags & G_PARAM_READABLE) {
|
|
|
|
g_object_get_property (G_OBJECT (element), param->name, &value);
|
2002-09-19 18:14:09 +00:00
|
|
|
readable = TRUE;
|
2002-05-08 20:40:48 +00:00
|
|
|
}
|
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" %-20s: %s\n", g_param_spec_get_name (param),
|
2004-03-15 19:27:17 +00:00
|
|
|
g_param_spec_get_blurb (param));
|
2002-05-08 20:40:48 +00:00
|
|
|
|
|
|
|
switch (G_VALUE_TYPE (&value)) {
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_STRING:
|
2004-03-15 19:27:17 +00:00
|
|
|
string_val = g_value_get_string (&value);
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%-23.23s String. ", "");
|
2004-03-15 19:27:17 +00:00
|
|
|
if (readable) {
|
|
|
|
if (string_val == NULL)
|
|
|
|
g_print ("(Default \"\")");
|
|
|
|
else
|
|
|
|
g_print ("(Default \"%s\")", g_value_get_string (&value));
|
|
|
|
}
|
|
|
|
break;
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_BOOLEAN:
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%-23.23s Boolean. ", "");
|
2004-03-15 19:27:17 +00:00
|
|
|
if (readable)
|
|
|
|
g_print ("(Default %s)",
|
|
|
|
(g_value_get_boolean (&value) ? "true" : "false"));
|
|
|
|
break;
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_ULONG:
|
2002-05-08 20:40:48 +00:00
|
|
|
{
|
2004-03-15 19:27:17 +00:00
|
|
|
GParamSpecULong *pulong = G_PARAM_SPEC_ULONG (param);
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%-23.23s Unsigned Long. ", "");
|
2004-03-15 19:27:17 +00:00
|
|
|
if (readable)
|
|
|
|
g_print ("Range: %lu - %lu (Default %lu)",
|
|
|
|
pulong->minimum, pulong->maximum, g_value_get_ulong (&value));
|
|
|
|
break;
|
2002-05-08 20:40:48 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_LONG:
|
2002-05-08 20:40:48 +00:00
|
|
|
{
|
2004-03-15 19:27:17 +00:00
|
|
|
GParamSpecLong *plong = G_PARAM_SPEC_LONG (param);
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%-23.23s Long. ", "");
|
2004-03-15 19:27:17 +00:00
|
|
|
if (readable)
|
|
|
|
g_print ("Range: %ld - %ld (Default %ld)",
|
|
|
|
plong->minimum, plong->maximum, g_value_get_long (&value));
|
|
|
|
break;
|
2002-05-08 20:40:48 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_UINT:
|
2002-05-08 20:40:48 +00:00
|
|
|
{
|
2004-03-15 19:27:17 +00:00
|
|
|
GParamSpecUInt *puint = G_PARAM_SPEC_UINT (param);
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%-23.23s Unsigned Integer. ", "");
|
2004-03-15 19:27:17 +00:00
|
|
|
if (readable)
|
|
|
|
g_print ("Range: %u - %u (Default %u)",
|
|
|
|
puint->minimum, puint->maximum, g_value_get_uint (&value));
|
|
|
|
break;
|
2002-05-08 20:40:48 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_INT:
|
2002-05-08 20:40:48 +00:00
|
|
|
{
|
2004-03-15 19:27:17 +00:00
|
|
|
GParamSpecInt *pint = G_PARAM_SPEC_INT (param);
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%-23.23s Integer. ", "");
|
2004-03-15 19:27:17 +00:00
|
|
|
if (readable)
|
|
|
|
g_print ("Range: %d - %d (Default %d)",
|
|
|
|
pint->minimum, pint->maximum, g_value_get_int (&value));
|
|
|
|
break;
|
2002-05-08 20:40:48 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_UINT64:
|
2002-05-14 00:45:10 +00:00
|
|
|
{
|
2004-03-15 19:27:17 +00:00
|
|
|
GParamSpecUInt64 *puint64 = G_PARAM_SPEC_UINT64 (param);
|
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%-23.23s Unsigned Integer64. ", "");
|
2004-03-15 19:27:17 +00:00
|
|
|
if (readable)
|
|
|
|
g_print ("Range: %" G_GUINT64_FORMAT " - %"
|
|
|
|
G_GUINT64_FORMAT " (Default %" G_GUINT64_FORMAT ")",
|
|
|
|
puint64->minimum, puint64->maximum, g_value_get_uint64 (&value));
|
|
|
|
break;
|
2002-05-14 00:45:10 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_INT64:
|
2002-05-14 00:45:10 +00:00
|
|
|
{
|
2004-03-15 19:27:17 +00:00
|
|
|
GParamSpecInt64 *pint64 = G_PARAM_SPEC_INT64 (param);
|
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%-23.23s Integer64. ", "");
|
2004-03-15 19:27:17 +00:00
|
|
|
if (readable)
|
|
|
|
g_print ("Range: %" G_GINT64_FORMAT " - %" G_GINT64_FORMAT
|
|
|
|
" (Default %" G_GINT64_FORMAT ")", pint64->minimum,
|
|
|
|
pint64->maximum, g_value_get_int64 (&value));
|
|
|
|
break;
|
2002-05-14 00:45:10 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_FLOAT:
|
2002-05-08 20:40:48 +00:00
|
|
|
{
|
2004-03-15 19:27:17 +00:00
|
|
|
GParamSpecFloat *pfloat = G_PARAM_SPEC_FLOAT (param);
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%-23.23s Float. Default: %-8.8s %15.7g\n", "", "",
|
2004-03-15 19:27:17 +00:00
|
|
|
g_value_get_float (&value));
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%-23.23s Range: %15.7g - %15.7g", "",
|
2004-03-15 19:27:17 +00:00
|
|
|
pfloat->minimum, pfloat->maximum);
|
|
|
|
break;
|
2002-05-08 20:40:48 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_DOUBLE:
|
2002-05-08 20:40:48 +00:00
|
|
|
{
|
2004-03-15 19:27:17 +00:00
|
|
|
GParamSpecDouble *pdouble = G_PARAM_SPEC_DOUBLE (param);
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%-23.23s Double. Default: %-8.8s %15.7g\n", "", "",
|
2004-03-15 19:27:17 +00:00
|
|
|
g_value_get_double (&value));
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%-23.23s Range: %15.7g - %15.7g", "",
|
2004-03-15 19:27:17 +00:00
|
|
|
pdouble->minimum, pdouble->maximum);
|
|
|
|
break;
|
2002-05-08 20:40:48 +00:00
|
|
|
}
|
|
|
|
default:
|
2004-03-15 19:27:17 +00:00
|
|
|
if (param->value_type == GST_TYPE_URI) {
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%-23.23s URI", "");
|
2004-03-15 19:27:17 +00:00
|
|
|
}
|
|
|
|
if (param->value_type == GST_TYPE_CAPS) {
|
|
|
|
const GstCaps *caps = gst_value_get_caps (&value);
|
|
|
|
|
|
|
|
if (!caps)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%-23.23s Caps (NULL)", "");
|
2004-03-15 19:27:17 +00:00
|
|
|
else {
|
|
|
|
print_caps (caps, " ");
|
|
|
|
}
|
|
|
|
} else if (G_IS_PARAM_SPEC_ENUM (param)) {
|
|
|
|
GEnumValue *values;
|
|
|
|
guint j = 0;
|
|
|
|
gint enum_value;
|
|
|
|
|
|
|
|
values = G_ENUM_CLASS (g_type_class_ref (param->value_type))->values;
|
|
|
|
enum_value = g_value_get_enum (&value);
|
|
|
|
|
|
|
|
while (values[j].value_name) {
|
|
|
|
if (values[j].value == enum_value)
|
|
|
|
break;
|
|
|
|
j++;
|
|
|
|
}
|
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%-23.23s Enum \"%s\" (default %d, \"%s\")", "",
|
2004-03-15 19:27:17 +00:00
|
|
|
g_type_name (G_VALUE_TYPE (&value)),
|
|
|
|
enum_value, values[j].value_nick);
|
|
|
|
|
|
|
|
j = 0;
|
|
|
|
while (values[j].value_name) {
|
2004-06-14 11:04:06 +00:00
|
|
|
g_print ("\n%s%-23.23s (%d): \t%s", "",
|
|
|
|
_name, values[j].value, values[j].value_nick);
|
2004-03-15 19:27:17 +00:00
|
|
|
j++;
|
|
|
|
}
|
|
|
|
/* g_type_class_unref (ec); */
|
|
|
|
} else if (G_IS_PARAM_SPEC_FLAGS (param)) {
|
|
|
|
GFlagsValue *values;
|
|
|
|
guint j = 0;
|
|
|
|
gint flags_value;
|
|
|
|
GString *flags = NULL;
|
|
|
|
|
|
|
|
values = G_FLAGS_CLASS (g_type_class_ref (param->value_type))->values;
|
|
|
|
flags_value = g_value_get_flags (&value);
|
|
|
|
|
|
|
|
while (values[j].value_name) {
|
|
|
|
if (values[j].value & flags_value) {
|
|
|
|
if (flags) {
|
|
|
|
g_string_append_printf (flags, " | %s", values[j].value_nick);
|
|
|
|
} else {
|
|
|
|
flags = g_string_new (values[j].value_nick);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
j++;
|
|
|
|
}
|
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%-23.23s Flags \"%s\" (default %d, \"%s\")", "",
|
2004-03-15 19:27:17 +00:00
|
|
|
g_type_name (G_VALUE_TYPE (&value)),
|
|
|
|
flags_value, (flags ? flags->str : "(none)"));
|
|
|
|
|
|
|
|
j = 0;
|
|
|
|
while (values[j].value_name) {
|
2004-06-14 11:04:06 +00:00
|
|
|
g_print ("\n%s%-23.23s (%d): \t%s", "",
|
|
|
|
_name, values[j].value, values[j].value_nick);
|
2004-03-15 19:27:17 +00:00
|
|
|
j++;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (flags)
|
|
|
|
g_string_free (flags, TRUE);
|
|
|
|
} else if (G_IS_PARAM_SPEC_OBJECT (param)) {
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%-23.23s Object of type \"%s\"", "",
|
2004-03-15 19:27:17 +00:00
|
|
|
g_type_name (param->value_type));
|
|
|
|
} else {
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%-23.23s Unknown type %ld \"%s\"", "", param->value_type,
|
2004-03-15 19:27:17 +00:00
|
|
|
g_type_name (param->value_type));
|
|
|
|
}
|
|
|
|
break;
|
2002-05-08 20:40:48 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
if (!readable)
|
2003-01-21 21:34:31 +00:00
|
|
|
g_print (" Write only\n");
|
2003-03-16 20:06:02 +00:00
|
|
|
else
|
2002-09-19 18:14:09 +00:00
|
|
|
g_print ("\n");
|
2002-05-08 20:40:48 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
if (num_properties == 0)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" none\n");
|
2002-05-08 20:40:48 +00:00
|
|
|
}
|
|
|
|
|
2004-05-23 17:52:54 +00:00
|
|
|
static void
|
2004-06-14 11:04:06 +00:00
|
|
|
print_pad_templates_info (GstElement * element, GstElementFactory * factory)
|
2001-03-07 21:52:56 +00:00
|
|
|
{
|
2001-01-03 07:38:45 +00:00
|
|
|
GstElementClass *gstelement_class;
|
2004-05-23 17:52:54 +00:00
|
|
|
const GList *pads;
|
Use libxml2 for registry parsing, use staticpadtemplates in elementfactories. Makes gst_init() +/- 10x faster.
Original commit message from CVS:
* docs/gst/tmpl/gstelementfactory.sgml:
* gst/gstelement.h:
* gst/gstelementfactory.c: (gst_element_factory_init),
(gst_element_factory_cleanup), (gst_element_register),
(__gst_element_factory_add_static_pad_template),
(gst_element_factory_get_static_pad_templates),
(gst_element_factory_can_src_caps),
(gst_element_factory_can_sink_caps):
* gst/registries/Makefile.am:
* gst/registries/gstlibxmlregistry.c: (gst_xml_registry_get_type),
(gst_xml_registry_class_init), (gst_xml_registry_init),
(gst_xml_registry_new), (gst_xml_registry_set_property),
(gst_xml_registry_get_property), (get_time), (make_dir),
(gst_xml_registry_get_perms_func),
(plugin_times_older_than_recurse), (plugin_times_older_than),
(gst_xml_registry_open_func), (gst_xml_registry_load_func),
(gst_xml_registry_save_func), (gst_xml_registry_close_func),
(add_to_char_array), (read_string), (read_uint), (read_enum),
(load_pad_template), (load_feature), (load_plugin), (load_paths),
(gst_xml_registry_load), (gst_xml_registry_load_plugin),
(gst_xml_registry_save_caps), (gst_xml_registry_save_pad_template),
(gst_xml_registry_save_feature), (gst_xml_registry_save_plugin),
(gst_xml_registry_save), (gst_xml_registry_rebuild_recurse),
(gst_xml_registry_rebuild):
* gst/registries/gstlibxmlregistry.h:
* tools/gst-compprep.c: (main):
* tools/gst-inspect.c: (print_pad_templates_info):
* tools/gst-xmlinspect.c: (print_element_info):
Use libxml2 for registry parsing, use staticpadtemplates in
elementfactories. Makes gst_init() +/- 10x faster.
2005-04-12 15:00:30 +00:00
|
|
|
GstStaticPadTemplate *padtemplate;
|
2004-05-23 17:52:54 +00:00
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("Pad Templates:\n");
|
2004-05-23 17:52:54 +00:00
|
|
|
if (!factory->numpadtemplates) {
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" none\n");
|
2004-05-23 17:52:54 +00:00
|
|
|
return;
|
2001-01-03 20:21:22 +00:00
|
|
|
}
|
2001-01-29 00:06:02 +00:00
|
|
|
|
2001-06-25 01:20:11 +00:00
|
|
|
gstelement_class = GST_ELEMENT_CLASS (G_OBJECT_GET_CLASS (element));
|
2001-01-03 07:38:45 +00:00
|
|
|
|
Use libxml2 for registry parsing, use staticpadtemplates in elementfactories. Makes gst_init() +/- 10x faster.
Original commit message from CVS:
* docs/gst/tmpl/gstelementfactory.sgml:
* gst/gstelement.h:
* gst/gstelementfactory.c: (gst_element_factory_init),
(gst_element_factory_cleanup), (gst_element_register),
(__gst_element_factory_add_static_pad_template),
(gst_element_factory_get_static_pad_templates),
(gst_element_factory_can_src_caps),
(gst_element_factory_can_sink_caps):
* gst/registries/Makefile.am:
* gst/registries/gstlibxmlregistry.c: (gst_xml_registry_get_type),
(gst_xml_registry_class_init), (gst_xml_registry_init),
(gst_xml_registry_new), (gst_xml_registry_set_property),
(gst_xml_registry_get_property), (get_time), (make_dir),
(gst_xml_registry_get_perms_func),
(plugin_times_older_than_recurse), (plugin_times_older_than),
(gst_xml_registry_open_func), (gst_xml_registry_load_func),
(gst_xml_registry_save_func), (gst_xml_registry_close_func),
(add_to_char_array), (read_string), (read_uint), (read_enum),
(load_pad_template), (load_feature), (load_plugin), (load_paths),
(gst_xml_registry_load), (gst_xml_registry_load_plugin),
(gst_xml_registry_save_caps), (gst_xml_registry_save_pad_template),
(gst_xml_registry_save_feature), (gst_xml_registry_save_plugin),
(gst_xml_registry_save), (gst_xml_registry_rebuild_recurse),
(gst_xml_registry_rebuild):
* gst/registries/gstlibxmlregistry.h:
* tools/gst-compprep.c: (main):
* tools/gst-inspect.c: (print_pad_templates_info):
* tools/gst-xmlinspect.c: (print_element_info):
Use libxml2 for registry parsing, use staticpadtemplates in
elementfactories. Makes gst_init() +/- 10x faster.
2005-04-12 15:00:30 +00:00
|
|
|
pads = factory->staticpadtemplates;
|
2004-05-23 17:52:54 +00:00
|
|
|
while (pads) {
|
Use libxml2 for registry parsing, use staticpadtemplates in elementfactories. Makes gst_init() +/- 10x faster.
Original commit message from CVS:
* docs/gst/tmpl/gstelementfactory.sgml:
* gst/gstelement.h:
* gst/gstelementfactory.c: (gst_element_factory_init),
(gst_element_factory_cleanup), (gst_element_register),
(__gst_element_factory_add_static_pad_template),
(gst_element_factory_get_static_pad_templates),
(gst_element_factory_can_src_caps),
(gst_element_factory_can_sink_caps):
* gst/registries/Makefile.am:
* gst/registries/gstlibxmlregistry.c: (gst_xml_registry_get_type),
(gst_xml_registry_class_init), (gst_xml_registry_init),
(gst_xml_registry_new), (gst_xml_registry_set_property),
(gst_xml_registry_get_property), (get_time), (make_dir),
(gst_xml_registry_get_perms_func),
(plugin_times_older_than_recurse), (plugin_times_older_than),
(gst_xml_registry_open_func), (gst_xml_registry_load_func),
(gst_xml_registry_save_func), (gst_xml_registry_close_func),
(add_to_char_array), (read_string), (read_uint), (read_enum),
(load_pad_template), (load_feature), (load_plugin), (load_paths),
(gst_xml_registry_load), (gst_xml_registry_load_plugin),
(gst_xml_registry_save_caps), (gst_xml_registry_save_pad_template),
(gst_xml_registry_save_feature), (gst_xml_registry_save_plugin),
(gst_xml_registry_save), (gst_xml_registry_rebuild_recurse),
(gst_xml_registry_rebuild):
* gst/registries/gstlibxmlregistry.h:
* tools/gst-compprep.c: (main):
* tools/gst-inspect.c: (print_pad_templates_info):
* tools/gst-xmlinspect.c: (print_element_info):
Use libxml2 for registry parsing, use staticpadtemplates in
elementfactories. Makes gst_init() +/- 10x faster.
2005-04-12 15:00:30 +00:00
|
|
|
padtemplate = (GstStaticPadTemplate *) (pads->data);
|
2004-05-23 17:52:54 +00:00
|
|
|
pads = g_list_next (pads);
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
|
2004-05-23 17:52:54 +00:00
|
|
|
if (padtemplate->direction == GST_PAD_SRC)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" SRC template: '%s'\n", padtemplate->name_template);
|
2004-05-23 17:52:54 +00:00
|
|
|
else if (padtemplate->direction == GST_PAD_SINK)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" SINK template: '%s'\n", padtemplate->name_template);
|
2004-05-23 17:52:54 +00:00
|
|
|
else
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" UNKNOWN!!! template: '%s'\n", padtemplate->name_template);
|
2004-05-23 17:52:54 +00:00
|
|
|
|
|
|
|
if (padtemplate->presence == GST_PAD_ALWAYS)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" Availability: Always\n");
|
2004-05-23 17:52:54 +00:00
|
|
|
else if (padtemplate->presence == GST_PAD_SOMETIMES)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" Availability: Sometimes\n");
|
2004-05-23 17:52:54 +00:00
|
|
|
else if (padtemplate->presence == GST_PAD_REQUEST) {
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" Availability: On request\n");
|
|
|
|
n_print (" Has request_new_pad() function: %s\n",
|
2004-05-23 17:52:54 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (gstelement_class->request_new_pad));
|
|
|
|
} else
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" Availability: UNKNOWN!!!\n");
|
2004-05-23 17:52:54 +00:00
|
|
|
|
Use libxml2 for registry parsing, use staticpadtemplates in elementfactories. Makes gst_init() +/- 10x faster.
Original commit message from CVS:
* docs/gst/tmpl/gstelementfactory.sgml:
* gst/gstelement.h:
* gst/gstelementfactory.c: (gst_element_factory_init),
(gst_element_factory_cleanup), (gst_element_register),
(__gst_element_factory_add_static_pad_template),
(gst_element_factory_get_static_pad_templates),
(gst_element_factory_can_src_caps),
(gst_element_factory_can_sink_caps):
* gst/registries/Makefile.am:
* gst/registries/gstlibxmlregistry.c: (gst_xml_registry_get_type),
(gst_xml_registry_class_init), (gst_xml_registry_init),
(gst_xml_registry_new), (gst_xml_registry_set_property),
(gst_xml_registry_get_property), (get_time), (make_dir),
(gst_xml_registry_get_perms_func),
(plugin_times_older_than_recurse), (plugin_times_older_than),
(gst_xml_registry_open_func), (gst_xml_registry_load_func),
(gst_xml_registry_save_func), (gst_xml_registry_close_func),
(add_to_char_array), (read_string), (read_uint), (read_enum),
(load_pad_template), (load_feature), (load_plugin), (load_paths),
(gst_xml_registry_load), (gst_xml_registry_load_plugin),
(gst_xml_registry_save_caps), (gst_xml_registry_save_pad_template),
(gst_xml_registry_save_feature), (gst_xml_registry_save_plugin),
(gst_xml_registry_save), (gst_xml_registry_rebuild_recurse),
(gst_xml_registry_rebuild):
* gst/registries/gstlibxmlregistry.h:
* tools/gst-compprep.c: (main):
* tools/gst-inspect.c: (print_pad_templates_info):
* tools/gst-xmlinspect.c: (print_element_info):
Use libxml2 for registry parsing, use staticpadtemplates in
elementfactories. Makes gst_init() +/- 10x faster.
2005-04-12 15:00:30 +00:00
|
|
|
if (padtemplate->static_caps.string) {
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" Capabilities:\n");
|
Use libxml2 for registry parsing, use staticpadtemplates in elementfactories. Makes gst_init() +/- 10x faster.
Original commit message from CVS:
* docs/gst/tmpl/gstelementfactory.sgml:
* gst/gstelement.h:
* gst/gstelementfactory.c: (gst_element_factory_init),
(gst_element_factory_cleanup), (gst_element_register),
(__gst_element_factory_add_static_pad_template),
(gst_element_factory_get_static_pad_templates),
(gst_element_factory_can_src_caps),
(gst_element_factory_can_sink_caps):
* gst/registries/Makefile.am:
* gst/registries/gstlibxmlregistry.c: (gst_xml_registry_get_type),
(gst_xml_registry_class_init), (gst_xml_registry_init),
(gst_xml_registry_new), (gst_xml_registry_set_property),
(gst_xml_registry_get_property), (get_time), (make_dir),
(gst_xml_registry_get_perms_func),
(plugin_times_older_than_recurse), (plugin_times_older_than),
(gst_xml_registry_open_func), (gst_xml_registry_load_func),
(gst_xml_registry_save_func), (gst_xml_registry_close_func),
(add_to_char_array), (read_string), (read_uint), (read_enum),
(load_pad_template), (load_feature), (load_plugin), (load_paths),
(gst_xml_registry_load), (gst_xml_registry_load_plugin),
(gst_xml_registry_save_caps), (gst_xml_registry_save_pad_template),
(gst_xml_registry_save_feature), (gst_xml_registry_save_plugin),
(gst_xml_registry_save), (gst_xml_registry_rebuild_recurse),
(gst_xml_registry_rebuild):
* gst/registries/gstlibxmlregistry.h:
* tools/gst-compprep.c: (main):
* tools/gst-inspect.c: (print_pad_templates_info):
* tools/gst-xmlinspect.c: (print_element_info):
Use libxml2 for registry parsing, use staticpadtemplates in
elementfactories. Makes gst_init() +/- 10x faster.
2005-04-12 15:00:30 +00:00
|
|
|
print_caps (gst_static_caps_get (&padtemplate->static_caps), " ");
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
}
|
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("\n");
|
2004-05-23 17:52:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
print_element_flag_info (GstElement * element)
|
|
|
|
{
|
|
|
|
gboolean have_flags = FALSE;
|
2001-05-20 20:12:45 +00:00
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("\n");
|
|
|
|
n_print ("Element Flags:\n");
|
2004-05-23 17:52:54 +00:00
|
|
|
|
2001-05-20 20:12:45 +00:00
|
|
|
if (!have_flags)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" no flags set\n");
|
2001-01-03 07:38:45 +00:00
|
|
|
|
2002-03-30 17:06:45 +00:00
|
|
|
if (GST_IS_BIN (element)) {
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("\n");
|
|
|
|
n_print ("Bin Flags:\n");
|
2002-03-30 17:06:45 +00:00
|
|
|
if (!have_flags)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" no flags set\n");
|
2002-03-30 17:06:45 +00:00
|
|
|
}
|
2004-05-23 17:52:54 +00:00
|
|
|
}
|
2002-03-30 17:06:45 +00:00
|
|
|
|
2004-05-23 17:52:54 +00:00
|
|
|
static void
|
|
|
|
print_implementation_info (GstElement * element)
|
|
|
|
{
|
|
|
|
GstObjectClass *gstobject_class;
|
|
|
|
GstElementClass *gstelement_class;
|
2001-01-03 07:38:45 +00:00
|
|
|
|
2004-05-23 17:52:54 +00:00
|
|
|
gstobject_class = GST_OBJECT_CLASS (G_OBJECT_GET_CLASS (element));
|
|
|
|
gstelement_class = GST_ELEMENT_CLASS (G_OBJECT_GET_CLASS (element));
|
2001-05-25 21:00:07 +00:00
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("\n");
|
|
|
|
n_print ("Element Implementation:\n");
|
2001-05-25 21:00:07 +00:00
|
|
|
|
2005-03-21 17:34:02 +00:00
|
|
|
n_print (" No loopfunc(), must be chain-based or not configured yet\n");
|
2001-01-03 07:38:45 +00:00
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" Has change_state() function: %s\n",
|
2004-03-13 15:27:01 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (gstelement_class->change_state));
|
2001-10-17 10:21:27 +00:00
|
|
|
#ifndef GST_DISABLE_LOADSAVE
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" Has custom save_thyself() function: %s\n",
|
2004-03-13 15:27:01 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (gstobject_class->save_thyself));
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" Has custom restore_thyself() function: %s\n",
|
2004-03-13 15:27:01 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (gstobject_class->restore_thyself));
|
2001-10-17 10:21:27 +00:00
|
|
|
#endif
|
2004-05-23 17:52:54 +00:00
|
|
|
}
|
2001-01-03 07:38:45 +00:00
|
|
|
|
2004-05-23 17:52:54 +00:00
|
|
|
static void
|
|
|
|
print_clocking_info (GstElement * element)
|
|
|
|
{
|
|
|
|
if (!gst_element_requires_clock (element) &&
|
|
|
|
!(gst_element_provides_clock (element) &&
|
|
|
|
gst_element_get_clock (element))) {
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("\n");
|
|
|
|
n_print ("Element has no clocking capabilities.");
|
2004-05-23 17:52:54 +00:00
|
|
|
return;
|
|
|
|
}
|
2002-03-30 17:06:45 +00:00
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("\n");
|
|
|
|
n_print ("Clocking Interaction:\n");
|
2002-11-27 20:47:39 +00:00
|
|
|
if (gst_element_requires_clock (element)) {
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" element requires a clock\n");
|
2002-03-30 17:06:45 +00:00
|
|
|
}
|
2004-05-23 17:52:54 +00:00
|
|
|
|
2002-11-27 20:47:39 +00:00
|
|
|
if (gst_element_provides_clock (element)) {
|
2002-03-30 17:06:45 +00:00
|
|
|
GstClock *clock;
|
|
|
|
|
|
|
|
clock = gst_element_get_clock (element);
|
2002-07-04 16:03:48 +00:00
|
|
|
if (clock)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" element provides a clock: %s\n", GST_OBJECT_NAME (clock));
|
2002-11-27 20:47:39 +00:00
|
|
|
else
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" element is supposed to provide a clock but returned NULL\n");
|
2002-03-30 17:06:45 +00:00
|
|
|
}
|
2004-05-23 17:52:54 +00:00
|
|
|
}
|
|
|
|
|
2003-02-10 20:32:32 +00:00
|
|
|
#ifndef GST_DISABLE_INDEX
|
2004-05-23 17:52:54 +00:00
|
|
|
static void
|
|
|
|
print_index_info (GstElement * element)
|
|
|
|
{
|
2002-12-14 15:00:08 +00:00
|
|
|
if (gst_element_is_indexable (element)) {
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("\n");
|
|
|
|
n_print ("Indexing capabilities:\n");
|
|
|
|
n_print (" element can do indexing\n");
|
2004-03-13 15:27:01 +00:00
|
|
|
} else {
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("\n");
|
|
|
|
n_print ("Element has no indexing capabilities.\n");
|
2002-11-27 20:47:39 +00:00
|
|
|
}
|
2004-05-23 17:52:54 +00:00
|
|
|
}
|
|
|
|
#else
|
|
|
|
static void
|
|
|
|
print_index_info (GstElement * element)
|
|
|
|
{
|
|
|
|
}
|
2003-02-10 20:32:32 +00:00
|
|
|
#endif
|
2001-05-25 21:00:07 +00:00
|
|
|
|
2004-05-23 17:52:54 +00:00
|
|
|
static void
|
|
|
|
print_pad_info (GstElement * element)
|
|
|
|
{
|
|
|
|
const GList *pads;
|
|
|
|
GstPad *pad;
|
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("\n");
|
|
|
|
n_print ("Pads:\n");
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
|
2004-05-23 17:52:54 +00:00
|
|
|
if (!element->numpads) {
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" none\n");
|
2004-05-23 17:52:54 +00:00
|
|
|
return;
|
|
|
|
}
|
2002-07-24 21:13:30 +00:00
|
|
|
|
2005-03-07 18:27:42 +00:00
|
|
|
pads = element->pads;
|
2004-05-23 17:52:54 +00:00
|
|
|
while (pads) {
|
|
|
|
pad = GST_PAD (pads->data);
|
|
|
|
pads = g_list_next (pads);
|
2002-07-24 21:13:30 +00:00
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("");
|
|
|
|
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
if (gst_pad_get_direction (pad) == GST_PAD_SRC)
|
2004-05-23 17:52:54 +00:00
|
|
|
g_print (" SRC: '%s'", gst_pad_get_name (pad));
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
else if (gst_pad_get_direction (pad) == GST_PAD_SINK)
|
2004-05-23 17:52:54 +00:00
|
|
|
g_print (" SINK: '%s'", gst_pad_get_name (pad));
|
|
|
|
else
|
2004-10-19 09:33:58 +00:00
|
|
|
g_print (" UNKNOWN!!!: '%s'", gst_pad_get_name (pad));
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
g_print ("\n");
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" Implementation:\n");
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
if (pad->chainfunc)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" Has chainfunc(): %s\n",
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (pad->chainfunc));
|
|
|
|
if (pad->getrangefunc)
|
2005-03-21 17:34:02 +00:00
|
|
|
n_print (" Has getrangefunc(): %s\n",
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (pad->getrangefunc));
|
|
|
|
if (pad->eventfunc != gst_pad_event_default)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" Has custom eventfunc(): %s\n",
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (pad->eventfunc));
|
|
|
|
if (pad->queryfunc != gst_pad_query_default)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" Has custom queryfunc(): %s\n",
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (pad->queryfunc));
|
|
|
|
if (pad->querytypefunc != gst_pad_get_query_types_default) {
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" Provides query types:\n");
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
print_query_types (gst_pad_get_query_types (pad));
|
2004-05-23 17:52:54 +00:00
|
|
|
}
|
|
|
|
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
if (pad->intlinkfunc != gst_pad_get_internal_links_default)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" Has custom intconnfunc(): %s\n",
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (pad->intlinkfunc));
|
2001-05-25 21:00:07 +00:00
|
|
|
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
if (pad->bufferallocfunc)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" Has bufferallocfunc(): %s\n",
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (pad->bufferallocfunc));
|
2001-07-25 21:40:42 +00:00
|
|
|
|
2004-05-23 17:52:54 +00:00
|
|
|
if (pad->padtemplate)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" Pad Template: '%s'\n", pad->padtemplate->name_template);
|
2004-05-23 17:52:54 +00:00
|
|
|
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
if (pad->caps) {
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" Capabilities:\n");
|
gst/gstutils.c: RPAD fixes all around.
Original commit message from CVS:
2005-06-08 Andy Wingo <wingo@pobox.com>
* gst/gstutils.c: RPAD fixes all around.
(gst_element_link_pads): Refcounting fixes.
* tools/gst-inspect.c:
* tools/gst-xmlinspect.c:
* parse/grammar.y:
* gst/base/gsttypefindhelper.c:
* gst/base/gstbasesink.c:
* gst/gstqueue.c: RPAD fixes.
* gst/gstghostpad.h:
* gst/gstghostpad.c: New ghost pad implementation as full proxy
pads. The tricky thing is they provide both source and sink
interfaces, since they proxy the internal pad for the external
pad, and vice versa. Implement with lower-level ProxyPad objects,
with the interior proxy pad as a child of the exterior ghost pad.
Should write a doc on this.
* gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/.
(gst_pad_set_name, gst_pad_set_parent): Macros removed, use
gst_object API.
* gst/gstpad.c: Big changes. No more stub base GstPad, now all
pads are real pads. No ghost pads in this file. Not documenting
the myriad s/RPAD/PAD/ and REALIZE fixes.
(gst_pad_class_init): Add properties for "direction" and
"template". Both are construct-only, so they can't change during
the life of the pad. Fixes properly deriving from GstPad.
(gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For
derived objects, just set properties when creating the objects via
g_object_new.
(gst_pad_get_parent): Implement as a function, return NULL if the
parent is not an element.
(gst_pad_get_real_parent, gst_pad_add_ghost_pad)
(gst_pad_remove_ghost_pad, gst_pad_realize): Removed.
* gst/gstobject.c (gst_object_class_init): Make name a construct
property. Don't set it in the object init.
* gst/gstelement.c (gst_element_add_pad): Don't allow adding pads
with UNKNOWN direction.
(gst_element_add_ghost_pad): Remove non-orthogonal API. Replace
with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)).
(gst_element_remove_pad): Remove ghost-pad special cases.
(gst_element_pads_activate): Remove rpad cruft.
* gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to
catch the pad's-parent-not-an-element case.
* gst/gst.h: Include gstghostpad.h.
* gst/gst.c (init_post): No more real, ghost pads.
* gst/Makefile.am: Add gstghostpad.[ch].
* check/Makefile.am:
* check/gst/gstbin.c:
* check/gst/gstghostpad.c (test_ghost_pads): Check that linking
into a bin creates ghost pads, and that the refcounts are right.
Partly moved from gstbin.c.
2005-06-08 22:16:27 +00:00
|
|
|
print_caps (pad->caps, " ");
|
2004-05-23 17:52:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
static gint
|
|
|
|
compare_signal_names (GSignalQuery * a, GSignalQuery * b)
|
|
|
|
{
|
|
|
|
return strcmp (a->signal_name, b->signal_name);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static void
|
|
|
|
print_signal_info (GstElement * element)
|
|
|
|
{
|
2003-03-16 20:06:02 +00:00
|
|
|
/* Signals/Actions Block */
|
2004-05-23 17:52:54 +00:00
|
|
|
guint *signals;
|
|
|
|
guint nsignals;
|
|
|
|
gint i = 0, j, k;
|
|
|
|
GSignalQuery *query = NULL;
|
|
|
|
GType type;
|
|
|
|
GSList *found_signals, *l;
|
|
|
|
|
|
|
|
for (k = 0; k < 2; k++) {
|
|
|
|
found_signals = NULL;
|
|
|
|
for (type = G_OBJECT_TYPE (element); type; type = g_type_parent (type)) {
|
|
|
|
if (type == GST_TYPE_ELEMENT || type == GST_TYPE_OBJECT)
|
|
|
|
break;
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2004-05-23 17:52:54 +00:00
|
|
|
if (type == GST_TYPE_BIN && G_OBJECT_TYPE (element) != GST_TYPE_BIN)
|
|
|
|
continue;
|
2002-07-24 21:13:30 +00:00
|
|
|
|
2004-05-23 17:52:54 +00:00
|
|
|
signals = g_signal_list_ids (type, &nsignals);
|
|
|
|
for (i = 0; i < nsignals; i++) {
|
|
|
|
query = g_new0 (GSignalQuery, 1);
|
|
|
|
g_signal_query (signals[i], query);
|
|
|
|
|
|
|
|
if ((k == 0 && !(query->signal_flags & G_SIGNAL_ACTION)) ||
|
|
|
|
(k == 1 && (query->signal_flags & G_SIGNAL_ACTION)))
|
|
|
|
found_signals = g_slist_append (found_signals, query);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (found_signals) {
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("\n");
|
2002-07-24 21:13:30 +00:00
|
|
|
if (k == 0)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("Element Signals:\n");
|
2002-07-24 21:13:30 +00:00
|
|
|
else
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("Element Actions:\n");
|
2004-05-23 17:52:54 +00:00
|
|
|
} else {
|
|
|
|
continue;
|
|
|
|
}
|
2001-01-03 07:38:45 +00:00
|
|
|
|
2004-05-23 17:52:54 +00:00
|
|
|
for (l = found_signals; l; l = l->next) {
|
|
|
|
gchar *indent;
|
|
|
|
int indent_len;
|
2004-03-15 19:27:17 +00:00
|
|
|
|
2004-05-23 17:52:54 +00:00
|
|
|
query = (GSignalQuery *) l->data;
|
|
|
|
indent_len = strlen (query->signal_name) +
|
|
|
|
strlen (g_type_name (query->return_type)) + 24;
|
2004-03-15 19:27:17 +00:00
|
|
|
|
2004-05-23 17:52:54 +00:00
|
|
|
indent = g_new0 (gchar, indent_len + 1);
|
|
|
|
memset (indent, ' ', indent_len);
|
2004-03-15 19:27:17 +00:00
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" \"%s\" : %s user_function (%s* object",
|
2004-05-23 17:52:54 +00:00
|
|
|
query->signal_name,
|
|
|
|
g_type_name (query->return_type), g_type_name (type));
|
2004-03-15 19:27:17 +00:00
|
|
|
|
2004-10-22 20:11:43 +00:00
|
|
|
for (j = 0; j < query->n_params; j++) {
|
|
|
|
if (G_TYPE_IS_FUNDAMENTAL (query->param_types[j])) {
|
|
|
|
g_print (",\n%s%s%s arg%d", _name, indent,
|
|
|
|
g_type_name (query->param_types[j]), j);
|
|
|
|
} else {
|
|
|
|
g_print (",\n%s%s%s* arg%d", _name, indent,
|
|
|
|
g_type_name (query->param_types[j]), j);
|
|
|
|
}
|
|
|
|
}
|
2004-03-15 19:27:17 +00:00
|
|
|
|
2004-05-23 17:52:54 +00:00
|
|
|
if (k == 0)
|
2004-06-14 11:04:06 +00:00
|
|
|
g_print (",\n%s%sgpointer user_data);\n", _name, indent);
|
2004-05-23 17:52:54 +00:00
|
|
|
else
|
|
|
|
g_print (");\n");
|
2004-03-15 19:27:17 +00:00
|
|
|
|
2004-05-23 17:52:54 +00:00
|
|
|
g_free (indent);
|
|
|
|
}
|
2004-03-15 19:27:17 +00:00
|
|
|
|
2004-05-23 17:52:54 +00:00
|
|
|
if (found_signals) {
|
|
|
|
g_slist_foreach (found_signals, (GFunc) g_free, NULL);
|
|
|
|
g_slist_free (found_signals);
|
2001-07-25 21:40:42 +00:00
|
|
|
}
|
|
|
|
}
|
2004-05-23 17:52:54 +00:00
|
|
|
}
|
2001-05-25 21:00:07 +00:00
|
|
|
|
2004-05-23 17:52:54 +00:00
|
|
|
static void
|
|
|
|
print_children_info (GstElement * element)
|
|
|
|
{
|
|
|
|
GList *children;
|
|
|
|
|
|
|
|
if (!GST_IS_BIN (element))
|
|
|
|
return;
|
|
|
|
|
2005-03-07 18:27:42 +00:00
|
|
|
children = (GList *) GST_BIN (element)->children;
|
2004-06-14 11:04:06 +00:00
|
|
|
if (children) {
|
|
|
|
n_print ("\n");
|
|
|
|
g_print ("Children:\n");
|
|
|
|
}
|
2001-05-25 21:00:07 +00:00
|
|
|
|
2004-05-23 17:52:54 +00:00
|
|
|
while (children) {
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" %s\n", GST_ELEMENT_NAME (GST_ELEMENT (children->data)));
|
2004-05-23 17:52:54 +00:00
|
|
|
children = g_list_next (children);
|
|
|
|
}
|
2001-01-03 07:38:45 +00:00
|
|
|
}
|
2001-01-04 10:47:39 +00:00
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
static void
|
2004-06-14 11:28:16 +00:00
|
|
|
print_element_list (gboolean print_all)
|
2001-08-21 20:16:48 +00:00
|
|
|
{
|
|
|
|
GList *plugins;
|
2001-01-04 10:47:39 +00:00
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
plugins = gst_registry_pool_plugin_list ();
|
2001-01-04 10:47:39 +00:00
|
|
|
while (plugins) {
|
2001-08-21 20:16:48 +00:00
|
|
|
GList *features;
|
|
|
|
GstPlugin *plugin;
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
plugin = (GstPlugin *) (plugins->data);
|
2001-01-04 10:47:39 +00:00
|
|
|
plugins = g_list_next (plugins);
|
|
|
|
|
2001-08-21 20:16:48 +00:00
|
|
|
features = gst_plugin_get_feature_list (plugin);
|
|
|
|
while (features) {
|
|
|
|
GstPluginFeature *feature;
|
2001-01-04 10:47:39 +00:00
|
|
|
|
2001-08-21 20:16:48 +00:00
|
|
|
feature = GST_PLUGIN_FEATURE (features->data);
|
2001-01-04 10:47:39 +00:00
|
|
|
|
2002-04-11 20:35:18 +00:00
|
|
|
if (GST_IS_ELEMENT_FACTORY (feature)) {
|
2004-03-15 19:27:17 +00:00
|
|
|
GstElementFactory *factory;
|
2001-08-21 20:16:48 +00:00
|
|
|
|
2004-03-15 19:27:17 +00:00
|
|
|
factory = GST_ELEMENT_FACTORY (feature);
|
2004-06-14 11:04:06 +00:00
|
|
|
if (print_all)
|
2004-06-14 11:28:16 +00:00
|
|
|
print_element_info (factory, TRUE);
|
2004-06-14 11:04:06 +00:00
|
|
|
else
|
|
|
|
g_print ("%s: %s: %s\n", plugin->desc.name,
|
|
|
|
GST_PLUGIN_FEATURE_NAME (factory), factory->details.longname);
|
2001-08-21 20:16:48 +00:00
|
|
|
}
|
2003-02-10 20:32:32 +00:00
|
|
|
#ifndef GST_DISABLE_INDEX
|
2002-12-12 22:14:36 +00:00
|
|
|
else if (GST_IS_INDEX_FACTORY (feature)) {
|
2004-03-15 19:27:17 +00:00
|
|
|
GstIndexFactory *factory;
|
2002-11-29 18:18:34 +00:00
|
|
|
|
2004-03-15 19:27:17 +00:00
|
|
|
factory = GST_INDEX_FACTORY (feature);
|
2004-06-14 11:04:06 +00:00
|
|
|
if (!print_all)
|
|
|
|
g_print ("%s: %s: %s\n", plugin->desc.name,
|
|
|
|
GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
|
2002-11-29 18:18:34 +00:00
|
|
|
}
|
2003-02-10 20:32:32 +00:00
|
|
|
#endif
|
2003-10-28 20:25:30 +00:00
|
|
|
else if (GST_IS_TYPE_FIND_FACTORY (feature)) {
|
2004-03-15 19:27:17 +00:00
|
|
|
GstTypeFindFactory *factory;
|
|
|
|
|
|
|
|
factory = GST_TYPE_FIND_FACTORY (feature);
|
2004-06-14 11:04:06 +00:00
|
|
|
if (!print_all)
|
|
|
|
g_print ("%s: %s: ", plugin->desc.name,
|
|
|
|
gst_plugin_feature_get_name (feature));
|
2004-03-15 19:27:17 +00:00
|
|
|
if (factory->extensions) {
|
|
|
|
guint i = 0;
|
|
|
|
|
|
|
|
while (factory->extensions[i]) {
|
2004-06-14 11:04:06 +00:00
|
|
|
if (!print_all)
|
|
|
|
g_print ("%s%s", i > 0 ? ", " : "", factory->extensions[i]);
|
2004-03-15 19:27:17 +00:00
|
|
|
i++;
|
|
|
|
}
|
2004-06-14 11:04:06 +00:00
|
|
|
if (!print_all)
|
|
|
|
g_print ("\n");
|
2004-03-15 19:27:17 +00:00
|
|
|
} else {
|
2004-06-14 11:04:06 +00:00
|
|
|
if (!print_all)
|
|
|
|
g_print ("no extensions\n");
|
2004-03-15 19:27:17 +00:00
|
|
|
}
|
2004-03-13 15:27:01 +00:00
|
|
|
} else {
|
2004-06-14 11:04:06 +00:00
|
|
|
if (!print_all)
|
|
|
|
n_print ("%s: %s (%s)\n", plugin->desc.name,
|
|
|
|
GST_PLUGIN_FEATURE_NAME (feature),
|
|
|
|
g_type_name (G_OBJECT_TYPE (feature)));
|
2001-08-21 20:16:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
features = g_list_next (features);
|
|
|
|
}
|
2001-01-04 10:47:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-08-21 20:16:48 +00:00
|
|
|
static void
|
2004-03-13 15:27:01 +00:00
|
|
|
print_plugin_info (GstPlugin * plugin)
|
2001-03-07 21:52:56 +00:00
|
|
|
{
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("Plugin Details:\n");
|
|
|
|
n_print (" Name:\t\t%s\n", plugin->desc.name);
|
|
|
|
n_print (" Description:\t%s\n", plugin->desc.description);
|
2004-07-30 20:18:11 +00:00
|
|
|
n_print (" Filename:\t%s\n", plugin->filename ? plugin->filename : "(null)");
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" Version:\t%s\n", plugin->desc.version);
|
|
|
|
n_print (" License:\t%s\n", plugin->desc.license);
|
|
|
|
n_print (" Package:\t%s\n", plugin->desc.package);
|
|
|
|
n_print (" Origin URL:\t%s\n", plugin->desc.origin);
|
|
|
|
n_print ("\n");
|
2004-08-12 11:50:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
print_plugin_features (GstPlugin * plugin)
|
|
|
|
{
|
|
|
|
GList *features;
|
|
|
|
gint num_features = 0;
|
|
|
|
gint num_elements = 0;
|
|
|
|
gint num_types = 0;
|
|
|
|
gint num_indexes = 0;
|
|
|
|
gint num_other = 0;
|
2001-01-04 10:47:39 +00:00
|
|
|
|
2001-08-21 20:16:48 +00:00
|
|
|
features = gst_plugin_get_feature_list (plugin);
|
2001-01-04 10:47:39 +00:00
|
|
|
|
2001-08-21 20:16:48 +00:00
|
|
|
while (features) {
|
|
|
|
GstPluginFeature *feature;
|
2001-03-07 21:52:56 +00:00
|
|
|
|
2001-08-21 20:16:48 +00:00
|
|
|
feature = GST_PLUGIN_FEATURE (features->data);
|
2001-03-07 21:52:56 +00:00
|
|
|
|
2002-04-11 20:35:18 +00:00
|
|
|
if (GST_IS_ELEMENT_FACTORY (feature)) {
|
2001-08-21 20:16:48 +00:00
|
|
|
GstElementFactory *factory;
|
2001-03-07 21:52:56 +00:00
|
|
|
|
2002-04-11 20:35:18 +00:00
|
|
|
factory = GST_ELEMENT_FACTORY (feature);
|
2005-05-19 08:41:42 +00:00
|
|
|
n_print (" %s: %s\n", GST_PLUGIN_FEATURE_NAME (factory),
|
2004-03-15 19:27:17 +00:00
|
|
|
factory->details.longname);
|
2002-11-27 20:47:39 +00:00
|
|
|
num_elements++;
|
2001-03-07 21:52:56 +00:00
|
|
|
}
|
2003-02-10 20:32:32 +00:00
|
|
|
#ifndef GST_DISABLE_INDEX
|
2002-12-12 22:14:36 +00:00
|
|
|
else if (GST_IS_INDEX_FACTORY (feature)) {
|
|
|
|
GstIndexFactory *factory;
|
2002-11-29 18:18:34 +00:00
|
|
|
|
2002-12-12 22:14:36 +00:00
|
|
|
factory = GST_INDEX_FACTORY (feature);
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" %s: %s\n", GST_OBJECT_NAME (factory), factory->longdesc);
|
2002-12-12 22:14:36 +00:00
|
|
|
num_indexes++;
|
2002-11-29 18:18:34 +00:00
|
|
|
}
|
2003-02-10 20:32:32 +00:00
|
|
|
#endif
|
2003-10-28 20:25:30 +00:00
|
|
|
else if (GST_IS_TYPE_FIND_FACTORY (feature)) {
|
|
|
|
GstTypeFindFactory *factory;
|
|
|
|
|
|
|
|
factory = GST_TYPE_FIND_FACTORY (feature);
|
|
|
|
if (factory->extensions) {
|
2004-03-15 19:27:17 +00:00
|
|
|
guint i = 0;
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2004-03-15 19:27:17 +00:00
|
|
|
g_print ("%s type: ", plugin->desc.name);
|
|
|
|
while (factory->extensions[i]) {
|
|
|
|
g_print ("%s%s", i > 0 ? ", " : "", factory->extensions[i]);
|
|
|
|
i++;
|
|
|
|
}
|
2004-10-19 09:33:58 +00:00
|
|
|
g_print ("\n");
|
2003-10-28 20:25:30 +00:00
|
|
|
} else
|
2004-03-15 19:27:17 +00:00
|
|
|
g_print ("%s type: N/A\n", plugin->desc.name);
|
2001-08-21 20:16:48 +00:00
|
|
|
|
2002-11-27 20:47:39 +00:00
|
|
|
num_types++;
|
2004-03-13 15:27:01 +00:00
|
|
|
} else {
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" %s (%s)\n", gst_object_get_name (GST_OBJECT (feature)),
|
2004-03-15 19:27:17 +00:00
|
|
|
g_type_name (G_OBJECT_TYPE (feature)));
|
2002-11-27 20:47:39 +00:00
|
|
|
num_other++;
|
2001-08-21 20:16:48 +00:00
|
|
|
}
|
2002-11-27 20:47:39 +00:00
|
|
|
num_features++;
|
2001-08-21 20:16:48 +00:00
|
|
|
features = g_list_next (features);
|
2001-03-07 21:52:56 +00:00
|
|
|
}
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("\n");
|
|
|
|
n_print (" %d features:\n", num_features);
|
2002-11-27 20:47:39 +00:00
|
|
|
if (num_elements > 0)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" +-- %d elements\n", num_elements);
|
2002-11-27 20:47:39 +00:00
|
|
|
if (num_types > 0)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" +-- %d types\n", num_types);
|
2002-12-12 22:14:36 +00:00
|
|
|
if (num_indexes > 0)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" +-- %d indexes\n", num_indexes);
|
2002-11-27 20:47:39 +00:00
|
|
|
if (num_other > 0)
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print (" +-- %d other objects\n", num_other);
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("\n");
|
2001-01-04 10:47:39 +00:00
|
|
|
}
|
|
|
|
|
2004-05-23 17:52:54 +00:00
|
|
|
static int
|
|
|
|
print_element_features (const gchar * element_name)
|
|
|
|
{
|
|
|
|
GstPluginFeature *feature;
|
|
|
|
|
|
|
|
/* FIXME implement other pretty print function for these */
|
|
|
|
#ifndef GST_DISABLE_INDEX
|
|
|
|
feature = gst_registry_pool_find_feature (element_name,
|
|
|
|
GST_TYPE_INDEX_FACTORY);
|
|
|
|
if (feature) {
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%s: an index\n", element_name);
|
2004-05-23 17:52:54 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
feature = gst_registry_pool_find_feature (element_name,
|
|
|
|
GST_TYPE_TYPE_FIND_FACTORY);
|
|
|
|
if (feature) {
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%s: a typefind function\n", element_name);
|
2004-05-23 17:52:54 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
#ifndef GST_DISABLE_URI
|
|
|
|
feature = gst_registry_pool_find_feature (element_name, GST_TYPE_URI_HANDLER);
|
|
|
|
if (feature) {
|
2004-06-14 11:04:06 +00:00
|
|
|
n_print ("%s: an uri handler\n", element_name);
|
2004-05-23 17:52:54 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
#endif
|
2004-05-23 18:41:25 +00:00
|
|
|
|
|
|
|
return -1;
|
2004-05-23 17:52:54 +00:00
|
|
|
}
|
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
static int
|
|
|
|
print_element_info (GstElementFactory * factory, gboolean print_names)
|
|
|
|
{
|
|
|
|
GstElement *element;
|
|
|
|
gint maxlevel = 0;
|
|
|
|
|
|
|
|
element = gst_element_factory_create (factory, NULL);
|
|
|
|
if (!element) {
|
|
|
|
g_print ("couldn't construct element for some reason\n");
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (print_names)
|
|
|
|
_name = g_strdup_printf ("%s: ", GST_PLUGIN_FEATURE (factory)->name);
|
|
|
|
else
|
|
|
|
_name = "";
|
|
|
|
|
|
|
|
print_factory_details_info (factory);
|
2004-08-12 11:50:31 +00:00
|
|
|
if (GST_PLUGIN_FEATURE (factory)->manager) {
|
|
|
|
GstPlugin *plugin = (GstPlugin *) GST_PLUGIN_FEATURE (factory)->manager;
|
|
|
|
|
|
|
|
print_plugin_info (plugin);
|
|
|
|
}
|
2004-06-14 11:04:06 +00:00
|
|
|
|
|
|
|
print_hierarchy (G_OBJECT_TYPE (element), 0, &maxlevel);
|
|
|
|
|
|
|
|
print_pad_templates_info (element, factory);
|
|
|
|
print_element_flag_info (element);
|
|
|
|
print_implementation_info (element);
|
|
|
|
print_clocking_info (element);
|
|
|
|
print_index_info (element);
|
|
|
|
print_pad_info (element);
|
|
|
|
print_element_properties_info (element);
|
|
|
|
print_signal_info (element);
|
|
|
|
print_children_info (element);
|
|
|
|
|
|
|
|
if (_name != "")
|
|
|
|
g_free (_name);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
int
|
|
|
|
main (int argc, char *argv[])
|
2001-08-21 20:16:48 +00:00
|
|
|
{
|
2004-06-14 11:04:06 +00:00
|
|
|
gboolean print_all = FALSE;
|
2002-09-15 18:59:27 +00:00
|
|
|
struct poptOption options[] = {
|
2004-06-14 11:04:06 +00:00
|
|
|
{"print-all", 'a', POPT_ARG_NONE | POPT_ARGFLAG_STRIP, &print_all, 0,
|
|
|
|
N_("Print all elements"), NULL},
|
2002-09-15 18:59:27 +00:00
|
|
|
POPT_TABLEEND
|
|
|
|
};
|
|
|
|
|
2004-05-07 02:36:28 +00:00
|
|
|
#ifdef GETTEXT_PACKAGE
|
2004-02-03 11:23:59 +00:00
|
|
|
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
2004-03-13 15:27:01 +00:00
|
|
|
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
2004-02-03 11:23:59 +00:00
|
|
|
textdomain (GETTEXT_PACKAGE);
|
2004-05-07 02:36:28 +00:00
|
|
|
#endif
|
2004-02-03 11:23:59 +00:00
|
|
|
|
2002-09-15 18:59:27 +00:00
|
|
|
gst_init_with_popt_table (&argc, &argv, options);
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2004-06-14 11:04:06 +00:00
|
|
|
if (print_all && argc > 2) {
|
|
|
|
g_print ("-a requires no extra arguments\n");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2001-12-14 20:56:51 +00:00
|
|
|
/* if no arguments, print out list of elements */
|
2004-06-14 11:04:06 +00:00
|
|
|
if (argc == 1 || print_all) {
|
2004-06-14 11:28:16 +00:00
|
|
|
print_element_list (print_all);
|
2004-03-13 15:27:01 +00:00
|
|
|
/* else we try to get a factory */
|
2001-01-04 10:47:39 +00:00
|
|
|
} else {
|
2004-06-15 14:17:55 +00:00
|
|
|
GstElementFactory *factory;
|
|
|
|
GstPlugin *plugin;
|
2004-06-14 11:04:06 +00:00
|
|
|
const char *arg = argv[argc - 1];
|
2004-06-15 14:17:55 +00:00
|
|
|
int retval;
|
2004-06-14 11:04:06 +00:00
|
|
|
|
2004-06-15 14:17:55 +00:00
|
|
|
factory = gst_element_factory_find (arg);
|
|
|
|
/* if there's a factory, print out the info */
|
|
|
|
if (factory) {
|
|
|
|
retval = print_element_info (factory, print_all);
|
2001-01-04 10:47:39 +00:00
|
|
|
} else {
|
2004-06-15 14:17:55 +00:00
|
|
|
retval = print_element_features (arg);
|
2001-01-04 10:47:39 +00:00
|
|
|
}
|
|
|
|
|
2004-06-15 14:17:55 +00:00
|
|
|
/* otherwise check if it's a plugin */
|
|
|
|
if (retval) {
|
|
|
|
plugin = gst_registry_pool_find_plugin (arg);
|
2001-01-04 10:47:39 +00:00
|
|
|
|
2004-06-15 14:17:55 +00:00
|
|
|
/* if there is such a plugin, print out info */
|
|
|
|
if (plugin) {
|
|
|
|
print_plugin_info (plugin);
|
2004-08-12 11:50:31 +00:00
|
|
|
print_plugin_features (plugin);
|
2004-06-15 14:17:55 +00:00
|
|
|
} else {
|
|
|
|
g_print ("No such element or plugin '%s'\n", arg);
|
|
|
|
return -1;
|
|
|
|
}
|
2001-01-04 10:47:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|