More Docs updates.

Original commit message from CVS:
More Docs updates.
Added plugin documentation. I fear we need a gstdoc implementation
that loads plugins and does introspection on them. I think we should
automatically create the docs for the pads and mime types the plugins
provide. Does anyone have enough perl knowledge to add these features? I
allready changed the C code to output the pad definitions but my perl
knowledge is too limited, for now, to implement the rest of the needed
functionality...
This commit is contained in:
Wim Taymans 2000-10-25 19:09:53 +00:00
parent 268bcbb89d
commit 9bae9d4b91
80 changed files with 14539 additions and 69 deletions

View file

@ -476,6 +476,9 @@ tools/Makefile
docs/Makefile docs/Makefile
docs/gst/Makefile docs/gst/Makefile
docs/gst/gstreamer.types docs/gst/gstreamer.types
docs/libs/Makefile
docs/plugins/Makefile
docs/plugins/gstreamer-plugins.types
docs/manual/Makefile docs/manual/Makefile
docs/manual/images/Makefile docs/manual/images/Makefile
stamp.h stamp.h

96
docs/plugins/Makefile.am Normal file
View file

@ -0,0 +1,96 @@
## Process this file with automake to produce Makefile.in
# The name of the module.
DOC_MODULE=gstreamer-plugins
# The top-level SGML file.
DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
# The directory containing the source code (if it contains documentation).
DOC_SOURCE_DIR=$(top_srcdir)/plugins
INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir)
LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_srcdir)/gst/libgst.la
CFLAGS = `gstreamer-config --cflags` -Wall -g
LDFLAGS = `gstreamer-config --libs`
EXTRA_DIST=$(DOC_MODULE).types.in
HTML_DIR=$(datadir)/$(DOC_MODULE)/html
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
tmpl_sources = \
tmpl/videoraw.sgml
gstreamer_docdir = $(HTML_DIR)
gstreamer_doc_DATA = \
$(DOC_MODULE).html \
$(DOC_MODULE).hierarchy \
$(DOC_MODULE).types \
$(DOC_MODULE)-sections.txt
SCANOBJS_FILES = \
$(DOC_MODULE).signals \
$(DOC_MODULE).hierarchy \
$(DOC_MODULE).args
if HAVE_GTK_DOC
$(DOC_MODULE).html: html/book1.html
-cd $(srcdir) && cp html/book1.html $(DOC_MODULE).html
else
$(DOC_MODULE).html:
endif
html/book1.html: sgml/$(DOC_MODULE)-doc.bottom
$(MAKE) html
sgml/$(DOC_MODULE)-doc.bottom: $(tmpl_sources)
$(MAKE) sgml
scanobj:
CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ./gstdoc-scanobj --module=$(DOC_MODULE)
tmpl: scanobj
./gstdoc-mktmpl --module=$(DOC_MODULE)
sgml: tmpl
./gstdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR)
html:
if ! test -d html ; then mkdir html ; fi
-cd html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
clean-local:
rm -f *~ *.bak *.signals *-unused.txt *.args
maintainer-clean-local: clean
rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
(installfiles=`echo $(srcdir)/html/*.html`; \
if test "$$installfiles" = '$(srcdir)/html/*.html'; \
then echo '-- Nothing to install' ; \
else \
for i in $$installfiles; do \
echo '-- Installing '$$i ; \
$(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
done; \
echo '-- Installing $(srcdir)/html/index.sgml' ; \
$(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
echo '-- Fixing Crossreferences' ; \
gtkdoc-fixxref --module=$(DOC_MODULE) --html-dir=$(HTML_DIR)|| true; \
fi)
dist-hook:
mkdir $(distdir)/html
mkdir $(distdir)/sgml
mkdir $(distdir)/tmpl
-cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
-cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
-cp $(srcdir)/sgml/*.bottom $(srcdir)/sgml/*.top $(distdir)/sgml
.PHONY : html sgml templates

2273
docs/plugins/gstdoc-mkdb Executable file

File diff suppressed because it is too large Load diff

1346
docs/plugins/gstdoc-mktmpl Executable file

File diff suppressed because it is too large Load diff

872
docs/plugins/gstdoc-scanobj Executable file
View file

@ -0,0 +1,872 @@
#!/usr/bin/perl -w
#
# gtk-doc - GTK DocBook documentation generator.
# Copyright (C) 1998 Damon Chaplin
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#
# This gets information about object heirarchies and signals
# by compiling a small C program. CFLAGS and LDFLAGS must be
# set appropriately before running this script.
#
# NOTE: the lookup_signal_srg_names() function contains the argument names of
# standard GTK signal handlers. This may need to be updated for new
# GTK signals or Gnome widget signals.
use Getopt::Long;
# Options
# name of documentation module
my $MODULE;
my $OUTPUT_DIR;
%optctl = (module => \$MODULE,
types => \$TYPES_FILE,
nogtkinit => \$NO_GTK_INIT);
GetOptions(\%optctl, "module=s", "types:s", "nogtkinit");
$TYPES_FILE = $TYPES_FILE ? $TYPES_FILE : "$MODULE.types";
open TYPES, $TYPES_FILE || die "Cannot open $TYPES_FILE: $!\n";
open OUTPUT, ">$MODULE-scan.c" || die "Cannot open $MODULE-scan.c: $!\n";
# write a C program to scan the types
$includes = "";
@types = ();
for (<TYPES>) {
if (/^#include/) {
$includes .= $_;
} elsif (/^%/) {
next;
} elsif (/^\s*$/) {
next;
} else {
chomp;
push @types, $_;
}
}
$ntypes = @types + 1;
print OUTPUT <<EOT;
#include <string.h>
#include <stdio.h>
$includes
GtkType object_types[$ntypes];
GstElement *elements[$ntypes];
gint _typenr = 0;
gboolean
get_plugins ()
{
gint i = 0;
EOT
for (@types) {
print OUTPUT " gst_plugin_load(\"$_\");\n";
print OUTPUT " elements[i] = gst_elementfactory_make(\"$_\", \"dummy\");\n";
print OUTPUT " object_types[i] = GTK_OBJECT_TYPE(GTK_OBJECT(elements[i]));\n";
print OUTPUT " i++; \n";
}
print OUTPUT " object_types[i] = 0;\n";
print OUTPUT <<EOT;
return TRUE;
}
/*
* This uses GTK type functions to output signal prototypes and the widget
* hierarchy.
*/
/* The output files */
gchar *signals_filename = "$MODULE.signals";
gchar *hierarchy_filename = "$MODULE.hierarchy";
gchar *args_filename = "$MODULE.args";
gchar *pads_filename = "$MODULE.pads";
static void output_signals ();
static void output_widget_signals (FILE *fp,
GtkType object_type);
static void output_widget_signal (FILE *fp,
GtkType object_type,
gchar *object_class_name,
guint signal_id);
static gchar * get_type_name (GtkType type,
gboolean * is_pointer);
static gchar * get_gdk_event (const gchar * signal_name);
static gchar ** lookup_signal_arg_names (gchar * type,
const gchar * signal_name);
static void output_widget_hierarchy ();
static void output_hierarchy (FILE *fp,
GtkType type,
gint level);
static void output_args ();
static void output_widget_args (FILE *fp, GtkType object_type);
static void output_pads ();
static void output_widget_pads (FILE *fp, GstElement *element);
int
main (int argc, char *argv[])
{
EOT
if ($NO_GTK_INIT) {
print OUTPUT <<EOT;
gtk_type_init ();
EOT
} else {
print OUTPUT <<EOT;
gtk_init (&argc, &argv);
EOT
}
print OUTPUT <<EOT;
gst_init (&argc, &argv);
get_plugins();
output_widget_hierarchy ();
output_signals ();
output_args ();
output_pads ();
return 0;
}
static void
output_signals ()
{
FILE *fp;
gint i;
fp = fopen (signals_filename, "w");
if (fp == NULL)
{
g_warning ("Couldn't open output file: %s", signals_filename);
return;
}
for (i = 0; object_types[i]; i++)
output_widget_signals (fp, object_types[i]);
fclose (fp);
}
/* This outputs all the signals of one widget. */
static void
output_widget_signals (FILE *fp, GtkType object_type)
{
GtkObjectClass *class;
gchar *object_class_name;
guint sig;
class = gtk_type_class (object_type);
if (!class || class->nsignals == 0)
return;
object_class_name = gtk_type_name (object_type);
for (sig = 0; sig < class->nsignals; sig++)
{
if (!class->signals[sig])
{
/*g_print ("Signal slot [%u] is empty\n", sig);*/
continue;
}
output_widget_signal (fp, object_type, object_class_name,
class->signals[sig]);
}
}
/* This outputs one signal. */
static void
output_widget_signal (FILE *fp,
GtkType object_type,
gchar *object_name,
guint signal_id)
{
GtkSignalQuery *query_info;
gchar *ret_type, *pos, *type_name, *arg_name, *object_arg, *object_arg_start;
gboolean is_pointer;
gchar ret_type_buffer[1024], buffer[1024];
gint i, param;
gchar **arg_names;
gint param_num, widget_num, event_num, callback_num;
gint *arg_num;
gchar signal_name[128];
/* g_print ("Object: %s Type: %i Signal: %u\n", object_name, object_type,
signal_id);*/
param_num = 1;
widget_num = event_num = callback_num = 0;
query_info = gtk_signal_query (signal_id);
if (query_info == NULL)
{
g_warning ("Couldn't query signal");
return;
}
/* Output the return type and function name. */
ret_type = get_type_name (query_info->return_val, &is_pointer);
sprintf (ret_type_buffer, "%s%s", ret_type, is_pointer ? "*" : "");
/* Output the signal object type and the argument name. We assume the
type is a pointer - I think that is OK. We remove "Gtk" or "Gnome" and
convert to lower case for the argument name. */
pos = buffer;
sprintf (pos, "%s ", object_name);
pos += strlen (pos);
if (!strncmp (object_name, "Gtk", 3))
object_arg = object_name + 3;
else if (!strncmp (object_name, "Gnome", 5))
object_arg = object_name + 5;
else
object_arg = object_name;
object_arg_start = pos;
sprintf (pos, "*%s\n", object_arg);
pos += strlen (pos);
g_strdown (object_arg_start);
if (!strcmp (object_arg_start, "widget"))
widget_num++;
/* Convert signal name to use underscores rather than dashes '-'. */
strcpy (signal_name, query_info->signal_name);
for (i = 0; signal_name[i]; i++)
{
if (signal_name[i] == '-')
signal_name[i] = '_';
}
/* Output the signal parameters. */
arg_names = lookup_signal_arg_names (object_name, signal_name);
for (param = 0; param < query_info->nparams; param++)
{
if (arg_names)
{
sprintf (pos, "%s\n", arg_names[param]);
pos += strlen (pos);
}
else
{
type_name = get_type_name (query_info->params[param], &is_pointer);
/* Most arguments to the callback are called "arg1", "arg2", etc.
GdkWidgets are called "widget", "widget2", ...
GdkEvents are called "event", "event2", ...
GtkCallbacks are called "callback", "callback2", ... */
if (!strcmp (type_name, "GtkWidget"))
{
arg_name = "widget";
arg_num = &widget_num;
}
else if (!strcmp (type_name, "GdkEvent"))
{
type_name = get_gdk_event (signal_name);
arg_name = "event";
arg_num = &event_num;
is_pointer = TRUE;
}
else if (!strcmp (type_name, "GtkCallback")
|| !strcmp (type_name, "GtkCCallback"))
{
arg_name = "callback";
arg_num = &callback_num;
}
else
{
arg_name = "arg";
arg_num = &param_num;
}
sprintf (pos, "%s ", type_name);
pos += strlen (pos);
if (!arg_num || *arg_num == 0)
sprintf (pos, "%s%s\n", is_pointer ? "*" : " ", arg_name);
else
sprintf (pos, "%s%s%i\n", is_pointer ? "*" : " ", arg_name,
*arg_num);
pos += strlen (pos);
if (arg_num)
*arg_num += 1;
}
}
fprintf (fp,
"<SIGNAL>\n<NAME>%s::%s</NAME>\n<RETURNS>%s</RETURNS>\n%s</SIGNAL>\n\n",
object_name, query_info->signal_name, ret_type_buffer, buffer);
g_free (query_info);
}
static gchar *
get_type_name (GtkType type, gboolean * is_pointer)
{
static gchar *GbTypeNames[] =
{
"char", "gchar",
"bool", "gboolean",
"int", "gint",
"uint", "guint",
"long", "glong",
"ulong", "gulong",
"float", "gfloat",
"double", "gdouble",
"string", "gchar",
"enum", "gint",
"flags", "gint",
"boxed", "gpointer",
"foreign", "gpointer",
"callback", "GtkCallback", /* ?? */
"args", "gpointer",
"pointer", "gpointer",
"signal", "gpointer",
"c_callback", "GtkCallback", /* ?? */
NULL
};
GtkType parent_type;
gchar *type_name, *parent_type_name;
gint i;
*is_pointer = FALSE;
type_name = gtk_type_name (type);
for (i = 0; GbTypeNames[i]; i += 2)
{
if (!strcmp (type_name, GbTypeNames[i]))
{
if (!strcmp (type_name, "string"))
*is_pointer = TRUE;
return GbTypeNames[i + 1];
}
}
for (;;)
{
parent_type = gtk_type_parent (type);
if (parent_type == 0)
break;
type = parent_type;
}
parent_type_name = gtk_type_name (type);
/*g_print ("Parent type name: %s\n", parent_type_name);*/
if (!strcmp (parent_type_name, "GtkObject")
|| !strcmp (parent_type_name, "boxed")
|| !strcmp (parent_type_name, "GtkBoxed"))
*is_pointer = TRUE;
return type_name;
}
static gchar *
get_gdk_event (const gchar * signal_name)
{
static gchar *GbGDKEvents[] =
{
"button_press_event", "GdkEventButton",
"button_release_event", "GdkEventButton",
"motion_notify_event", "GdkEventMotion",
"delete_event", "GdkEvent",
"destroy_event", "GdkEvent",
"expose_event", "GdkEventExpose",
"key_press_event", "GdkEventKey",
"key_release_event", "GdkEventKey",
"enter_notify_event", "GdkEventCrossing",
"leave_notify_event", "GdkEventCrossing",
"configure_event", "GdkEventConfigure",
"focus_in_event", "GdkEventFocus",
"focus_out_event", "GdkEventFocus",
"map_event", "GdkEvent",
"unmap_event", "GdkEvent",
"property_notify_event", "GdkEventProperty",
"selection_clear_event", "GdkEventSelection",
"selection_request_event", "GdkEventSelection",
"selection_notify_event", "GdkEventSelection",
"proximity_in_event", "GdkEventProximity",
"proximity_out_event", "GdkEventProximity",
"drag_begin_event", "GdkEventDragBegin",
"drag_request_event", "GdkEventDragRequest",
"drag_end_event", "GdkEventDragRequest",
"drop_enter_event", "GdkEventDropEnter",
"drop_leave_event", "GdkEventDropLeave",
"drop_data_available_event", "GdkEventDropDataAvailable",
"other_event", "GdkEventOther",
"client_event", "GdkEventClient",
"no_expose_event", "GdkEventNoExpose",
NULL
};
gint i;
for (i = 0; GbGDKEvents[i]; i += 2)
{
if (!strcmp (signal_name, GbGDKEvents[i]))
return GbGDKEvents[i + 1];
}
return "GdkEvent";
}
/* This returns argument names to use for some known GTK signals.
It is passed a widget name, e.g. 'GtkCList' and a signal name, e.g.
'select_row' and it returns a pointer to an array of argument types and
names. */
static gchar **
lookup_signal_arg_names (gchar * type, const gchar * signal_name)
{
/* Each arg array starts with the object type name and the signal name,
and then signal arguments follow. */
static gchar *GbArgTable[][16] =
{
{"GtkCList", "select_row",
"gint row",
"gint column",
"GdkEventButton *event"},
{"GtkCList", "unselect_row",
"gint row",
"gint column",
"GdkEventButton *event"},
{"GtkCList", "click_column",
"gint column"},
{"GtkCList", "resize_column",
"gint column",
"gint width"},
{"GtkCList", "extend_selection",
"GtkScrollType scroll_type",
"gfloat position",
"gboolean auto_start_selection"},
{"GtkCList", "scroll_vertical",
"GtkScrollType scroll_type",
"gfloat position"},
{"GtkCList", "scroll_horizontal",
"GtkScrollType scroll_type",
"gfloat position"},
{"GtkContainer", "focus",
"GtkDirectionType direction"},
{"GtkCTree", "tree_select_row",
"GList *node",
"gint column"},
{"GtkCTree", "tree_unselect_row",
"GList *node",
"gint column"},
{"GtkCTree", "tree_expand",
"GList *node"},
{"GtkCTree", "tree_collapse",
"GList *node"},
{"GtkCTree", "tree_move",
"GList *node",
"GList *new_parent",
"GList *new_sibling"},
{"GtkCTree", "change_focus_row_expansion",
"GtkCTreeExpansionType expansion"},
{"GtkEditable", "insert_text",
"gchar *new_text",
"gint new_text_length",
"gint *position"},
{"GtkEditable", "delete_text",
"gint start_pos",
"gint end_pos"},
{"GtkEditable", "set_editable",
"gboolean is_editable"},
{"GtkEditable", "move_cursor",
"gint x",
"gint y"},
{"GtkEditable", "move_word",
"gint num_words"},
{"GtkEditable", "move_page",
"gint x",
"gint y"},
{"GtkEditable", "move_to_row",
"gint row"},
{"GtkEditable", "move_to_column",
"gint column"},
{"GtkEditable", "kill_char",
"gint direction"},
{"GtkEditable", "kill_word",
"gint direction"},
{"GtkEditable", "kill_line",
"gint direction"},
{"GtkInputDialog", "enable_device",
"gint deviceid"},
{"GtkInputDialog", "disable_device",
"gint deviceid"},
{"GtkListItem", "extend_selection",
"GtkScrollType scroll_type",
"gfloat position",
"gboolean auto_start_selection"},
{"GtkListItem", "scroll_vertical",
"GtkScrollType scroll_type",
"gfloat position"},
{"GtkListItem", "scroll_horizontal",
"GtkScrollType scroll_type",
"gfloat position"},
{"GtkMenuShell", "move_current",
"GtkMenuDirectionType direction"},
{"GtkMenuShell", "activate_current",
"gboolean force_hide"},
{"GtkNotebook", "switch_page",
"GtkNotebookPage *page",
"gint page_num"},
{"GtkStatusbar", "text_pushed",
"guint context_id",
"gchar *text"},
{"GtkStatusbar", "text_popped",
"guint context_id",
"gchar *text"},
{"GtkTipsQuery", "widget_entered",
"GtkWidget *widget",
"gchar *tip_text",
"gchar *tip_private"},
{"GtkTipsQuery", "widget_selected",
"GtkWidget *widget",
"gchar *tip_text",
"gchar *tip_private",
"GdkEventButton *event"},
{"GtkToolbar", "orientation_changed",
"GtkOrientation orientation"},
{"GtkToolbar", "style_changed",
"GtkToolbarStyle style"},
{"GtkWidget", "draw",
"GdkRectangle *area"},
{"GtkWidget", "size_request",
"GtkRequisition *requisition"},
{"GtkWidget", "size_allocate",
"GtkAllocation *allocation"},
{"GtkWidget", "state_changed",
"GtkStateType state"},
{"GtkWidget", "style_set",
"GtkStyle *previous_style"},
{"GtkWidget", "install_accelerator",
"gchar *signal_name",
"gchar key",
"gint modifiers"},
{"GtkWidget", "add_accelerator",
"guint accel_signal_id",
"GtkAccelGroup *accel_group",
"guint accel_key",
"GdkModifierType accel_mods",
"GtkAccelFlags accel_flags"},
{"GtkWidget", "parent_set",
"GtkObject *old_parent"},
{"GtkWidget", "remove_accelerator",
"GtkAccelGroup *accel_group",
"guint accel_key",
"GdkModifierType accel_mods"},
{"GtkWidget", "debug_msg",
"gchar *message"},
{"GtkWindow", "move_resize",
"gint *x",
"gint *y",
"gint width",
"gint height"},
{"GtkWindow", "set_focus",
"GtkWidget *widget"},
{"GtkWidget", "selection_get",
"GtkSelectionData *data",
"guint info",
"guint time"},
{"GtkWidget", "selection_received",
"GtkSelectionData *data",
"guint time"},
{"GtkWidget", "drag_begin",
"GdkDragContext *drag_context"},
{"GtkWidget", "drag_end",
"GdkDragContext *drag_context"},
{"GtkWidget", "drag_data_delete",
"GdkDragContext *drag_context"},
{"GtkWidget", "drag_leave",
"GdkDragContext *drag_context",
"guint time"},
{"GtkWidget", "drag_motion",
"GdkDragContext *drag_context",
"gint x",
"gint y",
"guint time"},
{"GtkWidget", "drag_drop",
"GdkDragContext *drag_context",
"gint x",
"gint y",
"guint time"},
{"GtkWidget", "drag_data_get",
"GdkDragContext *drag_context",
"GtkSelectionData *data",
"guint info",
"guint time"},
{"GtkWidget", "drag_data_received",
"GdkDragContext *drag_context",
"gint x",
"gint y",
"GtkSelectionData *data",
"guint info",
"guint time"},
{NULL}
};
gint i;
for (i = 0; GbArgTable[i][0]; i++)
{
if (!strcmp (type, GbArgTable[i][0])
&& !strcmp (signal_name, GbArgTable[i][1]))
return &GbArgTable[i][2];
}
return NULL;
}
/* This outputs the hierarchy of all widgets which have been initialized,
i.e. by calling their XXX_get_type() initialization function. */
static void
output_widget_hierarchy ()
{
FILE *fp;
fp = fopen (hierarchy_filename, "w");
if (fp == NULL)
{
g_warning ("Couldn't open output file: %s", hierarchy_filename);
return;
}
output_hierarchy (fp, GTK_TYPE_OBJECT, 0);
fclose (fp);
}
/* This is called recursively to output the hierarchy of a widget. */
static void
output_hierarchy (FILE *fp,
GtkType type,
gint level)
{
GList *list;
guint i;
if (!type)
return;
for (i = 0; i < level; i++)
fprintf (fp, " ");
fprintf (fp, gtk_type_name (type));
fprintf (fp, "\n");
list = gtk_type_children_types (type);
while (list)
{
GtkType child = (GtkType) list->data;
output_hierarchy (fp, child, level + 1);
list = list->next;
}
}
static void
output_args ()
{
FILE *fp;
gint i;
fp = fopen (args_filename, "w");
if (fp == NULL)
{
g_warning ("Couldn't open output file: %s", args_filename);
return;
}
for (i = 0; object_types[i]; i++)
output_widget_args (fp, object_types[i]);
fclose (fp);
}
static void
output_widget_args (FILE *fp, GtkType object_type)
{
GtkObjectClass *class;
gchar *object_class_name;
GtkArg *args;
guint32 *arg_flags;
guint n_args;
gint arg;
gchar flags[16], *pos;
class = gtk_type_class (object_type);
if (!class)
return;
object_class_name = gtk_type_name (object_type);
args = gtk_object_query_args (class->type, &arg_flags, &n_args);
for (arg = 0; arg < n_args; arg++)
{
pos = flags;
/* We use one-character flags for simplicity. */
if (arg_flags[arg] & GTK_ARG_READABLE)
*pos++ = 'r';
if (arg_flags[arg] & GTK_ARG_WRITABLE)
*pos++ = 'w';
if (arg_flags[arg] & GTK_ARG_CONSTRUCT)
*pos++ = 'x';
if (arg_flags[arg] & GTK_ARG_CONSTRUCT_ONLY)
*pos++ = 'X';
if (arg_flags[arg] & GTK_ARG_CHILD_ARG)
*pos++ = 'c';
*pos = '\0';
fprintf (fp, "<ARG>\n<NAME>%s</NAME>\n<TYPE>%s</TYPE>\n<FLAGS>%s</FLAGS>\n",
args[arg].name, gtk_type_name (args[arg].type), flags);
if (GTK_FUNDAMENTAL_TYPE(args[arg].type) == GTK_TYPE_ENUM) {
GtkEnumValue *values;
gint i=0;
values = gtk_type_enum_get_values(args[arg].type);
while (values[i].value_name) {
fprintf (fp, "<ENUM>\n<VALUE>%d</VALUE>\n<NICK>%s</NICK>\n</ENUM>\n",
values[i].value, values[i].value_nick);
i++;
}
}
fprintf(fp, "</ARG>\n\n");
}
g_free (args);
g_free (arg_flags);
}
static void
output_pads ()
{
FILE *fp;
gint i;
fp = fopen (pads_filename, "w");
if (fp == NULL)
{
g_warning ("Couldn't open output file: %s", pads_filename);
return;
}
for (i = 0; elements[i]; i++)
output_widget_pads (fp, elements[i]);
fclose (fp);
}
static void
output_widget_pads (FILE *fp, GstElement *element)
{
GtkObjectClass *class;
GstElementFactory *factory;
GList *pads;
class = GTK_OBJECT(element)->klass;
if (!class || !GST_IS_ELEMENT_CLASS(class))
return;
pads = gst_element_get_pad_list(element);
factory = GST_ELEMENT_CLASS(class)->elementfactory;
if (!factory)
return;
while (pads) {
GstPad *pad = (GstPad *)pads->data;
GstType *type;
type = gst_type_find_by_id(pad->type);
fprintf (fp, "<PAD>\n<NAME>%s::%s</NAME>\n",
gtk_type_name(factory->type), pad->name);
if (type) {
fprintf(fp, "<MIME>%s</MIME>\n", type->mime);
if (type->exts)
fprintf(fp, "<EXTS>%s</EXTS>\n", type->exts);
}
fprintf(fp, "</PAD>\n\n");
pads = g_list_next(pads);
}
}
EOT
close OUTPUT;
# Compile and run our file
$CC = $ENV{CC} ? $ENV{CC} : "gcc";
$LD = $ENV{LD} ? $ENV{LD} : $CC;
$CFLAGS = $ENV{CFLAGS} ? $ENV{CFLAGS} : "";
$LDFLAGS = $ENV{LDFLAGS} ? $ENV{LDFLAGS} : "";
$command = "$CC $CFLAGS -c -o $MODULE-scan.o $MODULE-scan.c && $LD -o $MODULE-scan $MODULE-scan.o $LDFLAGS";
system($command) == 0 or die "Compilation of scanner failed\n";
system("./$MODULE-scan") == 0 or die "Scan failed\n";
unlink "./$MODULE-scan.c", "./$MODULE-scan",

View file

@ -0,0 +1,120 @@
<!doctype book PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
<!entity GstParseAu SYSTEM "sgml/gstparseau.sgml">
<!entity Audioscale SYSTEM "sgml/audioscale.sgml">
<!entity GstAviEncoder SYSTEM "sgml/gstaviencoder.sgml">
<!entity GstParseAvi SYSTEM "sgml/gstparseavi.sgml">
<!entity GstWinDec SYSTEM "sgml/gstwindec.sgml">
<!entity GstWinEnc SYSTEM "sgml/gstwinenc.sgml">
<!entity GstV4lSrc SYSTEM "sgml/gstv4lsrc.sgml">
<!entity GstStereo SYSTEM "sgml/stereo.sgml">
<!entity GstVolume SYSTEM "sgml/volume.sgml">
<!entity GstMedian SYSTEM "sgml/median.sgml">
<!entity GstSmooth SYSTEM "sgml/smooth.sgml">
<!entity GstJpegDec SYSTEM "sgml/gstjpegdec.sgml">
<!entity GstJpegEnc SYSTEM "sgml/gstjpegenc.sgml">
<!entity GstMpg123 SYSTEM "sgml/gstmpg123.sgml">
<!entity Mp3Parse SYSTEM "sgml/mp3parse.sgml">
<!entity GstMpegplay SYSTEM "sgml/gstmpeg_play.sgml">
<!entity GstMpegAudio SYSTEM "sgml/gstmpegaudio.sgml">
<!entity GstMpeg1Parse SYSTEM "sgml/mpeg1parse.sgml">
<!entity SystemEncode SYSTEM "sgml/system_encode.sgml">
<!entity Mp1VideoParse SYSTEM "sgml/mp1videoparse.sgml">
<!entity Ac3Dec SYSTEM "sgml/ac3dec.sgml">
<!entity Ac3Parse SYSTEM "sgml/ac3parse.sgml">
<!entity GstMpeg2enc SYSTEM "sgml/gstmpeg2enc.sgml">
<!entity Mpeg2Parse SYSTEM "sgml/mpeg2parse.sgml">
<!entity Mpeg2Subt SYSTEM "sgml/mpeg2subt.sgml">
<!entity Mpeg2Play SYSTEM "sgml/gstmpeg2play.sgml">
<!entity Mp2VideoParse SYSTEM "sgml/mp2videoparse.sgml">
<!entity RTJpegDec SYSTEM "sgml/rtjpegdec.sgml">
<!entity RTJpegEnc SYSTEM "sgml/rtjpegenc.sgml">
<!entity VCDSrc SYSTEM "sgml/vcdsrc.sgml">
<!entity Videoscale SYSTEM "sgml/videoscale.sgml">
<!entity VideoSink SYSTEM "sgml/videosink.sgml">
<!entity GstSmoothWave SYSTEM "sgml/smoothwave.sgml">
<!entity GstSpectrum SYSTEM "sgml/gstspectrum.sgml">
<!entity GstSynaesthesia SYSTEM "sgml/synaesthesia.sgml">
<!entity GstVuMeter SYSTEM "sgml/vumeter.sgml">
<!entity VorbisDec SYSTEM "sgml/vorbisdec.sgml">
<!entity VorbisEnc SYSTEM "sgml/vorbisenc.sgml">
<!entity GstParseWav SYSTEM "sgml/gstparsewav.sgml">
<!entity gstreamer-tree-index SYSTEM "sgml/tree_index.sgml">
]>
<book>
<bookinfo>
<title>GStreamer Library Reference Manual (Plugins)</title>
</bookinfo>
<chapter id="plugins">
<title>GStreamer Standard Plugins</title>
<para>
The following code example shows you how to create a GstDiskSrc element.
</para>
&GstParseAu;
&Audioscale;
&GstAviEncoder;
&GstParseAvi;
&GstWinDec;
&GstWinEnc;
&GstParseWav;
&GstV4lSrc;
&GstStereo;
&GstVolume;
&GstMedian;
&GstSmooth;
&GstJpegDec;
&GstJpegEnc;
&GstMpg123;
&Mp3Parse;
&GstMpegplay;
&GstMpegAudio;
&GstMpeg1Parse;
&SystemEncode;
&Mp1VideoParse;
&Ac3Dec;
&Ac3Parse;
&GstMpeg2enc;
&Mpeg2Parse;
&Mpeg2Subt;
&Mpeg2Play;
&Mp2VideoParse;
&RTJpegDec;
&RTJpegEnc;
&VCDSrc;
&Videoscale;
&VideoSink;
&GstSmoothWave;
&GstSpectrum;
&GstSynaesthesia;
&GstVuMeter;
&VorbisDec;
&VorbisEnc;
</chapter>
<chapter id="gst-index">
<title>Index</title>
<sect1>
<title>Object Hierarchy</title>
&gstreamer-tree-index;
</sect1>
</chapter>
</book>

View file

@ -0,0 +1,333 @@
<SECTION>
<FILE>example</FILE>
<TITLE>GstExample</TITLE>
<SUBSECTION Standard>
</SECTION>
<SECTION>
<FILE>gstparseau</FILE>
<TITLE>GstParseAu</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>gstaviencoder</FILE>
<TITLE>GstAviEncoder</TITLE>
<SUBSECTION Standard>
GST_TYPE_AVIENCODER
</SECTION>
<SECTION>
<FILE>gstparseavi</FILE>
<TITLE>GstParseAvi</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAVI
</SECTION>
<SECTION>
<FILE>gstwindec</FILE>
<TITLE>GstWinDec</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>gstwinenc</FILE>
<TITLE>GstWinEnc</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>gstwincodec</FILE>
<TITLE>GstWin</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>gstv4lsrc</FILE>
<TITLE>GstV4lSrc</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>cobin</FILE>
<TITLE>GstCoBin</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>spindentity</FILE>
<TITLE>GstSpindentity</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>dvdsrc</FILE>
<TITLE>DVDSrc</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>stereo</FILE>
<TITLE>GstStereo</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>volume</FILE>
<TITLE>GstVolume</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>gstjpeg</FILE>
<TITLE>GstJpeg</TITLE>
</SECTION>
<SECTION>
<FILE>gstjpegdec</FILE>
<TITLE>GstJpegDec</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>gstjpegenc</FILE>
<TITLE>GstJpegEnc</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>gstmpg123</FILE>
<TITLE>GstMpg123</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>mp3parse</FILE>
<TITLE>Mp3Parse</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>gstxa</FILE>
<TITLE>GstXa</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>gstxing</FILE>
<TITLE>GstXing</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>gstmpeg_play</FILE>
<TITLE>GstMpeg_play</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>mpeg1parse</FILE>
<TITLE>Mpeg1Parse</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>gstmpeg1encoder</FILE>
<TITLE>GstMpeg1encoder</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>system_encode</FILE>
<TITLE>System_Encode</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>gstmpegaudio</FILE>
<TITLE>GstMpegAudio</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>mp1videoparse</FILE>
<TITLE>Mp1VideoParse</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>ac3dec</FILE>
<TITLE>Ac3Dec</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>ac3parse</FILE>
<TITLE>Ac3Parse</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>mpeg2parse</FILE>
<TITLE>Mpeg2Parse</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>gstmpeg2play</FILE>
<TITLE>GstMpeg2play</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>gstmpeg2enc</FILE>
<TITLE>GstMpeg2enc</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>mpeg2subt</FILE>
<TITLE>Mpeg2Subt</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>mp2videoparse</FILE>
<TITLE>Mp2VideoParse</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>rtjpegdec</FILE>
<TITLE>RTJpegDec</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>rtjpegenc</FILE>
<TITLE>RTJpegEnc</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>vcdsrc</FILE>
<TITLE>VCDSrc</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>videosink</FILE>
<TITLE>GstVideoSink</TITLE>
<SUBSECTION Standard>
GST_TYPE_VIDEOSINK
</SECTION>
<SECTION>
<FILE>smoothwave</FILE>
<TITLE>GstSmoothWave</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>gstspectrum</FILE>
<TITLE>GstSpectrum</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>synaesthesia</FILE>
<TITLE>GstSynaesthesia</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>vumeter</FILE>
<TITLE>GstVuMeter</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>gstparsewav</FILE>
<TITLE>GstParseWav</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>smooth</FILE>
<TITLE>GstSmooth</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>median</FILE>
<TITLE>GstMedian</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>videoscale</FILE>
<TITLE>Videoscale</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>audioscale</FILE>
<TITLE>Audioscale</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>vorbisenc</FILE>
<TITLE>VorbisEnc</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>
<SECTION>
<FILE>vorbisdec</FILE>
<TITLE>VorbisDec</TITLE>
<SUBSECTION Standard>
GST_TYPE_PARSEAU
</SECTION>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
Ac3Dec
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,21 @@
<!-- ##### SECTION Title ##### -->
Ac3Parse
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### ARG Ac3Parse:skip ##### -->
<para>
</para>

View file

@ -0,0 +1,21 @@
<!-- ##### SECTION Title ##### -->
Audioscale
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### ARG Audioscale:frequency ##### -->
<para>
</para>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
GstCoBin
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
DVDSrc
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
GstExample
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,26 @@
<!-- ##### SECTION Title ##### -->
GstAviEncoder
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### ARG GstAviEncoder:video ##### -->
<para>
</para>
<!-- ##### ARG GstAviEncoder:audio ##### -->
<para>
</para>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
GstJpeg
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
GstJpegDec
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
GstJpegEnc
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
GstMpeg1encoder
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,21 @@
<!-- ##### SECTION Title ##### -->
GstMpeg2enc
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### ARG GstMpeg2enc:frames_per_second ##### -->
<para>
</para>

View file

@ -0,0 +1,21 @@
<!-- ##### SECTION Title ##### -->
GstMpeg2play
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### ARG GstMpeg2play:frames_per_second ##### -->
<para>
</para>

View file

@ -0,0 +1,24 @@
<!-- ##### SECTION Title ##### -->
GstMpeg_play
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SIGNAL GstMpeg_play::frame-decoded ##### -->
<para>
</para>
@gstmpeg_play: the object which received the signal.
@arg1:

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
GstMpegAudio
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
GstMpg123
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
parseau
<!-- ##### SECTION Short_Description ##### -->
Parse an .au file into raw audio
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
GstParseAvi
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
GstParseWav
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,21 @@
<!-- ##### SECTION Title ##### -->
GstSpectrum
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### ARG GstSpectrum:width ##### -->
<para>
</para>

View file

@ -0,0 +1,86 @@
<!-- ##### SECTION Title ##### -->
GstV4lSrc
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### ARG GstV4lSrc:width ##### -->
<para>
</para>
<!-- ##### ARG GstV4lSrc:height ##### -->
<para>
</para>
<!-- ##### ARG GstV4lSrc:format ##### -->
<para>
</para>
<!-- ##### ARG GstV4lSrc:tune ##### -->
<para>
</para>
<!-- ##### ARG GstV4lSrc:tuned ##### -->
<para>
</para>
<!-- ##### ARG GstV4lSrc:input ##### -->
<para>
</para>
<!-- ##### ARG GstV4lSrc:norm ##### -->
<para>
</para>
<!-- ##### ARG GstV4lSrc:volume ##### -->
<para>
</para>
<!-- ##### ARG GstV4lSrc:mute ##### -->
<para>
</para>
<!-- ##### ARG GstV4lSrc:mode ##### -->
<para>
</para>
<!-- ##### ARG GstV4lSrc:color ##### -->
<para>
</para>
<!-- ##### ARG GstV4lSrc:bright ##### -->
<para>
</para>
<!-- ##### ARG GstV4lSrc:hue ##### -->
<para>
</para>
<!-- ##### ARG GstV4lSrc:contrast ##### -->
<para>
</para>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
GstWin
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,26 @@
<!-- ##### SECTION Title ##### -->
GstWinDec
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### ARG GstWinDec:avi_header ##### -->
<para>
</para>
<!-- ##### ARG GstWinDec:bitdepth ##### -->
<para>
</para>

View file

@ -0,0 +1,49 @@
<!-- ##### SECTION Title ##### -->
GstWinEnc
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SIGNAL GstWinEnc::frame-encoded ##### -->
<para>
</para>
@gstwinenc: the object which received the signal.
@arg1:
<!-- ##### ARG GstWinEnc:avi_header ##### -->
<para>
</para>
<!-- ##### ARG GstWinEnc:bitrate ##### -->
<para>
</para>
<!-- ##### ARG GstWinEnc:quality ##### -->
<para>
</para>
<!-- ##### ARG GstWinEnc:compression ##### -->
<para>
</para>
<!-- ##### ARG GstWinEnc:last_frame_size ##### -->
<para>
</para>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
GstXa
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
GstXing
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,26 @@
<!-- ##### SECTION Title ##### -->
GstMedian
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### ARG GstMedian:active ##### -->
<para>
</para>
<!-- ##### ARG GstMedian:filtersize ##### -->
<para>
</para>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
Mp1VideoParse
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
Mp2VideoParse
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,21 @@
<!-- ##### SECTION Title ##### -->
Mp3Parse
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### ARG Mp3Parse:skip ##### -->
<para>
</para>

View file

@ -0,0 +1,21 @@
<!-- ##### SECTION Title ##### -->
Mpeg1Parse
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### ARG Mpeg1Parse:mux_rate ##### -->
<para>
</para>

View file

@ -0,0 +1,21 @@
<!-- ##### SECTION Title ##### -->
Mpeg2Parse
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### ARG Mpeg2Parse:mux_rate ##### -->
<para>
</para>

View file

@ -0,0 +1,21 @@
<!-- ##### SECTION Title ##### -->
Mpeg2Subt
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### ARG Mpeg2Subt:skip ##### -->
<para>
</para>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
RTJpegDec
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
RTJpegEnc
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,31 @@
<!-- ##### SECTION Title ##### -->
GstSmooth
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### ARG GstSmooth:active ##### -->
<para>
</para>
<!-- ##### ARG GstSmooth:tolerance ##### -->
<para>
</para>
<!-- ##### ARG GstSmooth:filtersize ##### -->
<para>
</para>

View file

@ -0,0 +1,31 @@
<!-- ##### SECTION Title ##### -->
GstSmoothWave
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### ARG GstSmoothWave:width ##### -->
<para>
</para>
<!-- ##### ARG GstSmoothWave:height ##### -->
<para>
</para>
<!-- ##### ARG GstSmoothWave:widget ##### -->
<para>
</para>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
GstSpindentity
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,26 @@
<!-- ##### SECTION Title ##### -->
GstStereo
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### ARG GstStereo:active ##### -->
<para>
</para>
<!-- ##### ARG GstStereo:stereo ##### -->
<para>
</para>

View file

@ -0,0 +1,31 @@
<!-- ##### SECTION Title ##### -->
GstSynaesthesia
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### ARG GstSynaesthesia:width ##### -->
<para>
</para>
<!-- ##### ARG GstSynaesthesia:height ##### -->
<para>
</para>
<!-- ##### ARG GstSynaesthesia:widget ##### -->
<para>
</para>

View file

@ -0,0 +1,26 @@
<!-- ##### SECTION Title ##### -->
System_Encode
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### ARG System_Encode:video ##### -->
<para>
</para>
<!-- ##### ARG System_Encode:audio ##### -->
<para>
</para>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
VCDSrc
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,26 @@
<!-- ##### SECTION Title ##### -->
Videoscale
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### ARG Videoscale:width ##### -->
<para>
</para>
<!-- ##### ARG Videoscale:height ##### -->
<para>
</para>

View file

@ -0,0 +1,55 @@
<!-- ##### SECTION Title ##### -->
GstVideoSink
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SIGNAL GstVideoSink::frame-displayed ##### -->
<para>
</para>
@gstvideosink: the object which received the signal.
<!-- # Unused Parameters # -->
@arg1:
<!-- ##### ARG GstVideoSink:width ##### -->
<para>
</para>
<!-- ##### ARG GstVideoSink:height ##### -->
<para>
</para>
<!-- ##### ARG GstVideoSink:widget ##### -->
<para>
</para>
<!-- ##### ARG GstVideoSink:frames_displayed ##### -->
<para>
</para>
<!-- ##### ARG GstVideoSink:frame_time ##### -->
<para>
</para>
<!-- ##### ARG GstVideoSink:xv_enabled ##### -->
<para>
</para>

View file

@ -0,0 +1,26 @@
<!-- ##### SECTION Title ##### -->
GstVolume
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### ARG GstVolume:active ##### -->
<para>
</para>
<!-- ##### ARG GstVolume:volume ##### -->
<para>
</para>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
VorbisDec
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,16 @@
<!-- ##### SECTION Title ##### -->
VorbisEnc
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>

View file

@ -0,0 +1,46 @@
<!-- ##### SECTION Title ##### -->
GstVuMeter
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### ARG GstVuMeter:volume ##### -->
<para>
</para>
<!-- ##### ARG GstVuMeter:volumeptr ##### -->
<para>
</para>
<!-- ##### ARG GstVuMeter:volume_left ##### -->
<para>
</para>
<!-- ##### ARG GstVuMeter:volumeptr_left ##### -->
<para>
</para>
<!-- ##### ARG GstVuMeter:volume_right ##### -->
<para>
</para>
<!-- ##### ARG GstVuMeter:volumeptr_right ##### -->
<para>
</para>

View file

@ -46,8 +46,8 @@ enum {
ARG_0, ARG_0,
ARG_LOCATION, ARG_LOCATION,
ARG_BYTESPERREAD, ARG_BYTESPERREAD,
ARG_LENGTH,
ARG_OFFSET, ARG_OFFSET,
ARG_SIZE,
}; };
@ -101,10 +101,10 @@ gst_asyncdisksrc_class_init(GstAsyncDiskSrcClass *klass) {
GTK_ARG_READWRITE, ARG_LOCATION); GTK_ARG_READWRITE, ARG_LOCATION);
gtk_object_add_arg_type("GstAsyncDiskSrc::bytesperread", GTK_TYPE_INT, gtk_object_add_arg_type("GstAsyncDiskSrc::bytesperread", GTK_TYPE_INT,
GTK_ARG_READWRITE, ARG_BYTESPERREAD); GTK_ARG_READWRITE, ARG_BYTESPERREAD);
gtk_object_add_arg_type("GstAsyncDiskSrc::length", GTK_TYPE_LONG,
GTK_ARG_READABLE, ARG_LENGTH);
gtk_object_add_arg_type("GstAsyncDiskSrc::offset", GTK_TYPE_LONG, gtk_object_add_arg_type("GstAsyncDiskSrc::offset", GTK_TYPE_LONG,
GTK_ARG_READWRITE, ARG_OFFSET); GTK_ARG_READWRITE, ARG_OFFSET);
gtk_object_add_arg_type("GstAsyncDiskSrc::size", GTK_TYPE_LONG,
GTK_ARG_READABLE, ARG_SIZE);
gtkobject_class->set_arg = gst_asyncdisksrc_set_arg; gtkobject_class->set_arg = gst_asyncdisksrc_set_arg;
gtkobject_class->get_arg = gst_asyncdisksrc_get_arg; gtkobject_class->get_arg = gst_asyncdisksrc_get_arg;
@ -178,12 +178,12 @@ static void gst_asyncdisksrc_get_arg(GtkObject *object,GtkArg *arg,guint id) {
case ARG_BYTESPERREAD: case ARG_BYTESPERREAD:
GTK_VALUE_INT(*arg) = src->bytes_per_read; GTK_VALUE_INT(*arg) = src->bytes_per_read;
break; break;
case ARG_LENGTH:
GTK_VALUE_LONG(*arg) = src->size;
break;
case ARG_OFFSET: case ARG_OFFSET:
GTK_VALUE_LONG(*arg) = src->curoffset; GTK_VALUE_LONG(*arg) = src->curoffset;
break; break;
case ARG_SIZE:
GTK_VALUE_LONG(*arg) = src->size;
break;
default: default:
arg->type = GTK_TYPE_INVALID; arg->type = GTK_TYPE_INVALID;
break; break;

View file

@ -155,8 +155,7 @@ gst_audiosink_class_init(GstAudioSinkClass *klass) {
gst_audiosink_signals[SIGNAL_HANDOFF] = gst_audiosink_signals[SIGNAL_HANDOFF] =
gtk_signal_new("handoff",GTK_RUN_LAST,gtkobject_class->type, gtk_signal_new("handoff",GTK_RUN_LAST,gtkobject_class->type,
GTK_SIGNAL_OFFSET(GstAudioSinkClass,handoff), GTK_SIGNAL_OFFSET(GstAudioSinkClass,handoff),
gtk_marshal_NONE__POINTER,GTK_TYPE_NONE,1, gtk_marshal_NONE__NONE,GTK_TYPE_NONE,0);
GST_TYPE_AUDIOSINK);
gtk_object_class_add_signals(gtkobject_class,gst_audiosink_signals, gtk_object_class_add_signals(gtkobject_class,gst_audiosink_signals,
LAST_SIGNAL); LAST_SIGNAL);

View file

@ -42,6 +42,15 @@ GstBufferPool *gst_buffer_pool_new()
return pool; return pool;
} }
/**
* gst_buffer_pool_set_create_function:
* @pool: the pool to set the create function for
* @create: the create function
* @user_data: any user data to be passed in the create function
*
* Sets the function that will be called when a buffer is created
* from this pool.
*/
void gst_buffer_pool_set_create_function(GstBufferPool *pool, GstBufferPoolCreateFunction create, gpointer user_data) void gst_buffer_pool_set_create_function(GstBufferPool *pool, GstBufferPoolCreateFunction create, gpointer user_data)
{ {
g_return_if_fail(pool != NULL); g_return_if_fail(pool != NULL);
@ -50,6 +59,15 @@ void gst_buffer_pool_set_create_function(GstBufferPool *pool, GstBufferPoolCreat
pool->new_user_data = user_data; pool->new_user_data = user_data;
} }
/**
* gst_buffer_pool_set_destroy_function:
* @pool: the pool to set the destroy function for
* @destroy: the destroy function
* @user_data: any user data to be passed in the create function
*
* Sets the function that will be called when a buffer is destroyed
* from this pool.
*/
void gst_buffer_pool_set_destroy_function(GstBufferPool *pool, GstBufferPoolDestroyFunction destroy, gpointer user_data) void gst_buffer_pool_set_destroy_function(GstBufferPool *pool, GstBufferPoolDestroyFunction destroy, gpointer user_data)
{ {
g_return_if_fail(pool != NULL); g_return_if_fail(pool != NULL);
@ -58,6 +76,12 @@ void gst_buffer_pool_set_destroy_function(GstBufferPool *pool, GstBufferPoolDest
pool->destroy_user_data = user_data; pool->destroy_user_data = user_data;
} }
/**
* gst_buffer_pool_destroy:
* @pool: the pool to destroy
*
* frees the memory for this bufferpool
*/
void gst_buffer_pool_destroy(GstBufferPool *pool) void gst_buffer_pool_destroy(GstBufferPool *pool)
{ {
g_return_if_fail(pool != NULL); g_return_if_fail(pool != NULL);
@ -65,6 +89,14 @@ void gst_buffer_pool_destroy(GstBufferPool *pool)
g_free(pool); g_free(pool);
} }
/**
* gst_buffer_pool_new_buffer:
* @pool: the pool to create the buffer from
*
* uses the given pool to create a new buffer.
*
* Returns: The new buffer
*/
GstBuffer *gst_buffer_pool_new_buffer(GstBufferPool *pool) GstBuffer *gst_buffer_pool_new_buffer(GstBufferPool *pool)
{ {
GstBuffer *buffer; GstBuffer *buffer;
@ -77,6 +109,13 @@ GstBuffer *gst_buffer_pool_new_buffer(GstBufferPool *pool)
return buffer; return buffer;
} }
/**
* gst_buffer_pool_destroy_buffer:
* @pool: the pool to return the buffer to
* @buffer: the buffer to return to the pool
*
* Gives a buffer back to the given pool.
*/
void gst_buffer_pool_destroy_buffer(GstBufferPool *pool, GstBuffer *buffer) void gst_buffer_pool_destroy_buffer(GstBufferPool *pool, GstBuffer *buffer)
{ {
g_return_if_fail(pool != NULL); g_return_if_fail(pool != NULL);

View file

@ -85,6 +85,12 @@ GstElement *gst_connection_new(gchar *name) {
return connection; return connection;
} }
/**
* gst_connection_push:
* @connection: the connection to push
*
* Push a buffer along a connection
*/
void gst_connection_push(GstConnection *connection) { void gst_connection_push(GstConnection *connection) {
GstConnectionClass *oclass; GstConnectionClass *oclass;

View file

@ -55,7 +55,7 @@ void _gst_cpu_initialize(void)
} }
guint32 gst_cpu_get_flags(void) GstCPUFlags gst_cpu_get_flags(void)
{ {
return _gst_cpu_flags; return _gst_cpu_flags;
} }

View file

@ -23,11 +23,13 @@
#include <glib.h> #include <glib.h>
#define GST_CPU_FLAG_MMX (1 << 0) typedef enum {
#define GST_CPU_FLAG_SSE (1 << 1) GST_CPU_FLAG_MMX = (1<<0),
GST_CPU_FLAG_SSE = (1<<1),
} GstCPUFlags;
void _gst_cpu_initialize(); void _gst_cpu_initialize();
guint32 gst_cpu_get_flags(); GstCPUFlags gst_cpu_get_flags();
#endif /* __GST_CPU_H__ */ #endif /* __GST_CPU_H__ */

View file

@ -523,6 +523,8 @@ xmlNodePtr gst_element_save_thyself(GstElement *element,xmlNodePtr parent) {
/** /**
* gst_element_load_thyself: * gst_element_load_thyself:
* @parent: the xml parent node * @parent: the xml parent node
* @elements: a hashtable to store the elements in. This is used
* to resolve inter element dependecies during the loading.
* *
* load the element based on the XML description * load the element based on the XML description
* *

View file

@ -72,7 +72,7 @@ static inline char *_gst_print_statename(int state) {
(GTK_CHECK_CLASS_CAST((klass),GST_TYPE_ELEMENT,GstElementClass)) (GTK_CHECK_CLASS_CAST((klass),GST_TYPE_ELEMENT,GstElementClass))
#define GST_IS_ELEMENT(obj) \ #define GST_IS_ELEMENT(obj) \
(GTK_CHECK_TYPE((obj),GST_TYPE_ELEMENT)) (GTK_CHECK_TYPE((obj),GST_TYPE_ELEMENT))
#define GST_IS_ELEMENT_CLASS(obj) \ #define GST_IS_ELEMENT_CLASS(klass) \
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ELEMENT)) (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ELEMENT))
typedef enum { typedef enum {

View file

@ -77,7 +77,7 @@ GstElementFactory *gst_elementfactory_find(gchar *name) {
* *
* Get the global list of elementfactories. * Get the global list of elementfactories.
* *
* Returns: <type>GList</type> of type #GstElementFactory * Returns: GList of type #GstElementFactory
*/ */
GList *gst_elementfactory_get_list() { GList *gst_elementfactory_get_list() {
return _gst_elementfactories; return _gst_elementfactories;

View file

@ -22,6 +22,14 @@
#include <gst/gsttrace.h> #include <gst/gsttrace.h>
/**
* gst_meta_new_size:
* @size: the size of the new meta data
*
* Create a new metadata object with a given size
*
* Returns: new meta object
*/
GstMeta *gst_meta_new_size(gint size) { GstMeta *gst_meta_new_size(gint size) {
GstMeta *meta; GstMeta *meta;
@ -31,6 +39,12 @@ GstMeta *gst_meta_new_size(gint size) {
return meta; return meta;
} }
/**
* gst_meta_ref:
* @meta: the meta object to ref
*
* increases the refcount of a meta object
*/
void gst_meta_ref(GstMeta *meta) { void gst_meta_ref(GstMeta *meta) {
g_return_if_fail(meta != NULL); g_return_if_fail(meta != NULL);
@ -38,6 +52,13 @@ void gst_meta_ref(GstMeta *meta) {
meta->refcount++; meta->refcount++;
} }
/**
* gst_meta_unref:
* @meta: the meta object to unref
*
* decreases the refcount of a meta object. if the refcount is zero, the
* meta object is freed.
*/
void gst_meta_unref(GstMeta *meta) { void gst_meta_unref(GstMeta *meta) {
g_return_if_fail(meta != NULL); g_return_if_fail(meta != NULL);
@ -52,6 +73,15 @@ void gst_meta_unref(GstMeta *meta) {
} }
/**
* gst_meta_cow:
* @meta: the meta object prepare for write
*
* prepares a meta object for writing. A copy of the meta
* object is returned if needed.
*
* Returns: the meta object or a copy.
*/
GstMeta *gst_meta_cow(GstMeta *meta) { GstMeta *gst_meta_cow(GstMeta *meta) {
g_return_val_if_fail(meta != NULL, NULL); g_return_val_if_fail(meta != NULL, NULL);
return NULL; return NULL;

View file

@ -33,8 +33,8 @@ extern "C" {
#define GST_META(meta) ((GstMeta *)(meta)) #define GST_META(meta) ((GstMeta *)(meta))
#define GST_META_FLAGS(buf) \ #define GST_META_FLAGS(meta) \
(GST_META(buf)->flags) (GST_META(meta)->flags)
#define GST_META_FLAG_IS_SET(meta,flag) \ #define GST_META_FLAG_IS_SET(meta,flag) \
(GST_META_FLAGS(meta) & (flag)) (GST_META_FLAGS(meta) & (flag))
#define GST_META_FLAG_SET(meta,flag) \ #define GST_META_FLAG_SET(meta,flag) \

View file

@ -156,6 +156,13 @@ gchar *gst_pad_get_name(GstPad *pad) {
return pad->name; return pad->name;
} }
/**
* gst_pad_set_pull_function:
* @pad: the pad to set the pull function for
* @pull: the pull function
*
* Set the given pull function for the pad
*/
void gst_pad_set_pull_function(GstPad *pad,GstPadPullFunction pull) { void gst_pad_set_pull_function(GstPad *pad,GstPadPullFunction pull) {
g_return_if_fail(pad != NULL); g_return_if_fail(pad != NULL);
g_return_if_fail(GST_IS_PAD(pad)); g_return_if_fail(GST_IS_PAD(pad));
@ -165,6 +172,13 @@ void gst_pad_set_pull_function(GstPad *pad,GstPadPullFunction pull) {
pad->pullfunc = pull; pad->pullfunc = pull;
} }
/**
* gst_pad_set_chain_function:
* @pad: the pad to set the chain function for
* @chain: the chain function
*
* Set the given chain function for the pad
*/
void gst_pad_set_chain_function(GstPad *pad,GstPadChainFunction chain) { void gst_pad_set_chain_function(GstPad *pad,GstPadChainFunction chain) {
g_return_if_fail(pad != NULL); g_return_if_fail(pad != NULL);
g_return_if_fail(GST_IS_PAD(pad)); g_return_if_fail(GST_IS_PAD(pad));
@ -172,6 +186,13 @@ void gst_pad_set_chain_function(GstPad *pad,GstPadChainFunction chain) {
pad->chainfunc = chain; pad->chainfunc = chain;
} }
/**
* gst_pad_set_qos_function:
* @pad: the pad to set the qos function for
* @qos: the qos function
*
* Set the given qos function for the pad
*/
void gst_pad_set_qos_function(GstPad *pad,GstPadQoSFunction qos) { void gst_pad_set_qos_function(GstPad *pad,GstPadQoSFunction qos) {
g_return_if_fail(pad != NULL); g_return_if_fail(pad != NULL);
g_return_if_fail(GST_IS_PAD(pad)); g_return_if_fail(GST_IS_PAD(pad));
@ -179,7 +200,13 @@ void gst_pad_set_qos_function(GstPad *pad,GstPadQoSFunction qos) {
pad->qosfunc = qos; pad->qosfunc = qos;
} }
/* gst_pad_push is handed the src pad and the buffer to push */ /**
* gst_pad_push:
* @pad: the pad to push
* @buffer: the buffer to push
*
* pushes a buffer along a src pad
*/
void gst_pad_push(GstPad *pad,GstBuffer *buffer) { void gst_pad_push(GstPad *pad,GstBuffer *buffer) {
g_return_if_fail(pad != NULL); g_return_if_fail(pad != NULL);
g_return_if_fail(GST_IS_PAD(pad)); g_return_if_fail(GST_IS_PAD(pad));
@ -206,7 +233,14 @@ void gst_pad_push(GstPad *pad,GstBuffer *buffer) {
} }
/* gst_pad_pull() is given the sink pad */ /**
* gst_pad_pull:
* @pad: the pad to pull
*
* pulls a buffer along a sink pad
*
* Returns: the buffer that was pulled
*/
GstBuffer *gst_pad_pull(GstPad *pad) { GstBuffer *gst_pad_pull(GstPad *pad) {
GstBuffer *buf; GstBuffer *buf;
// GstElement *peerparent; // GstElement *peerparent;
@ -246,6 +280,12 @@ GstBuffer *gst_pad_pull(GstPad *pad) {
return NULL; return NULL;
} }
/**
* gst_pad_chain:
* @pad: the pad to chain
*
* call the chain function of the given pad
*/
void gst_pad_chain(GstPad *pad) { void gst_pad_chain(GstPad *pad) {
g_return_if_fail(pad != NULL); g_return_if_fail(pad != NULL);
g_return_if_fail(GST_IS_PAD(pad)); g_return_if_fail(GST_IS_PAD(pad));
@ -262,6 +302,7 @@ void gst_pad_chain(GstPad *pad) {
* @pad: the pad to handle the QoS message * @pad: the pad to handle the QoS message
* @qos_message: the QoS message to handle * @qos_message: the QoS message to handle
* *
* pass the qos message downstream
*/ */
void gst_pad_handle_qos(GstPad *pad, void gst_pad_handle_qos(GstPad *pad,
glong qos_message) glong qos_message)
@ -292,6 +333,13 @@ void gst_pad_handle_qos(GstPad *pad,
return; return;
} }
/**
* gst_pad_disconnect:
* @srcpad: the source pad to disconnect
* @sinkpad: the sink pad to disconnect
*
* disconnects the source pad from the sink pad
*/
void gst_pad_disconnect(GstPad *srcpad,GstPad *sinkpad) { void gst_pad_disconnect(GstPad *srcpad,GstPad *sinkpad) {
/* generic checks */ /* generic checks */
@ -313,6 +361,13 @@ void gst_pad_disconnect(GstPad *srcpad,GstPad *sinkpad) {
srcpad->pullfunc = NULL; srcpad->pullfunc = NULL;
} }
/**
* gst_pad_connect:
* @srcpad: the source pad to connect
* @sinkpad: the sink pad to connect
*
* connects the source pad to the sink pad
*/
void gst_pad_connect(GstPad *srcpad,GstPad *sinkpad) { void gst_pad_connect(GstPad *srcpad,GstPad *sinkpad) {
GstPad *temppad; GstPad *temppad;
@ -348,6 +403,13 @@ void gst_pad_connect(GstPad *srcpad,GstPad *sinkpad) {
/* FIXME: set connected flag */ /* FIXME: set connected flag */
} }
/**
* gst_pad_set_parent:
* @pad: the pad to set the parent
* @parent: the object to set the parent to
*
* sets the parent object of a pad.
*/
void gst_pad_set_parent(GstPad *pad,GstObject *parent) { void gst_pad_set_parent(GstPad *pad,GstObject *parent) {
g_return_if_fail(pad != NULL); g_return_if_fail(pad != NULL);
g_return_if_fail(GST_IS_PAD(pad)); g_return_if_fail(GST_IS_PAD(pad));
@ -361,6 +423,13 @@ void gst_pad_set_parent(GstPad *pad,GstObject *parent) {
pad->parent = parent; pad->parent = parent;
} }
/**
* gst_pad_add_ghost_parent:
* @pad: the pad to set the ghost parent
* @parent: the object to set the ghost parent to
*
* add a ghost parent object to a pad.
*/
void gst_pad_add_ghost_parent(GstPad *pad,GstObject *parent) { void gst_pad_add_ghost_parent(GstPad *pad,GstObject *parent) {
g_return_if_fail(pad != NULL); g_return_if_fail(pad != NULL);
g_return_if_fail(GST_IS_PAD(pad)); g_return_if_fail(GST_IS_PAD(pad));
@ -371,6 +440,13 @@ void gst_pad_add_ghost_parent(GstPad *pad,GstObject *parent) {
} }
/**
* gst_pad_remove_ghost_parent:
* @pad: the pad to remove the ghost parent
* @parent: the object to remove the ghost parent from
*
* remove a ghost parent object from a pad.
*/
void gst_pad_remove_ghost_parent(GstPad *pad,GstObject *parent) { void gst_pad_remove_ghost_parent(GstPad *pad,GstObject *parent) {
g_return_if_fail(pad != NULL); g_return_if_fail(pad != NULL);
g_return_if_fail(GST_IS_PAD(pad)); g_return_if_fail(GST_IS_PAD(pad));
@ -380,6 +456,14 @@ void gst_pad_remove_ghost_parent(GstPad *pad,GstObject *parent) {
pad->ghostparents = g_list_remove(pad->ghostparents,parent); pad->ghostparents = g_list_remove(pad->ghostparents,parent);
} }
/**
* gst_pad_get_parent:
* @pad: the pad to get the parent from
*
* get the parent object of this pad
*
* Returns: the parent object
*/
GstObject *gst_pad_get_parent(GstPad *pad) { GstObject *gst_pad_get_parent(GstPad *pad) {
g_return_val_if_fail(pad != NULL, NULL); g_return_val_if_fail(pad != NULL, NULL);
g_return_val_if_fail(GST_IS_PAD(pad), NULL); g_return_val_if_fail(GST_IS_PAD(pad), NULL);
@ -387,6 +471,14 @@ GstObject *gst_pad_get_parent(GstPad *pad) {
return pad->parent; return pad->parent;
} }
/**
* gst_pad_get_ghost_parents:
* @pad: the pad to get the ghost parents from
*
* get the ghost parents of this pad
*
* Returns: a list of ghost parent objects
*/
GList *gst_pad_get_ghost_parents(GstPad *pad) { GList *gst_pad_get_ghost_parents(GstPad *pad) {
g_return_val_if_fail(pad != NULL, NULL); g_return_val_if_fail(pad != NULL, NULL);
g_return_val_if_fail(GST_IS_PAD(pad), NULL); g_return_val_if_fail(GST_IS_PAD(pad), NULL);
@ -394,6 +486,14 @@ GList *gst_pad_get_ghost_parents(GstPad *pad) {
return pad->ghostparents; return pad->ghostparents;
} }
/**
* gst_pad_get_type_id:
* @pad: the pad to get the type id from
*
* get the type of this pad
*
* Returns: the type of this pad
*/
guint16 gst_pad_get_type_id(GstPad *pad) { guint16 gst_pad_get_type_id(GstPad *pad) {
g_return_val_if_fail(pad != NULL, 0); g_return_val_if_fail(pad != NULL, 0);
g_return_val_if_fail(GST_IS_PAD(pad), 0); g_return_val_if_fail(GST_IS_PAD(pad), 0);
@ -401,6 +501,13 @@ guint16 gst_pad_get_type_id(GstPad *pad) {
return pad->type; return pad->type;
} }
/**
* gst_pad_set_type_id:
* @pad: the pad to set the type id to
* @id: the type id to set this pad to
*
* set the type of this pad
*/
void gst_pad_set_type_id(GstPad *pad,guint16 id) { void gst_pad_set_type_id(GstPad *pad,guint16 id) {
g_return_if_fail(pad != NULL); g_return_if_fail(pad != NULL);
g_return_if_fail(GST_IS_PAD(pad)); g_return_if_fail(GST_IS_PAD(pad));
@ -409,6 +516,14 @@ void gst_pad_set_type_id(GstPad *pad,guint16 id) {
pad->type = id; pad->type = id;
} }
/**
* gst_pad_get_peer:
* @pad: the pad to get the peer from
*
* Get the peer pad of this pad
*
* Returns: the peer pad
*/
GstPad *gst_pad_get_peer(GstPad *pad) { GstPad *gst_pad_get_peer(GstPad *pad) {
g_return_val_if_fail(pad != NULL, NULL); g_return_val_if_fail(pad != NULL, NULL);
g_return_val_if_fail(GST_IS_PAD(pad), NULL); g_return_val_if_fail(GST_IS_PAD(pad), NULL);
@ -428,15 +543,13 @@ static void gst_pad_real_destroy(GtkObject *object) {
/** /**
* gst_pad_handle_qos: * gst_pad_load_and_connect:
* @parent: the parent XML node to read the description from * @parent: the parent XML node to read the description from
* @element: the element that has the source pad * @element: the element that has the source pad
* @elements: a hashtable with elements * @elements: a hashtable with elements
* *
* Read the pad definition from the XML node and connect the given pad * Read the pad definition from the XML node and connect the given pad
* in element to a pad of an element in the hashtable. * in element to a pad of an element in the hashtable.
*
* Returns: the new Pad definition.
*/ */
void gst_pad_load_and_connect(xmlNodePtr parent, GstObject *element, GHashTable *elements) { void gst_pad_load_and_connect(xmlNodePtr parent, GstObject *element, GHashTable *elements) {
xmlNodePtr field = parent->childs; xmlNodePtr field = parent->childs;
@ -477,6 +590,15 @@ cleanup:
} }
/**
* gst_pad_save_thyself:
* @pad: the pad to save
* @parent: the parent XML node to save the description in
*
* Saves the pad into an xml representation
*
* Returns: the xml representation of the pad
*/
xmlNodePtr gst_pad_save_thyself(GstPad *pad,xmlNodePtr parent) { xmlNodePtr gst_pad_save_thyself(GstPad *pad,xmlNodePtr parent) {
GstPad *peer; GstPad *peer;
@ -494,6 +616,16 @@ xmlNodePtr gst_pad_save_thyself(GstPad *pad,xmlNodePtr parent) {
return parent; return parent;
} }
/**
* gst_pad_ghost_save_thyself:
* @pad: the pad to save
* @bin: the bin
* @parent: the parent XML node to save the description in
*
* Saves the ghost pad into an xml representation
*
* Returns: the xml representation of the pad
*/
xmlNodePtr gst_pad_ghost_save_thyself(GstPad *pad,GstElement *bin,xmlNodePtr parent) { xmlNodePtr gst_pad_ghost_save_thyself(GstPad *pad,GstElement *bin,xmlNodePtr parent) {
xmlNodePtr self; xmlNodePtr self;

View file

@ -348,6 +348,14 @@ GstElementFactory *gst_plugin_find_elementfactory(gchar *name) {
return NULL; return NULL;
} }
/**
* gst_plugin_load_elementfactory:
* @name: name of elementfactory to load
*
* Load a registered elementfactory by name.
*
* Returns: @GstElementFactory if loaded, NULL if not
*/
GstElementFactory *gst_plugin_load_elementfactory(gchar *name) { GstElementFactory *gst_plugin_load_elementfactory(gchar *name) {
GList *plugins, *factories; GList *plugins, *factories;
GstElementFactory *factory = NULL; GstElementFactory *factory = NULL;
@ -380,6 +388,12 @@ GstElementFactory *gst_plugin_load_elementfactory(gchar *name) {
return factory; return factory;
} }
/**
* gst_plugin_load_typefactory:
* @mime: name of typefactory to load
*
* Load a registered typefactory by mime type.
*/
void gst_plugin_load_typefactory(gchar *mime) { void gst_plugin_load_typefactory(gchar *mime) {
GList *plugins, *factories; GList *plugins, *factories;
GstTypeFactory *factory; GstTypeFactory *factory;
@ -416,7 +430,7 @@ void gst_plugin_load_typefactory(gchar *mime) {
* @plugin: plugin to add factory to * @plugin: plugin to add factory to
* @factory: factory to add * @factory: factory to add
* *
* Add factory to the list of those provided by the element. * Add factory to the list of those provided by the plugin.
*/ */
void gst_plugin_add_factory(GstPlugin *plugin,GstElementFactory *factory) { void gst_plugin_add_factory(GstPlugin *plugin,GstElementFactory *factory) {
g_return_if_fail(plugin != NULL); g_return_if_fail(plugin != NULL);
@ -426,6 +440,13 @@ void gst_plugin_add_factory(GstPlugin *plugin,GstElementFactory *factory) {
plugin->elements = g_list_append(plugin->elements,factory); plugin->elements = g_list_append(plugin->elements,factory);
} }
/**
* gst_plugin_add_type:
* @plugin: plugin to add type to
* @factory: the typefactory to add
*
* Add a typefactory to the list of those provided by the plugin.
*/
void gst_plugin_add_type(GstPlugin *plugin,GstTypeFactory *factory) { void gst_plugin_add_type(GstPlugin *plugin,GstTypeFactory *factory) {
g_return_if_fail(plugin != NULL); g_return_if_fail(plugin != NULL);
g_return_if_fail(factory != NULL); g_return_if_fail(factory != NULL);
@ -445,6 +466,14 @@ GList *gst_plugin_get_list() {
return _gst_plugins; return _gst_plugins;
} }
/**
* gst_plugin_save_thyself:
* @parent: the parent node to save the plugin to
*
* saves the plugin into an XML representation
*
* Returns: the new XML node
*/
xmlNodePtr gst_plugin_save_thyself(xmlNodePtr parent) { xmlNodePtr gst_plugin_save_thyself(xmlNodePtr parent) {
xmlNodePtr tree, subtree; xmlNodePtr tree, subtree;
GList *plugins = NULL, *elements = NULL, *types = NULL; GList *plugins = NULL, *elements = NULL, *types = NULL;
@ -479,6 +508,12 @@ xmlNodePtr gst_plugin_save_thyself(xmlNodePtr parent) {
return parent; return parent;
} }
/**
* gst_plugin_load_thyself:
* @parent: the parent node to load the plugin from
*
* load the plugin from an XML representation
*/
void gst_plugin_load_thyself(xmlNodePtr parent) { void gst_plugin_load_thyself(xmlNodePtr parent) {
xmlNodePtr kinderen; xmlNodePtr kinderen;
gint elementcount = 0; gint elementcount = 0;

View file

@ -57,6 +57,7 @@ static void gst_thread_restore_thyself(GstElement *element,xmlNodePtr parent, GH
static void gst_thread_signal_thread(GstThread *thread); static void gst_thread_signal_thread(GstThread *thread);
static void gst_thread_create_plan_dummy(GstBin *bin); static void gst_thread_create_plan_dummy(GstBin *bin);
static void *gst_thread_main_loop(void *arg);
static GstBin *parent_class = NULL; static GstBin *parent_class = NULL;
//static guint gst_thread_signals[LAST_SIGNAL] = { 0 }; //static guint gst_thread_signals[LAST_SIGNAL] = { 0 };
@ -253,7 +254,7 @@ static GstElementStateReturn gst_thread_change_state(GstElement *element) {
* The main loop of the thread. The thread will iterate * The main loop of the thread. The thread will iterate
* while the state is GST_THREAD_STATE_SPINNING * while the state is GST_THREAD_STATE_SPINNING
*/ */
void *gst_thread_main_loop(void *arg) { static void *gst_thread_main_loop(void *arg) {
GstThread *thread = GST_THREAD(arg); GstThread *thread = GST_THREAD(arg);
gst_info("gstthread: thread \"%s\" is running with PID %d\n", gst_info("gstthread: thread \"%s\" is running with PID %d\n",

View file

@ -69,9 +69,6 @@ struct _GstThreadClass {
GtkType gst_thread_get_type(void); GtkType gst_thread_get_type(void);
GstElement *gst_thread_new(guchar *name); GstElement *gst_thread_new(guchar *name);
void *gst_thread_main_loop(void *arg);
void gst_thread_iterate(GstThread *thread);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */

View file

@ -20,6 +20,15 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
/**
* gst_util_get_int_arg:
* @object: the object to query
* @argname: the name of the argument
*
* retrieves a property of an object as an integer
*
* Returns: the property of the object
*/
gint gst_util_get_int_arg(GtkObject *object,guchar *argname) { gint gst_util_get_int_arg(GtkObject *object,guchar *argname) {
GtkArg arg; GtkArg arg;
@ -28,6 +37,15 @@ gint gst_util_get_int_arg(GtkObject *object,guchar *argname) {
return GTK_VALUE_INT(arg); return GTK_VALUE_INT(arg);
} }
/**
* gst_util_get_long_arg:
* @object: the object to query
* @argname: the name of the argument
*
* retrieves a property of an object as a long
*
* Returns: the property of the object
*/
glong gst_util_get_long_arg(GtkObject *object,guchar *argname) { glong gst_util_get_long_arg(GtkObject *object,guchar *argname) {
GtkArg arg; GtkArg arg;
@ -36,6 +54,15 @@ glong gst_util_get_long_arg(GtkObject *object,guchar *argname) {
return GTK_VALUE_LONG(arg); return GTK_VALUE_LONG(arg);
} }
/**
* gst_util_get_float_arg:
* @object: the object to query
* @argname: the name of the argument
*
* retrieves a property of an object as a float
*
* Returns: the property of the object
*/
gfloat gst_util_get_float_arg(GtkObject *object,guchar *argname) { gfloat gst_util_get_float_arg(GtkObject *object,guchar *argname) {
GtkArg arg; GtkArg arg;
@ -44,6 +71,15 @@ gfloat gst_util_get_float_arg(GtkObject *object,guchar *argname) {
return GTK_VALUE_FLOAT(arg); return GTK_VALUE_FLOAT(arg);
} }
/**
* gst_util_get_double_arg:
* @object: the object to query
* @argname: the name of the argument
*
* retrieves a property of an object as a double
*
* Returns: the property of the object
*/
gdouble gst_util_get_double_arg(GtkObject *object,guchar *argname) { gdouble gst_util_get_double_arg(GtkObject *object,guchar *argname) {
GtkArg arg; GtkArg arg;
@ -52,6 +88,15 @@ gdouble gst_util_get_double_arg(GtkObject *object,guchar *argname) {
return GTK_VALUE_DOUBLE(arg); return GTK_VALUE_DOUBLE(arg);
} }
/**
* gst_util_get_string_arg:
* @object: the object to query
* @argname: the name of the argument
*
* retrieves a property of an object as a string
*
* Returns: the property of the object
*/
guchar *gst_util_get_string_arg(GtkObject *object,guchar *argname) { guchar *gst_util_get_string_arg(GtkObject *object,guchar *argname) {
GtkArg arg; GtkArg arg;
@ -60,6 +105,15 @@ guchar *gst_util_get_string_arg(GtkObject *object,guchar *argname) {
return GTK_VALUE_STRING(arg); return GTK_VALUE_STRING(arg);
} }
/**
* gst_util_get_pointer_arg:
* @object: the object to query
* @argname: the name of the argument
*
* retrieves a property of an object as a pointer
*
* Returns: the property of the object
*/
gpointer gst_util_get_pointer_arg(GtkObject *object,guchar *argname) { gpointer gst_util_get_pointer_arg(GtkObject *object,guchar *argname) {
GtkArg arg; GtkArg arg;
@ -68,6 +122,15 @@ gpointer gst_util_get_pointer_arg(GtkObject *object,guchar *argname) {
return GTK_VALUE_POINTER(arg); return GTK_VALUE_POINTER(arg);
} }
/**
* gst_util_get_widget_arg:
* @object: the object to query
* @argname: the name of the argument
*
* retrieves a property of an object as a widget
*
* Returns: the property of the object
*/
GtkWidget *gst_util_get_widget_arg(GtkObject *object,guchar *argname) { GtkWidget *gst_util_get_widget_arg(GtkObject *object,guchar *argname) {
GtkArg arg; GtkArg arg;
@ -76,6 +139,14 @@ GtkWidget *gst_util_get_widget_arg(GtkObject *object,guchar *argname) {
return GTK_WIDGET(GTK_VALUE_OBJECT(arg)); return GTK_WIDGET(GTK_VALUE_OBJECT(arg));
} }
/**
* gst_util_dump_mem:
* @mem: a pointer to the memory to dump
* @size: the size of the memory block to dump
*
* dumps the memory block into a hex representation. usefull
* for debugging.
*/
void gst_util_dump_mem(guchar *mem, guint size) { void gst_util_dump_mem(guchar *mem, guint size) {
guint i, j; guint i, j;

View file

@ -124,7 +124,7 @@ GstXML *gst_xml_new(const guchar *fname, const guchar *root) {
* @xml: The GstXML to get the element from * @xml: The GstXML to get the element from
* @name: The name of element to retreive * @name: The name of element to retreive
* *
* This function is used to get a pointer to the GStElement corresponding * This function is used to get a pointer to the GstElement corresponding
* to name in the pipeline description. You would use this if you have * to name in the pipeline description. You would use this if you have
* to do anything to the element after loading. * to do anything to the element after loading.
* *

View file

@ -28,26 +28,28 @@
#include "yuv2rgb.h" #include "yuv2rgb.h"
typedef enum { typedef enum {
#define GST_COLORSPACE_RGB_FIRST GST_COLORSPACE_RGB555
GST_COLORSPACE_RGB555, GST_COLORSPACE_RGB555,
GST_COLORSPACE_BGR555, GST_COLORSPACE_BGR555,
GST_COLORSPACE_RGB565, GST_COLORSPACE_RGB565,
GST_COLORSPACE_BGR565, GST_COLORSPACE_BGR565,
GST_COLORSPACE_RGB24, // RGB GST_COLORSPACE_RGB24,
GST_COLORSPACE_BGR24, // RGB GST_COLORSPACE_BGR24,
GST_COLORSPACE_RGB32, GST_COLORSPACE_RGB32,
GST_COLORSPACE_BGR32, GST_COLORSPACE_BGR32,
GST_COLORSPACE_YUV420,
GST_COLORSPACE_YUV420P,
GST_COLORSPACE_YUV422,
GST_COLORSPACE_YUV422P
} GstColorSpaceType;
#define GST_COLORSPACE_RGB_FIRST GST_COLORSPACE_RGB555
#define GST_COLORSPACE_RGB_LAST GST_COLORSPACE_BGR32 #define GST_COLORSPACE_RGB_LAST GST_COLORSPACE_BGR32
#define GST_COLORSPACE_YUV_FIRST GST_COLORSPACE_YUV420 #define GST_COLORSPACE_YUV_FIRST GST_COLORSPACE_YUV420
GST_COLORSPACE_YUV420, // YUV
GST_COLORSPACE_YUV420P, // YUV planar
GST_COLORSPACE_YUV422,
GST_COLORSPACE_YUV422P,
#define GST_COLORSPACE_YUV_LAST GST_COLORSPACE_YUV422P #define GST_COLORSPACE_YUV_LAST GST_COLORSPACE_YUV422P
} GstColorSpaceType;
typedef struct _GstColorSpaceConverter GstColorSpaceConverter; typedef struct _GstColorSpaceConverter GstColorSpaceConverter;
typedef void (*GstColorSpaceConvertFunction) (GstColorSpaceConverter *space, guchar *src, guchar *dest); typedef void (*GstColorSpaceConvertFunction) (GstColorSpaceConverter *space, guchar *src, guchar *dest);
@ -67,12 +69,14 @@ struct _GstColorSpaceConverter {
#define GST_COLORSPACE_IS_RGB_TYPE(type) ((type)>=GST_COLORSPACE_RGB_FIRST && \ #define GST_COLORSPACE_IS_RGB_TYPE(type) ((type)>=GST_COLORSPACE_RGB_FIRST && \
(type)<=GST_COLORSPACE_RGB_LAST) (type)<=GST_COLORSPACE_RGB_LAST)
#define GST_COLORSPACE_IS_YUV_TYPE(type) ((type)>=GST_COLORSPACE_YUV_FIRST && \ #define GST_COLORSPACE_IS_YUV_TYPE(type) ((type)>=GST_COLORSPACE_YUV_FIRST && \
(type)<=GST_COLORSPACE_YUV_LAST) (type)<=GST_COLORSPACE_YUV_LAST)
GstColorSpaceConverter *gst_colorspace_converter_new(gint width, gint height, GstColorSpaceType srcspace, GstColorSpaceConverter *gst_colorspace_converter_new(gint width, gint height, GstColorSpaceType srcspace,
GstColorSpaceType destspace, GdkVisual *destvisual); GstColorSpaceType destspace, GdkVisual *destvisual);
#define gst_colorspace_convert(converter, src, dest) (converter)->convert((converter), (src), (dest)) #define gst_colorspace_convert(converter, src, dest) \
(converter)->convert((converter), (src), (dest))
void gst_colorspace_destroy(GstColorSpaceConverter *space); void gst_colorspace_destroy(GstColorSpaceConverter *space);
#endif /* __GST_COLORSPACE_H__ */ #endif /* __GST_COLORSPACE_H__ */

View file

@ -24,12 +24,12 @@
#include <glib.h> #include <glib.h>
typedef enum { typedef enum {
GST_IDCT_DEFAULT, // default GST_IDCT_DEFAULT,
GST_IDCT_INT, // integer IDCT GST_IDCT_INT,
GST_IDCT_FAST_INT, // fastest integer GST_IDCT_FAST_INT,
GST_IDCT_FLOAT, // accurate float version GST_IDCT_FLOAT,
GST_IDCT_MMX, // fast MMX (not accurate) GST_IDCT_MMX,
GST_IDCT_MMX32, // accurate MMX GST_IDCT_MMX32
} GstIDCTMethod; } GstIDCTMethod;
typedef struct _GstIDCT GstIDCT; typedef struct _GstIDCT GstIDCT;

View file

@ -26,18 +26,21 @@
#include <gst/gstplugin.h> #include <gst/gstplugin.h>
#define GST_RIFF_OK 0 typedef enum {
#define GST_RIFF_ENOTRIFF -1 /* not a RIFF file */ GST_RIFF_OK = 0,
#define GST_RIFF_EINVAL -2 /* wrong parameters */ GST_RIFF_ENOTRIFF = -1,
#define GST_RIFF_ENOMEM -3 /* out of memory */ GST_RIFF_EINVAL = -2,
GST_RIFF_ENOMEM = -3
} GstRiffReturn;
/* states */ /* states */
#define GST_RIFF_STATE_INITIAL 0 typedef enum {
#define GST_RIFF_STATE_HASAVIH 1 GST_RIFF_STATE_INITIAL = 0,
#define GST_RIFF_STATE_HASSTRH 2 GST_RIFF_STATE_HASAVIH = 1,
#define GST_RIFF_STATE_HASSTRF 3 GST_RIFF_STATE_HASSTRH = 2,
#define GST_RIFF_STATE_MOVI 4 GST_RIFF_STATE_HASSTRF = 3,
GST_RIFF_STATE_MOVI = 4
} GstRiffParserState;
#define MAKE_FOUR_CC(a,b,c,d) ( ((guint32)a) | (((guint32)b)<< 8) | \ #define MAKE_FOUR_CC(a,b,c,d) ( ((guint32)a) | (((guint32)b)<< 8) | \
((guint32)c)<<16 | (((guint32)d)<<24) ) ((guint32)c)<<16 | (((guint32)d)<<24) )
@ -331,7 +334,7 @@ struct _GstRiff {
GstRiffChunk *incomplete_chunk; GstRiffChunk *incomplete_chunk;
guint32 incomplete_chunk_size; guint32 incomplete_chunk_size;
/* parse state */ /* parse state */
gint state; GstRiffParserState state;
guint32 curoffset; guint32 curoffset;
guint32 nextlikely; guint32 nextlikely;
/* leftover data */ /* leftover data */
@ -356,14 +359,14 @@ struct _GstRiffChunk {
/* from gstriffparse.c */ /* from gstriffparse.c */
GstRiff *gst_riff_parser_new(GstRiffCallback function, gpointer data); GstRiff *gst_riff_parser_new(GstRiffCallback function, gpointer data);
gint gst_riff_parser_next_buffer(GstRiff *riff,GstBuffer *buf,gulong off); GstRiffReturn gst_riff_parser_next_buffer(GstRiff *riff,GstBuffer *buf,gulong off);
/* from gstriffencode.c */ /* from gstriffencode.c */
GstRiff *gst_riff_encoder_new(guint32 type); GstRiff *gst_riff_encoder_new(guint32 type);
gint gst_riff_encoder_avih(GstRiff *riff, gst_riff_avih *head, gulong size); GstRiffReturn gst_riff_encoder_avih(GstRiff *riff, gst_riff_avih *head, gulong size);
gint gst_riff_encoder_strh(GstRiff *riff, guint32 fcc_type, gst_riff_strh *head, gulong size); GstRiffReturn gst_riff_encoder_strh(GstRiff *riff, guint32 fcc_type, gst_riff_strh *head, gulong size);
gint gst_riff_encoder_strf(GstRiff *riff, void *format, gulong size); GstRiffReturn gst_riff_encoder_strf(GstRiff *riff, void *format, gulong size);
gint gst_riff_encoder_chunk(GstRiff *riff, guint32 chunk_type, void *chunk, gulong size); GstRiffReturn gst_riff_encoder_chunk(GstRiff *riff, guint32 chunk_type, void *chunk, gulong size);
GstBuffer *gst_riff_encoder_get_buffer(GstRiff *riff); GstBuffer *gst_riff_encoder_get_buffer(GstRiff *riff);
GstBuffer *gst_riff_encoder_get_and_reset_buffer(GstRiff *riff); GstBuffer *gst_riff_encoder_get_and_reset_buffer(GstRiff *riff);

View file

@ -46,8 +46,8 @@ enum {
ARG_0, ARG_0,
ARG_LOCATION, ARG_LOCATION,
ARG_BYTESPERREAD, ARG_BYTESPERREAD,
ARG_LENGTH,
ARG_OFFSET, ARG_OFFSET,
ARG_SIZE,
}; };
@ -101,10 +101,10 @@ gst_asyncdisksrc_class_init(GstAsyncDiskSrcClass *klass) {
GTK_ARG_READWRITE, ARG_LOCATION); GTK_ARG_READWRITE, ARG_LOCATION);
gtk_object_add_arg_type("GstAsyncDiskSrc::bytesperread", GTK_TYPE_INT, gtk_object_add_arg_type("GstAsyncDiskSrc::bytesperread", GTK_TYPE_INT,
GTK_ARG_READWRITE, ARG_BYTESPERREAD); GTK_ARG_READWRITE, ARG_BYTESPERREAD);
gtk_object_add_arg_type("GstAsyncDiskSrc::length", GTK_TYPE_LONG,
GTK_ARG_READABLE, ARG_LENGTH);
gtk_object_add_arg_type("GstAsyncDiskSrc::offset", GTK_TYPE_LONG, gtk_object_add_arg_type("GstAsyncDiskSrc::offset", GTK_TYPE_LONG,
GTK_ARG_READWRITE, ARG_OFFSET); GTK_ARG_READWRITE, ARG_OFFSET);
gtk_object_add_arg_type("GstAsyncDiskSrc::size", GTK_TYPE_LONG,
GTK_ARG_READABLE, ARG_SIZE);
gtkobject_class->set_arg = gst_asyncdisksrc_set_arg; gtkobject_class->set_arg = gst_asyncdisksrc_set_arg;
gtkobject_class->get_arg = gst_asyncdisksrc_get_arg; gtkobject_class->get_arg = gst_asyncdisksrc_get_arg;
@ -178,12 +178,12 @@ static void gst_asyncdisksrc_get_arg(GtkObject *object,GtkArg *arg,guint id) {
case ARG_BYTESPERREAD: case ARG_BYTESPERREAD:
GTK_VALUE_INT(*arg) = src->bytes_per_read; GTK_VALUE_INT(*arg) = src->bytes_per_read;
break; break;
case ARG_LENGTH:
GTK_VALUE_LONG(*arg) = src->size;
break;
case ARG_OFFSET: case ARG_OFFSET:
GTK_VALUE_LONG(*arg) = src->curoffset; GTK_VALUE_LONG(*arg) = src->curoffset;
break; break;
case ARG_SIZE:
GTK_VALUE_LONG(*arg) = src->size;
break;
default: default:
arg->type = GTK_TYPE_INVALID; arg->type = GTK_TYPE_INVALID;
break; break;

View file

@ -155,8 +155,7 @@ gst_audiosink_class_init(GstAudioSinkClass *klass) {
gst_audiosink_signals[SIGNAL_HANDOFF] = gst_audiosink_signals[SIGNAL_HANDOFF] =
gtk_signal_new("handoff",GTK_RUN_LAST,gtkobject_class->type, gtk_signal_new("handoff",GTK_RUN_LAST,gtkobject_class->type,
GTK_SIGNAL_OFFSET(GstAudioSinkClass,handoff), GTK_SIGNAL_OFFSET(GstAudioSinkClass,handoff),
gtk_marshal_NONE__POINTER,GTK_TYPE_NONE,1, gtk_marshal_NONE__NONE,GTK_TYPE_NONE,0);
GST_TYPE_AUDIOSINK);
gtk_object_class_add_signals(gtkobject_class,gst_audiosink_signals, gtk_object_class_add_signals(gtkobject_class,gst_audiosink_signals,
LAST_SIGNAL); LAST_SIGNAL);

View file

@ -76,7 +76,7 @@ int main(int argc,char *argv[]) {
// sleep(1); // sleep(1);
g_print("about to enter loop\n"); g_print("about to enter loop\n");
while (1) { while (1) {
gst_thread_main_loop(GST_THREAD(playthread)); gst_bin_iterate(GST_BIN(playthread));
g_print("using %d bytes\n",vmsize()); g_print("using %d bytes\n",vmsize());
} }

View file

@ -93,7 +93,7 @@ int main(int argc,char *argv[]) {
g_print("\niterating on %p and %p\n",decodethread,playthread); g_print("\niterating on %p and %p\n",decodethread,playthread);
while (playing) { while (playing) {
gst_thread_main_loop(GST_THREAD(playthread)); gst_bin_iterate(GST_BIN(playthread));
/* buffers got wedged in the queue, unstick them */ /* buffers got wedged in the queue, unstick them */
// while (((GstQueue *)queue)->buffers_queued) // while (((GstQueue *)queue)->buffers_queued)
// gst_connection_push(GST_CONNECTION(queue)); // gst_connection_push(GST_CONNECTION(queue));