add actions. see ChangeLog for details

Original commit message from CVS:
add actions. see ChangeLog for details
This commit is contained in:
Benjamin Otte 2005-05-29 13:57:00 +00:00
parent 27c4315715
commit c50aa69137
185 changed files with 4780 additions and 22412 deletions

224
ChangeLog
View file

@ -1,3 +1,227 @@
2005-05-29 Benjamin Otte <in7y118@public.uni-hamburg.de>
ORGANIZATIONAL CHANGES:
* configure.ac:
remove leftover valgrind stuff, fix GST_OBJ_*FLAGS
* gst/cothreads.c:
* gst/cothreads.h:
remove cothreads
* gst/thread.h:
* gst/thread.c:
remove GstThread
* gst/gstschedulerfactory.h:
* gst/gstschedulerfactory.c:
* gst/registries/gstlibxmlregistry.c:
split out registry specific stuff from gstscheduler.[ch]
* gst/Makefile.am:
* gst/gst.h:
remove cothread.[ch] and gstthread.[ch], add gstaction.[ch] and
gstschedulerfactory.[ch]
* gst/gstcompat.h:
add a gst_bin_iterate macro, remove old 0.5 macros
* gst/gst.c: (gst_register_core_elements):
remove registering GstThread
* gst/gst_private.h:
add some functions here that shouldn't be exported
* gst/gstclock.c: (gst_clock_class_init):
remove thread initing, it's done in gst.c
* gst/gstclock.h:
* gst/gsttypes.h:
move some more types to gsttypes.h: GstRealPad(Class),
GstClockTime and GstAction
NEW SCHEDULING MODEL:
* gst/gstaction.h:
* gst/gstaction.c:
implement actions. These were formally known as triggers. They
implement the different callback types used by elements.
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_set_element_sched),
(gst_bin_unset_element_sched), (gst_bin_iterate):
* gst/gstbin.h:
- remove gst_bin_iterate
- remove code for decoupled elements
* gst/gstelement.c: (gst_element_add_pad), (gst_element_remove_pad),
(gst_element_reset_actions), (gst_element_change_state),
(gst_element_found_tags_for_pad):
add action support. Adding/removing pads adds/removes their actions
from the element automatically. Allow resetting actions which sets
all actions to their initial state.
* gst/gstelement.c:
* gst/gstelement.h:
remove lots of functions related to the old scheduling code, like
_yield, _interrupt etc
* gst/gstpad.c: (gst_pad_push), (gst_real_pad_set_active),
(gst_real_pad_is_active), (gst_real_pad_set_initially_active),
(gst_src_pad_set_action_handler),
(gst_sink_pad_set_action_handler):
add functions to interact with pad actions.
* gst/gstpad.c:
* gst/gstpad.h:
remove lots of stuff related to old scheduling, like DECOUPLED, the
active property, chainhandlers etc
* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_dispose):
remove old scheduling specific calls
* gst/gstscheduler.c: (gst_scheduler_class_init),
(gst_scheduler_init), (gst_scheduler_dispose),
(gst_scheduler_real_add_element),
(gst_scheduler_real_remove_element), (gst_scheduler_marshal),
(gst_scheduler_add_element), (gst_scheduler_remove_element),
(gst_scheduler_state_transition), (gst_scheduler_get_clock),
(gst_scheduler_set_clock), (gst_scheduler_auto_clock),
(gst_scheduler_pad_push):
* gst/gstscheduler.h:
remove old scheduling code and add new one, which is basically
add_action, remove_action (obvious), toggle_active (to indicate
changing the activity state of an action) and update_values (to
indicate that an action changed the values it was configured with
ELEMENTS:
* gst/gstqueue.c:
* gst/gstqueue.h:
nearly reimplement. Throw out all the threading specific code.
* gst/elements/gstfakesink.c: (gst_fakesink_init),
(gst_fakesink_request_new_pad), (gst_fakesink_chain):
* gst/elements/gstfdsink.c: (gst_fdsink_init), (gst_fdsink_chain):
* gst/elements/gstfdsrc.c: (gst_fdsrc_init), (gst_fdsrc_get):
* gst/elements/gstfilesink.c: (gst_filesink_init),
(gst_filesink_handle_event), (gst_filesink_chain):
* gst/elements/gstfilesrc.c: (gst_filesrc_init), (gst_filesrc_get):
replace get/chainfunction with a src/sinkpad action.
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_init), (gst_fakesrc_request_new_pad),
(gst_fakesrc_update_functions), (gst_fakesrc_set_property),
(gst_fakesrc_get_property), (gst_fakesrc_get):
* gst/elements/gstfakesrc.h:
replace getfunction with a srcpad action. Remove "loopbased"
property.
* gst/elements/gstidentity.c: (gst_identity_base_init),
(gst_identity_class_init), (gst_identity_init),
(gst_identity_push), (gst_identity_chain), (gst_identity_wakeup),
(gst_identity_set_property), (gst_identity_get_property),
(gst_identity_change_state):
* gst/elements/gstidentity.h:
make this a PUSH-based element. Remove "loopbased" property and
other scheduling specific stuff.
* gst/elements/gsttee.c: (gst_tee_base_init), (gst_tee_class_init),
(gst_tee_init), (gst_tee_request_new_pad), (gst_tee_get),
(gst_tee_chain), (gst_tee_change_state):
* gst/elements/gsttee.h:
implement using pad actions
* gst/elements/gsttypefindelement.c: (gst_type_find_element_init),
(push_buffer_store), (stop_typefinding),
(gst_type_find_element_wakeup),
(gst_type_find_element_handle_event),
(gst_type_find_element_chain):
* gst/elements/gsttypefindelement.h:
make this a push-based element
SCHEDULERS:
* gst/schedulers/Makefile.am:
* gst/schedulers/cothreads_compat.h:
* gst/schedulers/entryscheduler.c:
* gst/schedulers/faircothreads.c:
* gst/schedulers/faircothreads.h:
* gst/schedulers/fairscheduler.c:
* gst/schedulers/gstbasicscheduler.c:
* gst/schedulers/gstoptimalscheduler.c:
* gst/schedulers/gthread-cothreads.h:
remove
* gst/schedulers/gstsimplescheduler.c:
implement a simple scheduler. It's supposed to be as simple as
possible (code-size). It's as fast as opt in 0.8.
LIBS:
* libs/gst/bytestream/Makefile.am:
* libs/gst/bytestream/gstbytestream.c:
* libs/gst/bytestream/gstbytestream.h:
remove bytestream
* libs/gst/bytestream/filepad.c: (gst_file_pad_init),
(gst_file_pad_chain), (gst_file_pad_parent_set):
make this a sinkpad-action using pad.
TOOLS:
* tools/Makefile.am:
* tools/gst-md5sum.1.in:
* tools/gst-md5sum.c:
* tools/gst-xmlinspect.1.in:
* tools/gst-xmlinspect.c:
* tools/gst-xmllaunch.1.in:
remove gst-xml-* tools and gst-md5sum.
* tools/gst-inspect.c: (print_element_flag_info),
(print_implementation_info), (print_pad_info):
fix to show current scheduling information.
* tools/gst-launch.c: (fault_handler_sighandler),
(fault_handler_sigaction), (fault_spin), (print_tag),
(play_handler), (should_quit), (quit_cb), (launch_poll), (main):
implement new scheduling.
* tools/gst-typefind.c: (have_type_handler), (main):
make work with new scheduling
TESTSUITE:
* tests/Makefile.am:
* tests/lat.c:
* tests/muxing/Makefile.am:
* tests/muxing/case1.c:
* tests/sched/.cvsignore:
* tests/sched/Makefile.am:
* tests/sched/dynamic-pipeline.c:
* tests/sched/interrupt1.c:
* tests/sched/interrupt2.c:
* tests/sched/interrupt3.c:
* tests/sched/runtestcases:
* tests/sched/runxml.c:
* tests/sched/sched-stress.c:
* tests/sched/testcases:
* tests/sched/testcases1.tc:
* tests/threadstate/.cvsignore:
* tests/threadstate/Makefile.am:
* tests/threadstate/test1.c:
* tests/threadstate/test2.c:
* tests/threadstate/threadstate1.c:
* tests/threadstate/threadstate2.c:
* tests/threadstate/threadstate3.c:
* tests/threadstate/threadstate4.c:
* tests/threadstate/threadstate5.c:
* testsuite/Makefile.am:
* testsuite/bytestream/Makefile.am:
* testsuite/cleanup/Makefile.am:
* testsuite/clock/Makefile.am:
* testsuite/clock/clock1.c: (main):
* testsuite/dlopen/loadgst.c: (do_test):
* testsuite/elements/fake.c: (main):
* testsuite/elements/struct_i386.h:
* testsuite/elements/tee.c: (main):
* testsuite/ghostpads/ghostpads.c: (main):
* testsuite/pad/Makefile.am:
* testsuite/pad/getnopush.c: (gst_test_src_get),
(gst_test_src_init), (main):
* testsuite/parse/parse1.c:
* testsuite/schedulers/142183-2.c: (main):
* testsuite/schedulers/143777-2.c: (main):
* testsuite/schedulers/143777.c: (main):
* testsuite/schedulers/147819.c: (handoff_identity1),
(handoff_identity2), (main):
* testsuite/schedulers/Makefile.am:
* testsuite/schedulers/group_link.c: (main):
* testsuite/schedulers/queue_link.c: (main):
* testsuite/schedulers/relink.c: (cb_handoff), (main):
* testsuite/schedulers/unlink.c: (main):
* testsuite/schedulers/unref.c: (cb_handoff), (main):
* testsuite/schedulers/useless_iteration.c: (main):
- make work with new scheduling (mostly by making fakesrc only send
a fixed number of buffers so we hit EOS and uising the _iterate
compat macro.
- remove tests that test the old scheduling model
- remove tests that test threading
2005-05-17 Benjamin Otte <in7y118@public.uni-hamburg.de> 2005-05-17 Benjamin Otte <in7y118@public.uni-hamburg.de>
* gst/gstobject.c: (gst_object_ref), (gst_object_unref): * gst/gstobject.c: (gst_object_ref), (gst_object_unref):

2
common

@ -1 +1 @@
Subproject commit 131c2632127e6f061b5270d8f80651782a4fdd13 Subproject commit 67b7e6c0db99415e0440d0c576495641b53e976a

View file

@ -560,15 +560,14 @@ AC_SUBST(GST_PKG_DEPS)
dnl flags shared for all internal objects (core libs, elements, applications) dnl flags shared for all internal objects (core libs, elements, applications)
dnl we disable deprecated internally dnl we disable deprecated internally
dnl XML, GLib, popt, GST_INT, VALGRIND, and the right include for CFLAGS dnl XML, GLib, popt, GST_INT, and the right include for CFLAGS
dnl no need to add XML, GLib, popt explicitly since libgstreamer pulls them in dnl no need to add XML, GLib, popt explicitly since libgstreamer pulls them in
GST_INT_CFLAGS="$GLIB_CFLAGS $XML_CFLAGS $GST_PKG_CFLAGS \ GST_INT_CFLAGS="$GLIB_CFLAGS $XML_CFLAGS $GST_PKG_CFLAGS \
$GST_INT_CFLAGS $GST_ERROR_CFLAGS -DGST_DISABLE_DEPRECATED" $GST_INT_CFLAGS $GST_ERROR_CFLAGS -DGST_DISABLE_DEPRECATED"
dnl Private vars for libgst only dnl Private vars for libgst only
GST_LIB_CFLAGS="$GST_PKG_CFLAGS $GST_INT_CFLAGS \ GST_LIB_CFLAGS="$GST_PKG_CFLAGS $GST_INT_CFLAGS -I\$(top_srcdir)"
$VALGRIND_CFLAGS -I\$(top_srcdir)" GST_LIB_LIBS="$XML_LIBS $GLIB_LIBS -lpopt $GST_PKG_LIBS $LTLIBINTL -lm"
GST_LIB_LIBS="$XML_LIBS $GLIB_LIBS -lpopt $GST_PKG_LIBS $LTLIBINTL $VALGRIND_LIBS -lm"
GST_LIB_LDFLAGS="$GST_LT_LDFLAGS -version-info $GST_LIBVERSION $EXPORT_LDFLAGS" GST_LIB_LDFLAGS="$GST_LT_LDFLAGS -version-info $GST_LIBVERSION $EXPORT_LDFLAGS"
AC_SUBST(GST_LIB_CFLAGS) AC_SUBST(GST_LIB_CFLAGS)
AC_SUBST(GST_LIB_LIBS) AC_SUBST(GST_LIB_LIBS)
@ -576,10 +575,11 @@ AC_SUBST(GST_LIB_LDFLAGS)
dnl Vars for all internal objects built on libgstreamer dnl Vars for all internal objects built on libgstreamer
GST_OBJ_CFLAGS="$GST_INT_CFLAGS -I\$(top_srcdir)/libs -I\$(top_srcdir)" GST_OBJ_CFLAGS="$GST_INT_CFLAGS -I\$(top_srcdir)/libs -I\$(top_srcdir)"
GST_OBJ_LIBS="\$(top_builddir)/gst/libgstreamer-$GST_MAJORMINOR.la" GST_OBJ_LIBS="\$(top_builddir)/gst/libgstreamer-$GST_MAJORMINOR.la $GLIB_LIBS $LTLIBINTL"
GST_OBJ_LDFLAGS="$GST_LT_LDFLAGS -version-info $GST_LIBVERSION $EXPORT_LDFLAGS"
AC_SUBST(GST_OBJ_CFLAGS, "$GST_OBJ_CFLAGS") AC_SUBST(GST_OBJ_CFLAGS)
AC_SUBST(GST_OBJ_LIBS, "$GST_OBJ_LIBS") AC_SUBST(GST_OBJ_LIBS)
AC_SUBST(GST_OBJ_LDFLAGS)
dnl specific additional LDFLAGS for plugins dnl specific additional LDFLAGS for plugins
GST_PLUGIN_LDFLAGS="-module -avoid-version $EXPORT_LDFLAGS" GST_PLUGIN_LDFLAGS="-module -avoid-version $EXPORT_LDFLAGS"
@ -646,10 +646,7 @@ tests/Makefile
tests/bufspeed/Makefile tests/bufspeed/Makefile
tests/instantiate/Makefile tests/instantiate/Makefile
tests/memchunk/Makefile tests/memchunk/Makefile
tests/muxing/Makefile
tests/seeking/Makefile tests/seeking/Makefile
tests/sched/Makefile
tests/threadstate/Makefile
testsuite/Makefile testsuite/Makefile
testsuite/bins/Makefile testsuite/bins/Makefile
testsuite/bytestream/Makefile testsuite/bytestream/Makefile

View file

@ -1,10 +1,5 @@
lib_LTLIBRARIES = libgstreamer-@GST_MAJORMINOR@.la lib_LTLIBRARIES = libgstreamer-@GST_MAJORMINOR@.la
AS_LIBTOOL_LIB = libgstreamer-@GST_MAJORMINOR@ AS_LIBTOOL_LIB = libgstreamer-@GST_MAJORMINOR@
if GST_DISABLE_OMEGA_COTHREADS
noinst_LTLIBRARIES =
else
noinst_LTLIBRARIES = libcothreads.la
endif
#GST_INSTRUMENT_FLAGS = -finstrument-functions -DGST_ENABLE_FUNC_INSTRUMENTATION #GST_INSTRUMENT_FLAGS = -finstrument-functions -DGST_ENABLE_FUNC_INSTRUMENTATION
@ -82,6 +77,7 @@ EXTRA_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \ libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
gst.c \ gst.c \
gstobject.c \ gstobject.c \
gstaction.c \
gstbin.c \ gstbin.c \
gstbuffer.c \ gstbuffer.c \
gstcaps.c \ gstcaps.c \
@ -104,11 +100,11 @@ libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
gstqueue.c \ gstqueue.c \
gstquery.c \ gstquery.c \
gstscheduler.c \ gstscheduler.c \
gstschedulerfactory.c \
gststructure.c \ gststructure.c \
gstsystemclock.c \ gstsystemclock.c \
gsttag.c \ gsttag.c \
gsttaginterface.c \ gsttaginterface.c \
gstthread.c \
$(GST_TRACE_SRC) \ $(GST_TRACE_SRC) \
gsttypefind.c \ gsttypefind.c \
$(GST_URI_SRC) \ $(GST_URI_SRC) \
@ -150,6 +146,7 @@ libgstreamer_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINO
gst_headers = \ gst_headers = \
gst.h \ gst.h \
gstaction.h \
gstobject.h \ gstobject.h \
gstbin.h \ gstbin.h \
gstbuffer.h \ gstbuffer.h \
@ -174,11 +171,11 @@ gst_headers = \
gstqueue.h \ gstqueue.h \
gstquery.h \ gstquery.h \
gstscheduler.h \ gstscheduler.h \
gstschedulerfactory.h \
gststructure.h \ gststructure.h \
gstsystemclock.h \ gstsystemclock.h \
gsttag.h \ gsttag.h \
gsttaginterface.h \ gsttaginterface.h \
gstthread.h \
gsttrace.h \ gsttrace.h \
gsttypefind.h \ gsttypefind.h \
gsttypes.h \ gsttypes.h \
@ -201,16 +198,7 @@ noinst_HEADERS = \
gst-i18n-app.h \ gst-i18n-app.h \
gst_private.h \ gst_private.h \
gstdata_private.h \ gstdata_private.h \
gstarch.h \ gstarch.h
cothreads.h
if GST_DISABLE_OMEGA_COTHREADS
#libcothreads_la_SOURCES =
#libcothreads_la_CFLAGS =
else
libcothreads_la_SOURCES = cothreads.c
libcothreads_la_CFLAGS = $(libgstreamer_@GST_MAJORMINOR@_la_CFLAGS)
endif
gstmarshal.h: gstmarshal.list gstmarshal.h: gstmarshal.list

View file

@ -1,679 +0,0 @@
/* GStreamer
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
* 2000 Wim Taymans <wtay@chello.be>
*
* cothreads.c: Cothreading routines
*
* 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.
*/
#include "gst_private.h"
#include <glib.h>
#include <sys/time.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <setjmp.h>
#include <unistd.h>
#include <errno.h>
#include <sys/mman.h>
#include "cothreads.h"
#include "gstarch.h"
#include "gstinfo.h"
#include "gstutils.h"
#ifdef HAVE_UCONTEXT_H
#include <ucontext.h>
#endif
#ifndef MAP_ANONYMOUS
#ifdef MAP_ANON
/* older glibc's have MAP_ANON instead of MAP_ANONYMOUS */
#define MAP_ANONYMOUS MAP_ANON
#else
/* make due without. If this fails, we need to open and map /dev/zero */
#define MAP_ANONYMOUS 0
#endif
#endif
#define STACK_SIZE 0x200000
#define COTHREAD_MAGIC_NUMBER 0xabcdef
#define COTHREAD_MAXTHREADS 16
#define COTHREAD_STACKSIZE (STACK_SIZE/COTHREAD_MAXTHREADS)
static void cothread_destroy (cothread_state * cothread);
struct _cothread_context
{
cothread_state *cothreads[COTHREAD_MAXTHREADS]; /* array of cothread states */
int ncothreads;
int current;
unsigned long stack_top;
GHashTable *data;
GThread *thread;
};
/* Disabling this define allows you to shut off a few checks in
* cothread_switch. This likely will speed things up fractionally */
#define COTHREAD_PARANOID
/* this _cothread_ctx_key is used as a GThread key to the thread's context
* a GThread key is a "pointer" to memory space that is/can be different
* (ie. private) for each thread. The key itself is shared among threads,
* so it only needs to be initialized once.
*/
static GStaticPrivate _cothread_ctx_key = G_STATIC_PRIVATE_INIT;
/*
* This should only after context init, since we do checking.
*/
static cothread_context *
cothread_get_current_context (void)
{
cothread_context *ctx;
ctx = g_static_private_get (&_cothread_ctx_key);
g_assert (ctx);
#ifdef COTHREAD_PARANOID
g_assert (ctx->thread == g_thread_self ());
#endif
return ctx;
}
/**
* cothread_context_init:
*
* Create and initialize a new cothread context
*
* Returns: the new cothread context
*/
cothread_context *
cothread_context_init (void)
{
char __csf;
void *current_stack_frame = &__csf; /* Get pointer inside current stack frame */
cothread_context *ctx;
/* if there already is a cotread context for this thread,
* just return it */
ctx = g_static_private_get (&_cothread_ctx_key);
if (ctx) {
GST_CAT_INFO (GST_CAT_COTHREADS,
"returning private _cothread_ctx_key %p", ctx);
return ctx;
}
/*
* initalize the whole of the cothreads context
*/
ctx = (cothread_context *) g_malloc (sizeof (cothread_context));
/* we consider the initiating process to be cothread 0 */
ctx->ncothreads = 1;
ctx->current = 0;
ctx->data = g_hash_table_new (g_str_hash, g_str_equal);
ctx->thread = g_thread_self ();
GST_CAT_INFO (GST_CAT_COTHREADS, "initializing cothreads");
/* set this thread's context pointer */
GST_CAT_INFO (GST_CAT_COTHREADS,
"setting private _cothread_ctx_key to %p in thread %p", ctx,
g_thread_self ());
g_static_private_set (&_cothread_ctx_key, ctx, NULL);
g_assert (ctx == cothread_get_current_context ());
/* clear the cothread data */
memset (ctx->cothreads, 0, sizeof (ctx->cothreads));
/* FIXME this may not be 64bit clean
* could use casts to uintptr_t from inttypes.h
* if only all platforms had inttypes.h
*/
/* stack_top is the address of the first byte past our stack segment. */
/* FIXME: an assumption is made that the stack segment is STACK_SIZE
* aligned. */
ctx->stack_top = ((gulong) current_stack_frame | (STACK_SIZE - 1)) + 1;
GST_CAT_DEBUG (GST_CAT_COTHREADS, "stack top is 0x%08lx", ctx->stack_top);
/*
* initialize the 0th cothread
*/
ctx->cothreads[0] = (cothread_state *) g_malloc0 (sizeof (cothread_state));
ctx->cothreads[0]->ctx = ctx;
ctx->cothreads[0]->cothreadnum = 0;
ctx->cothreads[0]->func = NULL;
ctx->cothreads[0]->argc = 0;
ctx->cothreads[0]->argv = NULL;
ctx->cothreads[0]->priv = NULL;
ctx->cothreads[0]->flags = COTHREAD_STARTED;
ctx->cothreads[0]->sp = (void *) current_stack_frame;
GST_CAT_INFO (GST_CAT_COTHREADS, "0th cothread is %p at sp:%p",
ctx->cothreads[0], ctx->cothreads[0]->sp);
return ctx;
}
/**
* cothread_context_free:
* @ctx: the cothread context to free
*
* Free the cothread context.
*/
void
cothread_context_free (cothread_context * ctx)
{
gint i;
g_return_if_fail (ctx != NULL);
g_assert (ctx->thread == g_thread_self ());
g_assert (ctx->current == 0);
GST_CAT_INFO (GST_CAT_COTHREADS, "free cothread context");
for (i = 1; i < COTHREAD_MAXTHREADS; i++) {
if (ctx->cothreads[i]) {
cothread_destroy (ctx->cothreads[i]);
}
}
if (ctx->cothreads[0]) {
g_free (ctx->cothreads[0]);
ctx->cothreads[0] = NULL;
}
g_hash_table_destroy (ctx->data);
/* make sure we free the private key for cothread context */
GST_CAT_INFO (GST_CAT_COTHREADS,
"setting private _cothread_ctx_key to NULL in thread %p",
g_thread_self ());
g_static_private_set (&_cothread_ctx_key, NULL, NULL);
g_free (ctx);
}
/**
* cothread_create:
* @ctx: the cothread context
*
* Create a new cothread state in the given context
*
* Returns: the new cothread state or NULL on error
*/
cothread_state *
cothread_create (cothread_context * ctx)
{
cothread_state *cothread;
void *mmaped = NULL;
gint slot = 0;
unsigned long page_size;
g_return_val_if_fail (ctx != NULL, NULL);
GST_CAT_DEBUG (GST_CAT_COTHREADS, "manager sef %p, cothread self %p",
ctx->thread, g_thread_self ());
if (ctx->ncothreads == COTHREAD_MAXTHREADS) {
/* this is pretty fatal */
g_warning ("cothread_create: attempt to create > COTHREAD_MAXTHREADS");
return NULL;
}
/* find a free spot in the stack, note slot 0 has the main thread */
for (slot = 1; slot < ctx->ncothreads; slot++) {
if (ctx->cothreads[slot] == NULL)
break;
else if (ctx->cothreads[slot]->flags & COTHREAD_DESTROYED &&
slot != ctx->current) {
cothread_destroy (ctx->cothreads[slot]);
break;
}
}
GST_CAT_DEBUG (GST_CAT_COTHREADS, "Found free cothread slot %d", slot);
/* cothread stack space of the thread is mapped in reverse, with cothread 0
* stack space at the top */
cothread =
(cothread_state *) (ctx->stack_top - (slot + 1) * COTHREAD_STACKSIZE);
GST_CAT_DEBUG (GST_CAT_COTHREADS, "cothread pointer is %p", cothread);
#if 0
/* This tests to see whether or not we can grow down the stack */
{
unsigned long ptr;
for (ptr = ctx->stack_top - 4096; ptr > (unsigned long) cothread;
ptr -= 4096) {
GST_CAT_DEBUG (GST_CAT_COTHREADS, "touching location 0x%08lx", ptr);
*(volatile unsigned int *) ptr = *(volatile unsigned int *) ptr;
GST_CAT_DEBUG (GST_CAT_COTHREADS, "ok (0x%08x)", *(unsigned int *) ptr);
}
}
#endif
#ifdef _SC_PAGESIZE
page_size = sysconf (_SC_PAGESIZE);
#else
page_size = getpagesize ();
#endif
/* The mmap is necessary on Linux/i386, and possibly others, since the
* kernel is picky about when we can expand our stack. */
GST_CAT_DEBUG (GST_CAT_COTHREADS, "mmaping %p, size 0x%08x", cothread,
COTHREAD_STACKSIZE);
/* Remap with a guard page. This decreases our stack size by 8 kB (for
* 4 kB pages) and also wastes almost 4 kB for the cothreads
* structure */
munmap ((void *) cothread, COTHREAD_STACKSIZE);
mmaped = mmap ((void *) cothread, page_size,
PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
mmaped = mmap (((void *) cothread) + page_size * 2,
COTHREAD_STACKSIZE - page_size * 2,
PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
GST_CAT_DEBUG (GST_CAT_COTHREADS, "coming out of mmap");
if (mmaped == MAP_FAILED) {
perror ("mmap'ing cothread stack space");
return NULL;
}
if (mmaped != (void *) cothread + page_size * 2) {
g_warning ("could not mmap requested memory for cothread");
return NULL;
}
cothread->magic_number = COTHREAD_MAGIC_NUMBER;
GST_CAT_DEBUG (GST_CAT_COTHREADS,
"create cothread %d with magic number 0x%x", slot,
cothread->magic_number);
cothread->ctx = ctx;
cothread->cothreadnum = slot;
cothread->flags = 0;
cothread->priv = NULL;
cothread->sp = ((guchar *) cothread + COTHREAD_STACKSIZE);
cothread->stack_size = COTHREAD_STACKSIZE - page_size * 2;
cothread->stack_base = (void *) cothread + 2 * page_size;
GST_CAT_INFO (GST_CAT_COTHREADS,
"created cothread #%d in slot %d: %p at sp:%p",
ctx->ncothreads, slot, cothread, cothread->sp);
ctx->cothreads[slot] = cothread;
ctx->ncothreads++;
return cothread;
}
/**
* cothread_free:
* @cothread: the cothread state
*
* Free the given cothread state
*/
void
cothread_free (cothread_state * cothread)
{
g_return_if_fail (cothread != NULL);
GST_CAT_INFO (GST_CAT_COTHREADS, "flag cothread %d for destruction",
cothread->cothreadnum);
/* we simply flag the cothread for destruction here */
if (cothread)
cothread->flags |= COTHREAD_DESTROYED;
else
g_warning ("somebody set up us the bomb");
}
static void
cothread_destroy (cothread_state * cothread)
{
cothread_context *ctx;
gint cothreadnum;
g_return_if_fail (cothread != NULL);
cothreadnum = cothread->cothreadnum;
ctx = cothread->ctx;
g_assert (ctx->thread == g_thread_self ());
g_assert (ctx == cothread_get_current_context ());
GST_CAT_INFO (GST_CAT_COTHREADS, "destroy cothread %d %p %d",
cothreadnum, cothread, ctx->current);
/* cothread 0 needs to be destroyed specially */
g_assert (cothreadnum != 0);
/* doing cleanups of the cothread create */
GST_CAT_DEBUG (GST_CAT_COTHREADS,
"destroy cothread %d with magic number 0x%x", cothreadnum,
cothread->magic_number);
g_assert (cothread->magic_number == COTHREAD_MAGIC_NUMBER);
g_assert (cothread->priv == NULL);
memset (cothread, 0, sizeof (*cothread));
ctx->cothreads[cothreadnum] = NULL;
ctx->ncothreads--;
}
/**
* cothread_setfunc:
* @cothread: the cothread state
* @func: the function to call
* @argc: argument count for the cothread function
* @argv: arguments for the cothread function
*
* Set the cothread function
*/
void
cothread_setfunc (cothread_state * cothread, cothread_func func, int argc,
char **argv)
{
cothread->func = func;
cothread->argc = argc;
cothread->argv = argv;
}
/**
* cothread_stop:
* @cothread: the cothread to stop
*
* Stop the cothread and reset the stack and program counter.
*/
void
cothread_stop (cothread_state * cothread)
{
cothread->flags &= ~COTHREAD_STARTED;
}
/**
* cothread_main:
* @ctx: cothread context to find main cothread of.
*
* Gets the main thread.
*
* Returns: the #cothread_state of the main (0th) cothread.
*/
cothread_state *
cothread_main (cothread_context * ctx)
{
g_assert (ctx->thread == g_thread_self ());
GST_CAT_DEBUG (GST_CAT_COTHREADS, "returning %p, the 0th cothread",
ctx->cothreads[0]);
return ctx->cothreads[0];
}
/**
* cothread_current_main:
*
* Get the main thread in the current GThread.
*
* Returns: the #cothread_state of the main (0th) thread in the current GThread
*/
cothread_state *
cothread_current_main (void)
{
cothread_context *ctx = cothread_get_current_context ();
return ctx->cothreads[0];
}
/**
* cothread_current:
*
* Get the currenttly executing cothread
*
* Returns: the #cothread_state of the current cothread
*/
cothread_state *
cothread_current (void)
{
cothread_context *ctx = cothread_get_current_context ();
return ctx->cothreads[ctx->current];
}
static void
cothread_stub (void)
{
cothread_context *ctx = cothread_get_current_context ();
cothread_state *cothread = ctx->cothreads[ctx->current];
#ifndef GST_DISABLE_GST_DEBUG
char __csf;
void *current_stack_frame = &__csf;
#endif
GST_CAT_DEBUG (GST_CAT_COTHREADS, "stack addr %p", &ctx);
cothread->flags |= COTHREAD_STARTED;
while (TRUE) {
cothread->func (cothread->argc, cothread->argv);
GST_CAT_DEBUG (GST_CAT_COTHREADS, "cothread[%d] thread->func exited",
ctx->current);
GST_CAT_DEBUG (GST_CAT_COTHREADS, "sp=%p", current_stack_frame);
GST_CAT_DEBUG (GST_CAT_COTHREADS, "ctx=%p current=%p", ctx,
cothread_get_current_context ());
g_assert (ctx == cothread_get_current_context ());
g_assert (ctx->current != 0);
/* we do this to avoid ever returning, we just switch to 0th thread */
cothread_switch (cothread_main (ctx));
}
}
/**
* cothread_getcurrent:
*
* Get the current cothread id
*
* Returns: the current cothread id
*/
int
cothread_getcurrent (void)
G_GNUC_NO_INSTRUMENT;
int cothread_getcurrent (void)
{
cothread_context *ctx = cothread_get_current_context ();
if (!ctx)
return -1;
return ctx->current;
}
/**
* cothread_set_private:
* @cothread: the cothread state
* @data: the data
*
* set private data for the cothread.
*/
void
cothread_set_private (cothread_state * cothread, gpointer data)
{
cothread->priv = data;
}
/**
* cothread_context_set_data:
* @cothread: the cothread state
* @key: a key for the data
* @data: the data
*
* adds data to a cothread
*/
void
cothread_context_set_data (cothread_state * cothread, gchar * key,
gpointer data)
{
cothread_context *ctx = cothread_get_current_context ();
g_hash_table_insert (ctx->data, key, data);
}
/**
* cothread_get_private:
* @cothread: the cothread state
*
* get the private data from the cothread
*
* Returns: the private data of the cothread
*/
gpointer
cothread_get_private (cothread_state * cothread)
{
return cothread->priv;
}
/**
* cothread_context_get_data:
* @cothread: the cothread state
* @key: a key for the data
*
* get data from the cothread
*
* Returns: the data associated with the key
*/
gpointer
cothread_context_get_data (cothread_state * cothread, gchar * key)
{
cothread_context *ctx = cothread_get_current_context ();
return g_hash_table_lookup (ctx->data, key);
}
/**
* cothread_switch:
* @cothread: cothread state to switch to
*
* Switches to the given cothread state
*/
void
cothread_switch (cothread_state * cothread)
{
cothread_context *ctx;
cothread_state *current;
int enter;
#ifdef COTHREAD_PARANOID
if (cothread == NULL)
goto nothread;
#endif
ctx = cothread->ctx;
/* paranoia check to make sure we're in the right thread */
g_assert (ctx->thread == g_thread_self ());
#ifdef COTHREAD_PARANOID
if (ctx == NULL)
goto nocontext;
#endif
current = ctx->cothreads[ctx->current];
#ifdef COTHREAD_PARANOID
if (current == NULL)
goto nocurrent;
#endif
if (current == cothread)
goto selfswitch;
/* find the number of the thread to switch to */
GST_CAT_INFO (GST_CAT_COTHREAD_SWITCH,
"switching from cothread #%d to cothread #%d",
ctx->current, cothread->cothreadnum);
ctx->current = cothread->cothreadnum;
/* save the current stack pointer, frame pointer, and pc */
#ifdef GST_ARCH_PRESETJMP
GST_ARCH_PRESETJMP ();
#endif
enter = setjmp (current->jmp);
if (enter != 0) {
GST_CAT_DEBUG (GST_CAT_COTHREADS,
"enter cothread #%d %d sp=%p jmpbuf=%p",
current->cothreadnum, enter, current->sp, current->jmp);
return;
}
GST_CAT_DEBUG (GST_CAT_COTHREADS, "exit cothread #%d %d sp=%p jmpbuf=%p",
current->cothreadnum, enter, current->sp, current->jmp);
enter = 1;
if (current->flags & COTHREAD_DESTROYED) {
cothread_destroy (current);
}
GST_CAT_DEBUG (GST_CAT_COTHREADS, "set stack to %p", cothread->sp);
/* restore stack pointer and other stuff of new cothread */
if (cothread->flags & COTHREAD_STARTED) {
GST_CAT_DEBUG (GST_CAT_COTHREADS, "via longjmp() jmpbuf %p", cothread->jmp);
/* switch to it */
longjmp (cothread->jmp, 1);
} else {
#ifdef HAVE_MAKECONTEXT
ucontext_t ucp;
GST_CAT_DEBUG (GST_CAT_COTHREADS, "making context");
g_assert (cothread != cothread_main (ctx));
getcontext (&ucp);
ucp.uc_stack.ss_sp = (void *) cothread->stack_base;
ucp.uc_stack.ss_size = cothread->stack_size;
makecontext (&ucp, cothread_stub, 0);
setcontext (&ucp);
#else
GST_ARCH_SETUP_STACK ((char *) cothread->sp);
GST_ARCH_SET_SP (cothread->sp);
/* start it */
GST_ARCH_CALL (cothread_stub);
#endif
GST_CAT_DEBUG (GST_CAT_COTHREADS, "exit thread ");
ctx->current = 0;
}
return;
#ifdef COTHREAD_PARANOID
nothread:
g_warning ("cothread: can't switch to NULL cothread!");
return;
nocontext:
g_warning ("cothread: there's no context, help!");
exit (2);
nocurrent:
g_warning ("cothread: there's no current thread, help!");
exit (2);
#endif /* COTHREAD_PARANOID */
selfswitch:
return;
}

View file

@ -1,77 +0,0 @@
/* GStreamer
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
* 2000 Wim Taymans <wtay@chello.be>
*
* cothreads.h: Header for cothreading routines
*
* 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.
*/
#ifndef __COTHREADS_H__
#define __COTHREADS_H__
#include <glib.h>
#include <setjmp.h>
typedef struct _cothread_state cothread_state;
typedef struct _cothread_context cothread_context;
typedef int (*cothread_func) (int argc,char **argv);
#define COTHREAD_STARTED 0x01
#define COTHREAD_DESTROYED 0x02
struct _cothread_state {
cothread_context *ctx;
int cothreadnum;
gpointer priv;
cothread_func func;
int argc;
char **argv;
int flags;
void *sp;
jmp_buf jmp;
void *stack_base;
unsigned long stack_size;
int magic_number;
};
cothread_context* cothread_context_init (void);
void cothread_context_free (cothread_context *ctx);
void cothread_context_set_data (cothread_state *cothread,
gchar *key, gpointer data);
gpointer cothread_context_get_data (cothread_state *cothread, gchar *key);
cothread_state* cothread_create (cothread_context *ctx);
void cothread_free (cothread_state *cothread);
void cothread_setfunc (cothread_state *cothread, cothread_func func,
int argc, char **argv);
void cothread_stop (cothread_state *cothread);
void cothread_switch (cothread_state *cothread);
void cothread_set_private (cothread_state *cothread,
gpointer data);
gpointer cothread_get_private (cothread_state *cothread);
cothread_state* cothread_main (cothread_context *ctx);
cothread_state* cothread_current_main (void);
cothread_state* cothread_current (void);
#endif /* __COTHREAD_H__ */

View file

@ -113,7 +113,8 @@ static void gst_fakesink_get_property (GObject * object, guint prop_id,
static GstElementStateReturn gst_fakesink_change_state (GstElement * element); static GstElementStateReturn gst_fakesink_change_state (GstElement * element);
static void gst_fakesink_chain (GstPad * pad, GstData * _data); static void gst_fakesink_chain (GstAction * action, GstRealPad * pad,
GstData * _data);
static guint gst_fakesink_signals[LAST_SIGNAL] = { 0 }; static guint gst_fakesink_signals[LAST_SIGNAL] = { 0 };
@ -187,8 +188,8 @@ gst_fakesink_init (GstFakeSink * fakesink)
pad = pad =
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate), gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
"sink"); "sink");
gst_sink_pad_set_action_handler (pad, GST_DEBUG_FUNCPTR (gst_fakesink_chain));
gst_element_add_pad (GST_ELEMENT (fakesink), pad); gst_element_add_pad (GST_ELEMENT (fakesink), pad);
gst_pad_set_chain_function (pad, GST_DEBUG_FUNCPTR (gst_fakesink_chain));
fakesink->silent = FALSE; fakesink->silent = FALSE;
fakesink->dump = FALSE; fakesink->dump = FALSE;
@ -231,7 +232,8 @@ gst_fakesink_request_new_pad (GstElement * element, GstPadTemplate * templ,
sinkpad = gst_pad_new_from_template (templ, name); sinkpad = gst_pad_new_from_template (templ, name);
g_free (name); g_free (name);
gst_pad_set_chain_function (sinkpad, GST_DEBUG_FUNCPTR (gst_fakesink_chain)); gst_sink_pad_set_action_handler (sinkpad,
GST_DEBUG_FUNCPTR (gst_fakesink_chain));
gst_element_add_pad (GST_ELEMENT (fakesink), sinkpad); gst_element_add_pad (GST_ELEMENT (fakesink), sinkpad);
@ -309,7 +311,7 @@ gst_fakesink_get_property (GObject * object, guint prop_id, GValue * value,
} }
static void static void
gst_fakesink_chain (GstPad * pad, GstData * _data) gst_fakesink_chain (GstAction * action, GstRealPad * pad, GstData * _data)
{ {
GstBuffer *buf = GST_BUFFER (_data); GstBuffer *buf = GST_BUFFER (_data);
GstFakeSink *fakesink; GstFakeSink *fakesink;
@ -341,7 +343,7 @@ gst_fakesink_chain (GstPad * pad, GstData * _data)
gst_element_set_time (GST_ELEMENT (fakesink), value); gst_element_set_time (GST_ELEMENT (fakesink), value);
} }
default: default:
gst_pad_event_default (pad, event); gst_pad_event_default (GST_PAD (pad), event);
break; break;
} }
return; return;

View file

@ -64,7 +64,6 @@ enum
{ {
ARG_0, ARG_0,
ARG_NUM_SOURCES, ARG_NUM_SOURCES,
ARG_LOOP_BASED,
ARG_OUTPUT, ARG_OUTPUT,
ARG_DATA, ARG_DATA,
ARG_SIZETYPE, ARG_SIZETYPE,
@ -179,7 +178,7 @@ GST_BOILERPLATE_FULL (GstFakeSrc, gst_fakesrc, GstElement, GST_TYPE_ELEMENT,
static GstPad *gst_fakesrc_request_new_pad (GstElement * element, static GstPad *gst_fakesrc_request_new_pad (GstElement * element,
GstPadTemplate * templ, const gchar * unused); GstPadTemplate * templ, const gchar * unused);
static void gst_fakesrc_update_functions (GstFakeSrc * src); static void gst_fakesrc_update_functions (GstFakeSrc * src, GstPad * pad);
static void gst_fakesrc_set_property (GObject * object, guint prop_id, static void gst_fakesrc_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec); const GValue * value, GParamSpec * pspec);
static void gst_fakesrc_get_property (GObject * object, guint prop_id, static void gst_fakesrc_get_property (GObject * object, guint prop_id,
@ -188,8 +187,7 @@ static void gst_fakesrc_set_clock (GstElement * element, GstClock * clock);
static GstElementStateReturn gst_fakesrc_change_state (GstElement * element); static GstElementStateReturn gst_fakesrc_change_state (GstElement * element);
static GstData *gst_fakesrc_get (GstPad * pad); static GstData *gst_fakesrc_get (GstAction * action, GstRealPad * pad);
static void gst_fakesrc_loop (GstElement * element);
static guint gst_fakesrc_signals[LAST_SIGNAL] = { 0 }; static guint gst_fakesrc_signals[LAST_SIGNAL] = { 0 };
@ -214,13 +212,9 @@ gst_fakesrc_class_init (GstFakeSrcClass * klass)
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_NUM_SOURCES, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_NUM_SOURCES,
g_param_spec_int ("num-sources", "num-sources", "Number of sources", g_param_spec_int ("num-sources", "num-sources", "Number of sources",
1, G_MAXINT, 1, G_PARAM_READABLE)); 1, G_MAXINT, 1, G_PARAM_READABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LOOP_BASED,
g_param_spec_boolean ("loop-based", "loop-based",
"Enable loop-based operation", FALSE, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_OUTPUT, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_OUTPUT,
g_param_spec_enum ("output", "output", "Output method (currently unused)", g_param_spec_enum ("output", "output", "Output method (currently unused)",
GST_TYPE_FAKESRC_OUTPUT, FAKESRC_FIRST_LAST_LOOP, G_PARAM_READWRITE)); GST_TYPE_FAKESRC_OUTPUT, FAKESRC_FIRST_LAST_LOOP, G_PARAM_READWRITE));
@ -299,11 +293,9 @@ gst_fakesrc_init (GstFakeSrc * fakesrc)
pad = pad =
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate), gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
"src"); "src");
gst_fakesrc_update_functions (fakesrc, pad);
gst_element_add_pad (GST_ELEMENT (fakesrc), pad); gst_element_add_pad (GST_ELEMENT (fakesrc), pad);
fakesrc->loop_based = FALSE;
gst_fakesrc_update_functions (fakesrc);
fakesrc->output = FAKESRC_FIRST_LAST_LOOP; fakesrc->output = FAKESRC_FIRST_LAST_LOOP;
fakesrc->segment_start = -1; fakesrc->segment_start = -1;
fakesrc->segment_end = -1; fakesrc->segment_end = -1;
@ -358,39 +350,14 @@ gst_fakesrc_request_new_pad (GstElement * element, GstPadTemplate * templ,
name = g_strdup_printf ("src%d", GST_ELEMENT (fakesrc)->numsrcpads); name = g_strdup_printf ("src%d", GST_ELEMENT (fakesrc)->numsrcpads);
srcpad = gst_pad_new_from_template (templ, name); srcpad = gst_pad_new_from_template (templ, name);
gst_fakesrc_update_functions (fakesrc, srcpad);
gst_element_add_pad (GST_ELEMENT (fakesrc), srcpad); gst_element_add_pad (GST_ELEMENT (fakesrc), srcpad);
gst_fakesrc_update_functions (fakesrc);
g_free (name); g_free (name);
return srcpad; return srcpad;
} }
static const GstFormat *
gst_fakesrc_get_formats (GstPad * pad)
{
static const GstFormat formats[] = {
GST_FORMAT_DEFAULT,
0,
};
return formats;
}
static const GstQueryType *
gst_fakesrc_get_query_types (GstPad * pad)
{
static const GstQueryType types[] = {
GST_QUERY_TOTAL,
GST_QUERY_POSITION,
GST_QUERY_START,
GST_QUERY_SEGMENT_END,
0,
};
return types;
}
static gboolean static gboolean
gst_fakesrc_query (GstPad * pad, GstQueryType type, gst_fakesrc_query (GstPad * pad, GstQueryType type,
GstFormat * format, gint64 * value) GstFormat * format, gint64 * value)
@ -416,19 +383,6 @@ gst_fakesrc_query (GstPad * pad, GstQueryType type,
return TRUE; return TRUE;
} }
static const GstEventMask *
gst_fakesrc_get_event_mask (GstPad * pad)
{
static const GstEventMask masks[] = {
{GST_EVENT_SEEK, GST_SEEK_FLAG_FLUSH},
{GST_EVENT_SEEK_SEGMENT, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SEGMENT_LOOP},
{GST_EVENT_FLUSH, 0},
{0, 0},
};
return masks;
}
static gboolean static gboolean
gst_fakesrc_event_handler (GstPad * pad, GstEvent * event) gst_fakesrc_event_handler (GstPad * pad, GstEvent * event)
{ {
@ -463,34 +417,12 @@ gst_fakesrc_event_handler (GstPad * pad, GstEvent * event)
} }
static void static void
gst_fakesrc_update_functions (GstFakeSrc * src) gst_fakesrc_update_functions (GstFakeSrc * src, GstPad * pad)
{ {
GList *pads; gst_src_pad_set_action_handler (pad, gst_fakesrc_get);
gst_real_pad_set_initially_active (GST_REAL_PAD (pad), TRUE);
if (src->loop_based) {
gst_element_set_loop_function (GST_ELEMENT (src),
GST_DEBUG_FUNCPTR (gst_fakesrc_loop));
} else {
gst_element_set_loop_function (GST_ELEMENT (src), NULL);
}
pads = GST_ELEMENT (src)->pads;
while (pads) {
GstPad *pad = GST_PAD (pads->data);
if (src->loop_based) {
gst_pad_set_get_function (pad, NULL);
} else {
gst_pad_set_get_function (pad, GST_DEBUG_FUNCPTR (gst_fakesrc_get));
}
gst_pad_set_event_function (pad, gst_fakesrc_event_handler); gst_pad_set_event_function (pad, gst_fakesrc_event_handler);
gst_pad_set_event_mask_function (pad, gst_fakesrc_get_event_mask);
gst_pad_set_query_function (pad, gst_fakesrc_query); gst_pad_set_query_function (pad, gst_fakesrc_query);
gst_pad_set_query_type_function (pad, gst_fakesrc_get_query_types);
gst_pad_set_formats_function (pad, gst_fakesrc_get_formats);
pads = g_list_next (pads);
}
} }
static void static void
@ -516,10 +448,6 @@ gst_fakesrc_set_property (GObject * object, guint prop_id, const GValue * value,
src = GST_FAKESRC (object); src = GST_FAKESRC (object);
switch (prop_id) { switch (prop_id) {
case ARG_LOOP_BASED:
src->loop_based = g_value_get_boolean (value);
gst_fakesrc_update_functions (src);
break;
case ARG_OUTPUT: case ARG_OUTPUT:
g_warning ("not yet implemented"); g_warning ("not yet implemented");
break; break;
@ -596,9 +524,6 @@ gst_fakesrc_get_property (GObject * object, guint prop_id, GValue * value,
case ARG_NUM_SOURCES: case ARG_NUM_SOURCES:
g_value_set_int (value, GST_ELEMENT (src)->numsrcpads); g_value_set_int (value, GST_ELEMENT (src)->numsrcpads);
break; break;
case ARG_LOOP_BASED:
g_value_set_boolean (value, src->loop_based);
break;
case ARG_OUTPUT: case ARG_OUTPUT:
g_value_set_enum (value, src->output); g_value_set_enum (value, src->output);
break; break;
@ -791,7 +716,7 @@ gst_fakesrc_create_buffer (GstFakeSrc * src)
} }
static GstData * static GstData *
gst_fakesrc_get (GstPad * pad) gst_fakesrc_get (GstAction * action, GstRealPad * pad)
{ {
GstFakeSrc *src; GstFakeSrc *src;
GstBuffer *buf; GstBuffer *buf;
@ -870,40 +795,6 @@ gst_fakesrc_get (GstPad * pad)
return GST_DATA (buf); return GST_DATA (buf);
} }
/**
* gst_fakesrc_loop:
* @element: the faksesrc to loop
*
* generate an empty buffer and push it to the next element.
*/
static void
gst_fakesrc_loop (GstElement * element)
{
GstFakeSrc *src;
const GList *pads;
g_return_if_fail (element != NULL);
g_return_if_fail (GST_IS_FAKESRC (element));
src = GST_FAKESRC (element);
pads = gst_element_get_pad_list (element);
while (pads) {
GstPad *pad = GST_PAD (pads->data);
GstData *data;
data = gst_fakesrc_get (pad);
gst_pad_push (pad, data);
if (src->eos) {
return;
}
pads = g_list_next (pads);
}
}
static GstElementStateReturn static GstElementStateReturn
gst_fakesrc_change_state (GstElement * element) gst_fakesrc_change_state (GstElement * element)
{ {

View file

@ -76,7 +76,6 @@ typedef struct _GstFakeSrcClass GstFakeSrcClass;
struct _GstFakeSrc { struct _GstFakeSrc {
GstElement element; GstElement element;
gboolean loop_based;
gboolean eos; gboolean eos;
GstFakeSrcOutputType output; GstFakeSrcOutputType output;

View file

@ -69,7 +69,8 @@ static void gst_fdsink_set_property (GObject * object, guint prop_id,
static void gst_fdsink_get_property (GObject * object, guint prop_id, static void gst_fdsink_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec); GValue * value, GParamSpec * pspec);
static void gst_fdsink_chain (GstPad * pad, GstData * _data); static void gst_fdsink_chain (GstAction * action, GstRealPad * pad,
GstData * _data);
static void static void
@ -103,14 +104,14 @@ gst_fdsink_init (GstFdSink * fdsink)
fdsink->sinkpad = fdsink->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate), gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
"sink"); "sink");
gst_sink_pad_set_action_handler (fdsink->sinkpad, gst_fdsink_chain);
gst_element_add_pad (GST_ELEMENT (fdsink), fdsink->sinkpad); gst_element_add_pad (GST_ELEMENT (fdsink), fdsink->sinkpad);
gst_pad_set_chain_function (fdsink->sinkpad, gst_fdsink_chain);
fdsink->fd = 1; fdsink->fd = 1;
} }
static void static void
gst_fdsink_chain (GstPad * pad, GstData * _data) gst_fdsink_chain (GstAction * action, GstRealPad * pad, GstData * _data)
{ {
GstBuffer *buf = GST_BUFFER (_data); GstBuffer *buf = GST_BUFFER (_data);
GstFdSink *fdsink; GstFdSink *fdsink;
@ -119,7 +120,7 @@ gst_fdsink_chain (GstPad * pad, GstData * _data)
g_return_if_fail (GST_IS_PAD (pad)); g_return_if_fail (GST_IS_PAD (pad));
g_return_if_fail (buf != NULL); g_return_if_fail (buf != NULL);
fdsink = GST_FDSINK (gst_pad_get_parent (pad)); fdsink = GST_FDSINK (gst_pad_get_parent (GST_PAD (pad)));
g_return_if_fail (fdsink->fd >= 0); g_return_if_fail (fdsink->fd >= 0);

View file

@ -102,7 +102,7 @@ static void gst_fdsrc_get_property (GObject * object, guint prop_id,
static GstElementStateReturn gst_fdsrc_change_state (GstElement * element); static GstElementStateReturn gst_fdsrc_change_state (GstElement * element);
static gboolean gst_fdsrc_release_locks (GstElement * element); static gboolean gst_fdsrc_release_locks (GstElement * element);
static GstData *gst_fdsrc_get (GstPad * pad); static GstData *gst_fdsrc_get (GstAction * action, GstRealPad * pad);
static void static void
@ -164,7 +164,8 @@ gst_fdsrc_init (GstFdSrc * fdsrc)
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate), gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
"src"); "src");
gst_pad_set_get_function (fdsrc->srcpad, gst_fdsrc_get); gst_src_pad_set_action_handler (fdsrc->srcpad, gst_fdsrc_get);
gst_real_pad_set_initially_active (GST_REAL_PAD (fdsrc->srcpad), TRUE);
gst_element_add_pad (GST_ELEMENT (fdsrc), fdsrc->srcpad); gst_element_add_pad (GST_ELEMENT (fdsrc), fdsrc->srcpad);
fdsrc->fd = 0; fdsrc->fd = 0;
@ -265,7 +266,7 @@ gst_fdsrc_release_locks (GstElement * element)
} }
static GstData * static GstData *
gst_fdsrc_get (GstPad * pad) gst_fdsrc_get (GstAction * action, GstRealPad * pad)
{ {
GstFdSrc *src; GstFdSrc *src;
GstBuffer *buf; GstBuffer *buf;
@ -277,7 +278,7 @@ gst_fdsrc_get (GstPad * pad)
gint retval; gint retval;
#endif #endif
src = GST_FDSRC (gst_pad_get_parent (pad)); src = GST_FDSRC (gst_pad_get_parent (GST_PAD (pad)));
/* create the buffer */ /* create the buffer */
buf = gst_buffer_new_and_alloc (src->blocksize); buf = gst_buffer_new_and_alloc (src->blocksize);

View file

@ -66,29 +66,6 @@ enum
ARG_LOCATION ARG_LOCATION
}; };
static const GstFormat *
gst_filesink_get_formats (GstPad * pad)
{
static const GstFormat formats[] = {
GST_FORMAT_BYTES,
0,
};
return formats;
}
static const GstQueryType *
gst_filesink_get_query_types (GstPad * pad)
{
static const GstQueryType types[] = {
GST_QUERY_TOTAL,
GST_QUERY_POSITION,
0
};
return types;
}
static void gst_filesink_dispose (GObject * object); static void gst_filesink_dispose (GObject * object);
static void gst_filesink_set_property (GObject * object, guint prop_id, static void gst_filesink_set_property (GObject * object, guint prop_id,
@ -99,10 +76,11 @@ static void gst_filesink_get_property (GObject * object, guint prop_id,
static gboolean gst_filesink_open_file (GstFileSink * sink); static gboolean gst_filesink_open_file (GstFileSink * sink);
static void gst_filesink_close_file (GstFileSink * sink); static void gst_filesink_close_file (GstFileSink * sink);
static gboolean gst_filesink_handle_event (GstPad * pad, GstEvent * event); static gboolean gst_filesink_handle_event (GstRealPad * pad, GstEvent * event);
static gboolean gst_filesink_pad_query (GstPad * pad, GstQueryType type, static gboolean gst_filesink_pad_query (GstPad * pad, GstQueryType type,
GstFormat * format, gint64 * value); GstFormat * format, gint64 * value);
static void gst_filesink_chain (GstPad * pad, GstData * _data); static void gst_filesink_chain (GstAction * action, GstRealPad * pad,
GstData * _data);
static void gst_filesink_uri_handler_init (gpointer g_iface, static void gst_filesink_uri_handler_init (gpointer g_iface,
gpointer iface_data); gpointer iface_data);
@ -167,14 +145,12 @@ gst_filesink_init (GstFileSink * filesink)
pad = pad =
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate), gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
"sink"); "sink");
gst_sink_pad_set_action_handler (pad, gst_filesink_chain);
gst_element_add_pad (GST_ELEMENT (filesink), pad); gst_element_add_pad (GST_ELEMENT (filesink), pad);
gst_pad_set_chain_function (pad, gst_filesink_chain);
GST_FLAG_SET (GST_ELEMENT (filesink), GST_ELEMENT_EVENT_AWARE); GST_FLAG_SET (GST_ELEMENT (filesink), GST_ELEMENT_EVENT_AWARE);
gst_pad_set_query_function (pad, gst_filesink_pad_query); gst_pad_set_query_function (pad, gst_filesink_pad_query);
gst_pad_set_query_type_function (pad, gst_filesink_get_query_types);
gst_pad_set_formats_function (pad, gst_filesink_get_formats);
filesink->filename = NULL; filesink->filename = NULL;
filesink->file = NULL; filesink->file = NULL;
@ -336,12 +312,12 @@ gst_filesink_pad_query (GstPad * pad, GstQueryType type,
/* handle events (search) */ /* handle events (search) */
static gboolean static gboolean
gst_filesink_handle_event (GstPad * pad, GstEvent * event) gst_filesink_handle_event (GstRealPad * pad, GstEvent * event)
{ {
GstEventType type; GstEventType type;
GstFileSink *filesink; GstFileSink *filesink;
filesink = GST_FILESINK (gst_pad_get_parent (pad)); filesink = GST_FILESINK (gst_pad_get_parent (GST_PAD (pad)));
if (!(GST_FLAG_IS_SET (filesink, GST_FILESINK_OPEN))) { if (!(GST_FLAG_IS_SET (filesink, GST_FILESINK_OPEN))) {
gst_event_unref (event); gst_event_unref (event);
@ -407,7 +383,7 @@ gst_filesink_handle_event (GstPad * pad, GstEvent * event)
gst_element_set_eos (GST_ELEMENT (filesink)); gst_element_set_eos (GST_ELEMENT (filesink));
break; break;
default: default:
gst_pad_event_default (pad, event); gst_pad_event_default (GST_PAD (pad), event);
break; break;
} }
@ -422,7 +398,7 @@ gst_filesink_handle_event (GstPad * pad, GstEvent * event)
* take the buffer from the pad and write to file if it's open * take the buffer from the pad and write to file if it's open
*/ */
static void static void
gst_filesink_chain (GstPad * pad, GstData * _data) gst_filesink_chain (GstAction * action, GstRealPad * pad, GstData * _data)
{ {
GstBuffer *buf = GST_BUFFER (_data); GstBuffer *buf = GST_BUFFER (_data);
GstFileSink *filesink; GstFileSink *filesink;
@ -431,7 +407,7 @@ gst_filesink_chain (GstPad * pad, GstData * _data)
g_return_if_fail (GST_IS_PAD (pad)); g_return_if_fail (GST_IS_PAD (pad));
g_return_if_fail (buf != NULL); g_return_if_fail (buf != NULL);
filesink = GST_FILESINK (gst_pad_get_parent (pad)); filesink = GST_FILESINK (gst_pad_get_parent (GST_PAD (pad)));
if (GST_IS_EVENT (buf)) { if (GST_IS_EVENT (buf)) {
gst_filesink_handle_event (pad, GST_EVENT (buf)); gst_filesink_handle_event (pad, GST_EVENT (buf));

View file

@ -125,43 +125,6 @@ enum
ARG_TOUCH ARG_TOUCH
}; };
static const GstEventMask *
gst_filesrc_get_event_mask (GstPad * pad)
{
static const GstEventMask masks[] = {
{GST_EVENT_SEEK, GST_SEEK_METHOD_CUR |
GST_SEEK_METHOD_SET | GST_SEEK_METHOD_END | GST_SEEK_FLAG_FLUSH},
{GST_EVENT_FLUSH, 0},
{GST_EVENT_SIZE, 0},
{0, 0}
};
return masks;
}
static const GstQueryType *
gst_filesrc_get_query_types (GstPad * pad)
{
static const GstQueryType types[] = {
GST_QUERY_TOTAL,
GST_QUERY_POSITION,
0
};
return types;
}
static const GstFormat *
gst_filesrc_get_formats (GstPad * pad)
{
static const GstFormat formats[] = {
GST_FORMAT_BYTES,
0,
};
return formats;
}
static void gst_filesrc_dispose (GObject * object); static void gst_filesrc_dispose (GObject * object);
static void gst_filesrc_set_property (GObject * object, guint prop_id, static void gst_filesrc_set_property (GObject * object, guint prop_id,
@ -170,7 +133,7 @@ static void gst_filesrc_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec); GValue * value, GParamSpec * pspec);
static gboolean gst_filesrc_check_filesize (GstFileSrc * src); static gboolean gst_filesrc_check_filesize (GstFileSrc * src);
static GstData *gst_filesrc_get (GstPad * pad); static GstData *gst_filesrc_get (GstAction * action, GstRealPad * pad);
static gboolean gst_filesrc_srcpad_event (GstPad * pad, GstEvent * event); static gboolean gst_filesrc_srcpad_event (GstPad * pad, GstEvent * event);
static gboolean gst_filesrc_srcpad_query (GstPad * pad, GstQueryType type, static gboolean gst_filesrc_srcpad_query (GstPad * pad, GstQueryType type,
GstFormat * format, gint64 * value); GstFormat * format, gint64 * value);
@ -247,12 +210,10 @@ gst_filesrc_init (GstFileSrc * src)
src->srcpad = src->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate), gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
"src"); "src");
gst_pad_set_get_function (src->srcpad, gst_filesrc_get); gst_src_pad_set_action_handler (src->srcpad, gst_filesrc_get);
gst_real_pad_set_initially_active (GST_REAL_PAD (src->srcpad), TRUE);
gst_pad_set_event_function (src->srcpad, gst_filesrc_srcpad_event); gst_pad_set_event_function (src->srcpad, gst_filesrc_srcpad_event);
gst_pad_set_event_mask_function (src->srcpad, gst_filesrc_get_event_mask);
gst_pad_set_query_function (src->srcpad, gst_filesrc_srcpad_query); gst_pad_set_query_function (src->srcpad, gst_filesrc_srcpad_query);
gst_pad_set_query_type_function (src->srcpad, gst_filesrc_get_query_types);
gst_pad_set_formats_function (src->srcpad, gst_filesrc_get_formats);
gst_element_add_pad (GST_ELEMENT (src), src->srcpad); gst_element_add_pad (GST_ELEMENT (src), src->srcpad);
#ifdef HAVE_MMAP #ifdef HAVE_MMAP
@ -686,12 +647,12 @@ gst_filesrc_get_read (GstFileSrc * src)
} }
static GstData * static GstData *
gst_filesrc_get (GstPad * pad) gst_filesrc_get (GstAction * action, GstRealPad * pad)
{ {
GstFileSrc *src; GstFileSrc *src;
g_return_val_if_fail (pad != NULL, NULL); g_return_val_if_fail (pad != NULL, NULL);
src = GST_FILESRC (gst_pad_get_parent (pad)); src = GST_FILESRC (gst_pad_get_parent (GST_PAD (pad)));
g_return_val_if_fail (GST_FLAG_IS_SET (src, GST_FILESRC_OPEN), NULL); g_return_val_if_fail (GST_FLAG_IS_SET (src, GST_FILESRC_OPEN), NULL);
/* check for flush */ /* check for flush */

View file

@ -31,18 +31,10 @@
#include "gstidentity.h" #include "gstidentity.h"
#include <gst/gstmarshal.h> #include <gst/gstmarshal.h>
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", /*
GST_PAD_SINK, GST_DEBUG_CATEGORY_STATIC (gst_identity_debug, "identity", 0, "identity element");
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
GST_DEBUG_CATEGORY_STATIC (gst_identity_debug);
#define GST_CAT_DEFAULT gst_identity_debug #define GST_CAT_DEFAULT gst_identity_debug
*/
GstElementDetails gst_identity_details = GST_ELEMENT_DETAILS ("Identity", GstElementDetails gst_identity_details = GST_ELEMENT_DETAILS ("Identity",
"Generic", "Generic",
@ -58,49 +50,32 @@ enum
LAST_SIGNAL LAST_SIGNAL
}; };
#define DEFAULT_LOOP_BASED FALSE
#define DEFAULT_SLEEP_TIME 0
#define DEFAULT_DUPLICATE 1
#define DEFAULT_ERROR_AFTER -1
#define DEFAULT_DROP_PROBABILITY 0.0
#define DEFAULT_DATARATE 0
#define DEFAULT_SILENT FALSE
#define DEFAULT_DUMP FALSE
#define DEFAULT_SYNC FALSE
#define DEFAULT_CHECK_PERFECT FALSE
enum enum
{ {
ARG_0, ARG_0,
ARG_LOOP_BASED,
ARG_SLEEP_TIME, ARG_SLEEP_TIME,
ARG_DUPLICATE, ARG_DUPLICATE,
ARG_ERROR_AFTER, ARG_ERROR_AFTER,
ARG_DROP_PROBABILITY, ARG_DROP_PROBABILITY,
ARG_DATARATE,
ARG_SILENT, ARG_SILENT,
ARG_LAST_MESSAGE, ARG_LAST_MESSAGE,
ARG_DUMP, ARG_DUMP,
ARG_SYNC,
ARG_CHECK_PERFECT ARG_CHECK_PERFECT
}; };
GST_BOILERPLATE (GstIdentity, gst_identity, GstElement, GST_TYPE_ELEMENT);
#define _do_init(bla) \
GST_DEBUG_CATEGORY_INIT (gst_identity_debug, "identity", 0, "identity element");
GST_BOILERPLATE_FULL (GstIdentity, gst_identity, GstElement, GST_TYPE_ELEMENT,
_do_init);
static void gst_identity_finalize (GObject * object); static void gst_identity_finalize (GObject * object);
static void gst_identity_set_property (GObject * object, guint prop_id, static void gst_identity_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec); const GValue * value, GParamSpec * pspec);
static void gst_identity_get_property (GObject * object, guint prop_id, static void gst_identity_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec); GValue * value, GParamSpec * pspec);
static GstElementStateReturn gst_identity_change_state (GstElement * element);
static void gst_identity_chain (GstPad * pad, GstData * _data); static GstElementStateReturn gst_identity_change_state (GstElement * element);
static void gst_identity_set_clock (GstElement * element, GstClock * clock); static void gst_identity_chain (GstAction * action, GstRealPad * pad,
GstData * data);
static void gst_identity_wakeup (GstAction * action, GstElement * element,
gpointer unused);
static guint gst_identity_signals[LAST_SIGNAL] = { 0 }; static guint gst_identity_signals[LAST_SIGNAL] = { 0 };
@ -110,10 +85,6 @@ gst_identity_base_init (gpointer g_class)
{ {
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&srctemplate));
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
gst_element_class_set_details (gstelement_class, &gst_identity_details); gst_element_class_set_details (gstelement_class, &gst_identity_details);
} }
@ -138,45 +109,36 @@ gst_identity_class_init (GstIdentityClass * klass)
gobject_class = G_OBJECT_CLASS (klass); gobject_class = G_OBJECT_CLASS (klass);
gstelement_class = GST_ELEMENT_CLASS (klass); gstelement_class = GST_ELEMENT_CLASS (klass);
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LOOP_BASED, gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_identity_get_property);
g_param_spec_boolean ("loop-based", "Loop-based", gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_identity_set_property);
"Set to TRUE to use loop-based rather than chain-based scheduling",
DEFAULT_LOOP_BASED, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SLEEP_TIME, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SLEEP_TIME,
g_param_spec_uint ("sleep-time", "Sleep time", g_param_spec_uint ("sleep-time", "Sleep time",
"Microseconds to sleep between processing", 0, G_MAXUINT, "Microseconds to sleep between processing", 0, G_MAXUINT, 0,
DEFAULT_SLEEP_TIME, G_PARAM_READWRITE)); G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DUPLICATE, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DUPLICATE,
g_param_spec_uint ("duplicate", "Duplicate Buffers", g_param_spec_uint ("duplicate", "Duplicate Buffers",
"Push the buffers N times", 0, G_MAXUINT, DEFAULT_DUPLICATE, "Push the buffers N times", 0, G_MAXUINT, 1, G_PARAM_READWRITE));
G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_ERROR_AFTER, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_ERROR_AFTER,
g_param_spec_int ("error_after", "Error After", "Error after N buffers", g_param_spec_int ("error_after", "Error After", "Error after N buffers",
G_MININT, G_MAXINT, DEFAULT_ERROR_AFTER, G_PARAM_READWRITE)); G_MININT, G_MAXINT, -1, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DROP_PROBABILITY, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DROP_PROBABILITY,
g_param_spec_float ("drop_probability", "Drop Probability", g_param_spec_float ("drop_probability", "Drop Probability",
"The Probability a buffer is dropped", 0.0, 1.0, "The Probability a buffer is dropped", 0.0, 1.0, 0.0,
DEFAULT_DROP_PROBABILITY, G_PARAM_READWRITE)); G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DATARATE,
g_param_spec_int ("datarate", "Datarate",
"(Re)timestamps buffers with number of bytes per second (0 = inactive)",
0, G_MAXINT, DEFAULT_DATARATE, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SILENT, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SILENT,
g_param_spec_boolean ("silent", "silent", "silent", DEFAULT_SILENT, g_param_spec_boolean ("silent", "silent", "silent", FALSE,
G_PARAM_READWRITE)); G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LAST_MESSAGE, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LAST_MESSAGE,
g_param_spec_string ("last-message", "last-message", "last-message", NULL, g_param_spec_string ("last-message", "last-message", "last-message", NULL,
G_PARAM_READABLE)); G_PARAM_READABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DUMP, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DUMP,
g_param_spec_boolean ("dump", "Dump", "Dump buffer contents", g_param_spec_boolean ("dump", "Dump", "Dump buffer contents", FALSE,
DEFAULT_DUMP, G_PARAM_READWRITE)); G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SYNC,
g_param_spec_boolean ("sync", "Synchronize",
"Synchronize to pipeline clock", DEFAULT_SYNC, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_CHECK_PERFECT, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_CHECK_PERFECT,
g_param_spec_boolean ("check-perfect", "Check For Perfect Stream", g_param_spec_boolean ("check-perfect", "Check For Perfect Stream",
"Verify that the stream is time- and data-contiguous", "Verify that the stream is time- and data-contiguous", FALSE,
DEFAULT_CHECK_PERFECT, G_PARAM_READWRITE)); G_PARAM_READWRITE));
gst_identity_signals[SIGNAL_HANDOFF] = gst_identity_signals[SIGNAL_HANDOFF] =
g_signal_new ("handoff", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, g_signal_new ("handoff", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
@ -185,74 +147,82 @@ gst_identity_class_init (GstIdentityClass * klass)
GST_TYPE_BUFFER | G_SIGNAL_TYPE_STATIC_SCOPE); GST_TYPE_BUFFER | G_SIGNAL_TYPE_STATIC_SCOPE);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_identity_finalize); gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_identity_finalize);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_identity_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_identity_get_property);
gstelement_class->set_clock = GST_DEBUG_FUNCPTR (gst_identity_set_clock);
gstelement_class->change_state = gstelement_class->change_state =
GST_DEBUG_FUNCPTR (gst_identity_change_state); GST_DEBUG_FUNCPTR (gst_identity_change_state);
} }
static void static void
gst_identity_init (GstIdentity * identity) gst_identity_init (GstIdentity * identity)
{ {
identity->sinkpad = GST_FLAG_SET (identity, GST_ELEMENT_EVENT_AWARE);
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate), GST_FLAG_SET (identity, GST_ELEMENT_PUSHING);
"sink");
identity->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
gst_sink_pad_set_action_handler (identity->sinkpad, gst_identity_chain);
gst_element_add_pad (GST_ELEMENT (identity), identity->sinkpad); gst_element_add_pad (GST_ELEMENT (identity), identity->sinkpad);
gst_pad_set_chain_function (identity->sinkpad,
GST_DEBUG_FUNCPTR (gst_identity_chain));
gst_pad_set_link_function (identity->sinkpad, gst_pad_proxy_pad_link); gst_pad_set_link_function (identity->sinkpad, gst_pad_proxy_pad_link);
gst_pad_set_getcaps_function (identity->sinkpad, gst_pad_proxy_getcaps); gst_pad_set_getcaps_function (identity->sinkpad, gst_pad_proxy_getcaps);
identity->srcpad = identity->srcpad = gst_pad_new ("src", GST_PAD_SRC);
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
"src");
gst_element_add_pad (GST_ELEMENT (identity), identity->srcpad); gst_element_add_pad (GST_ELEMENT (identity), identity->srcpad);
gst_pad_set_link_function (identity->srcpad, gst_pad_proxy_pad_link); gst_pad_set_link_function (identity->srcpad, gst_pad_proxy_pad_link);
gst_pad_set_getcaps_function (identity->srcpad, gst_pad_proxy_getcaps); gst_pad_set_getcaps_function (identity->srcpad, gst_pad_proxy_getcaps);
identity->loop_based = DEFAULT_LOOP_BASED; identity->wakeup = gst_element_add_wakeup (GST_ELEMENT (identity), FALSE,
identity->sleep_time = DEFAULT_SLEEP_TIME; gst_identity_wakeup, NULL);
identity->duplicate = DEFAULT_DUPLICATE;
identity->error_after = DEFAULT_ERROR_AFTER; identity->loop_based = FALSE;
identity->drop_probability = DEFAULT_DROP_PROBABILITY; identity->sleep_time = 0;
identity->datarate = DEFAULT_DATARATE; identity->duplicate = 1;
identity->silent = DEFAULT_SILENT; identity->error_after = -1;
identity->sync = DEFAULT_SYNC; identity->drop_probability = 0.0;
identity->check_perfect = DEFAULT_CHECK_PERFECT; identity->silent = FALSE;
identity->dump = DEFAULT_DUMP; identity->check_perfect = FALSE;
identity->prev_timestamp = GST_CLOCK_TIME_NONE;
identity->prev_duration = GST_CLOCK_TIME_NONE;
identity->prev_offset_end = -1;
identity->dump = FALSE;
identity->last_message = NULL; identity->last_message = NULL;
identity->srccaps = NULL; identity->srccaps = NULL;
GST_FLAG_SET (identity, GST_ELEMENT_EVENT_AWARE);
GST_FLAG_SET (identity, GST_ELEMENT_WORK_IN_PLACE);
} }
static void static void
gst_identity_set_clock (GstElement * element, GstClock * clock) gst_identity_push (GstIdentity * identity, GstBuffer * buf)
{ {
GstIdentity *identity = GST_IDENTITY (element); if (!identity->silent) {
g_free (identity->last_message);
gst_object_replace ((GstObject **) & identity->clock, (GstObject *) clock); identity->last_message =
g_strdup_printf ("chain ******* (%s:%s)i (%d bytes, timestamp: %"
GST_TIME_FORMAT ", duration: %" GST_TIME_FORMAT ", offset: %"
G_GINT64_FORMAT ", offset_end: % " G_GINT64_FORMAT ", flags: %d) %p",
GST_DEBUG_PAD_NAME (identity->sinkpad), GST_BUFFER_SIZE (buf),
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
GST_TIME_ARGS (GST_BUFFER_DURATION (buf)), GST_BUFFER_OFFSET (buf),
GST_BUFFER_OFFSET_END (buf), GST_BUFFER_FLAGS (buf), buf);
g_object_notify (G_OBJECT (identity), "last-message");
} }
gst_object_ref (GST_OBJECT (identity));
g_signal_emit (G_OBJECT (identity), gst_identity_signals[SIGNAL_HANDOFF], 0,
buf);
if (identity->sleep_time)
g_usleep (identity->sleep_time);
/* things may happen in handoff signals... */
if (GST_ELEMENT_SCHED (identity))
gst_pad_push (identity->srcpad, GST_DATA (buf));
gst_object_unref (GST_OBJECT (identity));
}
static void static void
gst_identity_chain (GstPad * pad, GstData * _data) gst_identity_chain (GstAction * action, GstRealPad * pad, GstData * data)
{ {
GstBuffer *buf = GST_BUFFER (_data); GstBuffer *buf;
GstIdentity *identity; GstIdentity *identity = GST_IDENTITY (gst_pad_get_parent (GST_PAD (pad)));
guint i;
g_return_if_fail (pad != NULL);
g_return_if_fail (GST_IS_PAD (pad));
g_return_if_fail (buf != NULL);
identity = GST_IDENTITY (gst_pad_get_parent (pad));
buf = GST_BUFFER (data);
if (GST_IS_EVENT (buf)) { if (GST_IS_EVENT (buf)) {
GstEvent *event = GST_EVENT (buf); GstEvent *event = GST_EVENT (buf);
@ -261,11 +231,12 @@ gst_identity_chain (GstPad * pad, GstData * _data)
identity->last_message = identity->last_message =
g_strdup_printf ("chain ******* (%s:%s)E (type: %d) %p", g_strdup_printf ("chain ******* (%s:%s)E (type: %d) %p",
GST_DEBUG_PAD_NAME (pad), GST_EVENT_TYPE (event), event); GST_DEBUG_PAD_NAME (identity->sinkpad), GST_EVENT_TYPE (event),
event);
g_object_notify (G_OBJECT (identity), "last_message"); g_object_notify (G_OBJECT (identity), "last_message");
} }
gst_pad_event_default (pad, event); gst_pad_event_default (identity->sinkpad, event);
return; return;
} }
@ -328,75 +299,31 @@ gst_identity_chain (GstPad * pad, GstData * _data)
gst_util_dump_mem (GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf)); gst_util_dump_mem (GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf));
} }
for (i = identity->duplicate; i; i--) { if (identity->duplicate > 1) {
GstClockTime time; identity->current = buf;
gst_data_ref (GST_DATA (buf));
if (!identity->silent) { identity->missing = identity->duplicate - 1;
g_free (identity->last_message); gst_action_set_active (action, FALSE);
identity->last_message = gst_action_set_active (identity->wakeup, TRUE);
g_strdup_printf ("chain ******* (%s:%s)i (%d bytes, timestamp: %"
GST_TIME_FORMAT ", duration: %" GST_TIME_FORMAT ", offset: %"
G_GINT64_FORMAT ", offset_end: % " G_GINT64_FORMAT ", flags: %d) %p",
GST_DEBUG_PAD_NAME (identity->sinkpad), GST_BUFFER_SIZE (buf),
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
GST_TIME_ARGS (GST_BUFFER_DURATION (buf)), GST_BUFFER_OFFSET (buf),
GST_BUFFER_OFFSET_END (buf), GST_BUFFER_FLAGS (buf), buf);
g_object_notify (G_OBJECT (identity), "last-message");
}
time = GST_BUFFER_TIMESTAMP (buf);
if (identity->datarate > 0) {
time = identity->bytes_handled * GST_SECOND / identity->datarate;
GST_BUFFER_TIMESTAMP (buf) = time;
GST_BUFFER_DURATION (buf) =
GST_BUFFER_SIZE (buf) * GST_SECOND / identity->datarate;
}
g_signal_emit (G_OBJECT (identity), gst_identity_signals[SIGNAL_HANDOFF], 0,
buf);
if (i > 1)
gst_buffer_ref (buf);
if (identity->sync) {
if (identity->clock) {
gst_element_wait (GST_ELEMENT (identity), time);
}
}
identity->bytes_handled += GST_BUFFER_SIZE (buf);
gst_pad_push (identity->srcpad, GST_DATA (buf));
if (identity->sleep_time)
g_usleep (identity->sleep_time);
} }
gst_identity_push (identity, buf);
} }
static void static void
gst_identity_loop (GstElement * element) gst_identity_wakeup (GstAction * action, GstElement * element, gpointer unused)
{ {
GstIdentity *identity; GstIdentity *identity = GST_IDENTITY (element);
GstBuffer *buf; GstBuffer *buf = identity->current;
g_return_if_fail (element != NULL); g_assert (buf);
g_return_if_fail (GST_IS_IDENTITY (element)); if (--identity->missing) {
gst_data_ref (GST_DATA (buf));
identity = GST_IDENTITY (element);
buf = GST_BUFFER (gst_pad_pull (identity->sinkpad));
if (GST_IS_EVENT (buf)) {
GstEvent *event = GST_EVENT (buf);
if (GST_EVENT_IS_INTERRUPT (event)) {
gst_event_unref (event);
} else { } else {
gst_pad_event_default (identity->sinkpad, event); identity->current = NULL;
} gst_action_set_active (action, FALSE);
} else { gst_real_pad_set_active (GST_REAL_PAD (identity->sinkpad), TRUE);
gst_identity_chain (identity->sinkpad, GST_DATA (buf));
} }
gst_identity_push (identity, buf);
} }
static void static void
@ -411,17 +338,6 @@ gst_identity_set_property (GObject * object, guint prop_id,
identity = GST_IDENTITY (object); identity = GST_IDENTITY (object);
switch (prop_id) { switch (prop_id) {
case ARG_LOOP_BASED:
identity->loop_based = g_value_get_boolean (value);
if (identity->loop_based) {
gst_element_set_loop_function (GST_ELEMENT (identity),
gst_identity_loop);
gst_pad_set_chain_function (identity->sinkpad, NULL);
} else {
gst_pad_set_chain_function (identity->sinkpad, gst_identity_chain);
gst_element_set_loop_function (GST_ELEMENT (identity), NULL);
}
break;
case ARG_SLEEP_TIME: case ARG_SLEEP_TIME:
identity->sleep_time = g_value_get_uint (value); identity->sleep_time = g_value_get_uint (value);
break; break;
@ -440,12 +356,6 @@ gst_identity_set_property (GObject * object, guint prop_id,
case ARG_DROP_PROBABILITY: case ARG_DROP_PROBABILITY:
identity->drop_probability = g_value_get_float (value); identity->drop_probability = g_value_get_float (value);
break; break;
case ARG_DATARATE:
identity->datarate = g_value_get_int (value);
break;
case ARG_SYNC:
identity->sync = g_value_get_boolean (value);
break;
case ARG_CHECK_PERFECT: case ARG_CHECK_PERFECT:
identity->check_perfect = g_value_get_boolean (value); identity->check_perfect = g_value_get_boolean (value);
break; break;
@ -467,9 +377,6 @@ gst_identity_get_property (GObject * object, guint prop_id, GValue * value,
identity = GST_IDENTITY (object); identity = GST_IDENTITY (object);
switch (prop_id) { switch (prop_id) {
case ARG_LOOP_BASED:
g_value_set_boolean (value, identity->loop_based);
break;
case ARG_SLEEP_TIME: case ARG_SLEEP_TIME:
g_value_set_uint (value, identity->sleep_time); g_value_set_uint (value, identity->sleep_time);
break; break;
@ -482,9 +389,6 @@ gst_identity_get_property (GObject * object, guint prop_id, GValue * value,
case ARG_DROP_PROBABILITY: case ARG_DROP_PROBABILITY:
g_value_set_float (value, identity->drop_probability); g_value_set_float (value, identity->drop_probability);
break; break;
case ARG_DATARATE:
g_value_set_int (value, identity->datarate);
break;
case ARG_SILENT: case ARG_SILENT:
g_value_set_boolean (value, identity->silent); g_value_set_boolean (value, identity->silent);
break; break;
@ -494,9 +398,6 @@ gst_identity_get_property (GObject * object, guint prop_id, GValue * value,
case ARG_LAST_MESSAGE: case ARG_LAST_MESSAGE:
g_value_set_string (value, identity->last_message); g_value_set_string (value, identity->last_message);
break; break;
case ARG_SYNC:
g_value_set_boolean (value, identity->sync);
break;
case ARG_CHECK_PERFECT: case ARG_CHECK_PERFECT:
g_value_set_boolean (value, identity->check_perfect); g_value_set_boolean (value, identity->check_perfect);
break; break;
@ -509,29 +410,14 @@ gst_identity_get_property (GObject * object, guint prop_id, GValue * value,
static GstElementStateReturn static GstElementStateReturn
gst_identity_change_state (GstElement * element) gst_identity_change_state (GstElement * element)
{ {
GstIdentity *identity; GstIdentity *identity = GST_IDENTITY (element);
g_return_val_if_fail (GST_IS_IDENTITY (element), GST_STATE_FAILURE);
identity = GST_IDENTITY (element);
switch (GST_STATE_TRANSITION (element)) { switch (GST_STATE_TRANSITION (element)) {
case GST_STATE_NULL_TO_READY:
break;
case GST_STATE_READY_TO_PAUSED:
identity->bytes_handled = 0;
identity->prev_timestamp = GST_CLOCK_TIME_NONE;
identity->prev_duration = GST_CLOCK_TIME_NONE;
identity->prev_offset_end = -1;
break;
case GST_STATE_PAUSED_TO_PLAYING:
case GST_STATE_PLAYING_TO_PAUSED:
break;
case GST_STATE_PAUSED_TO_READY: case GST_STATE_PAUSED_TO_READY:
g_free (identity->last_message); if (identity->current) {
identity->last_message = NULL; gst_data_unref (GST_DATA (identity->current));
break; identity->current = NULL;
case GST_STATE_READY_TO_NULL: }
break; break;
default: default:
break; break;

View file

@ -50,24 +50,24 @@ struct _GstIdentity {
GstPad * sinkpad; GstPad * sinkpad;
GstPad * srcpad; GstPad * srcpad;
GstAction * wakeup;
gboolean loop_based; gboolean loop_based;
guint duplicate; guint duplicate;
gint error_after; gint error_after;
gfloat drop_probability; gfloat drop_probability;
gint datarate;
guint sleep_time; guint sleep_time;
gboolean silent; gboolean silent;
gboolean dump; gboolean dump;
gboolean sync;
gboolean check_perfect; gboolean check_perfect;
GstClockTime prev_timestamp; GstClockTime prev_timestamp;
GstClockTime prev_duration; GstClockTime prev_duration;
guint64 prev_offset_end; guint64 prev_offset_end;
GstClock *clock;
gchar *last_message; gchar *last_message;
GstCaps *srccaps; GstCaps *srccaps;
guint64 bytes_handled; GstBuffer * current;
guint missing;
}; };
struct _GstIdentityClass { struct _GstIdentityClass {

View file

@ -27,15 +27,10 @@
#include "gsttee.h" #include "gsttee.h"
#include <string.h> #include <string.h>
#if 0
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", GST_DEBUG_CATEGORY_STATIC (gst_tee_debug, "tee", 0, "tee element");
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
GST_DEBUG_CATEGORY_STATIC (gst_tee_debug);
#define GST_CAT_DEFAULT gst_tee_debug #define GST_CAT_DEFAULT gst_tee_debug
#endif
GstElementDetails gst_tee_details = GST_ELEMENT_DETAILS ("Tee pipe fitting", GstElementDetails gst_tee_details = GST_ELEMENT_DETAILS ("Tee pipe fitting",
"Generic", "Generic",
"1-to-N pipe fitting", "1-to-N pipe fitting",
@ -63,10 +58,7 @@ GstStaticPadTemplate tee_src_template = GST_STATIC_PAD_TEMPLATE ("src%d",
GST_PAD_REQUEST, GST_PAD_REQUEST,
GST_STATIC_CAPS_ANY); GST_STATIC_CAPS_ANY);
#define _do_init(bla) \ GST_BOILERPLATE (GstTee, gst_tee, GstElement, GST_TYPE_ELEMENT);
GST_DEBUG_CATEGORY_INIT (gst_tee_debug, "tee", 0, "tee element");
GST_BOILERPLATE_FULL (GstTee, gst_tee, GstElement, GST_TYPE_ELEMENT, _do_init);
static GstPad *gst_tee_request_new_pad (GstElement * element, static GstPad *gst_tee_request_new_pad (GstElement * element,
GstPadTemplate * temp, const gchar * unused); GstPadTemplate * temp, const gchar * unused);
@ -77,7 +69,10 @@ static void gst_tee_set_property (GObject * object, guint prop_id,
static void gst_tee_get_property (GObject * object, guint prop_id, static void gst_tee_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec); GValue * value, GParamSpec * pspec);
static void gst_tee_chain (GstPad * pad, GstData * _data); static void gst_tee_chain (GstAction * action, GstRealPad * pad,
GstData * data);
static GstData *gst_tee_get (GstAction * action, GstRealPad * pad);
static GstElementStateReturn gst_tee_change_state (GstElement * element);
static void static void
@ -85,8 +80,6 @@ gst_tee_base_init (gpointer g_class)
{ {
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
gst_element_class_set_details (gstelement_class, &gst_tee_details); gst_element_class_set_details (gstelement_class, &gst_tee_details);
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&tee_src_template)); gst_static_pad_template_get (&tee_src_template));
@ -114,6 +107,9 @@ gst_tee_class_init (GstTeeClass * klass)
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_tee_get_property);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_tee_set_property);
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_NUM_PADS, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_NUM_PADS,
g_param_spec_int ("num_pads", "num_pads", "num_pads", g_param_spec_int ("num_pads", "num_pads", "num_pads",
0, G_MAXINT, 0, G_PARAM_READABLE)); 0, G_MAXINT, 0, G_PARAM_READABLE));
@ -126,9 +122,8 @@ gst_tee_class_init (GstTeeClass * klass)
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_tee_finalize); gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_tee_finalize);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_tee_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_tee_get_property);
gstelement_class->change_state = gst_tee_change_state;
gstelement_class->request_new_pad = gstelement_class->request_new_pad =
GST_DEBUG_FUNCPTR (gst_tee_request_new_pad); GST_DEBUG_FUNCPTR (gst_tee_request_new_pad);
} }
@ -136,17 +131,16 @@ gst_tee_class_init (GstTeeClass * klass)
static void static void
gst_tee_init (GstTee * tee) gst_tee_init (GstTee * tee)
{ {
tee->sinkpad = tee->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate), gst_sink_pad_set_action_handler (tee->sinkpad, gst_tee_chain);
"sink");
gst_element_add_pad (GST_ELEMENT (tee), tee->sinkpad); gst_element_add_pad (GST_ELEMENT (tee), tee->sinkpad);
gst_pad_set_chain_function (tee->sinkpad, GST_DEBUG_FUNCPTR (gst_tee_chain));
gst_pad_set_link_function (tee->sinkpad, gst_pad_set_link_function (tee->sinkpad,
GST_DEBUG_FUNCPTR (gst_pad_proxy_pad_link)); GST_DEBUG_FUNCPTR (gst_pad_proxy_pad_link));
gst_pad_set_getcaps_function (tee->sinkpad, gst_pad_set_getcaps_function (tee->sinkpad,
GST_DEBUG_FUNCPTR (gst_pad_proxy_getcaps)); GST_DEBUG_FUNCPTR (gst_pad_proxy_getcaps));
tee->last_message = NULL; tee->last_message = NULL;
GST_FLAG_SET (tee, GST_ELEMENT_EVENT_AWARE);
} }
/* helper compare function */ /* helper compare function */
@ -161,56 +155,6 @@ name_pad_compare (gconstpointer a, gconstpointer b)
return strcmp (name, gst_pad_get_name (pad)); /* returns 0 if match */ return strcmp (name, gst_pad_get_name (pad)); /* returns 0 if match */
} }
static GstCaps *
gst_tee_getcaps (GstPad * _pad)
{
GstTee *tee = GST_TEE (gst_pad_get_parent (_pad));
GstCaps *caps = gst_caps_new_any (), *tmp, *res;
GstPad *pad;
const GList *pads;
for (pads = gst_element_get_pad_list (GST_ELEMENT (tee));
pads != NULL; pads = pads->next) {
pad = GST_PAD (pads->data);
if (pad == _pad)
continue;
tmp = gst_pad_get_allowed_caps (pad);
res = gst_caps_intersect (caps, tmp);
gst_caps_free (tmp);
gst_caps_free (caps);
caps = res;
}
return caps;
}
static GstPadLinkReturn
gst_tee_link (GstPad * _pad, const GstCaps * caps)
{
GstTee *tee = GST_TEE (gst_pad_get_parent (_pad));
GstPadLinkReturn res;
GstPad *pad;
const GList *pads;
GST_DEBUG_OBJECT (tee, "Forwarding link to all other pads");
for (pads = gst_element_get_pad_list (GST_ELEMENT (tee));
pads != NULL; pads = pads->next) {
pad = GST_PAD (pads->data);
if (pad == _pad)
continue;
res = gst_pad_try_set_caps (pad, caps);
GST_DEBUG_OBJECT (tee, "Pad %s:%s gave response %d",
GST_DEBUG_PAD_NAME (pad), res);
if (GST_PAD_LINK_FAILED (res))
return res;
}
return GST_PAD_LINK_OK;
}
static GstPad * static GstPad *
gst_tee_request_new_pad (GstElement * element, GstPadTemplate * templ, gst_tee_request_new_pad (GstElement * element, GstPadTemplate * templ,
const gchar * unused) const gchar * unused)
@ -252,8 +196,11 @@ gst_tee_request_new_pad (GstElement * element, GstPadTemplate * templ,
srcpad = gst_pad_new_from_template (templ, name); srcpad = gst_pad_new_from_template (templ, name);
g_free (name); g_free (name);
gst_pad_set_link_function (srcpad, GST_DEBUG_FUNCPTR (gst_tee_link)); gst_src_pad_set_action_handler (srcpad, gst_tee_get);
gst_pad_set_getcaps_function (srcpad, GST_DEBUG_FUNCPTR (gst_tee_getcaps)); gst_pad_set_link_function (srcpad,
GST_DEBUG_FUNCPTR (gst_pad_proxy_pad_link));
gst_pad_set_getcaps_function (srcpad,
GST_DEBUG_FUNCPTR (gst_pad_proxy_getcaps));
gst_element_add_pad (GST_ELEMENT (tee), srcpad); gst_element_add_pad (GST_ELEMENT (tee), srcpad);
GST_PAD_ELEMENT_PRIVATE (srcpad) = NULL; GST_PAD_ELEMENT_PRIVATE (srcpad) = NULL;
@ -313,50 +260,82 @@ gst_tee_get_property (GObject * object, guint prop_id, GValue * value,
} }
} }
/** static GstData *
* gst_tee_chain: gst_tee_get (GstAction * action, GstRealPad * pad)
* @pad: the pad to follow {
* @buf: the buffer to pass GstData *data;
* GstTee *tee = GST_TEE (gst_action_get_element (action));
* Chain a buffer on a pad.
*/ g_assert (tee->current);
static void if (!tee->silent) {
gst_tee_chain (GstPad * pad, GstData * _data) GstData *data = tee->current;
g_free (tee->last_message);
tee->last_message =
g_strdup_printf ("request ******* (%s:%s)t (%d bytes, %"
G_GUINT64_FORMAT ") %p", GST_DEBUG_PAD_NAME (pad),
GST_IS_BUFFER (data) ? GST_BUFFER_SIZE (data) : 0,
GST_IS_BUFFER (data) ? GST_BUFFER_TIMESTAMP (data) :
GST_CLOCK_TIME_NONE, data);
g_object_notify (G_OBJECT (tee), "last_message");
}
data = tee->current;
gst_action_set_active (action, FALSE);
tee->missing_pads--;
if (tee->missing_pads == 0) {
gst_real_pad_set_active (GST_REAL_PAD (tee->sinkpad), TRUE);
if (GST_IS_EVENT (tee->current) &&
GST_EVENT_TYPE (tee->current) == GST_EVENT_EOS) {
gst_element_set_eos (GST_ELEMENT (tee));
}
tee->current = NULL;
} else {
gst_data_ref (tee->current);
}
return data;
}
static void
gst_tee_chain (GstAction * action, GstRealPad * pad, GstData * data)
{ {
GstBuffer *buf = GST_BUFFER (_data);
GstTee *tee;
const GList *pads; const GList *pads;
GstTee *tee = GST_TEE (gst_action_get_element (action));
g_return_if_fail (pad != NULL); g_assert (tee->current == NULL);
g_return_if_fail (GST_IS_PAD (pad)); g_assert (tee->missing_pads == 0);
g_return_if_fail (buf != NULL); tee->current = data;
for (pads = gst_element_get_pad_list (GST_ELEMENT (tee)); pads;
tee = GST_TEE (gst_pad_get_parent (pad)); pads = g_list_next (pads)) {
gst_buffer_ref_by_count (buf, GST_ELEMENT (tee)->numsrcpads - 1);
pads = gst_element_get_pad_list (GST_ELEMENT (tee));
while (pads) {
GstPad *outpad = GST_PAD (pads->data); GstPad *outpad = GST_PAD (pads->data);
pads = g_list_next (pads);
if (GST_PAD_DIRECTION (outpad) != GST_PAD_SRC) if (GST_PAD_DIRECTION (outpad) != GST_PAD_SRC)
continue; continue;
if (!tee->silent) { gst_real_pad_set_active (GST_REAL_PAD (outpad), TRUE);
g_free (tee->last_message); tee->missing_pads++;
tee->last_message = }
g_strdup_printf ("chain ******* (%s:%s)t (%d bytes, %" gst_real_pad_set_active (GST_REAL_PAD (tee->sinkpad), FALSE);
G_GUINT64_FORMAT ") %p", GST_DEBUG_PAD_NAME (outpad),
GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf), buf);
g_object_notify (G_OBJECT (tee), "last_message");
} }
if (GST_PAD_IS_USABLE (outpad)) static GstElementStateReturn
gst_pad_push (outpad, GST_DATA (buf)); gst_tee_change_state (GstElement * element)
else {
gst_buffer_unref (buf); GstTee *tee = GST_TEE (element);
switch (GST_STATE_TRANSITION (element)) {
case GST_STATE_PAUSED_TO_READY:
if (tee->current) {
gst_data_unref (tee->current);
tee->current = NULL;
tee->missing_pads = 0;
} }
break;
default:
break;
}
if (GST_ELEMENT_CLASS (parent_class)->change_state)
return GST_ELEMENT_CLASS (parent_class)->change_state (element);
return GST_STATE_SUCCESS;
} }

View file

@ -48,6 +48,9 @@ struct _GstTee {
GstPad *sinkpad; GstPad *sinkpad;
GstData *current; /* current data peers should pull */
gint missing_pads; /* number of pads that haven't pulled yet */
gboolean silent; gboolean silent;
gchar *last_message; gchar *last_message;
}; };

View file

@ -45,6 +45,7 @@
#include <gst/gsttypefind.h> #include <gst/gsttypefind.h>
#include <gst/gstutils.h> #include <gst/gstutils.h>
#include <gst/gsterror.h> #include <gst/gsterror.h>
#include <gst/gstaction.h>
GST_DEBUG_CATEGORY_STATIC (gst_type_find_element_debug); GST_DEBUG_CATEGORY_STATIC (gst_type_find_element_debug);
#define GST_CAT_DEFAULT gst_type_find_element_debug #define GST_CAT_DEFAULT gst_type_find_element_debug
@ -103,16 +104,17 @@ static void gst_type_find_element_set_property (GObject * object,
static void gst_type_find_element_get_property (GObject * object, static void gst_type_find_element_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec); guint prop_id, GValue * value, GParamSpec * pspec);
static const GstEventMask *gst_type_find_element_src_event_mask (GstPad * pad);
static gboolean gst_type_find_element_src_event (GstPad * pad, static gboolean gst_type_find_element_src_event (GstPad * pad,
GstEvent * event); GstEvent * event);
static gboolean gst_type_find_handle_src_query (GstPad * pad, static gboolean gst_type_find_handle_src_query (GstPad * pad,
GstQueryType type, GstFormat * fmt, gint64 * value); GstQueryType type, GstFormat * fmt, gint64 * value);
static void push_buffer_store (GstTypeFindElement * typefind);
static void gst_type_find_element_chain (GstPad * sinkpad, GstData * data); static void gst_type_find_element_wakeup (GstAction * action,
static GstElementStateReturn GstElement * element, gpointer unused);
gst_type_find_element_change_state (GstElement * element); static void gst_type_find_element_chain (GstAction * action,
GstRealPad * sinkpad, GstData * data);
static GstElementStateReturn gst_type_find_element_change_state (GstElement *
element);
static guint gst_type_find_element_signals[LAST_SIGNAL] = { 0 }; static guint gst_type_find_element_signals[LAST_SIGNAL] = { 0 };
@ -178,33 +180,35 @@ gst_type_find_element_class_init (GstTypeFindElementClass * typefind_class)
static void static void
gst_type_find_element_init (GstTypeFindElement * typefind) gst_type_find_element_init (GstTypeFindElement * typefind)
{ {
GST_FLAG_SET (typefind, GST_ELEMENT_EVENT_AWARE);
GST_FLAG_SET (typefind, GST_ELEMENT_PUSHING);
/* sinkpad */ /* sinkpad */
typefind->sink = typefind->sink =
gst_pad_new_from_template (gst_static_pad_template_get gst_pad_new_from_template (gst_static_pad_template_get
(&type_find_element_sink_template), "sink"); (&type_find_element_sink_template), "sink");
gst_pad_set_chain_function (typefind->sink, gst_type_find_element_chain); gst_sink_pad_set_action_handler (typefind->sink, gst_type_find_element_chain);
gst_element_add_pad (GST_ELEMENT (typefind), typefind->sink); gst_element_add_pad (GST_ELEMENT (typefind), typefind->sink);
/* srcpad */ /* srcpad */
typefind->src = typefind->src =
gst_pad_new_from_template (gst_static_pad_template_get gst_pad_new_from_template (gst_static_pad_template_get
(&type_find_element_src_template), "src"); (&type_find_element_src_template), "src");
gst_pad_set_event_function (typefind->src, gst_type_find_element_src_event); gst_pad_set_event_function (typefind->src, gst_type_find_element_src_event);
gst_pad_set_event_mask_function (typefind->src,
gst_type_find_element_src_event_mask);
gst_pad_set_query_function (typefind->src, gst_pad_set_query_function (typefind->src,
GST_DEBUG_FUNCPTR (gst_type_find_handle_src_query)); GST_DEBUG_FUNCPTR (gst_type_find_handle_src_query));
gst_pad_use_explicit_caps (typefind->src); gst_pad_use_explicit_caps (typefind->src);
gst_element_add_pad (GST_ELEMENT (typefind), typefind->src); gst_element_add_pad (GST_ELEMENT (typefind), typefind->src);
typefind->wakeup = gst_element_add_wakeup (GST_ELEMENT (typefind), FALSE,
gst_type_find_element_wakeup, NULL);
typefind->caps = NULL; typefind->caps = NULL;
typefind->pending_events = NULL; typefind->pending_events = NULL;
typefind->min_probability = 1; typefind->min_probability = 1;
typefind->max_probability = GST_TYPE_FIND_MAXIMUM; typefind->max_probability = GST_TYPE_FIND_MAXIMUM;
typefind->store = gst_buffer_store_new (); typefind->store = gst_buffer_store_new ();
GST_FLAG_SET (typefind, GST_ELEMENT_EVENT_AWARE);
} }
static void static void
gst_type_find_element_dispose (GObject * object) gst_type_find_element_dispose (GObject * object)
{ {
@ -294,20 +298,6 @@ gst_type_find_handle_src_query (GstPad * pad,
return TRUE; return TRUE;
} }
static const GstEventMask *
gst_type_find_element_src_event_mask (GstPad * pad)
{
static const GstEventMask mask[] = {
{GST_EVENT_SEEK,
GST_SEEK_METHOD_SET | GST_SEEK_METHOD_CUR | GST_SEEK_METHOD_END |
GST_SEEK_FLAG_FLUSH},
/* add more if you want, event masks suck and need to die anyway */
{0,}
};
return mask;
}
static gboolean static gboolean
gst_type_find_element_src_event (GstPad * pad, GstEvent * event) gst_type_find_element_src_event (GstPad * pad, GstEvent * event)
{ {
@ -368,6 +358,19 @@ start_typefinding (GstTypeFindElement * typefind)
typefind->stream_length_available = TRUE; typefind->stream_length_available = TRUE;
typefind->stream_length = 0; typefind->stream_length = 0;
} }
static void
push_buffer_store (GstTypeFindElement * typefind, GstEvent * event)
{
if (!event)
event = gst_event_new_discontinuous (TRUE,
GST_FORMAT_DEFAULT, (guint64) 0, GST_FORMAT_BYTES, (guint64) 0,
GST_FORMAT_UNDEFINED);
typefind->pending_events = g_list_append (typefind->pending_events, event);
gst_real_pad_set_active (GST_REAL_PAD (typefind->sink), FALSE);
gst_action_set_active (typefind->wakeup, TRUE);
}
static void static void
stop_typefinding (GstTypeFindElement * typefind) stop_typefinding (GstTypeFindElement * typefind)
{ {
@ -401,7 +404,7 @@ stop_typefinding (GstTypeFindElement * typefind)
"could not seek to required position %u, hope for the best", size); "could not seek to required position %u, hope for the best", size);
typefind->mode = MODE_NORMAL; typefind->mode = MODE_NORMAL;
/* push out our queued buffers here */ /* push out our queued buffers here */
push_buffer_store (typefind); push_buffer_store (typefind, NULL);
} else { } else {
typefind->waiting_for_discont_offset = size; typefind->waiting_for_discont_offset = size;
} }
@ -409,25 +412,26 @@ stop_typefinding (GstTypeFindElement * typefind)
} }
static void static void
push_buffer_store (GstTypeFindElement * typefind) gst_type_find_element_wakeup (GstAction * action, GstElement * element,
gpointer unused)
{ {
guint size = gst_buffer_store_get_size (typefind->store, 0); guint size;
GstBuffer *buffer; GstBuffer *buffer;
const GList *item; const GList *item;
GstTypeFindElement *typefind = GST_TYPE_FIND_ELEMENT (element);
/* handle pending events */ /* handle pending events */
for (item = typefind->pending_events; item; item = item->next) { if (typefind->pending_events) {
GstEvent *e = item->data; GstEvent *e = item->data;
typefind->pending_events = g_list_remove (typefind->pending_events,
typefind->pending_events->data);
gst_pad_push (typefind->src, GST_DATA (e)); gst_pad_push (typefind->src, GST_DATA (e));
return;
} }
g_list_free (typefind->pending_events);
typefind->pending_events = NULL;
/* data */ /* data */
gst_pad_push (typefind->src, GST_DATA (gst_event_new_discontinuous (TRUE, size = gst_buffer_store_get_size (typefind->store, 0);
GST_FORMAT_DEFAULT, (guint64) 0, GST_FORMAT_BYTES, (guint64) 0,
GST_FORMAT_UNDEFINED)));
if (size && (buffer = gst_buffer_store_get_buffer (typefind->store, 0, size))) { if (size && (buffer = gst_buffer_store_get_buffer (typefind->store, 0, size))) {
GST_DEBUG_OBJECT (typefind, "pushing cached data (%u bytes)", size); GST_DEBUG_OBJECT (typefind, "pushing cached data (%u bytes)", size);
gst_pad_push (typefind->src, GST_DATA (buffer)); gst_pad_push (typefind->src, GST_DATA (buffer));
@ -437,6 +441,8 @@ push_buffer_store (GstTypeFindElement * typefind)
} }
gst_buffer_store_clear (typefind->store); gst_buffer_store_clear (typefind->store);
gst_action_set_active (action, FALSE);
gst_real_pad_set_active (GST_REAL_PAD (typefind->sink), TRUE);
} }
static guint64 static guint64
@ -496,8 +502,7 @@ gst_type_find_element_handle_event (GstPad * pad, GstEvent * event)
g_signal_emit (typefind, gst_type_find_element_signals[HAVE_TYPE], g_signal_emit (typefind, gst_type_find_element_signals[HAVE_TYPE],
0, entry->probability, entry->caps); 0, entry->probability, entry->caps);
stop_typefinding (typefind); stop_typefinding (typefind);
push_buffer_store (typefind); push_buffer_store (typefind, event);
gst_pad_event_default (pad, event);
} else { } else {
gst_pad_event_default (pad, event); gst_pad_event_default (pad, event);
GST_ELEMENT_ERROR (typefind, STREAM, TYPE_NOT_FOUND, (NULL), GST_ELEMENT_ERROR (typefind, STREAM, TYPE_NOT_FOUND, (NULL),
@ -526,13 +531,11 @@ gst_type_find_element_handle_event (GstPad * pad, GstEvent * event)
if (gst_event_discont_get_value (event, GST_FORMAT_BYTES, &off) && if (gst_event_discont_get_value (event, GST_FORMAT_BYTES, &off) &&
off == typefind->waiting_for_discont_offset) { off == typefind->waiting_for_discont_offset) {
typefind->mode = MODE_NORMAL; typefind->mode = MODE_NORMAL;
push_buffer_store (typefind); push_buffer_store (typefind, NULL);
} }
gst_event_unref (event);
} }
} else if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) { } else if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
push_buffer_store (typefind); push_buffer_store (typefind, event);
gst_pad_event_default (pad, event);
} else { } else {
gst_event_unref (event); gst_event_unref (event);
} }
@ -618,7 +621,8 @@ compare_type_find_factory (gconstpointer fac1, gconstpointer fac2)
return GST_PLUGIN_FEATURE (fac1)->rank - GST_PLUGIN_FEATURE (fac2)->rank; return GST_PLUGIN_FEATURE (fac1)->rank - GST_PLUGIN_FEATURE (fac2)->rank;
} }
static void static void
gst_type_find_element_chain (GstPad * pad, GstData * data) gst_type_find_element_chain (GstAction * action, GstRealPad * pad,
GstData * data)
{ {
GstTypeFindElement *typefind; GstTypeFindElement *typefind;
GList *entries; GList *entries;
@ -626,9 +630,9 @@ gst_type_find_element_chain (GstPad * pad, GstData * data)
GList *walk; GList *walk;
GstTypeFind find = { find_peek, find_suggest, NULL, find_element_get_length }; GstTypeFind find = { find_peek, find_suggest, NULL, find_element_get_length };
typefind = GST_TYPE_FIND_ELEMENT (GST_PAD_PARENT (pad)); typefind = GST_TYPE_FIND_ELEMENT (GST_PAD_PARENT (GST_PAD (pad)));
if (GST_IS_EVENT (data)) { if (GST_IS_EVENT (data)) {
gst_type_find_element_handle_event (pad, GST_EVENT (data)); gst_type_find_element_handle_event (GST_PAD (pad), GST_EVENT (data));
return; return;
} }
switch (typefind->mode) { switch (typefind->mode) {

View file

@ -48,6 +48,8 @@ struct _GstTypeFindElement {
GstPad * sink; GstPad * sink;
GstPad * src; GstPad * src;
GstAction * wakeup;
guint min_probability; guint min_probability;
guint max_probability; guint max_probability;
GstCaps * caps; GstCaps * caps;

View file

@ -450,11 +450,8 @@ init_pre (void)
{ {
g_type_init (); g_type_init ();
if (g_thread_supported ()) { if (!g_thread_supported ())
/* somebody already initialized threading */
} else {
g_thread_init (NULL); g_thread_init (NULL);
}
/* we need threading to be enabled right here */ /* we need threading to be enabled right here */
_gst_debug_init (); _gst_debug_init ();
@ -526,8 +523,6 @@ gst_register_core_elements (GstPlugin * plugin)
GST_TYPE_BIN) || GST_TYPE_BIN) ||
!gst_element_register (plugin, "pipeline", GST_RANK_PRIMARY, !gst_element_register (plugin, "pipeline", GST_RANK_PRIMARY,
GST_TYPE_PIPELINE) || GST_TYPE_PIPELINE) ||
!gst_element_register (plugin, "thread", GST_RANK_PRIMARY,
GST_TYPE_THREAD) ||
!gst_element_register (plugin, "queue", GST_RANK_NONE, GST_TYPE_QUEUE)) !gst_element_register (plugin, "queue", GST_RANK_NONE, GST_TYPE_QUEUE))
g_assert_not_reached (); g_assert_not_reached ();

View file

@ -31,6 +31,7 @@
#include <gst/gsttypes.h> #include <gst/gsttypes.h>
#include <gst/gstversion.h> #include <gst/gstversion.h>
#include <gst/gstaction.h>
#include <gst/gstbin.h> #include <gst/gstbin.h>
#include <gst/gstbuffer.h> #include <gst/gstbuffer.h>
#include <gst/gstcaps.h> #include <gst/gstcaps.h>
@ -48,11 +49,11 @@
#include <gst/gstpipeline.h> #include <gst/gstpipeline.h>
#include <gst/gstplugin.h> #include <gst/gstplugin.h>
#include <gst/gstscheduler.h> #include <gst/gstscheduler.h>
#include <gst/gstschedulerfactory.h>
#include <gst/gststructure.h> #include <gst/gststructure.h>
#include <gst/gstsystemclock.h> #include <gst/gstsystemclock.h>
#include <gst/gsttag.h> #include <gst/gsttag.h>
#include <gst/gsttaginterface.h> #include <gst/gsttaginterface.h>
#include <gst/gstthread.h>
#include <gst/gsttrace.h> #include <gst/gsttrace.h>
#include <gst/gsttypefind.h> #include <gst/gsttypefind.h>
#include <gst/gsturi.h> #include <gst/gsturi.h>

View file

@ -36,6 +36,10 @@ extern const char *g_log_domain_gstreamer;
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "gstaction.h"
GstAction *gst_action_new (GstActionType type);
#define gst_action_free(action) g_free (action)
/*** debugging categories *****************************************************/ /*** debugging categories *****************************************************/

404
gst/gstaction.c Normal file
View file

@ -0,0 +1,404 @@
/* GStreamer
* Copyright (C) 2004 Benjamin Otte <otte@gnome.org>
*
* gstaction.c: base class for main actions/loops
*
* 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.
*/
#include "gst_private.h"
#include "gstaction.h"
#include "gstelement.h"
#include "gstpad.h"
#include "gstinfo.h"
#include "gstscheduler.h"
/*
GST_DEBUG_CATEGORY_STATIC (debug, "GST_ACTION",
GST_DEBUG_BOLD | GST_DEBUG_FG_RED, "action handling");
#define GST_CAT_DEFAULT debug
*/
#if 1
# define RELEASE(action)
#else
# define RELEASE(action) G_STMT_START{\
gchar *_str; \
\
g_assert (action->any.active); \
_str = gst_action_to_string (action); \
g_print ("releasing %s\n", _str); \
g_free (_str); \
}G_STMT_END
#endif
GType
gst_action_get_type (void)
{
g_assert_not_reached ();
return 0;
}
#define GST_ACTION_SCHEDULER_CALL(action, call) G_STMT_START{ \
GstScheduler *sched = action->any.element->sched; \
if (sched) { \
GstSchedulerClass *klass = GST_SCHEDULER_GET_CLASS (sched); \
g_assert (klass->call); \
klass->call (sched, action); \
} \
}G_STMT_END
GstAction *
gst_action_new (GstActionType type)
{
GstAction *action = g_new0 (GstAction, 1);
action->type = type;
action->any.active = FALSE;
action->any.coupled = TRUE;
return action;
}
void
gst_element_add_action (GstElement * element, GstAction * action)
{
g_return_if_fail (action->any.element == NULL);
action->any.element = element;
element->actions = g_slist_prepend (element->actions, action);
#ifndef GST_DISABLE_GST_DEBUG
/* FIXME: make this work with %P */
G_STMT_START {
gchar *str = gst_action_to_string (action);
GST_DEBUG_OBJECT (element, "adding action: %s", str);
g_free (str);
} G_STMT_END;
#endif
GST_ACTION_SCHEDULER_CALL (action, add_action);
}
void
gst_element_remove_action (GstAction * action)
{
GstElement *element;
g_return_if_fail (action->any.element != NULL);
element = gst_action_get_element (action);
GST_ACTION_SCHEDULER_CALL (action, remove_action);
g_assert (g_slist_find (element->actions, action));
element->actions = g_slist_remove (element->actions, action);
#ifndef GST_DISABLE_GST_DEBUG
/* FIXME: make this work with %P */
G_STMT_START {
gchar *str = gst_action_to_string (action);
GST_DEBUG ("removing action: %s", str);
g_free (str);
} G_STMT_END;
#endif
action->any.element = NULL;
/* FIXME: pads manage their actions themselves - which kinda sucks */
if (action->type != GST_ACTION_SRC_PAD && action->type != GST_ACTION_SINK_PAD)
gst_action_free (action);
}
GstElement *
gst_action_get_element (const GstAction * action)
{
g_return_val_if_fail (GST_IS_ACTION (action), NULL);
return action->any.element;
}
void
gst_action_set_active (GstAction * action, gboolean active)
{
g_return_if_fail (GST_IS_ACTION (action));
if (action->any.active == active)
return;
action->any.active = active;
GST_ACTION_SCHEDULER_CALL (action, toggle_active);
}
gboolean
gst_action_is_active (GstAction * action)
{
g_return_val_if_fail (GST_IS_ACTION (action), FALSE);
return action->any.active;
}
/**
* gst_action_set_initially_active:
* @action: ithe action to set
* @active: whether or not the action should be initially active
*
* Initially active actions are activated by default when elements reset their
* actions. This happens during the state change from READY to PAUSED for
* example. This function allows modifying that behaviour for an action.
**/
void
gst_action_set_initially_active (GstAction * action, gboolean active)
{
g_return_if_fail (GST_IS_ACTION (action));
action->any.initially_active = active;
}
/**
* gst_action_is_initially_active:
* @action: #GstAction to check
*
* Retruns if the @action is initially active or not.
*
* Returns: TRUE if the @action is initially active, FALSE otherwise
**/
gboolean
gst_action_is_initially_active (GstAction * action)
{
g_return_val_if_fail (GST_IS_ACTION (action), FALSE);
return action->any.initially_active;
}
/**
* gst_action_set_coupled:
* @action: action to set
* @coupled: new value
*
* Makes an action coupled or not. A coupled action's activity depends on the
* state of the element it belongs to. It gets deactivated automatically when
* the element changes state to READY or below and it gets reset to its initial
* state by gst_element_reset_actions (). Activity of coupled actions must be
* set manually by the element at all times.
**/
void
gst_action_set_coupled (GstAction * action, gboolean coupled)
{
g_return_if_fail (GST_IS_ACTION (action));
if (action->any.coupled == coupled)
return;
action->any.coupled = coupled;
}
gboolean
gst_action_is_coupled (GstAction * action)
{
g_return_val_if_fail (GST_IS_ACTION (action), FALSE);
return action->any.coupled;
}
GstAction *
gst_element_add_wakeup (GstElement * element, gboolean active,
GstActionWakeupFunc release, gpointer user_data)
{
GstAction *action;
GstActionWakeup *wakeup;
g_return_val_if_fail (GST_IS_ELEMENT (element), NULL);
g_return_val_if_fail (release != NULL, NULL);
action = gst_action_new (GST_ACTION_WAKEUP);
action->any.initially_active = active;
wakeup = &action->wakeup;
wakeup->release = release;
wakeup->user_data = user_data;
gst_element_add_action (element, action);
return action;
}
void
gst_action_wakeup_release (GstAction * action)
{
g_return_if_fail (GST_IS_ACTION_TYPE (action, GST_ACTION_WAKEUP));
RELEASE (action);
action->wakeup.release (action, action->any.element,
action->wakeup.user_data);
}
GstRealPad *
gst_action_get_pad (const GstAction * action)
{
g_return_val_if_fail (GST_IS_ACTION (action), NULL);
g_return_val_if_fail (action->type == GST_ACTION_SINK_PAD
|| action->type == GST_ACTION_SRC_PAD, NULL);
if (action->type == GST_ACTION_SINK_PAD) {
g_assert (action->sinkpad.pad != NULL);
return action->sinkpad.pad;
} else if (action->type == GST_ACTION_SRC_PAD) {
g_assert (action->srcpad.pad != NULL);
return action->srcpad.pad;
} else {
g_assert_not_reached ();
return NULL;
}
}
void
gst_action_release_sink_pad (GstAction * action, GstData * data)
{
g_return_if_fail (GST_IS_ACTION_TYPE (action, GST_ACTION_SINK_PAD));
RELEASE (action);
action->sinkpad.release (action, action->sinkpad.pad, data);
}
GstData *
gst_action_release_src_pad (GstAction * action)
{
g_return_val_if_fail (GST_IS_ACTION_TYPE (action, GST_ACTION_SRC_PAD), NULL);
RELEASE (action);
return action->srcpad.release (action, action->srcpad.pad);
}
GstAction *
gst_real_pad_get_action (GstRealPad * pad)
{
g_return_val_if_fail (GST_IS_REAL_PAD (pad), NULL);
g_assert_not_reached ();
return NULL;
}
GstAction *
gst_element_add_wait (GstElement * element, gboolean active,
GstClockTime start_time, GstClockTime interval, GstActionWaitFunc release)
{
GstAction *action;
GstActionWait *wait;
g_return_val_if_fail (GST_IS_ELEMENT (element), NULL);
g_return_val_if_fail (release != NULL, NULL);
g_return_val_if_fail (GST_CLOCK_TIME_IS_VALID (start_time), NULL);
g_return_val_if_fail (GST_CLOCK_TIME_IS_VALID (interval), NULL);
action = gst_action_new (GST_ACTION_WAIT);
action->any.initially_active = active;
wait = &action->wait;
wait->time = start_time;
wait->interval = interval;
wait->release = release;
gst_element_add_action (element, action);
return action;
}
void
gst_action_wait_change (GstAction * action, GstClockTime start_time,
GstClockTime interval)
{
g_return_if_fail (GST_IS_ACTION_TYPE (action, GST_ACTION_WAIT));
action->wait.time = start_time;
action->wait.interval = interval;
GST_ACTION_SCHEDULER_CALL (action, update_values);
}
void
gst_action_wait_release (GstAction * action)
{
GstClockTime time;
g_return_if_fail (GST_IS_ACTION_TYPE (action, GST_ACTION_WAIT));
RELEASE (action);
time = action->wait.time;
action->wait.time += action->wait.interval;
action->wait.release (action, action->any.element, time);
}
GstAction *
gst_element_add_fd (GstElement * element, gboolean active,
gint fd, gushort condition, GstActionFdFunc release)
{
GstAction *action;
GstActionFd *afd;
g_return_val_if_fail (GST_IS_ELEMENT (element), NULL);
g_return_val_if_fail (release != NULL, NULL);
g_return_val_if_fail (condition != 0, NULL);
action = gst_action_new (GST_ACTION_FD);
action->any.initially_active = active;
afd = &action->fd;
afd->fd = fd;
afd->condition = condition;
gst_element_add_action (element, action);
return action;
}
void
gst_action_fd_release (GstAction * action, GIOCondition condition)
{
g_return_if_fail (GST_IS_ACTION_TYPE (action, GST_ACTION_FD));
RELEASE (action);
action->fd.release (action, action->any.element, action->fd.fd, condition);
}
void
gst_action_fd_change (GstAction * action, gint fd, gushort condition)
{
g_return_if_fail (GST_IS_ACTION_TYPE (action, GST_ACTION_FD));
action->fd.fd = fd;
action->fd.condition = condition;
GST_ACTION_SCHEDULER_CALL (action, update_values);
}
static const gchar *
gst_action_type_to_string (GstActionType type)
{
switch (type) {
case GST_ACTION_WAKEUP:
return "WAKEUP";
case GST_ACTION_SINK_PAD:
return "SINKPAD";
case GST_ACTION_SRC_PAD:
return "SRCPAD";
case GST_ACTION_FD:
return "FD";
case GST_ACTION_WAIT:
return "TIME";
default:
g_return_val_if_reached (NULL);
}
}
gchar *
gst_action_to_string (const GstAction * action)
{
g_return_val_if_fail (GST_IS_ACTION (action), NULL);
return g_strdup_printf ("%s for %s",
gst_action_type_to_string (action->type),
GST_ELEMENT_NAME (gst_action_get_element (action)));
}

182
gst/gstaction.h Normal file
View file

@ -0,0 +1,182 @@
/* GStreamer
* Copyright (C) 2004-2005 Benjamin Otte <otte@gnome.org>
*
* gstaction.h: base class for main actions/loops
*
* 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.
*/
#ifndef __GST_ACTION_H__
#define __GST_ACTION_H__
#include <glib.h>
#include <gst/gsttypes.h>
#include <gst/gstdata.h>
G_BEGIN_DECLS
#define GST_TYPE_ACTION (gst_action_get_type ())
#define GST_IS_ACTION(action) ((action) != NULL && \
(action)->type > GST_ACTION_INVALID && \
(action)->type < GST_ACTION_TYPE_COUNT)
#define GST_IS_ACTION_TYPE(action, _type) ((action) != NULL && \
(action)->type == _type)
typedef enum {
GST_ACTION_INVALID = 0,
GST_ACTION_WAKEUP,
GST_ACTION_SINK_PAD,
GST_ACTION_SRC_PAD,
GST_ACTION_FD,
GST_ACTION_WAIT,
/* add more */
GST_ACTION_TYPE_COUNT
} GstActionType;
typedef struct _GstActionAny GstActionAny;
typedef struct _GstActionWakeup GstActionWakeup;
typedef struct _GstActionSinkPad GstActionSinkPad;
typedef struct _GstActionSrcPad GstActionSrcPad;
typedef struct _GstActionFd GstActionFd;
typedef struct _GstActionWait GstActionWait;
typedef void (* GstActionWakeupFunc) (GstAction * action,
GstElement * element,
gpointer user_data);
typedef GstData * (* GstActionSrcPadFunc) (GstAction * action,
GstRealPad * pad);
typedef void (* GstActionSinkPadFunc) (GstAction * action,
GstRealPad * pad,
GstData * data);
typedef void (* GstActionFdFunc) (GstAction * action,
GstElement * element,
gint fd,
GIOCondition condition);
typedef void (* GstActionWaitFunc) (GstAction * action,
GstElement * element,
GstClockTime time);
#define GST_ACTION_HEAD \
GstActionType type; \
guint active : 1; \
guint initially_active : 1; \
guint coupled : 1; \
guint padding : 13; \
GstElement * element;
struct _GstActionAny {
GST_ACTION_HEAD
};
struct _GstActionWakeup {
GST_ACTION_HEAD
GstActionWakeupFunc release;
gpointer user_data;
};
struct _GstActionSrcPad {
GST_ACTION_HEAD
GstRealPad * pad;
GstActionSrcPadFunc release;
};
struct _GstActionSinkPad {
GST_ACTION_HEAD
GstRealPad * pad;
GstActionSinkPadFunc release;
};
struct _GstActionFd {
GST_ACTION_HEAD
int fd;
gushort condition;
GstActionFdFunc release;
};
struct _GstActionWait {
GST_ACTION_HEAD
GstClockTime time;
GstClockTime interval;
GstActionWaitFunc release;
};
/* FIXME: padding? */
union _GstAction {
GstActionType type;
GstActionAny any;
GstActionWakeup wakeup;
GstActionSinkPad sinkpad;
GstActionSrcPad srcpad;
GstActionFd fd;
GstActionWait wait;
};
GType gst_action_get_type (void);
GstElement * gst_action_get_element (const GstAction * action);
void gst_action_set_active (GstAction * action,
gboolean active);
gboolean gst_action_is_active (GstAction * action);
void gst_action_set_initially_active (GstAction * action,
gboolean active);
gboolean gst_action_is_initially_active (GstAction * action);
void gst_action_set_coupled (GstAction * action,
gboolean coupled);
gboolean gst_action_is_coupled (GstAction * action);
void gst_element_add_action (GstElement * element,
GstAction * action);
void gst_element_remove_action (GstAction * action);
GstAction * gst_element_add_wakeup (GstElement * element,
gboolean active,
GstActionWakeupFunc release,
gpointer user_data);
void gst_action_wakeup_release (GstAction * action);
GstRealPad * gst_action_get_pad (const GstAction * action);
void gst_action_release_sink_pad (GstAction * action,
GstData * data);
GstData * gst_action_release_src_pad (GstAction * action);
GstAction * gst_real_pad_get_action (GstRealPad * pad);
GstAction * gst_element_add_wait (GstElement * element,
gboolean active,
GstClockTime start_time,
GstClockTime interval,
GstActionWaitFunc release);
void gst_action_wait_change (GstAction * action,
/* FIXME: better name? */ GstClockTime start_time,
GstClockTime interval);
void gst_action_wait_release (GstAction * action);
GstAction * gst_element_add_fd (GstElement * element,
gboolean active,
gint fd,
gushort condition,
GstActionFdFunc release);
void gst_action_fd_release (GstAction * action,
GIOCondition condition);
void gst_action_fd_change (GstAction * action,
gint fd,
gushort condition);
gchar * gst_action_to_string (const GstAction * action);
G_END_DECLS
#endif /* __GST_ACTION_H__ */

View file

@ -51,9 +51,6 @@ static GstElementDetails gst_bin_details = GST_ELEMENT_DETAILS ("Generic bin",
GType _gst_bin_type = 0; GType _gst_bin_type = 0;
static gboolean _gst_boolean_did_something_accumulator (GSignalInvocationHint *
ihint, GValue * return_accu, const GValue * handler_return, gpointer dummy);
static void gst_bin_dispose (GObject * object); static void gst_bin_dispose (GObject * object);
static GstElementStateReturn gst_bin_change_state (GstElement * element); static GstElementStateReturn gst_bin_change_state (GstElement * element);
@ -73,8 +70,6 @@ GstElementStateReturn gst_bin_set_state (GstElement * element,
static GstClock *gst_bin_get_clock_func (GstElement * element); static GstClock *gst_bin_get_clock_func (GstElement * element);
static void gst_bin_set_clock_func (GstElement * element, GstClock * clock); static void gst_bin_set_clock_func (GstElement * element, GstClock * clock);
static gboolean gst_bin_iterate_func (GstBin * bin);
#ifndef GST_DISABLE_LOADSAVE #ifndef GST_DISABLE_LOADSAVE
static xmlNodePtr gst_bin_save_thyself (GstObject * object, xmlNodePtr parent); static xmlNodePtr gst_bin_save_thyself (GstObject * object, xmlNodePtr parent);
static void gst_bin_restore_thyself (GstObject * object, xmlNodePtr self); static void gst_bin_restore_thyself (GstObject * object, xmlNodePtr self);
@ -172,11 +167,6 @@ gst_bin_class_init (GstBinClass * klass)
g_signal_new ("element-removed", G_TYPE_FROM_CLASS (klass), g_signal_new ("element-removed", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GstBinClass, element_removed), NULL, G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GstBinClass, element_removed), NULL,
NULL, gst_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GST_TYPE_ELEMENT); NULL, gst_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GST_TYPE_ELEMENT);
gst_bin_signals[ITERATE] =
g_signal_new ("iterate", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstBinClass, iterate),
_gst_boolean_did_something_accumulator, NULL, gst_marshal_BOOLEAN__VOID,
G_TYPE_BOOLEAN, 0);
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_bin_dispose); gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_bin_dispose);
@ -196,22 +186,6 @@ gst_bin_class_init (GstBinClass * klass)
klass->remove_element = GST_DEBUG_FUNCPTR (gst_bin_remove_func); klass->remove_element = GST_DEBUG_FUNCPTR (gst_bin_remove_func);
klass->child_state_change = klass->child_state_change =
GST_DEBUG_FUNCPTR (gst_bin_child_state_change_func); GST_DEBUG_FUNCPTR (gst_bin_child_state_change_func);
klass->iterate = GST_DEBUG_FUNCPTR (gst_bin_iterate_func);
}
static gboolean
_gst_boolean_did_something_accumulator (GSignalInvocationHint * ihint,
GValue * return_accu, const GValue * handler_return, gpointer dummy)
{
gboolean did_something;
did_something = g_value_get_boolean (handler_return);
if (did_something) {
g_value_set_boolean (return_accu, TRUE);
}
/* always continue emission */
return TRUE;
} }
static void static void
@ -347,8 +321,6 @@ gst_bin_set_element_sched (GstElement * element, GstScheduler * sched)
if (GST_FLAG_IS_SET (element, GST_BIN_FLAG_MANAGER)) { if (GST_FLAG_IS_SET (element, GST_BIN_FLAG_MANAGER)) {
GST_CAT_DEBUG_OBJECT (GST_CAT_PARENTAGE, element, GST_CAT_DEBUG_OBJECT (GST_CAT_PARENTAGE, element,
"child is already a manager, not resetting sched"); "child is already a manager, not resetting sched");
if (GST_ELEMENT_SCHED (element))
gst_scheduler_add_scheduler (sched, GST_ELEMENT_SCHED (element));
return; return;
} }
@ -365,7 +337,6 @@ gst_bin_set_element_sched (GstElement * element, GstScheduler * sched)
gst_scheduler_add_element (sched, element); gst_scheduler_add_element (sched, element);
if (!GST_FLAG_IS_SET (element, GST_ELEMENT_DECOUPLED)) {
/* set the sched pointer in all the pads */ /* set the sched pointer in all the pads */
pads = element->pads; pads = element->pads;
while (pads) { while (pads) {
@ -393,7 +364,6 @@ gst_bin_set_element_sched (GstElement * element, GstScheduler * sched)
} }
} }
} }
}
static void static void
gst_bin_unset_element_sched (GstElement * element, GstScheduler * sched) gst_bin_unset_element_sched (GstElement * element, GstScheduler * sched)
@ -414,9 +384,6 @@ gst_bin_unset_element_sched (GstElement * element, GstScheduler * sched)
if (GST_FLAG_IS_SET (element, GST_BIN_FLAG_MANAGER)) { if (GST_FLAG_IS_SET (element, GST_BIN_FLAG_MANAGER)) {
GST_CAT_DEBUG_OBJECT (GST_CAT_PARENTAGE, element, GST_CAT_DEBUG_OBJECT (GST_CAT_PARENTAGE, element,
"child is already a manager, not unsetting sched"); "child is already a manager, not unsetting sched");
if (sched) {
gst_scheduler_remove_scheduler (sched, GST_ELEMENT_SCHED (element));
}
return; return;
} }
/* for each child, remove them from their schedule */ /* for each child, remove them from their schedule */
@ -428,7 +395,6 @@ gst_bin_unset_element_sched (GstElement * element, GstScheduler * sched)
/* otherwise, if it's just a regular old element */ /* otherwise, if it's just a regular old element */
GList *pads; GList *pads;
if (!GST_FLAG_IS_SET (element, GST_ELEMENT_DECOUPLED)) {
/* unset the sched pointer in all the pads */ /* unset the sched pointer in all the pads */
pads = element->pads; pads = element->pads;
while (pads) { while (pads) {
@ -454,7 +420,6 @@ gst_bin_unset_element_sched (GstElement * element, GstScheduler * sched)
} }
} }
} }
}
gst_scheduler_remove_element (GST_ELEMENT_SCHED (element), element); gst_scheduler_remove_element (GST_ELEMENT_SCHED (element), element);
} }
@ -1265,84 +1230,24 @@ gst_bin_restore_thyself (GstObject * object, xmlNodePtr self)
} }
#endif /* GST_DISABLE_LOADSAVE */ #endif /* GST_DISABLE_LOADSAVE */
static GStaticRecMutex iterate_lock = G_STATIC_REC_MUTEX_INIT;
static gboolean
gst_bin_iterate_func (GstBin * bin)
{
GstScheduler *sched = GST_ELEMENT_SCHED (bin);
g_static_rec_mutex_unlock (&iterate_lock);
/* only iterate if this is the manager bin */
if (sched && sched->parent == GST_ELEMENT (bin)) {
GstSchedulerState state;
state = gst_scheduler_iterate (sched);
if (state == GST_SCHEDULER_STATE_RUNNING) {
goto done;
} else if (state == GST_SCHEDULER_STATE_ERROR) {
gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED);
} else if (state == GST_SCHEDULER_STATE_STOPPED) {
/* check if we have children scheds that are still running */
/* FIXME: remove in 0.9? autouseless because iterations gone? */
GList *walk;
for (walk = sched->schedulers; walk; walk = g_list_next (walk)) {
GstScheduler *test = walk->data;
g_return_val_if_fail (test->parent, FALSE);
if (GST_STATE (test->parent) == GST_STATE_PLAYING) {
GST_CAT_DEBUG_OBJECT (GST_CAT_SCHEDULING, bin,
"current bin is not iterating, but children are, "
"so returning TRUE anyway...");
g_usleep (1);
goto done;
}
}
}
} else {
g_warning ("bin \"%s\" is not the managing bin, can't be iterated on!\n",
GST_ELEMENT_NAME (bin));
}
g_static_rec_mutex_lock (&iterate_lock);
return FALSE;
done:
g_static_rec_mutex_lock (&iterate_lock);
return TRUE;
}
/**
* gst_bin_iterate:
* @bin: a#GstBin to iterate.
*
* Iterates over the elements in this bin.
*
* Returns: TRUE if the bin did something useful. This value
* can be used to determine it the bin is in EOS.
*/
gboolean gboolean
gst_bin_iterate (GstBin * bin) gst_bin_iterate (GstBin * bin)
{ {
gboolean running; gulong eos, error;
GMainLoop *loop;
g_return_val_if_fail (bin != NULL, FALSE);
g_return_val_if_fail (GST_IS_BIN (bin), FALSE); g_return_val_if_fail (GST_IS_BIN (bin), FALSE);
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, bin, "starting iteration"); loop = g_main_loop_new (NULL, FALSE);
gst_object_ref (GST_OBJECT (bin)); eos =
g_signal_connect_swapped (bin, "error", G_CALLBACK (g_main_loop_quit),
g_static_rec_mutex_lock (&iterate_lock); loop);
running = FALSE; error =
g_signal_emit (G_OBJECT (bin), gst_bin_signals[ITERATE], 0, &running); g_signal_connect_swapped (bin, "eos", G_CALLBACK (g_main_loop_quit),
g_static_rec_mutex_unlock (&iterate_lock); loop);
g_main_loop_run (loop);
gst_object_unref (GST_OBJECT (bin)); g_main_loop_unref (loop);
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, bin, "finished iteration"); g_signal_handler_disconnect (bin, eos);
g_signal_handler_disconnect (bin, error);
return running; return FALSE;
} }

View file

@ -41,7 +41,6 @@ GST_EXPORT GType _gst_bin_type;
* GstBinFlags: * GstBinFlags:
* @GST_BIN_FLAG_MANAGER: this bin is a manager of child elements, i.e. * @GST_BIN_FLAG_MANAGER: this bin is a manager of child elements, i.e.
* a pipeline or thread. * a pipeline or thread.
* @GST_BIN_SELF_SCHEDULABLE: the bin iterates itself.
* @GST_BIN_FLAG_PREFER_COTHREADS: we prefer to have cothreads when its * @GST_BIN_FLAG_PREFER_COTHREADS: we prefer to have cothreads when its
* an option, over chain-based. * an option, over chain-based.
* @GST_BIN_FLAG_FIXED_CLOCK: bin has one clock that cannot be changed. * @GST_BIN_FLAG_FIXED_CLOCK: bin has one clock that cannot be changed.
@ -59,7 +58,6 @@ GST_EXPORT GType _gst_bin_type;
*/ */
typedef enum { typedef enum {
GST_BIN_FLAG_MANAGER = GST_ELEMENT_FLAG_LAST, GST_BIN_FLAG_MANAGER = GST_ELEMENT_FLAG_LAST,
GST_BIN_SELF_SCHEDULABLE,
GST_BIN_FLAG_PREFER_COTHREADS, GST_BIN_FLAG_PREFER_COTHREADS,
GST_BIN_FLAG_FIXED_CLOCK, GST_BIN_FLAG_FIXED_CLOCK,
GST_BIN_STATE_LOCKED, GST_BIN_STATE_LOCKED,
@ -90,9 +88,6 @@ struct _GstBinClass {
void (*child_state_change) (GstBin *bin, GstElementState oldstate, void (*child_state_change) (GstBin *bin, GstElementState oldstate,
GstElementState newstate, GstElement *element); GstElementState newstate, GstElement *element);
/* run a full iteration of operation */
gboolean (*iterate) (GstBin *bin);
/* signals */ /* signals */
void (*element_added) (GstBin *bin, GstElement *child); void (*element_added) (GstBin *bin, GstElement *child);
void (*element_removed) (GstBin *bin, GstElement *child); void (*element_removed) (GstBin *bin, GstElement *child);
@ -117,8 +112,6 @@ G_CONST_RETURN GList*
GstElement* gst_bin_get_by_interface (GstBin *bin, GType interface); GstElement* gst_bin_get_by_interface (GstBin *bin, GType interface);
GList * gst_bin_get_all_by_interface (GstBin *bin, GType interface); GList * gst_bin_get_all_by_interface (GstBin *bin, GType interface);
gboolean gst_bin_iterate (GstBin *bin);
void gst_bin_use_clock (GstBin *bin, GstClock *clock); void gst_bin_use_clock (GstBin *bin, GstClock *clock);
GstClock* gst_bin_get_clock (GstBin *bin); GstClock* gst_bin_get_clock (GstBin *bin);
void gst_bin_auto_clock (GstBin *bin); void gst_bin_auto_clock (GstBin *bin);

View file

@ -362,9 +362,6 @@ gst_clock_class_init (GstClockClass * klass)
parent_class = g_type_class_ref (GST_TYPE_OBJECT); parent_class = g_type_class_ref (GST_TYPE_OBJECT);
if (!g_thread_supported ())
g_thread_init (NULL);
#ifndef GST_DISABLE_TRACE #ifndef GST_DISABLE_TRACE
_gst_clock_entry_trace = _gst_clock_entry_trace =
gst_alloc_trace_register (GST_CLOCK_ENTRY_TRACE_NAME); gst_alloc_trace_register (GST_CLOCK_ENTRY_TRACE_NAME);

View file

@ -35,8 +35,6 @@ G_BEGIN_DECLS
#define GST_IS_CLOCK_CLASS(cclass) (G_TYPE_CHECK_CLASS_TYPE ((cclass), GST_TYPE_CLOCK)) #define GST_IS_CLOCK_CLASS(cclass) (G_TYPE_CHECK_CLASS_TYPE ((cclass), GST_TYPE_CLOCK))
#define GST_CLOCK_GET_CLASS(clock) (G_TYPE_INSTANCE_GET_CLASS ((clock), GST_TYPE_CLOCK, GstClockClass)) #define GST_CLOCK_GET_CLASS(clock) (G_TYPE_INSTANCE_GET_CLASS ((clock), GST_TYPE_CLOCK, GstClockClass))
typedef guint64 GstClockTime;
typedef gint64 GstClockTimeDiff;
typedef gpointer GstClockID; typedef gpointer GstClockID;
#define GST_CLOCK_TIME_NONE ((GstClockTime)-1) #define GST_CLOCK_TIME_NONE ((GstClockTime)-1)

View file

@ -27,60 +27,13 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#ifndef GST_DISABLE_DEPRECATED //#ifndef GST_DISABLE_DEPRECATED
/* 0.5.2 changes; remove these ASAP */
/* element functions */
#define gst_element_connect(a,b) gst_element_link(a,b)
#define gst_element_connect_pads(a,b,c,d) \
gst_element_link_pads(a,b,c,d)
#ifdef G_HAVE_ISO_VARARGS
#define gst_element_connect_many(a,...) gst_element_link_many(a,__VA_ARGS__)
#elif defined(G_HAVE_GNUC_VARARGS)
#define gst_element_connect_many(a,args...) \
gst_element_link_many(a, ## args)
#else
/* FIXME: need an inline function */
#endif
#define gst_element_connect_filtered(a,b,c) \
gst_element_link_filtered(a,b,c)
#define gst_element_disconnect(a,b) gst_element_unlink(a,b)
/* pad functions */ gboolean gst_bin_iterate (GstBin *bin);
#define gst_pad_connect(a,b) gst_pad_link(a,b)
#define gst_pad_connect_filtered(a,b,c) gst_pad_link_filtered(a,b,c)
#define gst_pad_disconnect(a,b) gst_pad_unlink(a,b)
#define gst_pad_proxy_connect(a,b) gst_pad_proxy_link(a,b)
#define gst_pad_set_connect_function(a,b) \
gst_pad_set_link_function(a,b)
/* pad macros */
#define GST_PAD_IS_CONNECTED(a) GST_PAD_IS_LINKED(a)
/* pad enums */ //#endif /* not GST_DISABLE_DEPRECATED */
#define GST_PAD_CONNECT_REFUSED GST_PAD_LINK_REFUSED
#define GST_PAD_CONNECT_DELAYED GST_PAD_LINK_DELAYED
#define GST_PAD_CONNECT_OK GST_PAD_LINK_OK
#define GST_PAD_CONNECT_DONE GST_PAD_LINK_DONE
typedef GstPadLinkReturn GstPadConnectReturn;
/* pad function types */
typedef GstPadLinkFunction GstPadConnectFunction;
/* probably not used */
/*
* GST_RPAD_LINKFUNC
*/
/* 0.8.1.1 removal; remove completely in 0.9 */
/* information messages */
# ifdef G_HAVE_ISO_VARARGS
#define gst_info(...) GST_INFO(__VA_ARGS__)
# elif defined(G_HAVE_GNUC_VARARGS)
#define gst_info(format,args...) GST_INFO(format,##args)
# endif
#endif /* not GST_DISABLE_DEPRECATED */
G_END_DECLS G_END_DECLS

View file

@ -26,6 +26,7 @@
#include <gobject/gvaluecollector.h> #include <gobject/gvaluecollector.h>
#include "gstelement.h" #include "gstelement.h"
#include "gstaction.h"
#include "gstbin.h" #include "gstbin.h"
#include "gstmarshal.h" #include "gstmarshal.h"
#include "gsterror.h" #include "gsterror.h"
@ -263,7 +264,6 @@ gst_element_init (GstElement * element)
element->numsrcpads = 0; element->numsrcpads = 0;
element->numsinkpads = 0; element->numsinkpads = 0;
element->pads = NULL; element->pads = NULL;
element->loopfunc = NULL;
element->sched = NULL; element->sched = NULL;
element->clock = NULL; element->clock = NULL;
element->sched_private = NULL; element->sched_private = NULL;
@ -834,37 +834,6 @@ gst_element_get_clock (GstElement * element)
return NULL; return NULL;
} }
/**
* gst_element_clock_wait:
* @element: a #GstElement.
* @id: the #GstClock to use.
* @jitter: the difference between requested time and actual time.
*
* Waits for a specific time on the clock.
*
* Returns: the #GstClockReturn result of the wait operation.
*/
GstClockReturn
gst_element_clock_wait (GstElement * element, GstClockID id,
GstClockTimeDiff * jitter)
{
GstClockReturn res;
g_return_val_if_fail (GST_IS_ELEMENT (element), GST_CLOCK_ERROR);
if (GST_ELEMENT_SCHED (element)) {
GST_CAT_DEBUG (GST_CAT_CLOCK, "waiting on scheduler clock with id %d");
res =
gst_scheduler_clock_wait (GST_ELEMENT_SCHED (element), element, id,
jitter);
} else {
GST_CAT_DEBUG (GST_CAT_CLOCK, "no scheduler, returning GST_CLOCK_TIMEOUT");
res = GST_CLOCK_TIMEOUT;
}
return res;
}
#undef GST_CAT_DEFAULT #undef GST_CAT_DEFAULT
#define GST_CAT_DEFAULT GST_CAT_CLOCK #define GST_CAT_DEFAULT GST_CAT_CLOCK
/** /**
@ -907,51 +876,6 @@ gst_element_get_time (GstElement * element)
} }
} }
/**
* gst_element_wait:
* @element: element that should wait
* @timestamp: what timestamp to wait on
*
* Waits until the given relative time stamp for the element has arrived.
* When this function returns successfully, the relative time point specified
* in the timestamp has passed for this element.
* <note>This function can only be called on elements in
* #GST_STATE_PLAYING</note>
*
* Returns: TRUE on success.
*/
gboolean
gst_element_wait (GstElement * element, GstClockTime timestamp)
{
GstClockID id;
GstClockReturn ret;
GstClockTime time;
g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
g_return_val_if_fail (GST_IS_CLOCK (element->clock), FALSE);
g_return_val_if_fail (element->current_state == GST_STATE_PLAYING, FALSE);
g_return_val_if_fail (GST_CLOCK_TIME_IS_VALID (timestamp), FALSE);
/* shortcut when we're already late... */
time = gst_element_get_time (element);
GST_CAT_LOG_OBJECT (GST_CAT_CLOCK, element, "element time %" GST_TIME_FORMAT,
GST_TIME_ARGS (time));
if (time >= timestamp) {
GST_CAT_INFO_OBJECT (GST_CAT_CLOCK, element,
"called gst_element_wait (%" GST_TIME_FORMAT ") and was late (%"
GST_TIME_FORMAT, GST_TIME_ARGS (timestamp),
GST_TIME_ARGS (gst_element_get_time (element)));
return TRUE;
}
id = gst_clock_new_single_shot_id (element->clock,
element->base_time + timestamp);
ret = gst_element_clock_wait (element, id, NULL);
gst_clock_id_free (id);
return ret == GST_CLOCK_STOPPED;
}
/** /**
* gst_element_set_time: * gst_element_set_time:
* @element: element to set time on * @element: element to set time on
@ -1171,6 +1095,16 @@ gst_element_add_pad (GstElement * element, GstPad * pad)
g_return_if_fail (gst_object_check_uniqueness (element->pads, g_return_if_fail (gst_object_check_uniqueness (element->pads,
GST_PAD_NAME (pad)) == TRUE); GST_PAD_NAME (pad)) == TRUE);
if (GST_IS_REAL_PAD (pad)) {
/* append the pad's action to the element */
if (GST_ELEMENT_IS_PUSHING (element) && GST_PAD_IS_SRC (pad)) {
g_return_if_fail (GST_REAL_PAD (pad)->action == NULL);
} else {
g_return_if_fail (GST_REAL_PAD (pad)->action != NULL);
gst_element_add_action (element, GST_REAL_PAD (pad)->action);
}
}
GST_CAT_INFO_OBJECT (GST_CAT_ELEMENT_PADS, element, "adding pad '%s'", GST_CAT_INFO_OBJECT (GST_CAT_ELEMENT_PADS, element, "adding pad '%s'",
GST_STR_NULL (GST_OBJECT_NAME (pad))); GST_STR_NULL (GST_OBJECT_NAME (pad)));
@ -1193,10 +1127,6 @@ gst_element_add_pad (GstElement * element, GstPad * pad)
break; break;
} }
/* activate element when we are playing */
if (GST_STATE (element) == GST_STATE_PLAYING)
gst_pad_set_active (pad, TRUE);
/* emit the NEW_PAD signal */ /* emit the NEW_PAD signal */
g_signal_emit (G_OBJECT (element), gst_element_signals[NEW_PAD], 0, pad); g_signal_emit (G_OBJECT (element), gst_element_signals[NEW_PAD], 0, pad);
} }
@ -1257,6 +1187,9 @@ gst_element_remove_pad (GstElement * element, GstPad * pad)
gst_pad_unlink (pad, GST_PAD (GST_RPAD_PEER (pad))); gst_pad_unlink (pad, GST_PAD (GST_RPAD_PEER (pad)));
} }
gst_caps_replace (&GST_RPAD_EXPLICIT_CAPS (pad), NULL); gst_caps_replace (&GST_RPAD_EXPLICIT_CAPS (pad), NULL);
if (GST_REAL_PAD (pad)->action)
gst_element_remove_action (GST_REAL_PAD (pad)->action);
} else if (GST_IS_GHOST_PAD (pad)) { } else if (GST_IS_GHOST_PAD (pad)) {
g_object_set (pad, "real-pad", NULL, NULL); g_object_set (pad, "real-pad", NULL, NULL);
} }
@ -2297,37 +2230,6 @@ gst_element_get_random_pad (GstElement * element, GstPadDirection dir)
return NULL; return NULL;
} }
/**
* gst_element_get_event_masks:
* @element: a #GstElement to query
*
* Get an array of event masks from the element.
* If the element doesn't implement an event masks function,
* the query will be forwarded to a random linked sink pad.
*
* Returns: An array of #GstEventMask elements.
*/
const GstEventMask *
gst_element_get_event_masks (GstElement * element)
{
GstElementClass *oclass;
g_return_val_if_fail (GST_IS_ELEMENT (element), NULL);
oclass = GST_ELEMENT_GET_CLASS (element);
if (oclass->get_event_masks)
return oclass->get_event_masks (element);
else {
GstPad *pad = gst_element_get_random_pad (element, GST_PAD_SINK);
if (pad)
return gst_pad_get_event_masks (GST_PAD_PEER (pad));
}
return NULL;
}
/** /**
* gst_element_send_event: * gst_element_send_event:
* @element: a #GstElement to send the event to. * @element: a #GstElement to send the event to.
@ -2383,37 +2285,6 @@ gst_element_seek (GstElement * element, GstSeekType seek_type, guint64 offset)
return gst_element_send_event (element, event); return gst_element_send_event (element, event);
} }
/**
* gst_element_get_query_types:
* @element: a #GstElement to query
*
* Get an array of query types from the element.
* If the element doesn't implement a query types function,
* the query will be forwarded to a random sink pad.
*
* Returns: An array of #GstQueryType elements.
*/
const GstQueryType *
gst_element_get_query_types (GstElement * element)
{
GstElementClass *oclass;
g_return_val_if_fail (GST_IS_ELEMENT (element), NULL);
oclass = GST_ELEMENT_GET_CLASS (element);
if (oclass->get_query_types)
return oclass->get_query_types (element);
else {
GstPad *pad = gst_element_get_random_pad (element, GST_PAD_SINK);
if (pad)
return gst_pad_get_query_types (GST_PAD_PEER (pad));
}
return NULL;
}
/** /**
* gst_element_query: * gst_element_query:
* @element: a #GstElement to perform the query on. * @element: a #GstElement to perform the query on.
@ -2456,37 +2327,6 @@ gst_element_query (GstElement * element, GstQueryType type,
return FALSE; return FALSE;
} }
/**
* gst_element_get_formats:
* @element: a #GstElement to query
*
* Get an array of formats from the element.
* If the element doesn't implement a formats function,
* the query will be forwarded to a random sink pad.
*
* Returns: An array of #GstFormat elements.
*/
const GstFormat *
gst_element_get_formats (GstElement * element)
{
GstElementClass *oclass;
g_return_val_if_fail (GST_IS_ELEMENT (element), NULL);
oclass = GST_ELEMENT_GET_CLASS (element);
if (oclass->get_formats)
return oclass->get_formats (element);
else {
GstPad *pad = gst_element_get_random_pad (element, GST_PAD_SINK);
if (pad)
return gst_pad_get_formats (GST_PAD_PEER (pad));
}
return NULL;
}
/** /**
* gst_element_convert: * gst_element_convert:
* @element: a #GstElement to invoke the converter on. * @element: a #GstElement to invoke the converter on.
@ -2934,20 +2774,18 @@ gst_element_clear_pad_caps (GstElement * element)
} }
} }
static void void
gst_element_pads_activate (GstElement * element, gboolean active) gst_element_reset_actions (GstElement * element)
{ {
GList *pads = element->pads; GSList *walk;
GstAction *action;
while (pads) { for (walk = element->actions; walk; walk = g_slist_next (walk)) {
GstPad *pad = GST_PAD (pads->data); action = walk->data;
if (gst_action_is_coupled (action)) {
pads = g_list_next (pads); //g_print ("resetting %s to %s\n", gst_action_to_string (action), action->any.initially_active ? "TRUE" : "FALSE");
gst_action_set_active (action, action->any.initially_active);
if (!GST_IS_REAL_PAD (pad)) }
continue;
gst_pad_set_active (pad, active);
} }
} }
@ -2957,6 +2795,7 @@ gst_element_change_state (GstElement * element)
GstElementState old_state, old_pending; GstElementState old_state, old_pending;
GstObject *parent; GstObject *parent;
gint old_transition; gint old_transition;
GSList *walk;
g_return_val_if_fail (GST_IS_ELEMENT (element), GST_STATE_FAILURE); g_return_val_if_fail (GST_IS_ELEMENT (element), GST_STATE_FAILURE);
@ -2995,10 +2834,8 @@ gst_element_change_state (GstElement * element)
GST_CAT_LOG_OBJECT (GST_CAT_CLOCK, element, "setting base time to %" GST_CAT_LOG_OBJECT (GST_CAT_CLOCK, element, "setting base time to %"
G_GINT64_FORMAT, element->base_time); G_GINT64_FORMAT, element->base_time);
} }
gst_element_pads_activate (element, FALSE);
break; break;
case GST_STATE_PAUSED_TO_PLAYING: case GST_STATE_PAUSED_TO_PLAYING:
gst_element_pads_activate (element, TRUE);
if (element->clock) { if (element->clock) {
GstClockTime time = gst_clock_get_event_time (element->clock); GstClockTime time = gst_clock_get_event_time (element->clock);
@ -3015,12 +2852,19 @@ gst_element_change_state (GstElement * element)
"failed state change, could not negotiate pads"); "failed state change, could not negotiate pads");
goto failure; goto failure;
} }
gst_element_reset_actions (element);
break; break;
/* going to the READY state clears all pad caps */ /* going to the READY state clears all pad caps */
/* FIXME: Why doesn't this happen on READY => NULL? -- Company */ /* FIXME: Why doesn't this happen on READY => NULL? -- Company */
case GST_STATE_PAUSED_TO_READY: case GST_STATE_PAUSED_TO_READY:
element->base_time = 0; element->base_time = 0;
gst_element_clear_pad_caps (element); gst_element_clear_pad_caps (element);
for (walk = element->actions; walk; walk = g_slist_next (walk)) {
GstAction *action = walk->data;
if (gst_action_is_coupled (action))
gst_action_set_active (action, FALSE);
}
break; break;
case GST_STATE_NULL_TO_READY: case GST_STATE_NULL_TO_READY:
case GST_STATE_READY_TO_NULL: case GST_STATE_READY_TO_NULL:
@ -3269,40 +3113,6 @@ gst_element_restore_thyself (GstObject * object, xmlNodePtr self)
} }
#endif /* GST_DISABLE_LOADSAVE */ #endif /* GST_DISABLE_LOADSAVE */
/**
* gst_element_yield:
* @element: a #GstElement to yield.
*
* Requests a yield operation for the element. The scheduler will typically
* give control to another element.
*/
void
gst_element_yield (GstElement * element)
{
if (GST_ELEMENT_SCHED (element)) {
gst_scheduler_yield (GST_ELEMENT_SCHED (element), element);
}
}
/**
* gst_element_interrupt:
* @element: a #GstElement to interrupt.
*
* Requests the scheduler of this element to interrupt the execution of
* this element and scheduler another one.
*
* Returns: TRUE if the element should exit its chain/loop/get
* function ASAP, depending on the scheduler implementation.
*/
gboolean
gst_element_interrupt (GstElement * element)
{
if (GST_ELEMENT_SCHED (element)) {
return gst_scheduler_interrupt (GST_ELEMENT_SCHED (element), element);
} else
return TRUE;
}
/** /**
* gst_element_set_scheduler: * gst_element_set_scheduler:
* @element: a #GstElement to set the scheduler of. * @element: a #GstElement to set the scheduler of.
@ -3339,46 +3149,6 @@ gst_element_get_scheduler (GstElement * element)
return GST_ELEMENT_SCHED (element); return GST_ELEMENT_SCHED (element);
} }
/**
* gst_element_set_loop_function:
* @element: a #GstElement to set the loop function of.
* @loop: Pointer to #GstElementLoopFunction.
*
* This sets the loop function for the element. The function pointed to
* can deviate from the GstElementLoopFunction definition in type of
* pointer only.
*
* NOTE: in order for this to take effect, the current loop function *must*
* exit. Assuming the loop function itself is the only one who will cause
* a new loopfunc to be assigned, this should be no problem.
*/
void
gst_element_set_loop_function (GstElement * element,
GstElementLoopFunction loop)
{
gboolean need_notify = FALSE;
g_return_if_fail (GST_IS_ELEMENT (element));
/* if the element changed from loop based to chain/get based
* or vice versa, we need to inform the scheduler about that */
if ((element->loopfunc == NULL && loop != NULL) ||
(element->loopfunc != NULL && loop == NULL)) {
need_notify = TRUE;
}
/* set the loop function */
element->loopfunc = loop;
if (need_notify) {
/* set the NEW_LOOPFUNC flag so everyone knows to go try again */
GST_FLAG_SET (element, GST_ELEMENT_NEW_LOOPFUNC);
if (GST_ELEMENT_SCHED (element)) {
gst_scheduler_scheduling_change (GST_ELEMENT_SCHED (element), element);
}
}
}
static inline void static inline void
gst_element_emit_found_tag (GstElement * element, GstElement * source, gst_element_emit_found_tag (GstElement * element, GstElement * source,
const GstTagList * tag_list) const GstTagList * tag_list)
@ -3387,6 +3157,7 @@ gst_element_emit_found_tag (GstElement * element, GstElement * source,
g_signal_emit (element, gst_element_signals[FOUND_TAG], 0, source, tag_list); g_signal_emit (element, gst_element_signals[FOUND_TAG], 0, source, tag_list);
gst_object_unref (GST_OBJECT (element)); gst_object_unref (GST_OBJECT (element));
} }
static void static void
gst_element_found_tag_func (GstElement * element, GstElement * source, gst_element_found_tag_func (GstElement * element, GstElement * source,
const GstTagList * tag_list) const GstTagList * tag_list)
@ -3448,11 +3219,7 @@ gst_element_found_tags_for_pad (GstElement * element, GstPad * pad,
GST_EVENT_SRC (tag_event) = gst_object_ref (GST_OBJECT (element)); GST_EVENT_SRC (tag_event) = gst_object_ref (GST_OBJECT (element));
GST_EVENT_TIMESTAMP (tag_event) = timestamp; GST_EVENT_TIMESTAMP (tag_event) = timestamp;
gst_element_found_tags (element, gst_event_tag_get_list (tag_event)); gst_element_found_tags (element, gst_event_tag_get_list (tag_event));
if (GST_PAD_IS_USABLE (pad)) {
gst_pad_push (pad, GST_DATA (tag_event)); gst_pad_push (pad, GST_DATA (tag_event));
} else {
gst_data_unref (GST_DATA (tag_event));
}
} }
static inline void static inline void

View file

@ -79,38 +79,9 @@ GST_EXPORT GType _gst_element_type;
#define GST_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_ELEMENT, GstElement)) #define GST_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_ELEMENT, GstElement))
#define GST_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_ELEMENT, GstElementClass)) #define GST_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_ELEMENT, GstElementClass))
/* convenience functions */
#ifndef GST_DISABLE_DEPRECATED
#ifdef G_HAVE_ISO_VARARGS
#define GST_ELEMENT_QUERY_TYPE_FUNCTION(functionname, ...) \
GST_QUERY_TYPE_FUNCTION (GstElement*, functionname, __VA_ARGS__);
#define GST_ELEMENT_FORMATS_FUNCTION(functionname, ...) \
GST_FORMATS_FUNCTION (GstElement*, functionname, __VA_ARGS__);
#define GST_ELEMENT_EVENT_MASK_FUNCTION(functionname, ...) \
GST_EVENT_MASK_FUNCTION (GstElement*, functionname, __VA_ARGS__);
#elif defined(G_HAVE_GNUC_VARARGS)
#define GST_ELEMENT_QUERY_TYPE_FUNCTION(functionname, a...) \
GST_QUERY_TYPE_FUNCTION (GstElement*, functionname, a);
#define GST_ELEMENT_FORMATS_FUNCTION(functionname, a...) \
GST_FORMATS_FUNCTION (GstElement*, functionname, a);
#define GST_ELEMENT_EVENT_MASK_FUNCTION(functionname, a...) \
GST_EVENT_MASK_FUNCTION (GstElement*, functionname, a);
#endif
#endif
typedef enum { typedef enum {
/* element is complex (for some def.) and generally require a cothread */ /* element pushes new data, srcpads aren't scheduled */
GST_ELEMENT_COMPLEX = GST_OBJECT_FLAG_LAST, GST_ELEMENT_PUSHING = GST_OBJECT_FLAG_LAST,
/* input and output pads aren't directly coupled to each other
examples: queues, multi-output async readers, etc. */
GST_ELEMENT_DECOUPLED,
/* this element should be placed in a thread if at all possible */
GST_ELEMENT_THREAD_SUGGESTED,
/* this element, for some reason, has a loop function that performs
* an infinite loop without calls to gst_element_yield () */
GST_ELEMENT_INFINITE_LOOP,
/* there is a new loopfunction ready for placement */
GST_ELEMENT_NEW_LOOPFUNC,
/* if this element can handle events */ /* if this element can handle events */
GST_ELEMENT_EVENT_AWARE, GST_ELEMENT_EVENT_AWARE,
/* use threadsafe property get/set implementation */ /* use threadsafe property get/set implementation */
@ -133,9 +104,8 @@ typedef enum {
GST_ELEMENT_FLAG_LAST = GST_OBJECT_FLAG_LAST + 16 GST_ELEMENT_FLAG_LAST = GST_OBJECT_FLAG_LAST + 16
} GstElementFlags; } GstElementFlags;
#define GST_ELEMENT_IS_THREAD_SUGGESTED(obj) (GST_FLAG_IS_SET(obj,GST_ELEMENT_THREAD_SUGGESTED)) #define GST_ELEMENT_IS_PUSHING(obj) (GST_FLAG_IS_SET(obj,GST_ELEMENT_PUSHING))
#define GST_ELEMENT_IS_EVENT_AWARE(obj) (GST_FLAG_IS_SET(obj,GST_ELEMENT_EVENT_AWARE)) #define GST_ELEMENT_IS_EVENT_AWARE(obj) (GST_FLAG_IS_SET(obj,GST_ELEMENT_EVENT_AWARE))
#define GST_ELEMENT_IS_DECOUPLED(obj) (GST_FLAG_IS_SET(obj,GST_ELEMENT_DECOUPLED))
#define GST_ELEMENT_NAME(obj) (GST_OBJECT_NAME(obj)) #define GST_ELEMENT_NAME(obj) (GST_OBJECT_NAME(obj))
#define GST_ELEMENT_PARENT(obj) (GST_OBJECT_PARENT(obj)) #define GST_ELEMENT_PARENT(obj) (GST_OBJECT_PARENT(obj))
@ -170,7 +140,6 @@ typedef enum {
typedef struct _GstElementFactory GstElementFactory; typedef struct _GstElementFactory GstElementFactory;
typedef struct _GstElementFactoryClass GstElementFactoryClass; typedef struct _GstElementFactoryClass GstElementFactoryClass;
typedef void (*GstElementLoopFunction) (GstElement *element);
typedef void (*GstElementPreRunFunction) (GstElement *element); typedef void (*GstElementPreRunFunction) (GstElement *element);
typedef void (*GstElementPostRunFunction) (GstElement *element); typedef void (*GstElementPostRunFunction) (GstElement *element);
@ -180,10 +149,10 @@ struct _GstElement {
/* element state and scheduling */ /* element state and scheduling */
guint8 current_state; guint8 current_state;
guint8 pending_state; guint8 pending_state;
GstElementLoopFunction loopfunc;
GstScheduler *sched; GstScheduler *sched;
gpointer sched_private; gpointer sched_private;
GSList * actions;
/* allocated clock */ /* allocated clock */
GstClock *clock; GstClock *clock;
@ -235,7 +204,6 @@ struct _GstElementClass {
gboolean (*release_locks) (GstElement *element); gboolean (*release_locks) (GstElement *element);
/* query/convert/events functions */ /* query/convert/events functions */
const GstEventMask* (*get_event_masks) (GstElement *element);
gboolean (*send_event) (GstElement *element, GstEvent *event); gboolean (*send_event) (GstElement *element, GstEvent *event);
const GstFormat* (*get_formats) (GstElement *element); const GstFormat* (*get_formats) (GstElement *element);
gboolean (*convert) (GstElement *element, gboolean (*convert) (GstElement *element,
@ -279,8 +247,6 @@ void gst_element_class_set_details (GstElementClass *klass,
void gst_element_default_error (GObject *object, GstObject *orig, GError *error, gchar *debug); void gst_element_default_error (GObject *object, GstObject *orig, GError *error, gchar *debug);
GType gst_element_get_type (void); GType gst_element_get_type (void);
void gst_element_set_loop_function (GstElement *element,
GstElementLoopFunction loop);
#define gst_element_get_name(elem) gst_object_get_name(GST_OBJECT(elem)) #define gst_element_get_name(elem) gst_object_get_name(GST_OBJECT(elem))
#define gst_element_set_name(elem,name) gst_object_set_name(GST_OBJECT(elem),name) #define gst_element_set_name(elem,name) gst_object_set_name(GST_OBJECT(elem),name)
@ -372,17 +338,11 @@ gboolean gst_element_link_pads_filtered (GstElement *src, const gchar *srcpadn
void gst_element_unlink_pads (GstElement *src, const gchar *srcpadname, void gst_element_unlink_pads (GstElement *src, const gchar *srcpadname,
GstElement *dest, const gchar *destpadname); GstElement *dest, const gchar *destpadname);
G_CONST_RETURN GstEventMask*
gst_element_get_event_masks (GstElement *element);
gboolean gst_element_send_event (GstElement *element, GstEvent *event); gboolean gst_element_send_event (GstElement *element, GstEvent *event);
gboolean gst_element_seek (GstElement *element, GstSeekType seek_type, gboolean gst_element_seek (GstElement *element, GstSeekType seek_type,
guint64 offset); guint64 offset);
G_CONST_RETURN GstQueryType*
gst_element_get_query_types (GstElement *element);
gboolean gst_element_query (GstElement *element, GstQueryType type, gboolean gst_element_query (GstElement *element, GstQueryType type,
GstFormat *format, gint64 *value); GstFormat *format, gint64 *value);
G_CONST_RETURN GstFormat*
gst_element_get_formats (GstElement *element);
gboolean gst_element_convert (GstElement *element, gboolean gst_element_convert (GstElement *element,
GstFormat src_format, gint64 src_value, GstFormat src_format, gint64 src_value,
GstFormat *dest_format, gint64 *dest_value); GstFormat *dest_format, gint64 *dest_value);

File diff suppressed because it is too large Load diff

View file

@ -27,6 +27,7 @@
#include <gst/gstconfig.h> #include <gst/gstconfig.h>
#include <gst/gstobject.h> #include <gst/gstobject.h>
#include <gst/gstaction.h>
#include <gst/gstbuffer.h> #include <gst/gstbuffer.h>
#include <gst/gstcaps.h> #include <gst/gstcaps.h>
#include <gst/gstevent.h> #include <gst/gstevent.h>
@ -71,14 +72,8 @@ GST_EXPORT GType _gst_ghost_pad_type;
#define GST_GHOST_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GHOST_PAD, GstGhostPadClass)) #define GST_GHOST_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GHOST_PAD, GstGhostPadClass))
/*typedef struct _GstPad GstPad; */
/*typedef struct _GstPadClass GstPadClass;*/
typedef struct _GstRealPad GstRealPad;
typedef struct _GstRealPadClass GstRealPadClass;
typedef struct _GstGhostPad GstGhostPad; typedef struct _GstGhostPad GstGhostPad;
typedef struct _GstGhostPadClass GstGhostPadClass; typedef struct _GstGhostPadClass GstGhostPadClass;
/*typedef struct _GstPadTemplate GstPadTemplate;*/
/*typedef struct _GstPadTemplateClass GstPadTemplateClass;*/
typedef struct _GstStaticPadTemplate GstStaticPadTemplate; typedef struct _GstStaticPadTemplate GstStaticPadTemplate;
typedef struct _GstPadLink GstPadLink; typedef struct _GstPadLink GstPadLink;
@ -119,7 +114,6 @@ typedef gboolean (*GstPadQueryFunction) (GstPad *pad, GstQueryType type,
GstFormat *format, gint64 *value); GstFormat *format, gint64 *value);
typedef GList* (*GstPadIntLinkFunction) (GstPad *pad); typedef GList* (*GstPadIntLinkFunction) (GstPad *pad);
typedef const GstFormat* (*GstPadFormatsFunction) (GstPad *pad); typedef const GstFormat* (*GstPadFormatsFunction) (GstPad *pad);
typedef const GstEventMask* (*GstPadEventMaskFunction) (GstPad *pad);
typedef const GstQueryType* (*GstPadQueryTypeFunction) (GstPad *pad); typedef const GstQueryType* (*GstPadQueryTypeFunction) (GstPad *pad);
typedef GstPadLinkReturn (*GstPadLinkFunction) (GstPad *pad, const GstCaps *caps); typedef GstPadLinkReturn (*GstPadLinkFunction) (GstPad *pad, const GstCaps *caps);
@ -137,8 +131,7 @@ typedef enum {
} GstPadDirection; } GstPadDirection;
typedef enum { typedef enum {
GST_PAD_DISABLED = GST_OBJECT_FLAG_LAST, GST_PAD_NEGOTIATING = GST_OBJECT_FLAG_LAST,
GST_PAD_NEGOTIATING,
GST_PAD_DISPATCHING, GST_PAD_DISPATCHING,
GST_PAD_FLAG_LAST = GST_OBJECT_FLAG_LAST + 4 GST_PAD_FLAG_LAST = GST_OBJECT_FLAG_LAST + 4
@ -185,13 +178,8 @@ struct _GstRealPad {
gpointer sched_private; gpointer sched_private;
/* data transport functions */ /* data transport functions */
GstPadChainFunction chainfunc; GstAction * action;
GstPadChainFunction chainhandler;
GstPadGetFunction getfunc;
GstPadGetFunction gethandler;
GstPadEventFunction eventfunc;
GstPadEventFunction eventhandler; GstPadEventFunction eventhandler;
GstPadEventMaskFunction eventmaskfunc;
GList *ghostpads; GList *ghostpads;
@ -250,18 +238,10 @@ struct _GstGhostPadClass {
#define GST_RPAD_CAPS(pad) (((GstRealPad *)(pad))->caps) #define GST_RPAD_CAPS(pad) (((GstRealPad *)(pad))->caps)
#define GST_RPAD_APPFILTER(pad) (((GstRealPad *)(pad))->appfilter) #define GST_RPAD_APPFILTER(pad) (((GstRealPad *)(pad))->appfilter)
#define GST_RPAD_PEER(pad) (((GstRealPad *)(pad))->peer) #define GST_RPAD_PEER(pad) (((GstRealPad *)(pad))->peer)
#define GST_RPAD_CHAINFUNC(pad) (((GstRealPad *)(pad))->chainfunc)
#define GST_RPAD_CHAINHANDLER(pad) (((GstRealPad *)(pad))->chainhandler)
#define GST_RPAD_GETFUNC(pad) (((GstRealPad *)(pad))->getfunc)
#define GST_RPAD_GETHANDLER(pad) (((GstRealPad *)(pad))->gethandler)
#define GST_RPAD_EVENTFUNC(pad) (((GstRealPad *)(pad))->eventfunc)
#define GST_RPAD_EVENTHANDLER(pad) (((GstRealPad *)(pad))->eventhandler) #define GST_RPAD_EVENTHANDLER(pad) (((GstRealPad *)(pad))->eventhandler)
#define GST_RPAD_CONVERTFUNC(pad) (((GstRealPad *)(pad))->convertfunc) #define GST_RPAD_CONVERTFUNC(pad) (((GstRealPad *)(pad))->convertfunc)
#define GST_RPAD_QUERYFUNC(pad) (((GstRealPad *)(pad))->queryfunc) #define GST_RPAD_QUERYFUNC(pad) (((GstRealPad *)(pad))->queryfunc)
#define GST_RPAD_INTLINKFUNC(pad) (((GstRealPad *)(pad))->intlinkfunc) #define GST_RPAD_INTLINKFUNC(pad) (((GstRealPad *)(pad))->intlinkfunc)
#define GST_RPAD_FORMATSFUNC(pad) (((GstRealPad *)(pad))->formatsfunc)
#define GST_RPAD_QUERYTYPEFUNC(pad) (((GstRealPad *)(pad))->querytypefunc)
#define GST_RPAD_EVENTMASKFUNC(pad) (((GstRealPad *)(pad))->eventmaskfunc)
#define GST_RPAD_LINKFUNC(pad) (((GstRealPad *)(pad))->linkfunc) #define GST_RPAD_LINKFUNC(pad) (((GstRealPad *)(pad))->linkfunc)
#define GST_RPAD_UNLINKFUNC(pad) (((GstRealPad *)(pad))->unlinkfunc) #define GST_RPAD_UNLINKFUNC(pad) (((GstRealPad *)(pad))->unlinkfunc)
@ -282,12 +262,8 @@ struct _GstGhostPadClass {
/* Some check functions (unused?) */ /* Some check functions (unused?) */
#define GST_PAD_IS_LINKED(pad) (GST_PAD_PEER(pad) != NULL) #define GST_PAD_IS_LINKED(pad) (GST_PAD_PEER(pad) != NULL)
#define GST_PAD_IS_ACTIVE(pad) (!GST_FLAG_IS_SET(GST_PAD_REALIZE(pad), GST_PAD_DISABLED))
#define GST_PAD_IS_NEGOTIATING(pad) (GST_FLAG_IS_SET (pad, GST_PAD_NEGOTIATING)) #define GST_PAD_IS_NEGOTIATING(pad) (GST_FLAG_IS_SET (pad, GST_PAD_NEGOTIATING))
#define GST_PAD_IS_DISPATCHING(pad) (GST_FLAG_IS_SET (pad, GST_PAD_DISPATCHING)) #define GST_PAD_IS_DISPATCHING(pad) (GST_FLAG_IS_SET (pad, GST_PAD_DISPATCHING))
#define GST_PAD_IS_USABLE(pad) (GST_PAD_IS_LINKED (pad) && \
GST_PAD_IS_ACTIVE(pad) && GST_PAD_IS_ACTIVE(GST_PAD_PEER (pad)))
#define GST_PAD_CAN_PULL(pad) (GST_IS_REAL_PAD(pad) && GST_REAL_PAD(pad)->gethandler != NULL)
#define GST_PAD_IS_SRC(pad) (GST_PAD_DIRECTION(pad) == GST_PAD_SRC) #define GST_PAD_IS_SRC(pad) (GST_PAD_DIRECTION(pad) == GST_PAD_SRC)
#define GST_PAD_IS_SINK(pad) (GST_PAD_DIRECTION(pad) == GST_PAD_SINK) #define GST_PAD_IS_SINK(pad) (GST_PAD_DIRECTION(pad) == GST_PAD_SINK)
@ -368,9 +344,9 @@ G_CONST_RETURN gchar* gst_pad_get_name (GstPad *pad);
GstPadDirection gst_pad_get_direction (GstPad *pad); GstPadDirection gst_pad_get_direction (GstPad *pad);
void gst_pad_set_active (GstPad *pad, gboolean active); void gst_real_pad_set_active (GstRealPad *pad, gboolean active);
void gst_pad_set_active_recursive (GstPad *pad, gboolean active); gboolean gst_real_pad_is_active (GstRealPad *pad);
gboolean gst_pad_is_active (GstPad *pad); void gst_real_pad_set_initially_active (GstRealPad *pad, gboolean active);
void gst_pad_set_element_private (GstPad *pad, gpointer priv); void gst_pad_set_element_private (GstPad *pad, gpointer priv);
gpointer gst_pad_get_element_private (GstPad *pad); gpointer gst_pad_get_element_private (GstPad *pad);
@ -391,14 +367,9 @@ void gst_pad_set_bufferalloc_function (GstPad *pad, GstPadBufferAllocFunction
GstBuffer* gst_pad_alloc_buffer (GstPad *pad, guint64 offset, gint size); GstBuffer* gst_pad_alloc_buffer (GstPad *pad, guint64 offset, gint size);
/* data passing setup functions */ /* data passing setup functions */
void gst_pad_set_chain_function (GstPad *pad, GstPadChainFunction chain); void gst_src_pad_set_action_handler (GstPad *pad, GstActionSrcPadFunc func);
void gst_pad_set_get_function (GstPad *pad, GstPadGetFunction get); void gst_sink_pad_set_action_handler (GstPad *pad, GstActionSinkPadFunc func);
void gst_pad_set_event_function (GstPad *pad, GstPadEventFunction event); void gst_pad_set_event_function (GstPad *pad, GstPadEventFunction event);
void gst_pad_set_event_mask_function (GstPad *pad, GstPadEventMaskFunction mask_func);
G_CONST_RETURN GstEventMask*
gst_pad_get_event_masks (GstPad *pad);
G_CONST_RETURN GstEventMask*
gst_pad_get_event_masks_default (GstPad *pad);
/* pad links */ /* pad links */
void gst_pad_set_link_function (GstPad *pad, GstPadLinkFunction link); void gst_pad_set_link_function (GstPad *pad, GstPadLinkFunction link);
@ -446,27 +417,10 @@ gboolean gst_pad_recover_caps_error (GstPad *pad, const GstCaps *allowed);
/* data passing functions */ /* data passing functions */
void gst_pad_push (GstPad *pad, GstData *data); void gst_pad_push (GstPad *pad, GstData *data);
GstData* gst_pad_pull (GstPad *pad);
gboolean gst_pad_send_event (GstPad *pad, GstEvent *event); gboolean gst_pad_send_event (GstPad *pad, GstEvent *event);
gboolean gst_pad_event_default (GstPad *pad, GstEvent *event); gboolean gst_pad_event_default (GstPad *pad, GstEvent *event);
#ifndef GST_DISABLE_DEPRECATED
GstPad* gst_pad_selectv (GList *padlist);
GstPad* gst_pad_select (GstPad *pad, ...);
GstPad* gst_pad_select_valist (GstPad *pad, va_list varargs);
#endif
/* FIXME 0.9: rename to _select? Otherwise rename SchedulerClass pointer */
GstData * gst_pad_collectv (GstPad **selected, const GList *padlist);
GstData * gst_pad_collect (GstPad **selected, GstPad *pad, ...);
GstData * gst_pad_collect_valist (GstPad **selected, GstPad *pad, va_list varargs);
/* convert/query/format functions */
void gst_pad_set_formats_function (GstPad *pad,
GstPadFormatsFunction formats);
G_CONST_RETURN GstFormat*
gst_pad_get_formats (GstPad *pad);
G_CONST_RETURN GstFormat*
gst_pad_get_formats_default (GstPad *pad);
/* convert/query functions */
void gst_pad_set_convert_function (GstPad *pad, GstPadConvertFunction convert); void gst_pad_set_convert_function (GstPad *pad, GstPadConvertFunction convert);
gboolean gst_pad_convert (GstPad *pad, gboolean gst_pad_convert (GstPad *pad,
GstFormat src_format, gint64 src_value, GstFormat src_format, gint64 src_value,
@ -476,11 +430,6 @@ gboolean gst_pad_convert_default (GstPad *pad,
GstFormat *dest_format, gint64 *dest_value); GstFormat *dest_format, gint64 *dest_value);
void gst_pad_set_query_function (GstPad *pad, GstPadQueryFunction query); void gst_pad_set_query_function (GstPad *pad, GstPadQueryFunction query);
void gst_pad_set_query_type_function (GstPad *pad, GstPadQueryTypeFunction type_func);
G_CONST_RETURN GstQueryType*
gst_pad_get_query_types (GstPad *pad);
G_CONST_RETURN GstQueryType*
gst_pad_get_query_types_default (GstPad *pad);
gboolean gst_pad_query (GstPad *pad, GstQueryType type, gboolean gst_pad_query (GstPad *pad, GstQueryType type,
GstFormat *format, gint64 *value); GstFormat *format, gint64 *value);
gboolean gst_pad_query_default (GstPad *pad, GstQueryType type, gboolean gst_pad_query_default (GstPad *pad, GstQueryType type,

View file

@ -25,6 +25,7 @@
#include "gstpipeline.h" #include "gstpipeline.h"
#include "gstinfo.h" #include "gstinfo.h"
#include "gstscheduler.h" #include "gstscheduler.h"
#include "gstschedulerfactory.h"
static GstElementDetails gst_pipeline_details = static GstElementDetails gst_pipeline_details =
GST_ELEMENT_DETAILS ("Pipeline object", GST_ELEMENT_DETAILS ("Pipeline object",
@ -52,8 +53,6 @@ static void gst_pipeline_init (GTypeInstance * instance, gpointer g_class);
static void gst_pipeline_dispose (GObject * object); static void gst_pipeline_dispose (GObject * object);
static GstElementStateReturn gst_pipeline_change_state (GstElement * element);
static GstBinClass *parent_class = NULL; static GstBinClass *parent_class = NULL;
/* static guint gst_pipeline_signals[LAST_SIGNAL] = { 0 }; */ /* static guint gst_pipeline_signals[LAST_SIGNAL] = { 0 }; */
@ -95,15 +94,11 @@ static void
gst_pipeline_class_init (gpointer g_class, gpointer class_data) gst_pipeline_class_init (gpointer g_class, gpointer class_data)
{ {
GObjectClass *gobject_class = G_OBJECT_CLASS (g_class); GObjectClass *gobject_class = G_OBJECT_CLASS (g_class);
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
GstPipelineClass *klass = GST_PIPELINE_CLASS (g_class); GstPipelineClass *klass = GST_PIPELINE_CLASS (g_class);
parent_class = g_type_class_peek_parent (klass); parent_class = g_type_class_peek_parent (klass);
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_pipeline_dispose); gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_pipeline_dispose);
gstelement_class->change_state =
GST_DEBUG_FUNCPTR (gst_pipeline_change_state);
} }
static void static void
@ -137,7 +132,6 @@ gst_pipeline_dispose (GObject * object)
g_assert (GST_IS_SCHEDULER (GST_ELEMENT_SCHED (pipeline))); g_assert (GST_IS_SCHEDULER (GST_ELEMENT_SCHED (pipeline)));
sched = GST_ELEMENT_SCHED (pipeline); sched = GST_ELEMENT_SCHED (pipeline);
gst_scheduler_reset (sched);
G_OBJECT_CLASS (parent_class)->dispose (object); G_OBJECT_CLASS (parent_class)->dispose (object);
} }
@ -154,24 +148,3 @@ gst_pipeline_new (const gchar * name)
{ {
return gst_element_factory_make ("pipeline", name); return gst_element_factory_make ("pipeline", name);
} }
static GstElementStateReturn
gst_pipeline_change_state (GstElement * element)
{
switch (GST_STATE_TRANSITION (element)) {
case GST_STATE_NULL_TO_READY:
gst_scheduler_setup (GST_ELEMENT_SCHED (element));
break;
case GST_STATE_READY_TO_PAUSED:
case GST_STATE_PAUSED_TO_PLAYING:
case GST_STATE_PLAYING_TO_PAUSED:
case GST_STATE_PAUSED_TO_READY:
case GST_STATE_READY_TO_NULL:
break;
}
if (GST_ELEMENT_CLASS (parent_class)->change_state)
return GST_ELEMENT_CLASS (parent_class)->change_state (element);
return GST_STATE_SUCCESS;
}

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,7 @@
/* GStreamer /* GStreamer
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu> * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
* 2000 Wim Taymans <wtay@chello.be> * 2000 Wim Taymans <wtay@chello.be>
* 2004,2005 Benjamin Otte <otte@gnome.org>
* *
* gstqueue.h: * gstqueue.h:
* *
@ -52,9 +53,10 @@ typedef struct _GstQueueSize GstQueueSize;
typedef struct _GstQueueClass GstQueueClass; typedef struct _GstQueueClass GstQueueClass;
struct _GstQueueSize { struct _GstQueueSize {
guint items; /* no. of items */
guint buffers; /* no. of buffers */ guint buffers; /* no. of buffers */
guint bytes; /* no. of bytes */ guint bytes; /* no. of bytes */
guint64 time; /* amount of time */ GstClockTime time; /* amount of time */
}; };
struct _GstQueue { struct _GstQueue {
@ -69,39 +71,25 @@ struct _GstQueue {
GstQueueSize GstQueueSize
cur_level, /* currently in the queue */ cur_level, /* currently in the queue */
max_size, /* max. amount of data allowed in the queue */ max_size, /* max. amount of data allowed in the queue */
min_threshold; /* min. amount of data required to wake reader */ min_threshold, /* min. amount of data required to wake reader */
max_threshold; /* min. amount of data required to wake writer */
/* whether we leak data, and at which end */ /* whether we leak data, and at which end */
gint leaky; gint leaky;
gboolean got_eos;
/* number of nanoseconds until a blocked queue 'times out'
* to receive data and returns a filler event. -1 = disable */
guint64 block_timeout;
/* it the queue should fail on possible deadlocks */
gboolean may_deadlock;
gboolean interrupt;
gboolean flush;
GMutex *qlock; /* lock for queue (vs object lock) */ GMutex *qlock; /* lock for queue (vs object lock) */
GCond *item_add; /* signals buffers now available for reading */
GCond *item_del; /* signals space now available for writing */
GCond *event_done; /* upstream event signaller */
GTimeVal *timeval; /* the timeout for the queue locking */
GQueue *events; /* upstream events get decoupled here */
GstCaps *negotiated_caps; GstCaps *negotiated_caps;
GMutex *event_lock; /* lock when handling the events queue */
gpointer _gst_reserved[GST_PADDING - 1]; gpointer _gst_reserved[GST_PADDING - 1];
}; };
struct _GstQueueClass { struct _GstQueueClass {
GstElementClass parent_class; GstElementClass parent_class;
/* vtable */
/* signals - 'running' is called from both sides /* signals - 'running' is called from both sides
* which might make it sort of non-useful... */ * which might make it sort of non-useful... */
void (*underrun) (GstQueue *queue); void (*underrun) (GstQueue *queue);

View file

@ -1,6 +1,7 @@
/* GStreamer /* GStreamer
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu> * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
* 2000 Wim Taymans <wim.taymans@chello.be> * 2000 Wim Taymans <wim.taymans@chello.be>
* 2004 Benjamin Otte <otte@gnomee.org>
* *
* gstscheduler.c: Default scheduling code for most cases * gstscheduler.c: Default scheduling code for most cases
* *
@ -27,13 +28,22 @@
#include "gstinfo.h" #include "gstinfo.h"
#include "gstregistrypool.h" #include "gstregistrypool.h"
/*
GST_DEBUG_CATEGORY_STATIC (sched_debug, "GST_SCHEDULER",
GST_DEBUG_BOLD | GST_DEBUG_FG_BLUE, "scheduler base class");
#define GST_CAT_DEFAULT sched_debug
*/
static void gst_scheduler_class_init (GstSchedulerClass * klass); static void gst_scheduler_class_init (GstSchedulerClass * klass);
static void gst_scheduler_init (GstScheduler * sched); static void gst_scheduler_init (GstScheduler * sched);
static void gst_scheduler_dispose (GObject * object); static void gst_scheduler_dispose (GObject * object);
static GstObjectClass *parent_class = NULL; static void gst_scheduler_real_add_element (GstScheduler * scheduler,
GstElement * element);
static void gst_scheduler_real_remove_element (GstScheduler * scheduler,
GstElement * element);
static gchar *_default_name = NULL; static GstObjectClass *parent_class = NULL;
GType GType
gst_scheduler_get_type (void) gst_scheduler_get_type (void)
@ -64,13 +74,14 @@ gst_scheduler_get_type (void)
static void static void
gst_scheduler_class_init (GstSchedulerClass * klass) gst_scheduler_class_init (GstSchedulerClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject = G_OBJECT_CLASS (klass);
gobject_class = (GObjectClass *) klass; parent_class = g_type_class_peek_parent (klass);
parent_class = g_type_class_ref (GST_TYPE_OBJECT); gobject->dispose = gst_scheduler_dispose;
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_scheduler_dispose); klass->add_element = gst_scheduler_real_add_element;
klass->remove_element = gst_scheduler_real_remove_element;
} }
static void static void
@ -78,10 +89,6 @@ gst_scheduler_init (GstScheduler * sched)
{ {
sched->clock_providers = NULL; sched->clock_providers = NULL;
sched->clock_receivers = NULL; sched->clock_receivers = NULL;
sched->schedulers = NULL;
sched->state = GST_SCHEDULER_STATE_NONE;
sched->parent = NULL;
sched->parent_sched = NULL;
sched->clock = NULL; sched->clock = NULL;
} }
@ -91,58 +98,62 @@ gst_scheduler_dispose (GObject * object)
GstScheduler *sched = GST_SCHEDULER (object); GstScheduler *sched = GST_SCHEDULER (object);
/* thse lists should all be NULL */ /* thse lists should all be NULL */
GST_DEBUG ("scheduler %p dispose %p %p %p", GST_DEBUG ("scheduler %p dispose %p %p",
object, object, sched->clock_providers, sched->clock_receivers);
sched->clock_providers, sched->clock_receivers, sched->schedulers);
gst_object_replace ((GstObject **) & sched->current_clock, NULL); gst_object_replace ((GstObject **) & sched->current_clock, NULL);
gst_object_replace ((GstObject **) & sched->clock, NULL); gst_object_replace ((GstObject **) & sched->clock, NULL);
/* kids are held reference to, so dereference here. */
while (sched->schedulers != NULL) {
gst_scheduler_remove_scheduler (sched,
GST_SCHEDULER (sched->schedulers->data));
}
G_OBJECT_CLASS (parent_class)->dispose (object); G_OBJECT_CLASS (parent_class)->dispose (object);
} }
/** static void
* gst_scheduler_setup: gst_scheduler_real_add_element (GstScheduler * scheduler, GstElement * element)
* @sched: the scheduler
*
* Prepare the scheduler.
*/
void
gst_scheduler_setup (GstScheduler * sched)
{ {
GstSchedulerClass *sclass; GSList *walk;
GstSchedulerClass *klass = GST_SCHEDULER_GET_CLASS (scheduler);
g_return_if_fail (GST_IS_SCHEDULER (sched)); g_assert (klass->add_element);
for (walk = element->actions; walk; walk = g_slist_next (walk)) {
klass->add_action (scheduler, walk->data);
}
}
sclass = GST_SCHEDULER_GET_CLASS (sched); static void
gst_scheduler_real_remove_element (GstScheduler * scheduler,
GstElement * element)
{
GSList *walk;
GstSchedulerClass *klass = GST_SCHEDULER_GET_CLASS (scheduler);
if (sclass->setup) g_assert (klass->remove_element);
sclass->setup (sched); for (walk = element->actions; walk; walk = g_slist_next (walk)) {
klass->remove_action (scheduler, walk->data);
}
} }
/** /**
* gst_scheduler_reset: * gst_scheduler_marshal:
* @sched: a #GstScheduler to reset. * @sched: #GstScheduler to marshal to
* @func: function to be called
* @data: user data provided to the function
* *
* Reset the schedulers. * This function is meant to be used from a different thread. Use this whenever
*/ * you need to marshal function calls into the thread this scheduler is running
* in. Note that there are no guarantees made as to when the provided function
* will be exected, though schedulers will make a best effort to execute it as
* soon as possible.
**/
void void
gst_scheduler_reset (GstScheduler * sched) gst_scheduler_marshal (GstScheduler * sched, GstMarshalFunc func, gpointer data)
{ {
GstSchedulerClass *sclass; GstSchedulerClass *klass;
g_return_if_fail (GST_IS_SCHEDULER (sched)); g_return_if_fail (GST_IS_SCHEDULER (sched));
g_return_if_fail (func != NULL);
sclass = GST_SCHEDULER_GET_CLASS (sched); klass = GST_SCHEDULER_GET_CLASS (sched);
g_return_if_fail (klass->marshal != NULL);
if (sclass->reset) klass->marshal (sched, func, data);
sclass->reset (sched);
} }
/** /**
@ -221,7 +232,6 @@ void
gst_scheduler_add_element (GstScheduler * sched, GstElement * element) gst_scheduler_add_element (GstScheduler * sched, GstElement * element)
{ {
GstSchedulerClass *sclass; GstSchedulerClass *sclass;
gboolean redistribute_clock = FALSE;
g_return_if_fail (GST_IS_SCHEDULER (sched)); g_return_if_fail (GST_IS_SCHEDULER (sched));
g_return_if_fail (GST_IS_ELEMENT (element)); g_return_if_fail (GST_IS_ELEMENT (element));
@ -240,24 +250,15 @@ gst_scheduler_add_element (GstScheduler * sched, GstElement * element)
sched->clock_providers = g_list_prepend (sched->clock_providers, element); sched->clock_providers = g_list_prepend (sched->clock_providers, element);
GST_CAT_DEBUG (GST_CAT_CLOCK, "added clock provider %s", GST_CAT_DEBUG (GST_CAT_CLOCK, "added clock provider %s",
GST_ELEMENT_NAME (element)); GST_ELEMENT_NAME (element));
redistribute_clock = TRUE;
} }
if (gst_element_requires_clock (element)) { if (gst_element_requires_clock (element)) {
sched->clock_receivers = g_list_prepend (sched->clock_receivers, element); sched->clock_receivers = g_list_prepend (sched->clock_receivers, element);
GST_CAT_DEBUG (GST_CAT_CLOCK, "added clock receiver %s", GST_CAT_DEBUG (GST_CAT_CLOCK, "added clock receiver %s",
GST_ELEMENT_NAME (element)); GST_ELEMENT_NAME (element));
redistribute_clock = TRUE;
} }
gst_element_set_scheduler (element, sched); gst_element_set_scheduler (element, sched);
if (redistribute_clock) {
GstClock *clock;
clock = gst_scheduler_get_clock (sched);
gst_scheduler_set_clock (sched, clock);
}
sclass = GST_SCHEDULER_GET_CLASS (sched); sclass = GST_SCHEDULER_GET_CLASS (sched);
if (sclass->add_element) if (sclass->add_element)
@ -275,33 +276,12 @@ void
gst_scheduler_remove_element (GstScheduler * sched, GstElement * element) gst_scheduler_remove_element (GstScheduler * sched, GstElement * element)
{ {
GstSchedulerClass *sclass; GstSchedulerClass *sclass;
GList *link;
gboolean redistribute_clock = FALSE;
g_return_if_fail (GST_IS_SCHEDULER (sched)); g_return_if_fail (GST_IS_SCHEDULER (sched));
g_return_if_fail (GST_IS_ELEMENT (element)); g_return_if_fail (GST_IS_ELEMENT (element));
link = g_list_find (sched->clock_providers, element); sched->clock_providers = g_list_remove (sched->clock_providers, element);
if (link) { sched->clock_receivers = g_list_remove (sched->clock_receivers, element);
sched->clock_providers = g_list_delete_link (sched->clock_providers, link);
GST_CAT_DEBUG (GST_CAT_CLOCK, "removed clock provider %s",
GST_ELEMENT_NAME (element));
redistribute_clock = TRUE;
}
link = g_list_find (sched->clock_receivers, element);
if (link) {
sched->clock_receivers = g_list_delete_link (sched->clock_receivers, link);
GST_CAT_DEBUG (GST_CAT_CLOCK, "removed clock receiver %s",
GST_ELEMENT_NAME (element));
redistribute_clock = TRUE;
}
if (redistribute_clock) {
GstClock *clock;
clock = gst_scheduler_get_clock (sched);
gst_scheduler_set_clock (sched, clock);
}
sclass = GST_SCHEDULER_GET_CLASS (sched); sclass = GST_SCHEDULER_GET_CLASS (sched);
@ -331,9 +311,7 @@ gst_scheduler_state_transition (GstScheduler * sched, GstElement * element,
g_return_val_if_fail (GST_IS_SCHEDULER (sched), GST_STATE_FAILURE); g_return_val_if_fail (GST_IS_SCHEDULER (sched), GST_STATE_FAILURE);
g_return_val_if_fail (GST_IS_ELEMENT (element), GST_STATE_FAILURE); g_return_val_if_fail (GST_IS_ELEMENT (element), GST_STATE_FAILURE);
if (element == sched->parent && sched->parent_sched == NULL) { if (GST_OBJECT (element) == gst_object_get_parent (GST_OBJECT (sched))) {
/* FIXME is distributing the clock in the state change still needed
* when we distribute as soon as we add/remove elements? I think not.*/
switch (transition) { switch (transition) {
case GST_STATE_READY_TO_PAUSED: case GST_STATE_READY_TO_PAUSED:
{ {
@ -357,121 +335,6 @@ gst_scheduler_state_transition (GstScheduler * sched, GstElement * element,
return GST_STATE_SUCCESS; return GST_STATE_SUCCESS;
} }
/**
* gst_scheduler_scheduling_change:
* @sched: the scheduler
* @element: the element that changed its scheduling strategy
*
* Tell the scheduler that an element changed its scheduling strategy.
* An element could, for example, change its loop function or changes
* from a loop based element to a chain based element.
*/
void
gst_scheduler_scheduling_change (GstScheduler * sched, GstElement * element)
{
GstSchedulerClass *sclass;
g_return_if_fail (GST_IS_SCHEDULER (sched));
g_return_if_fail (GST_IS_ELEMENT (element));
sclass = GST_SCHEDULER_GET_CLASS (sched);
if (sclass->scheduling_change)
sclass->scheduling_change (sched, element);
}
/**
* gst_scheduler_add_scheduler:
* @sched: a #GstScheduler to add to
* @sched2: the #GstScheduler to add
*
* Notifies the scheduler that it has to monitor this scheduler.
*/
void
gst_scheduler_add_scheduler (GstScheduler * sched, GstScheduler * sched2)
{
GstSchedulerClass *sclass;
g_return_if_fail (GST_IS_SCHEDULER (sched));
g_return_if_fail (GST_IS_SCHEDULER (sched2));
g_return_if_fail (sched2->parent_sched == NULL);
GST_DEBUG ("gstscheduler: %p add scheduler %p", sched, sched2);
gst_object_ref (GST_OBJECT (sched2));
gst_object_ref (GST_OBJECT (sched));
sched->schedulers = g_list_prepend (sched->schedulers, sched2);
sched2->parent_sched = sched;
sclass = GST_SCHEDULER_GET_CLASS (sched);
if (sclass->add_scheduler)
sclass->add_scheduler (sched, sched2);
}
/**
* gst_scheduler_remove_scheduler:
* @sched: the scheduler
* @sched2: the scheduler to remove
*
a Notifies the scheduler that it can stop monitoring this scheduler.
*/
void
gst_scheduler_remove_scheduler (GstScheduler * sched, GstScheduler * sched2)
{
GstSchedulerClass *sclass;
g_return_if_fail (GST_IS_SCHEDULER (sched));
g_return_if_fail (GST_IS_SCHEDULER (sched2));
g_return_if_fail (sched2->parent_sched == sched);
GST_DEBUG ("gstscheduler: %p remove scheduler %p", sched, sched2);
sclass = GST_SCHEDULER_GET_CLASS (sched);
if (sclass->remove_scheduler)
sclass->remove_scheduler (sched, sched2);
sched->schedulers = g_list_remove (sched->schedulers, sched2);
sched2->parent_sched = NULL;
gst_object_unref (GST_OBJECT (sched2));
gst_object_unref (GST_OBJECT (sched));
}
/**
* gst_scheduler_lock_element:
* @sched: the scheduler
* @element: the element to lock
*
* Acquire a lock on the given element in the given scheduler.
*/
void
gst_scheduler_lock_element (GstScheduler * sched, GstElement * element)
{
g_return_if_fail (GST_IS_SCHEDULER (sched));
g_return_if_fail (GST_IS_ELEMENT (element));
}
/**
* gst_scheduler_unlock_element:
* @sched: the scheduler
* @element: the element to unlock
*
* Release the lock on the given element in the given scheduler.
*/
void
gst_scheduler_unlock_element (GstScheduler * sched, GstElement * element)
{
GstSchedulerClass *sclass;
g_return_if_fail (GST_IS_SCHEDULER (sched));
g_return_if_fail (GST_IS_ELEMENT (element));
sclass = GST_SCHEDULER_GET_CLASS (sched);
}
/** /**
* gst_scheduler_error: * gst_scheduler_error:
* @sched: the scheduler * @sched: the scheduler
@ -493,58 +356,6 @@ gst_scheduler_error (GstScheduler * sched, GstElement * element)
sclass->error (sched, element); sclass->error (sched, element);
} }
/**
* gst_scheduler_yield:
* @sched: the scheduler
* @element: the element requesting a yield
*
* Tell the scheduler to schedule another element.
*
* Returns: TRUE if the element should save its state, FALSE
* if the scheduler can perform this action itself.
*/
gboolean
gst_scheduler_yield (GstScheduler * sched, GstElement * element)
{
GstSchedulerClass *sclass;
g_return_val_if_fail (GST_IS_SCHEDULER (sched), TRUE);
g_return_val_if_fail (GST_IS_ELEMENT (element), TRUE);
sclass = GST_SCHEDULER_GET_CLASS (sched);
if (sclass->yield)
return sclass->yield (sched, element);
return TRUE;
}
/**
* gst_scheduler_interrupt:
* @sched: the scheduler
* @element: the element requesting an interrupt
*
* Tell the scheduler to interrupt execution of this element.
*
* Returns: TRUE if the element should return NULL from the chain/get
* function.
*/
gboolean
gst_scheduler_interrupt (GstScheduler * sched, GstElement * element)
{
GstSchedulerClass *sclass;
g_return_val_if_fail (GST_IS_SCHEDULER (sched), FALSE);
g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
sclass = GST_SCHEDULER_GET_CLASS (sched);
if (sclass->interrupt)
return sclass->interrupt (sched, element);
return FALSE;
}
/** /**
* gst_scheduler_get_clock: * gst_scheduler_get_clock:
* @sched: the scheduler * @sched: the scheduler
@ -565,23 +376,8 @@ gst_scheduler_get_clock (GstScheduler * sched)
GST_CAT_DEBUG (GST_CAT_CLOCK, "scheduler using fixed clock %p (%s)", GST_CAT_DEBUG (GST_CAT_CLOCK, "scheduler using fixed clock %p (%s)",
clock, clock ? GST_STR_NULL (GST_OBJECT_NAME (clock)) : "-"); clock, clock ? GST_STR_NULL (GST_OBJECT_NAME (clock)) : "-");
} else { } else {
GList *schedulers = sched->schedulers;
GList *providers = sched->clock_providers; GList *providers = sched->clock_providers;
/* try to get a clock from one of the schedulers we manage first */
while (schedulers) {
GstScheduler *scheduler = GST_SCHEDULER (schedulers->data);
clock = gst_scheduler_get_clock (scheduler);
if (clock) {
GST_CAT_DEBUG (GST_CAT_CLOCK,
"scheduler found managed sched clock %p (%s)",
clock, clock ? GST_STR_NULL (GST_OBJECT_NAME (clock)) : "-");
break;
}
schedulers = g_list_next (schedulers);
}
/* still no clock, try to find one in the providers */ /* still no clock, try to find one in the providers */
while (!clock && providers) { while (!clock && providers) {
clock = gst_element_get_clock (GST_ELEMENT (providers->data)); clock = gst_element_get_clock (GST_ELEMENT (providers->data));
@ -591,7 +387,7 @@ gst_scheduler_get_clock (GstScheduler * sched)
providers = g_list_next (providers); providers = g_list_next (providers);
} }
/* still no clock, use a system clock */ /* still no clock, use a system clock */
if (!clock && sched->parent_sched == NULL) { if (!clock) {
clock = gst_system_clock_obtain (); clock = gst_system_clock_obtain ();
/* we unref since this function is not supposed to increase refcount /* we unref since this function is not supposed to increase refcount
* of clock object returned; this is ok since the systemclock always * of clock object returned; this is ok since the systemclock always
@ -640,14 +436,11 @@ void
gst_scheduler_set_clock (GstScheduler * sched, GstClock * clock) gst_scheduler_set_clock (GstScheduler * sched, GstClock * clock)
{ {
GList *receivers; GList *receivers;
GList *schedulers;
g_return_if_fail (sched != NULL); g_return_if_fail (sched != NULL);
g_return_if_fail (GST_IS_SCHEDULER (sched)); g_return_if_fail (GST_IS_SCHEDULER (sched));
receivers = sched->clock_receivers; receivers = sched->clock_receivers;
schedulers = sched->schedulers;
gst_object_replace ((GstObject **) & sched->current_clock, gst_object_replace ((GstObject **) & sched->current_clock,
(GstObject *) clock); (GstObject *) clock);
@ -661,15 +454,6 @@ gst_scheduler_set_clock (GstScheduler * sched, GstClock * clock)
gst_element_set_clock (element, clock); gst_element_set_clock (element, clock);
receivers = g_list_next (receivers); receivers = g_list_next (receivers);
} }
while (schedulers) {
GstScheduler *scheduler = GST_SCHEDULER (schedulers->data);
GST_CAT_DEBUG (GST_CAT_CLOCK,
"scheduler setting clock %p (%s) on scheduler %p", clock,
(clock ? GST_OBJECT_NAME (clock) : "nil"), scheduler);
gst_scheduler_set_clock (scheduler, clock);
schedulers = g_list_next (schedulers);
}
} }
/** /**
@ -688,66 +472,24 @@ gst_scheduler_auto_clock (GstScheduler * sched)
gst_object_replace ((GstObject **) & sched->clock, NULL); gst_object_replace ((GstObject **) & sched->clock, NULL);
GST_CAT_DEBUG (GST_CAT_CLOCK, "scheduler using automatic clock"); GST_DEBUG_OBJECT (sched, "using automatic clock");
} }
GstClockReturn gst_clock_id_wait (GstClockID id, GstClockTimeDiff * jitter); void
gst_scheduler_pad_push (GstScheduler * sched, GstRealPad * pad, GstData * data)
/**
* gst_scheduler_clock_wait:
* @sched: the scheduler
* @element: the element that wants to wait
* @id: the clockid to use
* @jitter: the time difference between requested time and actual time
*
* Wait till the clock reaches a specific time. The ClockID can
* be obtained from #gst_clock_new_single_shot_id.
*
* Returns: the status of the operation
*/
GstClockReturn
gst_scheduler_clock_wait (GstScheduler * sched, GstElement * element,
GstClockID id, GstClockTimeDiff * jitter)
{ {
GstSchedulerClass *sclass; GstSchedulerClass *klass;
g_return_val_if_fail (GST_IS_SCHEDULER (sched), GST_CLOCK_ERROR); g_return_if_fail (GST_IS_SCHEDULER (sched));
g_return_val_if_fail (id != NULL, GST_CLOCK_ERROR); g_return_if_fail (GST_IS_REAL_PAD (pad));
g_return_if_fail (GST_PAD_IS_SRC (pad));
g_return_if_fail (data != NULL);
sclass = GST_SCHEDULER_GET_CLASS (sched); klass = GST_SCHEDULER_GET_CLASS (sched);
g_return_if_fail (klass->pad_push);
if (sclass->clock_wait) klass->pad_push (sched, pad, data);
return sclass->clock_wait (sched, element, id, jitter);
else
return gst_clock_id_wait (id, jitter);
} }
/**
* gst_scheduler_iterate:
* @sched: the scheduler
*
* Perform one iteration on the scheduler.
*
* Returns: a boolean indicating something usefull has happened.
*/
gboolean
gst_scheduler_iterate (GstScheduler * sched)
{
GstSchedulerClass *sclass;
gboolean res = FALSE;
g_return_val_if_fail (GST_IS_SCHEDULER (sched), FALSE);
sclass = GST_SCHEDULER_GET_CLASS (sched);
if (sclass->iterate) {
res = sclass->iterate (sched);
}
return res;
}
/** /**
* gst_scheduler_show: * gst_scheduler_show:
* @sched: the scheduler * @sched: the scheduler
@ -766,277 +508,3 @@ gst_scheduler_show (GstScheduler * sched)
if (sclass->show) if (sclass->show)
sclass->show (sched); sclass->show (sched);
} }
/*
* Factory stuff starts here
*
*/
static void gst_scheduler_factory_class_init (GstSchedulerFactoryClass * klass);
static void gst_scheduler_factory_init (GstSchedulerFactory * factory);
static GstPluginFeatureClass *factory_parent_class = NULL;
/* static guint gst_scheduler_factory_signals[LAST_SIGNAL] = { 0 }; */
GType
gst_scheduler_factory_get_type (void)
{
static GType schedulerfactory_type = 0;
if (!schedulerfactory_type) {
static const GTypeInfo schedulerfactory_info = {
sizeof (GstSchedulerFactoryClass),
NULL,
NULL,
(GClassInitFunc) gst_scheduler_factory_class_init,
NULL,
NULL,
sizeof (GstSchedulerFactory),
0,
(GInstanceInitFunc) gst_scheduler_factory_init,
NULL
};
schedulerfactory_type = g_type_register_static (GST_TYPE_PLUGIN_FEATURE,
"GstSchedulerFactory", &schedulerfactory_info, 0);
}
return schedulerfactory_type;
}
static void
gst_scheduler_factory_class_init (GstSchedulerFactoryClass * klass)
{
GObjectClass *gobject_class;
GstObjectClass *gstobject_class;
GstPluginFeatureClass *gstpluginfeature_class;
gobject_class = (GObjectClass *) klass;
gstobject_class = (GstObjectClass *) klass;
gstpluginfeature_class = (GstPluginFeatureClass *) klass;
factory_parent_class = g_type_class_ref (GST_TYPE_PLUGIN_FEATURE);
if (!_default_name) {
if (g_getenv ("GST_SCHEDULER")) {
_default_name = g_strdup (g_getenv ("GST_SCHEDULER"));
} else {
_default_name = g_strdup (GST_SCHEDULER_DEFAULT_NAME);
}
}
g_assert (_default_name);
}
static void
gst_scheduler_factory_init (GstSchedulerFactory * factory)
{
}
/**
* gst_scheduler_register:
* @plugin: a #GstPlugin
* @name: name of the scheduler to register
* @longdesc: description of the scheduler
* @type: #GType of the scheduler to register
*
* Registers a scheduler with GStreamer.
*
* Returns: TRUE, if the registering succeeded, FALSE on error.
*
* Since: 0.8.5
**/
gboolean
gst_scheduler_register (GstPlugin * plugin, const gchar * name,
const gchar * longdesc, GType type)
{
GstSchedulerFactory *factory;
g_return_val_if_fail (plugin != NULL, FALSE);
g_return_val_if_fail (name != NULL, FALSE);
g_return_val_if_fail (longdesc != NULL, FALSE);
g_return_val_if_fail (g_type_is_a (type, GST_TYPE_SCHEDULER), FALSE);
factory = gst_scheduler_factory_find (name);
if (factory) {
g_return_val_if_fail (factory->type == 0, FALSE);
g_free (factory->longdesc);
factory->longdesc = g_strdup (longdesc);
factory->type = type;
} else {
factory = gst_scheduler_factory_new (name, longdesc, type);
g_return_val_if_fail (factory, FALSE);
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
}
return TRUE;
}
/**
* gst_scheduler_factory_new:
* @name: name of schedulerfactory to create
* @longdesc: long description of schedulerfactory to create
* @type: the gtk type of the GstScheduler element of this factory
*
* Create a new schedulerfactory with the given parameters
*
* Returns: a new #GstSchedulerFactory.
*/
GstSchedulerFactory *
gst_scheduler_factory_new (const gchar * name, const gchar * longdesc,
GType type)
{
GstSchedulerFactory *factory;
g_return_val_if_fail (name != NULL, NULL);
factory = gst_scheduler_factory_find (name);
if (!factory) {
factory =
GST_SCHEDULER_FACTORY (g_object_new (GST_TYPE_SCHEDULER_FACTORY, NULL));
GST_PLUGIN_FEATURE_NAME (factory) = g_strdup (name);
} else {
g_free (factory->longdesc);
}
factory->longdesc = g_strdup (longdesc);
factory->type = type;
return factory;
}
/**
* gst_scheduler_factory_destroy:
* @factory: factory to destroy
*
* Removes the scheduler from the global list.
*/
void
gst_scheduler_factory_destroy (GstSchedulerFactory * factory)
{
g_return_if_fail (factory != NULL);
/* we don't free the struct bacause someone might have a handle to it.. */
}
/**
* gst_scheduler_factory_find:
* @name: name of schedulerfactory to find
*
* Search for an schedulerfactory of the given name.
*
* Returns: #GstSchedulerFactory if found, NULL otherwise
*/
GstSchedulerFactory *
gst_scheduler_factory_find (const gchar * name)
{
GstPluginFeature *feature;
g_return_val_if_fail (name != NULL, NULL);
GST_DEBUG ("gstscheduler: find \"%s\"", name);
feature = gst_registry_pool_find_feature (name, GST_TYPE_SCHEDULER_FACTORY);
if (feature)
return GST_SCHEDULER_FACTORY (feature);
return NULL;
}
/**
* gst_scheduler_factory_create:
* @factory: the factory used to create the instance
* @parent: the parent element of this scheduler
*
* Create a new #GstScheduler instance from the
* given schedulerfactory with the given parent. @parent will
* have its scheduler set to the returned #GstScheduler instance.
*
* Returns: A new #GstScheduler instance with a reference count of %1.
*/
GstScheduler *
gst_scheduler_factory_create (GstSchedulerFactory * factory,
GstElement * parent)
{
GstScheduler *sched = NULL;
g_return_val_if_fail (factory != NULL, NULL);
g_return_val_if_fail (GST_IS_ELEMENT (parent), NULL);
if (gst_plugin_feature_ensure_loaded (GST_PLUGIN_FEATURE (factory))) {
g_return_val_if_fail (factory->type != 0, NULL);
sched = GST_SCHEDULER (g_object_new (factory->type, NULL));
sched->parent = parent;
GST_ELEMENT_SCHED (parent) = sched;
/* let's refcount the scheduler */
gst_object_ref (GST_OBJECT (sched));
gst_object_sink (GST_OBJECT (sched));
}
return sched;
}
/**
* gst_scheduler_factory_make:
* @name: the name of the factory used to create the instance
* @parent: the parent element of this scheduler
*
* Create a new #GstScheduler instance from the
* schedulerfactory with the given name and parent. @parent will
* have its scheduler set to the returned #GstScheduler instance.
* If %NULL is passed as @name, the default scheduler name will
* be used.
*
* Returns: A new #GstScheduler instance with a reference count of %1.
*/
GstScheduler *
gst_scheduler_factory_make (const gchar * name, GstElement * parent)
{
GstSchedulerFactory *factory;
const gchar *default_name = gst_scheduler_factory_get_default_name ();
if (name)
factory = gst_scheduler_factory_find (name);
else {
/* FIXME: do better error handling */
if (default_name == NULL)
g_error ("No default scheduler name - do you have a registry ?");
factory = gst_scheduler_factory_find (default_name);
}
if (factory == NULL)
return NULL;
return gst_scheduler_factory_create (factory, parent);
}
/**
* gst_scheduler_factory_set_default_name:
* @name: the name of the factory used as a default
*
* Set the default schedulerfactory name.
*/
void
gst_scheduler_factory_set_default_name (const gchar * name)
{
g_free (_default_name);
_default_name = g_strdup (name);
}
/**
* gst_scheduler_factory_get_default_name:
*
* Get the default schedulerfactory name.
*
* Returns: the name of the default scheduler.
*/
const gchar *
gst_scheduler_factory_get_default_name (void)
{
return _default_name;
}

View file

@ -26,7 +26,7 @@
#include <glib.h> #include <glib.h>
#include <gst/gstelement.h> #include <gst/gstelement.h>
#include <gst/gstbin.h> #include <gst/gstdata.h>
G_BEGIN_DECLS G_BEGIN_DECLS
@ -40,40 +40,21 @@ G_BEGIN_DECLS
typedef enum { typedef enum {
/* this scheduler works with a fixed clock */ /* this scheduler works with a fixed clock */
GST_SCHEDULER_FLAG_FIXED_CLOCK = GST_OBJECT_FLAG_LAST, GST_SCHEDULER_FLAG_FIXED_CLOCK = GST_OBJECT_FLAG_LAST,
/* this scheduler supports select and lock calls */
GST_SCHEDULER_FLAG_NEW_API,
/* padding */ /* padding */
GST_SCHEDULER_FLAG_LAST = GST_OBJECT_FLAG_LAST + 4 GST_SCHEDULER_FLAG_LAST = GST_OBJECT_FLAG_LAST + 4
} GstSchedulerFlags; } GstSchedulerFlags;
#define GST_SCHEDULER_PARENT(sched) ((sched)->parent) typedef (*GstMarshalFunc) (gpointer data);
#define GST_SCHEDULER_STATE(sched) ((sched)->state)
/*typedef struct _GstScheduler GstScheduler; */
/*typedef struct _GstSchedulerClass GstSchedulerClass; */
typedef enum {
GST_SCHEDULER_STATE_NONE,
GST_SCHEDULER_STATE_RUNNING,
GST_SCHEDULER_STATE_STOPPED,
GST_SCHEDULER_STATE_ERROR
} GstSchedulerState;
struct _GstScheduler { struct _GstScheduler {
GstObject object; GstObject object;
GstElement *parent;
GstScheduler *parent_sched;
GstSchedulerState state;
GstClock *clock; GstClock *clock;
GstClock *current_clock; GstClock *current_clock;
GList *clock_providers; GList *clock_providers;
GList *clock_receivers; GList *clock_receivers;
GList *schedulers;
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];
}; };
@ -81,64 +62,39 @@ struct _GstSchedulerClass {
GstObjectClass parent_class; GstObjectClass parent_class;
/* virtual methods */ /* virtual methods */
void (*setup) (GstScheduler *sched); /* required */
void (*reset) (GstScheduler *sched); void (*marshal) (GstScheduler *sched, GstMarshalFunc func, gpointer data);
void (*add_action) (GstScheduler *sched, GstAction *action);
void (*remove_action) (GstScheduler *sched, GstAction *action);
/* FIXME: can/want this optional, too? */
void (*pad_push) (GstScheduler *sched, GstRealPad *pad, GstData *data);
/* optional */
void (*update_values) (GstScheduler *sched, GstAction *action);
void (*toggle_active) (GstScheduler *sched, GstAction *action);
void (*add_element) (GstScheduler *sched, GstElement *element); void (*add_element) (GstScheduler *sched, GstElement *element);
void (*remove_element) (GstScheduler *sched, GstElement *element); void (*remove_element) (GstScheduler *sched, GstElement *element);
void (*add_scheduler) (GstScheduler *sched, GstScheduler *sched2);
void (*remove_scheduler) (GstScheduler *sched, GstScheduler *sched2);
GstElementStateReturn (*state_transition) (GstScheduler *sched, GstElement *element, gint transition); GstElementStateReturn (*state_transition) (GstScheduler *sched, GstElement *element, gint transition);
void (*scheduling_change) (GstScheduler *sched, GstElement *element);
/* next two are optional, require NEW_API flag */
/* FIXME 0.9: rename to (un)lock_object */
void (*lock_element) (GstScheduler *sched, GstObject *object);
void (*unlock_element) (GstScheduler *sched, GstObject *object);
gboolean (*yield) (GstScheduler *sched, GstElement *element);
gboolean (*interrupt) (GstScheduler *sched, GstElement *element);
void (*error) (GstScheduler *sched, GstElement *element); void (*error) (GstScheduler *sched, GstElement *element);
/* FIXME: make this GstRealPad */
void (*pad_link) (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad); void (*pad_link) (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad);
void (*pad_unlink) (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad); void (*pad_unlink) (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad);
/* optional, requires NEW_API flag */
GstData * (*pad_select) (GstScheduler *sched, GstPad **selected, GstPad **pads);
GstClockReturn (*clock_wait) (GstScheduler *sched, GstElement *element,
GstClockID id, GstClockTimeDiff *jitter);
GstSchedulerState (*iterate) (GstScheduler *sched);
/* for debugging */ /* for debugging */
void (*show) (GstScheduler *sched); void (*show) (GstScheduler *sched);
/* signals */
void (*object_sync) (GstScheduler *sched, GstClock *clock, GstObject *object,
GstClockID id);
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];
}; };
GType gst_scheduler_get_type (void); GType gst_scheduler_get_type (void);
void gst_scheduler_setup (GstScheduler *sched);
void gst_scheduler_reset (GstScheduler *sched);
void gst_scheduler_add_element (GstScheduler *sched, GstElement *element); void gst_scheduler_add_element (GstScheduler *sched, GstElement *element);
void gst_scheduler_remove_element (GstScheduler *sched, GstElement *element); void gst_scheduler_remove_element (GstScheduler *sched, GstElement *element);
void gst_scheduler_add_scheduler (GstScheduler *sched, GstScheduler *sched2); void gst_scheduler_marshal (GstScheduler *sched, GstMarshalFunc func, gpointer data);
void gst_scheduler_remove_scheduler (GstScheduler *sched, GstScheduler *sched2); /* FIXME: make private? */
GstElementStateReturn gst_scheduler_state_transition (GstScheduler *sched, GstElement *element, gint transition); GstElementStateReturn gst_scheduler_state_transition (GstScheduler *sched, GstElement *element, gint transition);
void gst_scheduler_scheduling_change (GstScheduler *sched, GstElement *element);
#ifndef GST_DISABLE_DEPRECATED
void gst_scheduler_lock_element (GstScheduler *sched, GstElement *element);
void gst_scheduler_unlock_element (GstScheduler *sched, GstElement *element);
#endif
gboolean gst_scheduler_yield (GstScheduler *sched, GstElement *element);
gboolean gst_scheduler_interrupt (GstScheduler *sched, GstElement *element);
void gst_scheduler_error (GstScheduler *sched, GstElement *element); void gst_scheduler_error (GstScheduler *sched, GstElement *element);
void gst_scheduler_pad_link (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad); void gst_scheduler_pad_link (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad);
void gst_scheduler_pad_unlink (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad); void gst_scheduler_pad_unlink (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad);
#ifndef GST_DISABLE_DEPRECATED void gst_scheduler_pad_push (GstScheduler *sched, GstRealPad *pad, GstData *data);
GstPad* gst_scheduler_pad_select (GstScheduler *sched, GList *padlist);
#endif
GstClockReturn gst_scheduler_clock_wait (GstScheduler *sched, GstElement *element,
GstClockID id, GstClockTimeDiff *jitter);
gboolean gst_scheduler_iterate (GstScheduler *sched);
void gst_scheduler_use_clock (GstScheduler *sched, GstClock *clock); void gst_scheduler_use_clock (GstScheduler *sched, GstClock *clock);
void gst_scheduler_set_clock (GstScheduler *sched, GstClock *clock); void gst_scheduler_set_clock (GstScheduler *sched, GstClock *clock);
@ -147,53 +103,6 @@ void gst_scheduler_auto_clock (GstScheduler *sched);
void gst_scheduler_show (GstScheduler *sched); void gst_scheduler_show (GstScheduler *sched);
/*
* creating schedulers
*
*/
#define GST_TYPE_SCHEDULER_FACTORY (gst_scheduler_factory_get_type ())
#define GST_SCHEDULER_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_SCHEDULER_FACTORY, GstSchedulerFactory))
#define GST_IS_SCHEDULER_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_SCHEDULER_FACTORY))
#define GST_SCHEDULER_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_SCHEDULER_FACTORY, GstSchedulerFactoryClass))
#define GST_IS_SCHEDULER_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_SCHEDULER_FACTORY))
#define GST_SCHEDULER_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_SCHEDULER_FACTORY, GstSchedulerFactoryClass))
/* change this to change the default scheduler */
#define GST_SCHEDULER_DEFAULT_NAME "opt"
typedef struct _GstSchedulerFactory GstSchedulerFactory;
typedef struct _GstSchedulerFactoryClass GstSchedulerFactoryClass;
struct _GstSchedulerFactory {
GstPluginFeature feature;
gchar *longdesc; /* long description of the scheduler (well, don't overdo it..) */
GType type; /* unique GType of the scheduler */
gpointer _gst_reserved[GST_PADDING];
};
struct _GstSchedulerFactoryClass {
GstPluginFeatureClass parent;
gpointer _gst_reserved[GST_PADDING];
};
GType gst_scheduler_factory_get_type (void);
gboolean gst_scheduler_register (GstPlugin *plugin, const gchar *name,
const gchar *longdesc, GType type);
GstSchedulerFactory* gst_scheduler_factory_new (const gchar *name, const gchar *longdesc, GType type);
void gst_scheduler_factory_destroy (GstSchedulerFactory *factory);
GstSchedulerFactory* gst_scheduler_factory_find (const gchar *name);
GstScheduler* gst_scheduler_factory_create (GstSchedulerFactory *factory, GstElement *parent);
GstScheduler* gst_scheduler_factory_make (const gchar *name, GstElement *parent);
void gst_scheduler_factory_set_default_name (const gchar* name);
G_CONST_RETURN gchar* gst_scheduler_factory_get_default_name (void);
G_END_DECLS G_END_DECLS

295
gst/gstschedulerfactory.c Normal file
View file

@ -0,0 +1,295 @@
/* GStreamer
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
* 2000 Wim Taymans <wim.taymans@chello.be>
* 2004 Benjamin Otte <otte@gnome.org>
*
* gstschedulerfactory.c: code for registering schedulers
*
* 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.
*/
#include "gst_private.h"
#include "gstscheduler.h"
#include "gstschedulerfactory.h"
#include "gstinfo.h"
#include "gstregistrypool.h"
static gchar *_default_name = NULL;
static void gst_scheduler_factory_class_init (GstSchedulerFactoryClass * klass);
static void gst_scheduler_factory_init (GstSchedulerFactory * factory);
static GstPluginFeatureClass *factory_parent_class = NULL;
/* static guint gst_scheduler_factory_signals[LAST_SIGNAL] = { 0 }; */
GType
gst_scheduler_factory_get_type (void)
{
static GType schedulerfactory_type = 0;
if (!schedulerfactory_type) {
static const GTypeInfo schedulerfactory_info = {
sizeof (GstSchedulerFactoryClass),
NULL,
NULL,
(GClassInitFunc) gst_scheduler_factory_class_init,
NULL,
NULL,
sizeof (GstSchedulerFactory),
0,
(GInstanceInitFunc) gst_scheduler_factory_init,
NULL
};
schedulerfactory_type = g_type_register_static (GST_TYPE_PLUGIN_FEATURE,
"GstSchedulerFactory", &schedulerfactory_info, 0);
}
return schedulerfactory_type;
}
static void
gst_scheduler_factory_class_init (GstSchedulerFactoryClass * klass)
{
GObjectClass *gobject_class;
GstObjectClass *gstobject_class;
GstPluginFeatureClass *gstpluginfeature_class;
gobject_class = (GObjectClass *) klass;
gstobject_class = (GstObjectClass *) klass;
gstpluginfeature_class = (GstPluginFeatureClass *) klass;
factory_parent_class = g_type_class_ref (GST_TYPE_PLUGIN_FEATURE);
if (!_default_name) {
if (g_getenv ("GST_SCHEDULER")) {
_default_name = g_strdup (g_getenv ("GST_SCHEDULER"));
} else {
_default_name = g_strdup (GST_SCHEDULER_DEFAULT_NAME);
}
}
g_assert (_default_name);
}
static void
gst_scheduler_factory_init (GstSchedulerFactory * factory)
{
}
/**
* gst_scheduler_register:
* @plugin: a #GstPlugin
* @name: name of the scheduler to register
* @longdesc: description of the scheduler
* @type: #GType of the scheduler to register
*
* Registers a scheduler with GStreamer.
*
* Returns: TRUE, if the registering succeeded, FALSE on error
**/
gboolean
gst_scheduler_register (GstPlugin * plugin, const gchar * name,
const gchar * longdesc, GType type)
{
GstSchedulerFactory *factory;
g_return_val_if_fail (plugin != NULL, FALSE);
g_return_val_if_fail (name != NULL, FALSE);
g_return_val_if_fail (longdesc != NULL, FALSE);
g_return_val_if_fail (g_type_is_a (type, GST_TYPE_SCHEDULER), FALSE);
factory = gst_scheduler_factory_find (name);
if (factory) {
g_return_val_if_fail (factory->type == 0, FALSE);
g_free (factory->longdesc);
factory->longdesc = g_strdup (longdesc);
factory->type = type;
} else {
factory = gst_scheduler_factory_new (name, longdesc, type);
g_return_val_if_fail (factory, FALSE);
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
}
return TRUE;
}
/**
* gst_scheduler_factory_new:
* @name: name of schedulerfactory to create
* @longdesc: long description of schedulerfactory to create
* @type: the gtk type of the GstScheduler element of this factory
*
* Create a new schedulerfactory with the given parameters
*
* Returns: a new #GstSchedulerFactory.
*/
GstSchedulerFactory *
gst_scheduler_factory_new (const gchar * name, const gchar * longdesc,
GType type)
{
GstSchedulerFactory *factory;
g_return_val_if_fail (name != NULL, NULL);
factory = gst_scheduler_factory_find (name);
if (!factory) {
factory =
GST_SCHEDULER_FACTORY (g_object_new (GST_TYPE_SCHEDULER_FACTORY, NULL));
GST_PLUGIN_FEATURE_NAME (factory) = g_strdup (name);
} else {
g_free (factory->longdesc);
}
factory->longdesc = g_strdup (longdesc);
factory->type = type;
return factory;
}
/**
* gst_scheduler_factory_destroy:
* @factory: factory to destroy
*
* Removes the scheduler from the global list.
*/
void
gst_scheduler_factory_destroy (GstSchedulerFactory * factory)
{
g_return_if_fail (factory != NULL);
/* we don't free the struct bacause someone might have a handle to it.. */
}
/**
* gst_scheduler_factory_find:
* @name: name of schedulerfactory to find
*
* Search for an schedulerfactory of the given name.
*
* Returns: #GstSchedulerFactory if found, NULL otherwise
*/
GstSchedulerFactory *
gst_scheduler_factory_find (const gchar * name)
{
GstPluginFeature *feature;
g_return_val_if_fail (name != NULL, NULL);
GST_DEBUG ("gstscheduler: find \"%s\"", name);
feature = gst_registry_pool_find_feature (name, GST_TYPE_SCHEDULER_FACTORY);
if (feature)
return GST_SCHEDULER_FACTORY (feature);
return NULL;
}
/**
* gst_scheduler_factory_create:
* @factory: the factory used to create the instance
* @parent: the parent element of this scheduler
*
* Create a new #GstScheduler instance from the
* given schedulerfactory with the given parent. @parent will
* have its scheduler set to the returned #GstScheduler instance.
*
* Returns: A new #GstScheduler instance with a reference count of %1.
*/
GstScheduler *
gst_scheduler_factory_create (GstSchedulerFactory * factory,
GstElement * parent)
{
GstScheduler *sched = NULL;
g_return_val_if_fail (factory != NULL, NULL);
g_return_val_if_fail (GST_IS_ELEMENT (parent), NULL);
if (gst_plugin_feature_ensure_loaded (GST_PLUGIN_FEATURE (factory))) {
g_return_val_if_fail (factory->type != 0, NULL);
sched = GST_SCHEDULER (g_object_new (factory->type, NULL));
gst_object_set_parent (GST_OBJECT (sched), GST_OBJECT (parent));
GST_ELEMENT_SCHED (parent) = sched;
}
return sched;
}
/**
* gst_scheduler_factory_make:
* @name: the name of the factory used to create the instance
* @parent: the parent element of this scheduler
*
* Create a new #GstScheduler instance from the
* schedulerfactory with the given name and parent. @parent will
* have its scheduler set to the returned #GstScheduler instance.
* If %NULL is passed as @name, the default scheduler name will
* be used.
*
* Returns: A new #GstScheduler instance with a reference count of %1.
*/
GstScheduler *
gst_scheduler_factory_make (const gchar * name, GstElement * parent)
{
GstSchedulerFactory *factory;
const gchar *default_name = gst_scheduler_factory_get_default_name ();
if (name)
factory = gst_scheduler_factory_find (name);
else {
/* FIXME: do better error handling */
if (default_name == NULL)
g_error ("No default scheduler name - do you have a registry ?");
factory = gst_scheduler_factory_find (default_name);
}
if (factory == NULL)
return NULL;
return gst_scheduler_factory_create (factory, parent);
}
/**
* gst_scheduler_factory_set_default_name:
* @name: the name of the factory used as a default
*
* Set the default schedulerfactory name.
*/
void
gst_scheduler_factory_set_default_name (const gchar * name)
{
g_free (_default_name);
_default_name = g_strdup (name);
}
/**
* gst_scheduler_factory_get_default_name:
*
* Get the default schedulerfactory name.
*
* Returns: the name of the default scheduler.
*/
const gchar *
gst_scheduler_factory_get_default_name (void)
{
return _default_name;
}

81
gst/gstschedulerfactory.h Normal file
View file

@ -0,0 +1,81 @@
/* GStreamer
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
* 2000 Wim Taymans <wtay@chello.be>
* 2004 Benjamin Otte <otte@gnome.org>
*
* gstschedulerfactory.h: Header for default scheduler factories
*
* 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.
*/
#include <glib.h>
#include <gst/gstplugin.h>
#include <gst/gstpluginfeature.h>
#ifndef __GST_SCHEDULER_FACTORY_H__
#define __GST_SCHEDULER_FACTORY_H__
G_BEGIN_DECLS
#define GST_TYPE_SCHEDULER_FACTORY (gst_scheduler_factory_get_type ())
#define GST_SCHEDULER_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_SCHEDULER_FACTORY, GstSchedulerFactory))
#define GST_IS_SCHEDULER_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_SCHEDULER_FACTORY))
#define GST_SCHEDULER_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_SCHEDULER_FACTORY, GstSchedulerFactoryClass))
#define GST_IS_SCHEDULER_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_SCHEDULER_FACTORY))
#define GST_SCHEDULER_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_SCHEDULER_FACTORY, GstSchedulerFactoryClass))
/* change this to change the default scheduler */
/* FIXME: use ranks and determine the best scheduler automagically */
#define GST_SCHEDULER_DEFAULT_NAME "simple"
typedef struct _GstSchedulerFactory GstSchedulerFactory;
typedef struct _GstSchedulerFactoryClass GstSchedulerFactoryClass;
struct _GstSchedulerFactory {
GstPluginFeature feature;
gchar *longdesc; /* long description of the scheduler (well, don't overdo it..) */
GType type; /* unique GType of the scheduler */
gpointer _gst_reserved[GST_PADDING];
};
struct _GstSchedulerFactoryClass {
GstPluginFeatureClass parent;
gpointer _gst_reserved[GST_PADDING];
};
GType gst_scheduler_factory_get_type (void);
gboolean gst_scheduler_register (GstPlugin *plugin, const gchar *name,
const gchar *longdesc, GType type);
GstSchedulerFactory* gst_scheduler_factory_new (const gchar *name, const gchar *longdesc, GType type);
GstSchedulerFactory* gst_scheduler_factory_find (const gchar *name);
GstScheduler* gst_scheduler_factory_create (GstSchedulerFactory *factory, GstElement *parent);
GstScheduler* gst_scheduler_factory_make (const gchar *name, GstElement *parent);
void gst_scheduler_factory_set_default_name (const gchar* name);
G_CONST_RETURN gchar* gst_scheduler_factory_get_default_name (void);
G_END_DECLS
#endif /* __GST_SCHEDULER_FACTORY_H__ */

View file

@ -24,10 +24,13 @@
G_BEGIN_DECLS G_BEGIN_DECLS
typedef union _GstAction GstAction;
typedef struct _GstObject GstObject; typedef struct _GstObject GstObject;
typedef struct _GstObjectClass GstObjectClass; typedef struct _GstObjectClass GstObjectClass;
typedef struct _GstPad GstPad; typedef struct _GstPad GstPad;
typedef struct _GstPadClass GstPadClass; typedef struct _GstPadClass GstPadClass;
typedef struct _GstRealPad GstRealPad;
typedef struct _GstRealPadClass GstRealPadClass;
typedef struct _GstPadTemplate GstPadTemplate; typedef struct _GstPadTemplate GstPadTemplate;
typedef struct _GstPadTemplateClass GstPadTemplateClass; typedef struct _GstPadTemplateClass GstPadTemplateClass;
typedef struct _GstElement GstElement; typedef struct _GstElement GstElement;
@ -37,6 +40,8 @@ typedef struct _GstBinClass GstBinClass;
typedef struct _GstScheduler GstScheduler; typedef struct _GstScheduler GstScheduler;
typedef struct _GstSchedulerClass GstSchedulerClass; typedef struct _GstSchedulerClass GstSchedulerClass;
typedef struct _GstEvent GstEvent; typedef struct _GstEvent GstEvent;
typedef guint64 GstClockTime;
typedef gint64 GstClockTimeDiff;
typedef enum { typedef enum {
GST_STATE_VOID_PENDING = 0, GST_STATE_VOID_PENDING = 0,

View file

@ -54,7 +54,7 @@
#include <gst/gst_private.h> #include <gst/gst_private.h>
#include <gst/gstelement.h> #include <gst/gstelement.h>
#include <gst/gsttypefind.h> #include <gst/gsttypefind.h>
#include <gst/gstscheduler.h> #include <gst/gstschedulerfactory.h>
#include <gst/gsturi.h> #include <gst/gsturi.h>
#include <gst/gstinfo.h> #include <gst/gstinfo.h>
#include <gst/gstenumtypes.h> #include <gst/gstenumtypes.h>

View file

@ -1,82 +1,16 @@
if GST_DISABLE_OMEGA_COTHREADS
omegaschedulers =
omegaschedulers_nola =
else
omegaschedulers = \
libgstbasicomegascheduler.la \
libgstentryomegascheduler.la \
libgstoptomegascheduler.la
omegaschedulers_nola = \
libgstbasicomegascheduler \
libgstentryomegascheduler \
libgstoptomegascheduler
endif
plugin_LTLIBRARIES = \ plugin_LTLIBRARIES = \
$(omegaschedulers) \ libgstsimplescheduler.la
libgstbasicgthreadscheduler.la \
libgstentrygthreadscheduler.la \
libgstoptscheduler.la \
libgstoptgthreadscheduler.la \
libgstfairgthreadscheduler.la
AS_LIBTOOL_LIBS = \ AS_LIBTOOL_LIBS = \
$(omegaschedulers_nola) \ libgstsimplescheduler
libgstbasicgthreadscheduler \
libgstentrygthreadscheduler \
libgstoptscheduler \
libgstoptgthreadscheduler \
libgstfairgthreadscheduler
if GST_DISABLE_OMEGA_COTHREADS
else
libgstbasicomegascheduler_la_SOURCES = gstbasicscheduler.c
libgstbasicomegascheduler_la_CFLAGS = $(GST_OBJ_CFLAGS) -D_COTHREADS_OMEGA
libgstbasicomegascheduler_la_LIBADD = $(GST_OBJ_LIBS) ../libcothreads.la
libgstbasicomegascheduler_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(as_libtool_LDFLAGS)
endif
libgstbasicgthreadscheduler_la_SOURCES = gstbasicscheduler.c libgstsimplescheduler_la_SOURCES = gstsimplescheduler.c
libgstbasicgthreadscheduler_la_CFLAGS = $(GST_OBJ_CFLAGS) -D_COTHREADS_GTHREAD libgstsimplescheduler_la_CFLAGS = $(GST_OBJ_CFLAGS)
libgstbasicgthreadscheduler_la_LIBADD = $(GST_OBJ_LIBS) libgstsimplescheduler_la_LIBADD = $(GST_OBJ_LIBS)
libgstbasicgthreadscheduler_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(as_libtool_LDFLAGS) libgstsimplescheduler_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(as_libtool_LDFLAGS)
libgstentrygthreadscheduler_la_SOURCES = entryscheduler.c
libgstentrygthreadscheduler_la_CFLAGS = $(GST_OBJ_CFLAGS) -D_COTHREADS_GTHREAD
libgstentrygthreadscheduler_la_LIBADD = $(GST_OBJ_LIBS)
libgstentrygthreadscheduler_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(as_libtool_LDFLAGS)
if GST_DISABLE_OMEGA_COTHREADS
else
libgstentryomegascheduler_la_SOURCES = entryscheduler.c
libgstentryomegascheduler_la_CFLAGS = $(GST_OBJ_CFLAGS) -D_COTHREADS_OMEGA
libgstentryomegascheduler_la_LIBADD = $(GST_OBJ_LIBS) ../libcothreads.la
libgstentryomegascheduler_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(as_libtool_LDFLAGS)
endif
libgstoptscheduler_la_SOURCES = gstoptimalscheduler.c
libgstoptscheduler_la_CFLAGS = $(GST_OBJ_CFLAGS)
libgstoptscheduler_la_LIBADD = $(GST_OBJ_LIBS)
libgstoptscheduler_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(as_libtool_LDFLAGS)
if GST_DISABLE_OMEGA_COTHREADS
else
libgstoptomegascheduler_la_SOURCES = gstoptimalscheduler.c
libgstoptomegascheduler_la_CFLAGS = $(GST_OBJ_CFLAGS) -D_COTHREADS_OMEGA -DUSE_COTHREADS
libgstoptomegascheduler_la_LIBADD = $(GST_OBJ_LIBS) ../libcothreads.la
libgstoptomegascheduler_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(as_libtool_LDFLAGS)
endif
libgstoptgthreadscheduler_la_SOURCES = gstoptimalscheduler.c
libgstoptgthreadscheduler_la_CFLAGS = $(GST_OBJ_CFLAGS) -D_COTHREADS_GTHREAD -DUSE_COTHREADS
libgstoptgthreadscheduler_la_LIBADD = $(GST_OBJ_LIBS)
libgstoptgthreadscheduler_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(as_libtool_LDFLAGS)
libgstfairgthreadscheduler_la_SOURCES = fairscheduler.c faircothreads.c
libgstfairgthreadscheduler_la_CFLAGS = $(GST_OBJ_CFLAGS) -D_COTHREADS_GTHREAD
libgstfairgthreadscheduler_la_LIBADD = $(GST_OBJ_LIBS)
libgstfairgthreadscheduler_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(as_libtool_LDFLAGS)
noinst_HEADERS = cothreads_compat.h gthread-cothreads.h faircothreads.h
if AS_LIBTOOL_WIN32 if AS_LIBTOOL_WIN32
@ -106,6 +40,8 @@ as-libtool-uninstall-local:
endif endif
%.lib: %.def %.lib: %.def
dlltool -S $(CC) -f "-c" --export-all-symbols --input-def \ dlltool -S $(CC) -f "-c" --export-all-symbols --input-def \
%.def --output-lib %.lib %.def --output-lib %.lib
@ -117,3 +53,4 @@ endif
awk '{ print $$3 }' | \ awk '{ print $$3 }' | \
sed 's/^/ /' >>%.def.tmp sed 's/^/ /' >>%.def.tmp
mv %.def.tmp %.def mv %.def.tmp %.def

View file

@ -1,79 +0,0 @@
/* GStreamer
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
* 2000 Wim Taymans <wtay@chello.be>
*
* cothreads_compat.h: Compatibility macros between cothreads packages
*
* 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.
*/
/* use the old cothreads implementation in gst/cothreads.[ch] */
#if defined(_COTHREADS_OMEGA)
#include "../cothreads.h"
/* the name of this cothreads type */
#define COTHREADS_TYPE omega
#define COTHREADS_NAME "omega"
#define COTHREADS_NAME_CAPITAL "Omega"
/* unify the structs
*
* "cothread" and "cothread_context" need to be defined
*/
typedef struct _cothread_state cothread;
/* define functions
* the macros are prepended with "do_"
*/
#define do_cothreads_init(x) /* NOP */
#define do_cothreads_stackquery(stack,size) cothread_stackquery(stack,size)
#define do_cothread_switch(to) cothread_switch(to)
#define do_cothread_create(new_cothread, context, func, argc, argv) \
G_STMT_START{ \
new_cothread = cothread_create (context); \
if (new_cothread) { \
cothread_setfunc (new_cothread, (func), (argc), (argv)); \
} \
}G_STMT_END
#define do_cothread_setfunc(cothread, context, func, argc, argv) \
cothread_setfunc ((cothread), (func), (argc), (argv))
#define do_cothread_destroy(cothread) cothread_free(cothread)
#define do_cothread_context_init() (cothread_context_init ())
#define do_cothread_context_destroy(context) cothread_context_free (context)
#define do_cothread_get_current(context) (cothread_current())
#define do_cothread_get_main(context) (cothread_current_main())
/* use the gthread-based cothreads implementation */
#elif defined(_COTHREADS_GTHREAD)
#include "gthread-cothreads.h"
/* bail out with an error if no cothreads package is defined */
#else
#error "No cothreads package defined"
#endif

File diff suppressed because it is too large Load diff

View file

@ -1,615 +0,0 @@
/* GStreamer
* Copyright (C) 2004 Martin Soto <martinsoto@users.sourceforge.net>
*
* faircothread.c: High level cothread implementation for the fair scheduler.
*
* 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.
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <glib.h>
#include <gst/gst.h>
#ifdef _COTHREADS_PTH
#include "pth-cothreads.h"
#else
#include "cothreads_compat.h"
#endif
#include "faircothreads.h"
#if !defined(GST_DISABLE_GST_DEBUG) && defined(FAIRSCHEDULER_USE_GETTID)
#include <sys/types.h>
#include <linux/unistd.h>
_syscall0 (pid_t, gettid)
#endif
GST_DEBUG_CATEGORY_EXTERN (debug_fair_ct);
#define GST_CAT_DEFAULT debug_fair_ct
/*
* Support for Asynchronous Operations
*/
enum
{
ASYNC_OP_CHANGE_STATE = 1,
ASYNC_OP_AWAKE
};
typedef struct _AsyncOp AsyncOp;
typedef struct _AsyncOpChangeState AsyncOpChangeState;
typedef struct _AsyncOpAwake AsyncOpAwake;
struct _AsyncOp
{
int type;
};
struct _AsyncOpChangeState
{
AsyncOp parent;
GstFairSchedulerCothread *ct; /* Cothread whose state will be
changed. */
gint new_state; /* New state for the cothread. */
};
struct _AsyncOpAwake
{
AsyncOp parent;
GstFairSchedulerCothread *ct; /* Cothread to awake. */
gint priority; /* Priority for the cothread. */
};
#ifndef GST_DISABLE_GST_DEBUG
static gchar *gst_fairscheduler_ct_state_names[] = {
"stopped",
"suspended",
"running"
};
#endif
/*
* Helpers
*/
static int
cothread_base_func (int argc, char **argv)
{
GstFairSchedulerCothread *ct;
g_return_val_if_fail (argc >= 1, -1);
ct = (GstFairSchedulerCothread *) argv[0];
GST_INFO ("queue %p: Cothread %p starting", ct->queue, ct);
#ifndef GST_DISABLE_GST_DEBUG
#ifdef FAIRSCHEDULER_USE_GETTID
ct->pid = gettid ();
#else
ct->pid = 0;
#endif
#endif
/* Call the thread function. This looks sort of funny, but there's
no other way I know of doing it. */
switch (argc - 1) {
case 0:
ct->func (ct, NULL);
break;
case 1:
ct->func (ct, argv[1], NULL);
break;
case 2:
ct->func (ct, argv[1], argv[2], NULL);
break;
case 3:
ct->func (ct, argv[1], argv[2], argv[3], NULL);
break;
case 4:
ct->func (ct, argv[1], argv[2], argv[3], argv[4], NULL);
break;
case 5:
ct->func (ct, argv[1], argv[2], argv[3], argv[4], argv[5], NULL);
break;
case 6:
ct->func (ct, argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], NULL);
break;
case 7:
ct->func (ct, argv[1], argv[2], argv[3], argv[4], argv[5],
argv[6], argv[7], NULL);
break;
default:
g_return_val_if_reached (-1);
break;
}
/* After the cothread function is finished, we go to the stopped
state. */
gst_fair_scheduler_cothread_change_state (ct,
GST_FAIRSCHEDULER_CTSTATE_STOPPED);
return 0;
}
static void
cothread_activate (GstFairSchedulerCothread * ct, gint priority)
{
GST_DEBUG ("queue %p: activating cothread %p", ct->queue, ct);
if (priority > 0) {
g_queue_push_head (ct->queue->ct_queue, ct);
} else {
g_queue_push_tail (ct->queue->ct_queue, ct);
}
}
static void
cothread_deactivate (GstFairSchedulerCothread * ct)
{
GList *node;
GST_DEBUG ("queue %p: deactivating cothread %p", ct->queue, ct);
/* Find the node. */
node = g_list_find (ct->queue->ct_queue->head, ct);
if (node == NULL) {
return;
}
if (node->next == NULL) {
g_queue_pop_tail (ct->queue->ct_queue);
} else {
ct->queue->ct_queue->head =
g_list_remove_link (ct->queue->ct_queue->head, node);
}
}
static void
queue_async_op (GstFairSchedulerCothreadQueue * queue, AsyncOp * op)
{
g_mutex_lock (queue->async_mutex);
g_queue_push_tail (queue->async_queue, op);
g_cond_signal (queue->new_async_op);
g_mutex_unlock (queue->async_mutex);
}
/*
* Cothreads API
*/
extern GstFairSchedulerCothreadQueue *
gst_fair_scheduler_cothread_queue_new (void)
{
GstFairSchedulerCothreadQueue *new;
new = g_malloc (sizeof (GstFairSchedulerCothreadQueue));
new->context = NULL;
new->ct_queue = g_queue_new ();
new->async_queue = g_queue_new ();
new->async_mutex = g_mutex_new ();
new->new_async_op = g_cond_new ();
return new;
}
extern void
gst_fair_scheduler_cothread_queue_destroy (GstFairSchedulerCothreadQueue *
queue)
{
GList *iter;
/* Destroy all remaining cothreads. */
for (iter = queue->ct_queue->head; iter != NULL; iter = iter->next) {
gst_fair_scheduler_cothread_destroy (
(GstFairSchedulerCothread *) iter->data);
}
g_queue_free (queue->ct_queue);
for (iter = queue->async_queue->head; iter != NULL; iter = iter->next) {
g_free (iter->data);
}
g_queue_free (queue->async_queue);
g_mutex_free (queue->async_mutex);
g_cond_free (queue->new_async_op);
g_free (queue);
}
extern void
gst_fair_scheduler_cothread_queue_start (GstFairSchedulerCothreadQueue * queue)
{
if (queue->context == NULL) {
do_cothreads_init (NULL);
queue->context = do_cothread_context_init ();
}
}
extern void
gst_fair_scheduler_cothread_queue_stop (GstFairSchedulerCothreadQueue * queue)
{
if (queue->context != NULL) {
do_cothread_context_destroy (queue->context);
}
}
gboolean
gst_fair_scheduler_cothread_queue_iterate (GstFairSchedulerCothreadQueue *
queue)
{
GstFairSchedulerCothread *ct;
g_return_val_if_fail (queue->context != NULL, FALSE);
GST_LOG ("queue %p: iterating", queue);
/* Perform any pending asynchronous operations. Checking the queue
is safe and more efficient without locking the mutex. */
if (!g_queue_is_empty (queue->async_queue)) {
AsyncOp *basic_op;
GST_LOG ("queue %p: processing asynchronous operations", queue);
g_mutex_lock (queue->async_mutex);
while (!g_queue_is_empty (queue->async_queue)) {
basic_op = (AsyncOp *) g_queue_pop_head (queue->async_queue);
switch (basic_op->type) {
case ASYNC_OP_CHANGE_STATE:
{
AsyncOpChangeState *op = (AsyncOpChangeState *) basic_op;
gst_fair_scheduler_cothread_change_state (op->ct, op->new_state);
}
break;
case ASYNC_OP_AWAKE:
{
AsyncOpAwake *op = (AsyncOpAwake *) basic_op;
gst_fair_scheduler_cothread_awake (op->ct, op->priority);
}
break;
default:
g_return_val_if_reached (FALSE);
break;
}
g_free (basic_op);
}
g_mutex_unlock (queue->async_mutex);
}
/* First cothread in the queue (if any) should get control. */
ct = g_queue_peek_head (queue->ct_queue);
if (ct == NULL) {
GTimeVal timeout;
g_get_current_time (&timeout);
g_time_val_add (&timeout, 5000);
/* No cothread available, wait until some other thread queues an
operation. */
g_mutex_lock (queue->async_mutex);
g_cond_timed_wait (queue->new_async_op, queue->async_mutex, &timeout);
g_mutex_unlock (queue->async_mutex);
return FALSE;
}
g_return_val_if_fail (ct->state == GST_FAIRSCHEDULER_CTSTATE_RUNNING, FALSE);
/* Check for a cothread mutex. */
if (ct->mutex != NULL) {
g_mutex_lock (ct->mutex);
ct->mutex = NULL;
}
GST_LOG ("queue %p: giving control to %p", queue, ct);
/* Handle control to the cothread. */
do_cothread_switch (ct->execst);
return TRUE;
}
void
gst_fair_scheduler_cothread_queue_show (GstFairSchedulerCothreadQueue * queue)
{
GList *iter;
GstFairSchedulerCothread *ct;
g_print ("\n Running cothreads (last is active):\n");
for (iter = queue->ct_queue->tail; iter != NULL; iter = iter->prev) {
ct = (GstFairSchedulerCothread *) iter->data;
#ifndef GST_DISABLE_GST_DEBUG
g_print (" %p: %s (%d)\n", ct, ct->readable_name->str, ct->pid);
#endif
}
}
GstFairSchedulerCothread *
gst_fair_scheduler_cothread_new (GstFairSchedulerCothreadQueue * queue,
GstFairSchedulerCtFunc function, gpointer first_arg, ...)
{
GstFairSchedulerCothread *new;
va_list ap;
gpointer arg;
new = g_malloc (sizeof (GstFairSchedulerCothread));
new->queue = queue;
new->func = function;
/* The first parameter is always the cothread structure itself. */
new->argv[0] = (char *) new;
new->argc = 1;
/* Store the parameters. */
va_start (ap, first_arg);
arg = first_arg;
while (new->argc < GST_FAIRSCHEDULER_MAX_CTARGS && arg != NULL) {
new->argv[new->argc] = (char *) arg;
new->argc++;
arg = va_arg (ap, gpointer);
}
/* Make sure we don't have more parameters than we can handle. */
g_return_val_if_fail (arg == NULL, NULL);
/* Creation of the actual execution state is defered to transition
to running/suspended. */
new->execst = NULL;
/* All cothreads are created in the stopped state. */
new->state = GST_FAIRSCHEDULER_CTSTATE_STOPPED;
new->mutex = NULL;
#ifndef GST_DISABLE_GST_DEBUG
new->readable_name = g_string_new ("");
new->pid = 0;
#endif
GST_DEBUG ("queue %p: cothread %p created", queue, new);
return new;
}
void
gst_fair_scheduler_cothread_destroy (GstFairSchedulerCothread * ct)
{
GST_DEBUG ("queue %p: destroying cothread %p", ct->queue, ct);
if (ct->state != GST_FAIRSCHEDULER_CTSTATE_STOPPED) {
cothread_deactivate (ct);
}
if (ct->execst != NULL) {
do_cothread_destroy (ct->execst);
}
#ifndef GST_DISABLE_GST_DEBUG
g_string_free (ct->readable_name, TRUE);
#endif
g_free (ct);
}
void
gst_fair_scheduler_cothread_change_state (GstFairSchedulerCothread * ct,
gint new_state)
{
if (new_state == ct->state) {
return;
}
GST_DEBUG ("queue %p: changing state of %p from %s to %s", ct->queue, ct,
gst_fairscheduler_ct_state_names[ct->state],
gst_fairscheduler_ct_state_names[new_state]);
switch (ct->state) {
case GST_FAIRSCHEDULER_CTSTATE_STOPPED:
/* (Re)Initialize the cothread. */
if (ct->execst == NULL) {
/* Initialize cothread's execution state. */
do_cothread_create (ct->execst, ct->queue->context,
cothread_base_func, ct->argc, ct->argv);
GST_LOG_OBJECT (ct->queue,
"cothread %p has exec state %p", ct, ct->execst);
} else {
/* Reset cothread's execution state. */
do_cothread_setfunc (ct->execst, ct->queue->context,
cothread_base_func, ct->argc, ct->argv);
}
ct->sleeping = FALSE;
if (new_state == GST_FAIRSCHEDULER_CTSTATE_RUNNING) {
cothread_activate (ct, 0);
}
break;
case GST_FAIRSCHEDULER_CTSTATE_RUNNING:
if (!ct->sleeping) {
cothread_deactivate (ct);
}
break;
case GST_FAIRSCHEDULER_CTSTATE_SUSPENDED:
if (new_state == GST_FAIRSCHEDULER_CTSTATE_RUNNING && !ct->sleeping) {
cothread_activate (ct, 0);
}
break;
}
ct->state = new_state;
}
void
gst_fair_scheduler_cothread_change_state_async (GstFairSchedulerCothread * ct,
gint new_state)
{
AsyncOpChangeState *op;
/* Queue an asynchronous operation. */
op = g_new (AsyncOpChangeState, 1);
op->parent.type = ASYNC_OP_CHANGE_STATE;
op->ct = ct;
op->new_state = new_state;
queue_async_op (ct->queue, (AsyncOp *) op);
}
void
gst_fair_scheduler_cothread_sleep (GstFairSchedulerCothreadQueue * queue)
{
gst_fair_scheduler_cothread_sleep_mutex (queue, NULL);
}
/*
* Go to sleep but unblock the mutex while sleeping.
*/
void
gst_fair_scheduler_cothread_sleep_mutex (GstFairSchedulerCothreadQueue * queue,
GMutex * mutex)
{
GstFairSchedulerCothread *ct;
g_return_if_fail (queue->context != NULL);
/* The sleep operation can be invoked when the cothread is already
deactivated. */
ct = gst_fair_scheduler_cothread_current (queue);
if (ct != NULL && ct->execst == do_cothread_get_current (queue->context)) {
ct = g_queue_pop_head (queue->ct_queue);
ct->sleeping = TRUE;
}
ct->mutex = mutex;
if (mutex != NULL) {
g_mutex_unlock (mutex);
}
GST_LOG ("queue %p: cothread going to sleep", queue);
/* Switch back to the main cothread. */
do_cothread_switch (do_cothread_get_main (queue->context));
}
void
gst_fair_scheduler_cothread_yield (GstFairSchedulerCothreadQueue * queue)
{
gst_fair_scheduler_cothread_yield_mutex (queue, NULL);
}
void
gst_fair_scheduler_cothread_yield_mutex (GstFairSchedulerCothreadQueue * queue,
GMutex * mutex)
{
GstFairSchedulerCothread *ct;
g_return_if_fail (queue->context != NULL);
/* The yield operation can be invoked when the cothread is already
deactivated. */
ct = gst_fair_scheduler_cothread_current (queue);
if (ct != NULL && ct->execst == do_cothread_get_current (queue->context)) {
ct = g_queue_pop_head (queue->ct_queue);
g_queue_push_tail (queue->ct_queue, ct);
}
ct->mutex = mutex;
if (mutex != NULL) {
g_mutex_unlock (mutex);
}
GST_LOG ("queue %p: cothread yielding control", queue);
/* Switch back to the main cothread. */
do_cothread_switch (do_cothread_get_main (queue->context));
}
void
gst_fair_scheduler_cothread_awake (GstFairSchedulerCothread * ct, gint priority)
{
g_return_if_fail (ct->state != GST_FAIRSCHEDULER_CTSTATE_STOPPED);
if (!ct->sleeping) {
/* Cothread is already awake. */
return;
}
ct->sleeping = FALSE;
if (ct->state == GST_FAIRSCHEDULER_CTSTATE_RUNNING) {
cothread_activate (ct, priority);
}
}
void
gst_fair_scheduler_cothread_awake_async (GstFairSchedulerCothread * ct,
gint priority)
{
AsyncOpAwake *op;
/* Queue an asynchronous operation. */
op = g_new (AsyncOpAwake, 1);
op->parent.type = ASYNC_OP_AWAKE;
op->ct = ct;
op->priority = priority;
queue_async_op (ct->queue, (AsyncOp *) op);
}
GstFairSchedulerCothread *
gst_fair_scheduler_cothread_current (GstFairSchedulerCothreadQueue * queue)
{
return g_queue_peek_head (queue->ct_queue);
}

View file

@ -1,163 +0,0 @@
/* GStreamer
* Copyright (C) 2004 Martin Soto <martinsoto@users.sourceforge.net>
*
* faircothread.h: High level cothread implementation for the fair scheduler.
*
* 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.
*/
#ifndef __FAIRCOTHREADS_H__
#define __FAIRCOTHREADS_H__
#ifdef _COTHREADS_PTH
#include "pth-cothreads.h"
#else
#define GTHREAD_COTHREADS_NO_DEFINITIONS
#include "cothreads_compat.h"
#endif
typedef struct _GstFairSchedulerCothread GstFairSchedulerCothread;
typedef struct _GstFairSchedulerCothreadQueue GstFairSchedulerCothreadQueue;
/* Possible states of a cothread. */
enum
{
GST_FAIRSCHEDULER_CTSTATE_STOPPED,
GST_FAIRSCHEDULER_CTSTATE_SUSPENDED,
GST_FAIRSCHEDULER_CTSTATE_RUNNING,
};
/* Maximum number of cothread parameters. */
#define GST_FAIRSCHEDULER_MAX_CTARGS 7
/* Cothread function type. */
typedef void (*GstFairSchedulerCtFunc) (GstFairSchedulerCothread * ct,
gpointer first_arg, ...);
struct _GstFairSchedulerCothread {
GstFairSchedulerCothreadQueue *queue;
/* Cothread queue this cothread
belongs to. */
GstFairSchedulerCtFunc func; /* Cothread function. */
char *argv[1 + GST_FAIRSCHEDULER_MAX_CTARGS]; /*
Arguments for the cothread function.
argv[0] is always the cothread
object itself. */
int argc; /* Number of stored parameters. */
cothread *execst; /* Execution state for this cothread. */
gint state; /* Current cothread state. */
gboolean sleeping; /* Is this cothread sleeping? */
GMutex *mutex; /* If not null, a mutex to lock before
giving control to this cothread. */
#ifndef GST_DISABLE_GST_DEBUG
GString *readable_name; /* Readable name for this cothread. */
gint pid; /* Process or thread id associated to
this cothread. */
#endif
};
struct _GstFairSchedulerCothreadQueue {
cothread_context *context; /* Cothread context. */
GQueue *ct_queue; /* Queue of currently running
cothreads. New cothreads are pushed
on the tail. If a cothread is
executing, it is the one in the
head. */
/* Asynchronous support. */
GQueue *async_queue; /* Queue storing asynchronous
operations (operations on the queue
requested potentially from other
threads. */
GMutex *async_mutex; /* Mutex to protect acceses to
async_queue. */
GCond *new_async_op; /* Condition variable to signal the
presence of a new asynchronous
operation in the queue. */
};
extern GstFairSchedulerCothreadQueue *
gst_fair_scheduler_cothread_queue_new (void);
extern void
gst_fair_scheduler_cothread_queue_destroy (
GstFairSchedulerCothreadQueue * queue);
extern void
gst_fair_scheduler_cothread_queue_start (
GstFairSchedulerCothreadQueue * queue);
extern void
gst_fair_scheduler_cothread_queue_stop (
GstFairSchedulerCothreadQueue * queue);
extern gboolean
gst_fair_scheduler_cothread_queue_iterate (
GstFairSchedulerCothreadQueue * queue);
extern void
gst_fair_scheduler_cothread_queue_show (
GstFairSchedulerCothreadQueue * queue);
extern GstFairSchedulerCothread *
gst_fair_scheduler_cothread_new (GstFairSchedulerCothreadQueue * queue,
GstFairSchedulerCtFunc function, gpointer first_arg, ...);
extern void
gst_fair_scheduler_cothread_destroy (GstFairSchedulerCothread * ct);
extern void
gst_fair_scheduler_cothread_change_state (GstFairSchedulerCothread * ct,
gint new_state);
extern void
gst_fair_scheduler_cothread_change_state_async (
GstFairSchedulerCothread * ct, gint new_state);
extern void
gst_fair_scheduler_cothread_sleep (GstFairSchedulerCothreadQueue * queue);
extern void
gst_fair_scheduler_cothread_sleep_mutex (
GstFairSchedulerCothreadQueue * queue, GMutex * mutex);
extern void
gst_fair_scheduler_cothread_yield (GstFairSchedulerCothreadQueue * queue);
extern void
gst_fair_scheduler_cothread_yield_mutex (
GstFairSchedulerCothreadQueue * queue, GMutex * mutex);
extern void
gst_fair_scheduler_cothread_awake (GstFairSchedulerCothread * ct,
gint priority);
extern void
gst_fair_scheduler_cothread_awake_async (GstFairSchedulerCothread * ct,
gint priority);
extern GstFairSchedulerCothread *
gst_fair_scheduler_cothread_current (GstFairSchedulerCothreadQueue * queue);
#endif /* __FAIRCOTHREADS_H__ */

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,474 @@
/* GStreamer
* Copyright (C) 2004 Benjamin Otte <otte@gnome.org>
*
* gstsimplesimple_scheduler.c: A simple_scheduler as simple as possible
*
* 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.
*/
#include "gst/gst_private.h"
#include <gst/gst.h>
/*** GstCheckSource ***/
typedef struct
{
GSource source;
GSourceFunc check;
gpointer check_data;
} GstCheckSource;
static gboolean
gst_check_prepare (GSource * source, gint * timeout)
{
GstCheckSource *s = (GstCheckSource *) source;
if (s->check (s->check_data)) {
*timeout = 0;
return TRUE;
} else {
*timeout = -1;
return FALSE;
}
}
static gboolean
gst_check_check (GSource * source)
{
GstCheckSource *s = (GstCheckSource *) source;
if (s->check (s->check_data)) {
return TRUE;
}
return FALSE;
}
static gboolean
gst_check_dispatch (GSource * source, GSourceFunc callback, gpointer user_data)
{
if (!callback) {
g_warning ("Check source dispatched without callback\n"
"You must call g_source_set_callback().");
return FALSE;
}
return callback (user_data);
}
static GSourceFuncs gst_check_funcs = {
gst_check_prepare,
gst_check_check,
gst_check_dispatch,
NULL
};
GSource *
gst_check_source_new (GSourceFunc check, gpointer check_data)
{
GSource *source;
g_return_val_if_fail (check, NULL);
source = g_source_new (&gst_check_funcs, sizeof (GstCheckSource));
((GstCheckSource *) source)->check = check;
((GstCheckSource *) source)->check_data = check_data;
return source;
}
/*** the scheduler ***/
/*
GST_DEBUG_CATEGORY_STATIC (sched_debug, "simplescheduler", GST_DEBUG_BOLD,
"the simplest possible scheduler");
#define GST_CAT_DEFAULT sched_debug
*/
#define GST_TYPE_SIMPLE_SCHEDULER (gst_simple_scheduler_get_type ())
#define GST_SIMPLE_SCHEDULER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_SIMPLE_SCHEDULER, GstSimpleScheduler))
#define GST_IS_SIMPLE_SCHEDULER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_SIMPLE_SCHEDULER))
#define GST_SIMPLE_SCHEDULER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_SIMPLE_SCHEDULER,GstSimpleSchedulerClass))
#define GST_IS_SIMPLE_SCHEDULER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_SIMPLE_SCHEDULER))
#define GST_SIMPLE_SCHEDULER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_SIMPLE_SCHEDULER, GstSimpleSchedulerClass))
typedef struct _GstSimpleScheduler GstSimpleScheduler;
typedef struct _GstSimpleSchedulerClass GstSimpleSchedulerClass;
struct _GstSimpleScheduler
{
GstScheduler object;
GHashTable *sources_for_actions;
gpointer _gst_reserved[GST_PADDING];
};
struct _GstSimpleSchedulerClass
{
GstSchedulerClass parent_class;
gpointer _gst_reserved[GST_PADDING];
};
static void gst_simple_scheduler_class_init (GstSimpleSchedulerClass * klass);
static void gst_simple_scheduler_init (GstSimpleScheduler * sched);
static void gst_simple_scheduler_finalize (GObject * object);
static void gst_simple_scheduler_add_action (GstScheduler * scheduler,
GstAction * action);
static void gst_simple_scheduler_remove_action (GstScheduler * scheduler,
GstAction * action);
static void gst_simple_scheduler_pad_push (GstScheduler * scheduler,
GstRealPad * pad, GstData * data);
static void gst_simple_scheduler_toggle_active (GstScheduler * scheduler,
GstAction * action);
static void gst_simple_scheduler_update_values (GstScheduler * scheduler,
GstAction * action);
GstSchedulerClass *parent_class;
GType
gst_simple_scheduler_get_type (void)
{
static GType _gst_simple_scheduler_type = 0;
if (!_gst_simple_scheduler_type) {
static const GTypeInfo simple_scheduler_info = {
sizeof (GstSimpleSchedulerClass),
NULL,
NULL,
(GClassInitFunc) gst_simple_scheduler_class_init,
NULL,
NULL,
sizeof (GstSimpleScheduler),
0,
(GInstanceInitFunc) gst_simple_scheduler_init,
NULL
};
_gst_simple_scheduler_type =
g_type_register_static (GST_TYPE_SCHEDULER, "GstSimpleScheduler",
&simple_scheduler_info, 0);
}
return _gst_simple_scheduler_type;
}
static void
gst_simple_scheduler_class_init (GstSimpleSchedulerClass * klass)
{
GObjectClass *object = G_OBJECT_CLASS (klass);
GstSchedulerClass *sched = GST_SCHEDULER_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
object->finalize = gst_simple_scheduler_finalize;
sched->add_action = gst_simple_scheduler_add_action;
sched->remove_action = gst_simple_scheduler_remove_action;
sched->pad_push = gst_simple_scheduler_pad_push;
sched->toggle_active = gst_simple_scheduler_toggle_active;
sched->update_values = gst_simple_scheduler_update_values;
}
static void
gst_simple_scheduler_init (GstSimpleScheduler * sched)
{
sched->sources_for_actions = g_hash_table_new (g_direct_hash, g_direct_equal);
}
#ifndef G_DISABLE_ASSERT
static void
print_all_actions (gpointer key, gpointer value, gpointer unused)
{
GstAction *action = key;
gchar *str = gst_action_to_string (action);
g_print (" action %p: %s --- source %p\n", action, str, value);
g_free (str);
}
#endif
static void
gst_simple_scheduler_finalize (GObject * object)
{
GstSimpleScheduler *sched = GST_SIMPLE_SCHEDULER (object);
/* all actions must have been removed by the scheduler's parent before
* disposing */
#ifndef G_DISABLE_ASSERT
if (g_hash_table_size (sched->sources_for_actions) != 0) {
g_printerr ("scheduler %p has %u items left:\n", sched,
g_hash_table_size (sched->sources_for_actions));
g_hash_table_foreach (sched->sources_for_actions, print_all_actions, NULL);
g_assert_not_reached ();
}
#endif
g_hash_table_destroy (sched->sources_for_actions);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static gboolean
release_wakeup_cb (gpointer data)
{
GstAction *action = data;
gst_action_wakeup_release (action);
return TRUE;
}
static gboolean
timeout_elapsed_cb (gpointer data)
{
GstAction *action = data;
#ifndef G_DISABLE_CHECKS
GstClockTime time = gst_element_get_time (action->any.element);
if (action->wait.time > time) {
GST_WARNING ("time on element %s is %" GST_TIME_FORMAT " too short (it's %"
GST_TIME_FORMAT ".\n", GST_ELEMENT_NAME (action->wait.element),
GST_TIME_ARGS (action->wait.time - time), GST_TIME_ARGS (time));
}
#endif
gst_action_wait_release (action);
return TRUE;
}
static gboolean
release_fd_cb (GIOChannel * source, GIOCondition condition, gpointer data)
{
GstAction *action = data;
gst_action_fd_release (action, condition);
return TRUE;
}
static gboolean
push_cb (gpointer action)
{
GstRealPad *pad = gst_action_get_pad (action);
GstData *data;
GST_LOG ("pushing on %s:%s...", GST_DEBUG_PAD_NAME (pad));
if (GST_RPAD_PEER (pad)) {
GstRealPad *peer = GST_RPAD_PEER (pad);
g_assert (peer->sched_private); /* FIXME: relinking in callback? */
data = ((GList *) peer->sched_private)->data;
peer->sched_private = g_list_remove (peer->sched_private, data);
if (peer->sched_private)
GST_ERROR ("pad %s:%s had multiple (%u) GstData queued.",
GST_DEBUG_PAD_NAME (peer), g_list_length (peer->sched_private) + 1);
} else {
data = GST_DATA (gst_event_new (GST_EVENT_EOS));
}
gst_action_release_sink_pad (action, data);
return TRUE;
}
static void
gst_simple_scheduler_do_push (GstRealPad * pad, GstData * data)
{
g_assert (GST_PAD_IS_SRC (pad));
if (!GST_PAD_PEER (pad)) {
g_assert (pad->sched_private == NULL);
gst_data_unref (data);
return;
}
pad->sched_private = g_list_append (pad->sched_private, data);
}
static gboolean
pull_cb (gpointer action)
{
GstData *data;
GstRealPad *pad = gst_action_get_pad (action);
GstScheduler *sched;
GST_LOG ("pulling...");
gst_object_ref (pad);
sched = gst_pad_get_scheduler (GST_PAD (pad));
data = gst_action_release_src_pad (action);
if (sched == gst_pad_get_scheduler (GST_PAD (pad)))
gst_simple_scheduler_do_push (pad, data);
gst_object_unref (pad);
return TRUE;
}
static gboolean
check_no_data (gpointer action)
{
return !(gst_action_get_element (action)->sched_private);
}
static gboolean
check_no_data_srcpad (gpointer action)
{
return !(gst_action_get_pad (action)->sched_private);
}
static gboolean
check_data_sinkpad (gpointer action)
{
GstRealPad *pad = gst_action_get_pad (action);
if (!GST_RPAD_PEER (pad))
return TRUE;
return GST_RPAD_PEER (pad)->sched_private != NULL;
}
static void
gst_simple_scheduler_activate_action (GstScheduler * scheduler,
GstAction * action)
{
GSource *source;
GstSimpleScheduler *sched = GST_SIMPLE_SCHEDULER (scheduler);
g_assert (gst_action_is_active (action));
switch (action->type) {
case GST_ACTION_WAKEUP:
source = gst_check_source_new (check_no_data, action);
g_source_set_priority (source, G_PRIORITY_DEFAULT);
g_source_set_callback (source, release_wakeup_cb, action, NULL);
break;
case GST_ACTION_SRC_PAD:
source = gst_check_source_new (check_no_data_srcpad, action);
g_source_set_callback (source, pull_cb, action, NULL);
break;
case GST_ACTION_SINK_PAD:
source = gst_check_source_new (check_data_sinkpad, action);
g_source_set_callback (source, push_cb, action, NULL);
break;
case GST_ACTION_FD:
{
GIOChannel *channel = g_io_channel_unix_new (action->fd.fd);
source = g_io_create_watch (channel, action->fd.condition);
g_source_set_callback (source, (GSourceFunc) release_fd_cb, action, NULL);
g_io_channel_unref (channel);
}
break;
case GST_ACTION_WAIT:
{
GstClockTime time = gst_element_get_time (action->any.element);
GST_LOG_OBJECT (sched,
"time is %" GST_TIME_FORMAT ", waiting for %" GST_TIME_FORMAT "\n",
GST_TIME_ARGS (time), GST_TIME_ARGS (action->wait.time));
if (action->wait.time > time) {
time = action->wait.time - time;
/* FIXME: make this adjustable by the element's clock */
} else {
time = 0;
}
source = g_timeout_source_new (time / (GST_SECOND / 1000));
g_source_set_callback (source, timeout_elapsed_cb, action, NULL);
}
break;
default:
g_assert_not_reached ();
break;
}
/* FIXME: LEAKS */
GST_DEBUG_OBJECT (sched, "adding source %p for action %s\n", source,
gst_action_to_string (action));
g_hash_table_insert (sched->sources_for_actions, action, source);
g_source_attach (source, NULL);
g_source_unref (source); /* FIXME: need better refcount management? */
GST_LOG_OBJECT (sched, "%u active sources now",
g_hash_table_size (sched->sources_for_actions));
}
static void
gst_simple_scheduler_add_action (GstScheduler * scheduler, GstAction * action)
{
if (gst_action_is_active (action))
gst_simple_scheduler_activate_action (scheduler, action);
}
static void
gst_simple_scheduler_deactivate_action (GstScheduler * scheduler,
GstAction * action)
{
GSource *source;
GstSimpleScheduler *sched = GST_SIMPLE_SCHEDULER (scheduler);
source = g_hash_table_lookup (sched->sources_for_actions, action);
g_assert (source);
g_source_destroy (source);
if (!g_hash_table_remove (sched->sources_for_actions, action))
g_assert_not_reached ();
GST_DEBUG_OBJECT (sched, "%p removed for action %p, %u active sources now",
source, action, g_hash_table_size (sched->sources_for_actions));
}
static void
gst_simple_scheduler_remove_action (GstScheduler * scheduler,
GstAction * action)
{
if (gst_action_is_active (action))
gst_simple_scheduler_deactivate_action (scheduler, action);
}
static void
gst_simple_scheduler_toggle_active (GstScheduler * scheduler,
GstAction * action)
{
//g_print ("toggling action %s to be %sactive now\n", gst_action_to_string (action),
// gst_action_is_active (action) ? "" : "NOT ");
if (gst_action_is_active (action)) {
gst_simple_scheduler_activate_action (scheduler, action);
} else {
gst_simple_scheduler_deactivate_action (scheduler, action);
}
}
static void
gst_simple_scheduler_update_values (GstScheduler * scheduler,
GstAction * action)
{
if (gst_action_is_active (action)) {
gst_simple_scheduler_deactivate_action (scheduler, action);
gst_simple_scheduler_activate_action (scheduler, action);
}
}
static void
gst_simple_scheduler_pad_push (GstScheduler * scheduler, GstRealPad * pad,
GstData * data)
{
GST_LOG_OBJECT (scheduler, "pad %s:%s pushed %p", GST_DEBUG_PAD_NAME (pad),
data);
gst_simple_scheduler_do_push (pad, data);
}
static gboolean
plugin_init (GstPlugin * plugin)
{
if (!gst_scheduler_register (plugin, "simple",
"A scheduler as simple as possible", GST_TYPE_SIMPLE_SCHEDULER))
return FALSE;
return TRUE;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, "gstsimplescheduler",
"A scheduler as simple as possible", plugin_init, VERSION, GST_LICENSE,
GST_PACKAGE, GST_ORIGIN)

View file

@ -1,221 +0,0 @@
/* GStreamer
* Copyright (C) 2003 Benjamin Otte <in7y118@public.uni-hamburg.de>
*
* gthread-cothreads.c: cothreads implemented via GThread for compatibility
* They're probably slooooooow
*
* 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.
*/
#ifndef __GTHREAD_COTHREADS_H__
#define __GTHREAD_COTHREADS_H__
#include <glib.h>
#include <gst/gstthread.h>
/* the name of this cothreads */
#define COTHREADS_TYPE gthread
#define COTHREADS_NAME "gthread"
#define COTHREADS_NAME_CAPITAL "GThread"
/*
* Theory of operation:
* Instead of using cothreads, GThreads and 1 mutex are used.
* Every thread may only run if it holds the mutex. Otherwise it holds its own
* cond which has to be signaled to wakeit up.
*/
/* define "cothread", "cothread_context" and "cothread_func" */
typedef int (*cothread_func) (int, char **);
typedef struct _cothread cothread;
typedef struct _cothread_context cothread_context;
struct _cothread_context {
GSList * cothreads; /* contains all threads but main */
cothread * main;
cothread * current;
GMutex * mutex;
GstThread * gst_thread; /* the GstThread we're running from */
};
struct _cothread {
GThread * thread;
GCond * cond;
cothread_func run;
int argc;
char ** argv;
cothread * creator;
gboolean die;
cothread_context * context;
};
#ifndef GTHREAD_COTHREADS_NO_DEFINITIONS
/* define functions
* Functions starting with "do_" are used by the scheduler.
*/
static void do_cothreads_init (void *unused);
static cothread_context *do_cothread_context_init (void);
static void do_cothread_context_destroy (cothread_context *context);
static cothread * cothread_create (cothread_context *context,
cothread_func func,
int argc,
char **argv);
#define do_cothread_create(new_cothread, context, func, argc, argv) \
G_STMT_START{ \
new_cothread = cothread_create ((context), (func), argc, (char**) (argv)); \
}G_STMT_END
static void do_cothread_switch (cothread *to);
static void do_cothread_destroy (cothread *thread);
#define do_cothread_get_current(context) ((context)->current)
#define do_cothread_get_main(context) ((context)->main)
static void
do_cothreads_init (void *unused)
{
if (!g_thread_supported ()) g_thread_init (NULL);
}
static cothread_context *
do_cothread_context_init (void)
{
cothread_context *ret = g_new0 (cothread_context, 1);
ret->main = g_new0 (cothread, 1);
ret->main->thread = g_thread_self ();
ret->main->cond = g_cond_new ();
ret->main->die = FALSE;
ret->main->context = ret;
ret->mutex = g_mutex_new ();
ret->cothreads = NULL;
ret->current = ret->main;
ret->gst_thread = gst_thread_get_current();
g_mutex_lock (ret->mutex);
return ret;
}
static void
do_cothread_context_destroy (cothread_context *context)
{
g_assert (g_thread_self() == context->main->thread);
while (context->cothreads) {
do_cothread_destroy ((cothread *) context->cothreads->data);
}
g_mutex_unlock (context->mutex);
g_mutex_free (context->mutex);
g_cond_free (context->main->cond);
g_free (context->main);
g_free (context);
}
static void
die (cothread *to_die) {
g_cond_free (to_die->cond);
to_die->context->cothreads = g_slist_remove (to_die->context->cothreads, to_die);
g_free (to_die);
g_thread_exit (to_die);
/* don't unlock the mutex here, the thread waiting for us to die is gonna take it */
}
static gpointer
run_new_thread (gpointer data)
{
cothread *self = (cothread *) data;
g_mutex_lock (self->context->mutex);
g_private_set (gst_thread_current, self->context->gst_thread);
g_cond_signal (self->creator->cond);
g_cond_wait (self->cond, self->context->mutex);
if (self->die)
die (self);
while (TRUE) {
self->run (self->argc, self->argv);
/* compatibility */
do_cothread_switch (do_cothread_get_main (self->context));
}
g_assert_not_reached ();
return NULL;
}
static cothread *
cothread_create (cothread_context *context, cothread_func func, int argc, char **argv)
{
cothread *ret;
if ((ret = g_new (cothread, 1)) == NULL) {
goto out1;
}
ret->cond = g_cond_new ();
ret->run = func;
ret->argc = argc;
ret->argv = argv;
ret->creator = do_cothread_get_current (context);
ret->die = FALSE;
ret->context = context;
context->cothreads = g_slist_prepend (context->cothreads, ret);
ret->thread = g_thread_create (run_new_thread, ret, TRUE, NULL);
if (ret->thread == NULL) goto out2;
g_cond_wait (do_cothread_get_current (context)->cond, context->mutex);
return ret;
out2:
context->cothreads = g_slist_remove (context->cothreads, ret);
g_free (ret);
out1:
return NULL;
}
static void do_cothread_switch (cothread *to)
{
cothread *self = do_cothread_get_current(to->context);
if (self != to) {
self->context->current = to;
g_cond_signal (to->cond);
g_cond_wait (self->cond, self->context->mutex);
if (self->die)
die (self);
}
}
#define do_cothread_setfunc(thread,context,_func,_argc,_argv) G_STMT_START {\
((cothread *)(thread))->run = (_func); \
((cothread *)(thread))->argc = _argc; \
((cothread *)(thread))->argv = _argv; \
}G_STMT_END
static void
do_cothread_destroy (cothread *thread)
{
GThread *join;
cothread_context *context;
g_return_if_fail (thread != thread->context->main);
g_return_if_fail (thread != thread->context->current);
thread->die = TRUE;
join = thread->thread;
context = thread->context;
g_cond_signal (thread->cond);
g_mutex_unlock (thread->context->mutex);
g_thread_join (join);
/* the mutex was locked by the thread that we joined, no need to lock again */
}
#define do_cothread_get_current(context) ((context)->current)
#define do_cothread_get_main(context) ((context)->main)
#endif /* GTHREAD_COTHREADS_NO_DEFINITIONS */
#endif /* __GTHREAD_COTHREADS_H__ */

View file

@ -1,16 +1,16 @@
plugin_LTLIBRARIES = libgstbytestream.la lib_LTLIBRARIES = libgstbytestream-@GST_MAJORMINOR@.la
AS_LIBTOOL_LIB = libgstbytestream AS_LIBTOOL_LIB = libgstbytestream-@GST_MAJORMINOR@
EXTRA_DIST = $(as_libtool_EXTRA_DIST) EXTRA_DIST = $(as_libtool_EXTRA_DIST)
noinst_DATA = $(as_libtool_noinst_DATA_files) noinst_DATA = $(as_libtool_noinst_DATA_files)
libgstbytestreamincludedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/bytestream libgstbytestreamincludedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/bytestream
libgstbytestreaminclude_HEADERS = bytestream.h adapter.h filepad.h libgstbytestreaminclude_HEADERS = adapter.h filepad.h
libgstbytestream_la_SOURCES = bytestream.c adapter.c filepad.c libgstbytestream_@GST_MAJORMINOR@_la_SOURCES = adapter.c filepad.c
libgstbytestream_la_CFLAGS = $(GST_OBJ_CFLAGS) libgstbytestream_@GST_MAJORMINOR@_la_CFLAGS = $(GST_OBJ_CFLAGS)
libgstbytestream_la_LIBS = $(GST_OBJ_LIBS) libgstbytestream_@GST_MAJORMINOR@_la_LIBS = $(GST_OBJ_LIBS)
libgstbytestream_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(as_libtool_LDFLAGS) libgstbytestream_@GST_MAJORMINOR@_la_LDFLAGS = $(GST_OBJ_LDFLAGS) $(as_libtool_LDFLAGS)
install-data-local: as-libtool-install-data-local install-data-local: as-libtool-install-data-local

View file

@ -39,7 +39,8 @@ GST_BOILERPLATE_FULL (GstFilePad, gst_file_pad, GstRealPad, GST_TYPE_REAL_PAD,
static void gst_file_pad_dispose (GObject * object); static void gst_file_pad_dispose (GObject * object);
static void gst_file_pad_finalize (GObject * object); static void gst_file_pad_finalize (GObject * object);
static void gst_file_pad_chain (GstPad * pad, GstData * data); static void gst_file_pad_chain (GstAction * action, GstRealPad * gst_pad,
GstData * data);
static void gst_file_pad_parent_set (GstObject * object, static void gst_file_pad_parent_set (GstObject * object,
GstObject * parent); GstObject * parent);
@ -65,10 +66,9 @@ gst_file_pad_init (GstFilePad * pad)
{ {
GstRealPad *real = GST_REAL_PAD (pad); GstRealPad *real = GST_REAL_PAD (pad);
/* must do this for set_chain_function to work */ /* must do this for set_action_handler to work */
real->direction = GST_PAD_SINK; real->direction = GST_PAD_SINK;
gst_sink_pad_set_action_handler (GST_PAD (pad), gst_file_pad_chain);
gst_pad_set_chain_function (GST_PAD (real), gst_file_pad_chain);
pad->adapter = gst_adapter_new (); pad->adapter = gst_adapter_new ();
pad->in_seek = FALSE; pad->in_seek = FALSE;
@ -99,7 +99,7 @@ gst_file_pad_finalize (GObject * object)
} }
static void static void
gst_file_pad_chain (GstPad * gst_pad, GstData * data) gst_file_pad_chain (GstAction * action, GstRealPad * gst_pad, GstData * data)
{ {
GstFilePad *pad = GST_FILE_PAD (gst_pad); GstFilePad *pad = GST_FILE_PAD (gst_pad);
gboolean got_value; gboolean got_value;
@ -162,7 +162,7 @@ gst_file_pad_chain (GstPad * gst_pad, GstData * data)
} }
g_return_if_fail (pad->event_func); g_return_if_fail (pad->event_func);
pad->event_func (gst_pad, event); pad->event_func (GST_PAD (pad), event);
} else { } else {
if (pad->in_seek) { if (pad->in_seek) {
GST_DEBUG_OBJECT (pad, "discarding buffer %p, we're seeking", data); GST_DEBUG_OBJECT (pad, "discarding buffer %p, we're seeking", data);
@ -183,8 +183,6 @@ gst_file_pad_parent_set (GstObject * object, GstObject * parent)
/* FIXME: we can only be added to elements, right? */ /* FIXME: we can only be added to elements, right? */
element = GST_ELEMENT (parent); element = GST_ELEMENT (parent);
if (element->loopfunc)
g_warning ("attempt to add a GstFilePad to a loopbased element.");
if (!GST_FLAG_IS_SET (element, GST_ELEMENT_EVENT_AWARE)) if (!GST_FLAG_IS_SET (element, GST_ELEMENT_EVENT_AWARE))
g_warning ("elements using GstFilePad must be event-aware."); g_warning ("elements using GstFilePad must be event-aware.");

View file

@ -113,7 +113,8 @@ static void gst_fakesink_get_property (GObject * object, guint prop_id,
static GstElementStateReturn gst_fakesink_change_state (GstElement * element); static GstElementStateReturn gst_fakesink_change_state (GstElement * element);
static void gst_fakesink_chain (GstPad * pad, GstData * _data); static void gst_fakesink_chain (GstAction * action, GstRealPad * pad,
GstData * _data);
static guint gst_fakesink_signals[LAST_SIGNAL] = { 0 }; static guint gst_fakesink_signals[LAST_SIGNAL] = { 0 };
@ -187,8 +188,8 @@ gst_fakesink_init (GstFakeSink * fakesink)
pad = pad =
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate), gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
"sink"); "sink");
gst_sink_pad_set_action_handler (pad, GST_DEBUG_FUNCPTR (gst_fakesink_chain));
gst_element_add_pad (GST_ELEMENT (fakesink), pad); gst_element_add_pad (GST_ELEMENT (fakesink), pad);
gst_pad_set_chain_function (pad, GST_DEBUG_FUNCPTR (gst_fakesink_chain));
fakesink->silent = FALSE; fakesink->silent = FALSE;
fakesink->dump = FALSE; fakesink->dump = FALSE;
@ -231,7 +232,8 @@ gst_fakesink_request_new_pad (GstElement * element, GstPadTemplate * templ,
sinkpad = gst_pad_new_from_template (templ, name); sinkpad = gst_pad_new_from_template (templ, name);
g_free (name); g_free (name);
gst_pad_set_chain_function (sinkpad, GST_DEBUG_FUNCPTR (gst_fakesink_chain)); gst_sink_pad_set_action_handler (sinkpad,
GST_DEBUG_FUNCPTR (gst_fakesink_chain));
gst_element_add_pad (GST_ELEMENT (fakesink), sinkpad); gst_element_add_pad (GST_ELEMENT (fakesink), sinkpad);
@ -309,7 +311,7 @@ gst_fakesink_get_property (GObject * object, guint prop_id, GValue * value,
} }
static void static void
gst_fakesink_chain (GstPad * pad, GstData * _data) gst_fakesink_chain (GstAction * action, GstRealPad * pad, GstData * _data)
{ {
GstBuffer *buf = GST_BUFFER (_data); GstBuffer *buf = GST_BUFFER (_data);
GstFakeSink *fakesink; GstFakeSink *fakesink;
@ -341,7 +343,7 @@ gst_fakesink_chain (GstPad * pad, GstData * _data)
gst_element_set_time (GST_ELEMENT (fakesink), value); gst_element_set_time (GST_ELEMENT (fakesink), value);
} }
default: default:
gst_pad_event_default (pad, event); gst_pad_event_default (GST_PAD (pad), event);
break; break;
} }
return; return;

View file

@ -64,7 +64,6 @@ enum
{ {
ARG_0, ARG_0,
ARG_NUM_SOURCES, ARG_NUM_SOURCES,
ARG_LOOP_BASED,
ARG_OUTPUT, ARG_OUTPUT,
ARG_DATA, ARG_DATA,
ARG_SIZETYPE, ARG_SIZETYPE,
@ -179,7 +178,7 @@ GST_BOILERPLATE_FULL (GstFakeSrc, gst_fakesrc, GstElement, GST_TYPE_ELEMENT,
static GstPad *gst_fakesrc_request_new_pad (GstElement * element, static GstPad *gst_fakesrc_request_new_pad (GstElement * element,
GstPadTemplate * templ, const gchar * unused); GstPadTemplate * templ, const gchar * unused);
static void gst_fakesrc_update_functions (GstFakeSrc * src); static void gst_fakesrc_update_functions (GstFakeSrc * src, GstPad * pad);
static void gst_fakesrc_set_property (GObject * object, guint prop_id, static void gst_fakesrc_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec); const GValue * value, GParamSpec * pspec);
static void gst_fakesrc_get_property (GObject * object, guint prop_id, static void gst_fakesrc_get_property (GObject * object, guint prop_id,
@ -188,8 +187,7 @@ static void gst_fakesrc_set_clock (GstElement * element, GstClock * clock);
static GstElementStateReturn gst_fakesrc_change_state (GstElement * element); static GstElementStateReturn gst_fakesrc_change_state (GstElement * element);
static GstData *gst_fakesrc_get (GstPad * pad); static GstData *gst_fakesrc_get (GstAction * action, GstRealPad * pad);
static void gst_fakesrc_loop (GstElement * element);
static guint gst_fakesrc_signals[LAST_SIGNAL] = { 0 }; static guint gst_fakesrc_signals[LAST_SIGNAL] = { 0 };
@ -214,13 +212,9 @@ gst_fakesrc_class_init (GstFakeSrcClass * klass)
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_NUM_SOURCES, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_NUM_SOURCES,
g_param_spec_int ("num-sources", "num-sources", "Number of sources", g_param_spec_int ("num-sources", "num-sources", "Number of sources",
1, G_MAXINT, 1, G_PARAM_READABLE)); 1, G_MAXINT, 1, G_PARAM_READABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LOOP_BASED,
g_param_spec_boolean ("loop-based", "loop-based",
"Enable loop-based operation", FALSE, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_OUTPUT, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_OUTPUT,
g_param_spec_enum ("output", "output", "Output method (currently unused)", g_param_spec_enum ("output", "output", "Output method (currently unused)",
GST_TYPE_FAKESRC_OUTPUT, FAKESRC_FIRST_LAST_LOOP, G_PARAM_READWRITE)); GST_TYPE_FAKESRC_OUTPUT, FAKESRC_FIRST_LAST_LOOP, G_PARAM_READWRITE));
@ -299,11 +293,9 @@ gst_fakesrc_init (GstFakeSrc * fakesrc)
pad = pad =
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate), gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
"src"); "src");
gst_fakesrc_update_functions (fakesrc, pad);
gst_element_add_pad (GST_ELEMENT (fakesrc), pad); gst_element_add_pad (GST_ELEMENT (fakesrc), pad);
fakesrc->loop_based = FALSE;
gst_fakesrc_update_functions (fakesrc);
fakesrc->output = FAKESRC_FIRST_LAST_LOOP; fakesrc->output = FAKESRC_FIRST_LAST_LOOP;
fakesrc->segment_start = -1; fakesrc->segment_start = -1;
fakesrc->segment_end = -1; fakesrc->segment_end = -1;
@ -358,39 +350,14 @@ gst_fakesrc_request_new_pad (GstElement * element, GstPadTemplate * templ,
name = g_strdup_printf ("src%d", GST_ELEMENT (fakesrc)->numsrcpads); name = g_strdup_printf ("src%d", GST_ELEMENT (fakesrc)->numsrcpads);
srcpad = gst_pad_new_from_template (templ, name); srcpad = gst_pad_new_from_template (templ, name);
gst_fakesrc_update_functions (fakesrc, srcpad);
gst_element_add_pad (GST_ELEMENT (fakesrc), srcpad); gst_element_add_pad (GST_ELEMENT (fakesrc), srcpad);
gst_fakesrc_update_functions (fakesrc);
g_free (name); g_free (name);
return srcpad; return srcpad;
} }
static const GstFormat *
gst_fakesrc_get_formats (GstPad * pad)
{
static const GstFormat formats[] = {
GST_FORMAT_DEFAULT,
0,
};
return formats;
}
static const GstQueryType *
gst_fakesrc_get_query_types (GstPad * pad)
{
static const GstQueryType types[] = {
GST_QUERY_TOTAL,
GST_QUERY_POSITION,
GST_QUERY_START,
GST_QUERY_SEGMENT_END,
0,
};
return types;
}
static gboolean static gboolean
gst_fakesrc_query (GstPad * pad, GstQueryType type, gst_fakesrc_query (GstPad * pad, GstQueryType type,
GstFormat * format, gint64 * value) GstFormat * format, gint64 * value)
@ -416,19 +383,6 @@ gst_fakesrc_query (GstPad * pad, GstQueryType type,
return TRUE; return TRUE;
} }
static const GstEventMask *
gst_fakesrc_get_event_mask (GstPad * pad)
{
static const GstEventMask masks[] = {
{GST_EVENT_SEEK, GST_SEEK_FLAG_FLUSH},
{GST_EVENT_SEEK_SEGMENT, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SEGMENT_LOOP},
{GST_EVENT_FLUSH, 0},
{0, 0},
};
return masks;
}
static gboolean static gboolean
gst_fakesrc_event_handler (GstPad * pad, GstEvent * event) gst_fakesrc_event_handler (GstPad * pad, GstEvent * event)
{ {
@ -463,34 +417,12 @@ gst_fakesrc_event_handler (GstPad * pad, GstEvent * event)
} }
static void static void
gst_fakesrc_update_functions (GstFakeSrc * src) gst_fakesrc_update_functions (GstFakeSrc * src, GstPad * pad)
{ {
GList *pads; gst_src_pad_set_action_handler (pad, gst_fakesrc_get);
gst_real_pad_set_initially_active (GST_REAL_PAD (pad), TRUE);
if (src->loop_based) {
gst_element_set_loop_function (GST_ELEMENT (src),
GST_DEBUG_FUNCPTR (gst_fakesrc_loop));
} else {
gst_element_set_loop_function (GST_ELEMENT (src), NULL);
}
pads = GST_ELEMENT (src)->pads;
while (pads) {
GstPad *pad = GST_PAD (pads->data);
if (src->loop_based) {
gst_pad_set_get_function (pad, NULL);
} else {
gst_pad_set_get_function (pad, GST_DEBUG_FUNCPTR (gst_fakesrc_get));
}
gst_pad_set_event_function (pad, gst_fakesrc_event_handler); gst_pad_set_event_function (pad, gst_fakesrc_event_handler);
gst_pad_set_event_mask_function (pad, gst_fakesrc_get_event_mask);
gst_pad_set_query_function (pad, gst_fakesrc_query); gst_pad_set_query_function (pad, gst_fakesrc_query);
gst_pad_set_query_type_function (pad, gst_fakesrc_get_query_types);
gst_pad_set_formats_function (pad, gst_fakesrc_get_formats);
pads = g_list_next (pads);
}
} }
static void static void
@ -516,10 +448,6 @@ gst_fakesrc_set_property (GObject * object, guint prop_id, const GValue * value,
src = GST_FAKESRC (object); src = GST_FAKESRC (object);
switch (prop_id) { switch (prop_id) {
case ARG_LOOP_BASED:
src->loop_based = g_value_get_boolean (value);
gst_fakesrc_update_functions (src);
break;
case ARG_OUTPUT: case ARG_OUTPUT:
g_warning ("not yet implemented"); g_warning ("not yet implemented");
break; break;
@ -596,9 +524,6 @@ gst_fakesrc_get_property (GObject * object, guint prop_id, GValue * value,
case ARG_NUM_SOURCES: case ARG_NUM_SOURCES:
g_value_set_int (value, GST_ELEMENT (src)->numsrcpads); g_value_set_int (value, GST_ELEMENT (src)->numsrcpads);
break; break;
case ARG_LOOP_BASED:
g_value_set_boolean (value, src->loop_based);
break;
case ARG_OUTPUT: case ARG_OUTPUT:
g_value_set_enum (value, src->output); g_value_set_enum (value, src->output);
break; break;
@ -791,7 +716,7 @@ gst_fakesrc_create_buffer (GstFakeSrc * src)
} }
static GstData * static GstData *
gst_fakesrc_get (GstPad * pad) gst_fakesrc_get (GstAction * action, GstRealPad * pad)
{ {
GstFakeSrc *src; GstFakeSrc *src;
GstBuffer *buf; GstBuffer *buf;
@ -870,40 +795,6 @@ gst_fakesrc_get (GstPad * pad)
return GST_DATA (buf); return GST_DATA (buf);
} }
/**
* gst_fakesrc_loop:
* @element: the faksesrc to loop
*
* generate an empty buffer and push it to the next element.
*/
static void
gst_fakesrc_loop (GstElement * element)
{
GstFakeSrc *src;
const GList *pads;
g_return_if_fail (element != NULL);
g_return_if_fail (GST_IS_FAKESRC (element));
src = GST_FAKESRC (element);
pads = gst_element_get_pad_list (element);
while (pads) {
GstPad *pad = GST_PAD (pads->data);
GstData *data;
data = gst_fakesrc_get (pad);
gst_pad_push (pad, data);
if (src->eos) {
return;
}
pads = g_list_next (pads);
}
}
static GstElementStateReturn static GstElementStateReturn
gst_fakesrc_change_state (GstElement * element) gst_fakesrc_change_state (GstElement * element)
{ {

View file

@ -76,7 +76,6 @@ typedef struct _GstFakeSrcClass GstFakeSrcClass;
struct _GstFakeSrc { struct _GstFakeSrc {
GstElement element; GstElement element;
gboolean loop_based;
gboolean eos; gboolean eos;
GstFakeSrcOutputType output; GstFakeSrcOutputType output;

View file

@ -69,7 +69,8 @@ static void gst_fdsink_set_property (GObject * object, guint prop_id,
static void gst_fdsink_get_property (GObject * object, guint prop_id, static void gst_fdsink_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec); GValue * value, GParamSpec * pspec);
static void gst_fdsink_chain (GstPad * pad, GstData * _data); static void gst_fdsink_chain (GstAction * action, GstRealPad * pad,
GstData * _data);
static void static void
@ -103,14 +104,14 @@ gst_fdsink_init (GstFdSink * fdsink)
fdsink->sinkpad = fdsink->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate), gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
"sink"); "sink");
gst_sink_pad_set_action_handler (fdsink->sinkpad, gst_fdsink_chain);
gst_element_add_pad (GST_ELEMENT (fdsink), fdsink->sinkpad); gst_element_add_pad (GST_ELEMENT (fdsink), fdsink->sinkpad);
gst_pad_set_chain_function (fdsink->sinkpad, gst_fdsink_chain);
fdsink->fd = 1; fdsink->fd = 1;
} }
static void static void
gst_fdsink_chain (GstPad * pad, GstData * _data) gst_fdsink_chain (GstAction * action, GstRealPad * pad, GstData * _data)
{ {
GstBuffer *buf = GST_BUFFER (_data); GstBuffer *buf = GST_BUFFER (_data);
GstFdSink *fdsink; GstFdSink *fdsink;
@ -119,7 +120,7 @@ gst_fdsink_chain (GstPad * pad, GstData * _data)
g_return_if_fail (GST_IS_PAD (pad)); g_return_if_fail (GST_IS_PAD (pad));
g_return_if_fail (buf != NULL); g_return_if_fail (buf != NULL);
fdsink = GST_FDSINK (gst_pad_get_parent (pad)); fdsink = GST_FDSINK (gst_pad_get_parent (GST_PAD (pad)));
g_return_if_fail (fdsink->fd >= 0); g_return_if_fail (fdsink->fd >= 0);

View file

@ -102,7 +102,7 @@ static void gst_fdsrc_get_property (GObject * object, guint prop_id,
static GstElementStateReturn gst_fdsrc_change_state (GstElement * element); static GstElementStateReturn gst_fdsrc_change_state (GstElement * element);
static gboolean gst_fdsrc_release_locks (GstElement * element); static gboolean gst_fdsrc_release_locks (GstElement * element);
static GstData *gst_fdsrc_get (GstPad * pad); static GstData *gst_fdsrc_get (GstAction * action, GstRealPad * pad);
static void static void
@ -164,7 +164,8 @@ gst_fdsrc_init (GstFdSrc * fdsrc)
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate), gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
"src"); "src");
gst_pad_set_get_function (fdsrc->srcpad, gst_fdsrc_get); gst_src_pad_set_action_handler (fdsrc->srcpad, gst_fdsrc_get);
gst_real_pad_set_initially_active (GST_REAL_PAD (fdsrc->srcpad), TRUE);
gst_element_add_pad (GST_ELEMENT (fdsrc), fdsrc->srcpad); gst_element_add_pad (GST_ELEMENT (fdsrc), fdsrc->srcpad);
fdsrc->fd = 0; fdsrc->fd = 0;
@ -265,7 +266,7 @@ gst_fdsrc_release_locks (GstElement * element)
} }
static GstData * static GstData *
gst_fdsrc_get (GstPad * pad) gst_fdsrc_get (GstAction * action, GstRealPad * pad)
{ {
GstFdSrc *src; GstFdSrc *src;
GstBuffer *buf; GstBuffer *buf;
@ -277,7 +278,7 @@ gst_fdsrc_get (GstPad * pad)
gint retval; gint retval;
#endif #endif
src = GST_FDSRC (gst_pad_get_parent (pad)); src = GST_FDSRC (gst_pad_get_parent (GST_PAD (pad)));
/* create the buffer */ /* create the buffer */
buf = gst_buffer_new_and_alloc (src->blocksize); buf = gst_buffer_new_and_alloc (src->blocksize);

View file

@ -66,29 +66,6 @@ enum
ARG_LOCATION ARG_LOCATION
}; };
static const GstFormat *
gst_filesink_get_formats (GstPad * pad)
{
static const GstFormat formats[] = {
GST_FORMAT_BYTES,
0,
};
return formats;
}
static const GstQueryType *
gst_filesink_get_query_types (GstPad * pad)
{
static const GstQueryType types[] = {
GST_QUERY_TOTAL,
GST_QUERY_POSITION,
0
};
return types;
}
static void gst_filesink_dispose (GObject * object); static void gst_filesink_dispose (GObject * object);
static void gst_filesink_set_property (GObject * object, guint prop_id, static void gst_filesink_set_property (GObject * object, guint prop_id,
@ -99,10 +76,11 @@ static void gst_filesink_get_property (GObject * object, guint prop_id,
static gboolean gst_filesink_open_file (GstFileSink * sink); static gboolean gst_filesink_open_file (GstFileSink * sink);
static void gst_filesink_close_file (GstFileSink * sink); static void gst_filesink_close_file (GstFileSink * sink);
static gboolean gst_filesink_handle_event (GstPad * pad, GstEvent * event); static gboolean gst_filesink_handle_event (GstRealPad * pad, GstEvent * event);
static gboolean gst_filesink_pad_query (GstPad * pad, GstQueryType type, static gboolean gst_filesink_pad_query (GstPad * pad, GstQueryType type,
GstFormat * format, gint64 * value); GstFormat * format, gint64 * value);
static void gst_filesink_chain (GstPad * pad, GstData * _data); static void gst_filesink_chain (GstAction * action, GstRealPad * pad,
GstData * _data);
static void gst_filesink_uri_handler_init (gpointer g_iface, static void gst_filesink_uri_handler_init (gpointer g_iface,
gpointer iface_data); gpointer iface_data);
@ -167,14 +145,12 @@ gst_filesink_init (GstFileSink * filesink)
pad = pad =
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate), gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
"sink"); "sink");
gst_sink_pad_set_action_handler (pad, gst_filesink_chain);
gst_element_add_pad (GST_ELEMENT (filesink), pad); gst_element_add_pad (GST_ELEMENT (filesink), pad);
gst_pad_set_chain_function (pad, gst_filesink_chain);
GST_FLAG_SET (GST_ELEMENT (filesink), GST_ELEMENT_EVENT_AWARE); GST_FLAG_SET (GST_ELEMENT (filesink), GST_ELEMENT_EVENT_AWARE);
gst_pad_set_query_function (pad, gst_filesink_pad_query); gst_pad_set_query_function (pad, gst_filesink_pad_query);
gst_pad_set_query_type_function (pad, gst_filesink_get_query_types);
gst_pad_set_formats_function (pad, gst_filesink_get_formats);
filesink->filename = NULL; filesink->filename = NULL;
filesink->file = NULL; filesink->file = NULL;
@ -336,12 +312,12 @@ gst_filesink_pad_query (GstPad * pad, GstQueryType type,
/* handle events (search) */ /* handle events (search) */
static gboolean static gboolean
gst_filesink_handle_event (GstPad * pad, GstEvent * event) gst_filesink_handle_event (GstRealPad * pad, GstEvent * event)
{ {
GstEventType type; GstEventType type;
GstFileSink *filesink; GstFileSink *filesink;
filesink = GST_FILESINK (gst_pad_get_parent (pad)); filesink = GST_FILESINK (gst_pad_get_parent (GST_PAD (pad)));
if (!(GST_FLAG_IS_SET (filesink, GST_FILESINK_OPEN))) { if (!(GST_FLAG_IS_SET (filesink, GST_FILESINK_OPEN))) {
gst_event_unref (event); gst_event_unref (event);
@ -407,7 +383,7 @@ gst_filesink_handle_event (GstPad * pad, GstEvent * event)
gst_element_set_eos (GST_ELEMENT (filesink)); gst_element_set_eos (GST_ELEMENT (filesink));
break; break;
default: default:
gst_pad_event_default (pad, event); gst_pad_event_default (GST_PAD (pad), event);
break; break;
} }
@ -422,7 +398,7 @@ gst_filesink_handle_event (GstPad * pad, GstEvent * event)
* take the buffer from the pad and write to file if it's open * take the buffer from the pad and write to file if it's open
*/ */
static void static void
gst_filesink_chain (GstPad * pad, GstData * _data) gst_filesink_chain (GstAction * action, GstRealPad * pad, GstData * _data)
{ {
GstBuffer *buf = GST_BUFFER (_data); GstBuffer *buf = GST_BUFFER (_data);
GstFileSink *filesink; GstFileSink *filesink;
@ -431,7 +407,7 @@ gst_filesink_chain (GstPad * pad, GstData * _data)
g_return_if_fail (GST_IS_PAD (pad)); g_return_if_fail (GST_IS_PAD (pad));
g_return_if_fail (buf != NULL); g_return_if_fail (buf != NULL);
filesink = GST_FILESINK (gst_pad_get_parent (pad)); filesink = GST_FILESINK (gst_pad_get_parent (GST_PAD (pad)));
if (GST_IS_EVENT (buf)) { if (GST_IS_EVENT (buf)) {
gst_filesink_handle_event (pad, GST_EVENT (buf)); gst_filesink_handle_event (pad, GST_EVENT (buf));

View file

@ -125,43 +125,6 @@ enum
ARG_TOUCH ARG_TOUCH
}; };
static const GstEventMask *
gst_filesrc_get_event_mask (GstPad * pad)
{
static const GstEventMask masks[] = {
{GST_EVENT_SEEK, GST_SEEK_METHOD_CUR |
GST_SEEK_METHOD_SET | GST_SEEK_METHOD_END | GST_SEEK_FLAG_FLUSH},
{GST_EVENT_FLUSH, 0},
{GST_EVENT_SIZE, 0},
{0, 0}
};
return masks;
}
static const GstQueryType *
gst_filesrc_get_query_types (GstPad * pad)
{
static const GstQueryType types[] = {
GST_QUERY_TOTAL,
GST_QUERY_POSITION,
0
};
return types;
}
static const GstFormat *
gst_filesrc_get_formats (GstPad * pad)
{
static const GstFormat formats[] = {
GST_FORMAT_BYTES,
0,
};
return formats;
}
static void gst_filesrc_dispose (GObject * object); static void gst_filesrc_dispose (GObject * object);
static void gst_filesrc_set_property (GObject * object, guint prop_id, static void gst_filesrc_set_property (GObject * object, guint prop_id,
@ -170,7 +133,7 @@ static void gst_filesrc_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec); GValue * value, GParamSpec * pspec);
static gboolean gst_filesrc_check_filesize (GstFileSrc * src); static gboolean gst_filesrc_check_filesize (GstFileSrc * src);
static GstData *gst_filesrc_get (GstPad * pad); static GstData *gst_filesrc_get (GstAction * action, GstRealPad * pad);
static gboolean gst_filesrc_srcpad_event (GstPad * pad, GstEvent * event); static gboolean gst_filesrc_srcpad_event (GstPad * pad, GstEvent * event);
static gboolean gst_filesrc_srcpad_query (GstPad * pad, GstQueryType type, static gboolean gst_filesrc_srcpad_query (GstPad * pad, GstQueryType type,
GstFormat * format, gint64 * value); GstFormat * format, gint64 * value);
@ -247,12 +210,10 @@ gst_filesrc_init (GstFileSrc * src)
src->srcpad = src->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate), gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
"src"); "src");
gst_pad_set_get_function (src->srcpad, gst_filesrc_get); gst_src_pad_set_action_handler (src->srcpad, gst_filesrc_get);
gst_real_pad_set_initially_active (GST_REAL_PAD (src->srcpad), TRUE);
gst_pad_set_event_function (src->srcpad, gst_filesrc_srcpad_event); gst_pad_set_event_function (src->srcpad, gst_filesrc_srcpad_event);
gst_pad_set_event_mask_function (src->srcpad, gst_filesrc_get_event_mask);
gst_pad_set_query_function (src->srcpad, gst_filesrc_srcpad_query); gst_pad_set_query_function (src->srcpad, gst_filesrc_srcpad_query);
gst_pad_set_query_type_function (src->srcpad, gst_filesrc_get_query_types);
gst_pad_set_formats_function (src->srcpad, gst_filesrc_get_formats);
gst_element_add_pad (GST_ELEMENT (src), src->srcpad); gst_element_add_pad (GST_ELEMENT (src), src->srcpad);
#ifdef HAVE_MMAP #ifdef HAVE_MMAP
@ -686,12 +647,12 @@ gst_filesrc_get_read (GstFileSrc * src)
} }
static GstData * static GstData *
gst_filesrc_get (GstPad * pad) gst_filesrc_get (GstAction * action, GstRealPad * pad)
{ {
GstFileSrc *src; GstFileSrc *src;
g_return_val_if_fail (pad != NULL, NULL); g_return_val_if_fail (pad != NULL, NULL);
src = GST_FILESRC (gst_pad_get_parent (pad)); src = GST_FILESRC (gst_pad_get_parent (GST_PAD (pad)));
g_return_val_if_fail (GST_FLAG_IS_SET (src, GST_FILESRC_OPEN), NULL); g_return_val_if_fail (GST_FLAG_IS_SET (src, GST_FILESRC_OPEN), NULL);
/* check for flush */ /* check for flush */

View file

@ -31,18 +31,10 @@
#include "gstidentity.h" #include "gstidentity.h"
#include <gst/gstmarshal.h> #include <gst/gstmarshal.h>
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", /*
GST_PAD_SINK, GST_DEBUG_CATEGORY_STATIC (gst_identity_debug, "identity", 0, "identity element");
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
GST_DEBUG_CATEGORY_STATIC (gst_identity_debug);
#define GST_CAT_DEFAULT gst_identity_debug #define GST_CAT_DEFAULT gst_identity_debug
*/
GstElementDetails gst_identity_details = GST_ELEMENT_DETAILS ("Identity", GstElementDetails gst_identity_details = GST_ELEMENT_DETAILS ("Identity",
"Generic", "Generic",
@ -58,49 +50,32 @@ enum
LAST_SIGNAL LAST_SIGNAL
}; };
#define DEFAULT_LOOP_BASED FALSE
#define DEFAULT_SLEEP_TIME 0
#define DEFAULT_DUPLICATE 1
#define DEFAULT_ERROR_AFTER -1
#define DEFAULT_DROP_PROBABILITY 0.0
#define DEFAULT_DATARATE 0
#define DEFAULT_SILENT FALSE
#define DEFAULT_DUMP FALSE
#define DEFAULT_SYNC FALSE
#define DEFAULT_CHECK_PERFECT FALSE
enum enum
{ {
ARG_0, ARG_0,
ARG_LOOP_BASED,
ARG_SLEEP_TIME, ARG_SLEEP_TIME,
ARG_DUPLICATE, ARG_DUPLICATE,
ARG_ERROR_AFTER, ARG_ERROR_AFTER,
ARG_DROP_PROBABILITY, ARG_DROP_PROBABILITY,
ARG_DATARATE,
ARG_SILENT, ARG_SILENT,
ARG_LAST_MESSAGE, ARG_LAST_MESSAGE,
ARG_DUMP, ARG_DUMP,
ARG_SYNC,
ARG_CHECK_PERFECT ARG_CHECK_PERFECT
}; };
GST_BOILERPLATE (GstIdentity, gst_identity, GstElement, GST_TYPE_ELEMENT);
#define _do_init(bla) \
GST_DEBUG_CATEGORY_INIT (gst_identity_debug, "identity", 0, "identity element");
GST_BOILERPLATE_FULL (GstIdentity, gst_identity, GstElement, GST_TYPE_ELEMENT,
_do_init);
static void gst_identity_finalize (GObject * object); static void gst_identity_finalize (GObject * object);
static void gst_identity_set_property (GObject * object, guint prop_id, static void gst_identity_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec); const GValue * value, GParamSpec * pspec);
static void gst_identity_get_property (GObject * object, guint prop_id, static void gst_identity_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec); GValue * value, GParamSpec * pspec);
static GstElementStateReturn gst_identity_change_state (GstElement * element);
static void gst_identity_chain (GstPad * pad, GstData * _data); static GstElementStateReturn gst_identity_change_state (GstElement * element);
static void gst_identity_set_clock (GstElement * element, GstClock * clock); static void gst_identity_chain (GstAction * action, GstRealPad * pad,
GstData * data);
static void gst_identity_wakeup (GstAction * action, GstElement * element,
gpointer unused);
static guint gst_identity_signals[LAST_SIGNAL] = { 0 }; static guint gst_identity_signals[LAST_SIGNAL] = { 0 };
@ -110,10 +85,6 @@ gst_identity_base_init (gpointer g_class)
{ {
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&srctemplate));
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
gst_element_class_set_details (gstelement_class, &gst_identity_details); gst_element_class_set_details (gstelement_class, &gst_identity_details);
} }
@ -138,45 +109,36 @@ gst_identity_class_init (GstIdentityClass * klass)
gobject_class = G_OBJECT_CLASS (klass); gobject_class = G_OBJECT_CLASS (klass);
gstelement_class = GST_ELEMENT_CLASS (klass); gstelement_class = GST_ELEMENT_CLASS (klass);
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LOOP_BASED, gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_identity_get_property);
g_param_spec_boolean ("loop-based", "Loop-based", gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_identity_set_property);
"Set to TRUE to use loop-based rather than chain-based scheduling",
DEFAULT_LOOP_BASED, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SLEEP_TIME, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SLEEP_TIME,
g_param_spec_uint ("sleep-time", "Sleep time", g_param_spec_uint ("sleep-time", "Sleep time",
"Microseconds to sleep between processing", 0, G_MAXUINT, "Microseconds to sleep between processing", 0, G_MAXUINT, 0,
DEFAULT_SLEEP_TIME, G_PARAM_READWRITE)); G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DUPLICATE, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DUPLICATE,
g_param_spec_uint ("duplicate", "Duplicate Buffers", g_param_spec_uint ("duplicate", "Duplicate Buffers",
"Push the buffers N times", 0, G_MAXUINT, DEFAULT_DUPLICATE, "Push the buffers N times", 0, G_MAXUINT, 1, G_PARAM_READWRITE));
G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_ERROR_AFTER, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_ERROR_AFTER,
g_param_spec_int ("error_after", "Error After", "Error after N buffers", g_param_spec_int ("error_after", "Error After", "Error after N buffers",
G_MININT, G_MAXINT, DEFAULT_ERROR_AFTER, G_PARAM_READWRITE)); G_MININT, G_MAXINT, -1, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DROP_PROBABILITY, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DROP_PROBABILITY,
g_param_spec_float ("drop_probability", "Drop Probability", g_param_spec_float ("drop_probability", "Drop Probability",
"The Probability a buffer is dropped", 0.0, 1.0, "The Probability a buffer is dropped", 0.0, 1.0, 0.0,
DEFAULT_DROP_PROBABILITY, G_PARAM_READWRITE)); G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DATARATE,
g_param_spec_int ("datarate", "Datarate",
"(Re)timestamps buffers with number of bytes per second (0 = inactive)",
0, G_MAXINT, DEFAULT_DATARATE, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SILENT, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SILENT,
g_param_spec_boolean ("silent", "silent", "silent", DEFAULT_SILENT, g_param_spec_boolean ("silent", "silent", "silent", FALSE,
G_PARAM_READWRITE)); G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LAST_MESSAGE, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LAST_MESSAGE,
g_param_spec_string ("last-message", "last-message", "last-message", NULL, g_param_spec_string ("last-message", "last-message", "last-message", NULL,
G_PARAM_READABLE)); G_PARAM_READABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DUMP, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DUMP,
g_param_spec_boolean ("dump", "Dump", "Dump buffer contents", g_param_spec_boolean ("dump", "Dump", "Dump buffer contents", FALSE,
DEFAULT_DUMP, G_PARAM_READWRITE)); G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SYNC,
g_param_spec_boolean ("sync", "Synchronize",
"Synchronize to pipeline clock", DEFAULT_SYNC, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_CHECK_PERFECT, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_CHECK_PERFECT,
g_param_spec_boolean ("check-perfect", "Check For Perfect Stream", g_param_spec_boolean ("check-perfect", "Check For Perfect Stream",
"Verify that the stream is time- and data-contiguous", "Verify that the stream is time- and data-contiguous", FALSE,
DEFAULT_CHECK_PERFECT, G_PARAM_READWRITE)); G_PARAM_READWRITE));
gst_identity_signals[SIGNAL_HANDOFF] = gst_identity_signals[SIGNAL_HANDOFF] =
g_signal_new ("handoff", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, g_signal_new ("handoff", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
@ -185,74 +147,82 @@ gst_identity_class_init (GstIdentityClass * klass)
GST_TYPE_BUFFER | G_SIGNAL_TYPE_STATIC_SCOPE); GST_TYPE_BUFFER | G_SIGNAL_TYPE_STATIC_SCOPE);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_identity_finalize); gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_identity_finalize);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_identity_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_identity_get_property);
gstelement_class->set_clock = GST_DEBUG_FUNCPTR (gst_identity_set_clock);
gstelement_class->change_state = gstelement_class->change_state =
GST_DEBUG_FUNCPTR (gst_identity_change_state); GST_DEBUG_FUNCPTR (gst_identity_change_state);
} }
static void static void
gst_identity_init (GstIdentity * identity) gst_identity_init (GstIdentity * identity)
{ {
identity->sinkpad = GST_FLAG_SET (identity, GST_ELEMENT_EVENT_AWARE);
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate), GST_FLAG_SET (identity, GST_ELEMENT_PUSHING);
"sink");
identity->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
gst_sink_pad_set_action_handler (identity->sinkpad, gst_identity_chain);
gst_element_add_pad (GST_ELEMENT (identity), identity->sinkpad); gst_element_add_pad (GST_ELEMENT (identity), identity->sinkpad);
gst_pad_set_chain_function (identity->sinkpad,
GST_DEBUG_FUNCPTR (gst_identity_chain));
gst_pad_set_link_function (identity->sinkpad, gst_pad_proxy_pad_link); gst_pad_set_link_function (identity->sinkpad, gst_pad_proxy_pad_link);
gst_pad_set_getcaps_function (identity->sinkpad, gst_pad_proxy_getcaps); gst_pad_set_getcaps_function (identity->sinkpad, gst_pad_proxy_getcaps);
identity->srcpad = identity->srcpad = gst_pad_new ("src", GST_PAD_SRC);
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
"src");
gst_element_add_pad (GST_ELEMENT (identity), identity->srcpad); gst_element_add_pad (GST_ELEMENT (identity), identity->srcpad);
gst_pad_set_link_function (identity->srcpad, gst_pad_proxy_pad_link); gst_pad_set_link_function (identity->srcpad, gst_pad_proxy_pad_link);
gst_pad_set_getcaps_function (identity->srcpad, gst_pad_proxy_getcaps); gst_pad_set_getcaps_function (identity->srcpad, gst_pad_proxy_getcaps);
identity->loop_based = DEFAULT_LOOP_BASED; identity->wakeup = gst_element_add_wakeup (GST_ELEMENT (identity), FALSE,
identity->sleep_time = DEFAULT_SLEEP_TIME; gst_identity_wakeup, NULL);
identity->duplicate = DEFAULT_DUPLICATE;
identity->error_after = DEFAULT_ERROR_AFTER; identity->loop_based = FALSE;
identity->drop_probability = DEFAULT_DROP_PROBABILITY; identity->sleep_time = 0;
identity->datarate = DEFAULT_DATARATE; identity->duplicate = 1;
identity->silent = DEFAULT_SILENT; identity->error_after = -1;
identity->sync = DEFAULT_SYNC; identity->drop_probability = 0.0;
identity->check_perfect = DEFAULT_CHECK_PERFECT; identity->silent = FALSE;
identity->dump = DEFAULT_DUMP; identity->check_perfect = FALSE;
identity->prev_timestamp = GST_CLOCK_TIME_NONE;
identity->prev_duration = GST_CLOCK_TIME_NONE;
identity->prev_offset_end = -1;
identity->dump = FALSE;
identity->last_message = NULL; identity->last_message = NULL;
identity->srccaps = NULL; identity->srccaps = NULL;
GST_FLAG_SET (identity, GST_ELEMENT_EVENT_AWARE);
GST_FLAG_SET (identity, GST_ELEMENT_WORK_IN_PLACE);
} }
static void static void
gst_identity_set_clock (GstElement * element, GstClock * clock) gst_identity_push (GstIdentity * identity, GstBuffer * buf)
{ {
GstIdentity *identity = GST_IDENTITY (element); if (!identity->silent) {
g_free (identity->last_message);
gst_object_replace ((GstObject **) & identity->clock, (GstObject *) clock); identity->last_message =
g_strdup_printf ("chain ******* (%s:%s)i (%d bytes, timestamp: %"
GST_TIME_FORMAT ", duration: %" GST_TIME_FORMAT ", offset: %"
G_GINT64_FORMAT ", offset_end: % " G_GINT64_FORMAT ", flags: %d) %p",
GST_DEBUG_PAD_NAME (identity->sinkpad), GST_BUFFER_SIZE (buf),
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
GST_TIME_ARGS (GST_BUFFER_DURATION (buf)), GST_BUFFER_OFFSET (buf),
GST_BUFFER_OFFSET_END (buf), GST_BUFFER_FLAGS (buf), buf);
g_object_notify (G_OBJECT (identity), "last-message");
} }
gst_object_ref (GST_OBJECT (identity));
g_signal_emit (G_OBJECT (identity), gst_identity_signals[SIGNAL_HANDOFF], 0,
buf);
if (identity->sleep_time)
g_usleep (identity->sleep_time);
/* things may happen in handoff signals... */
if (GST_ELEMENT_SCHED (identity))
gst_pad_push (identity->srcpad, GST_DATA (buf));
gst_object_unref (GST_OBJECT (identity));
}
static void static void
gst_identity_chain (GstPad * pad, GstData * _data) gst_identity_chain (GstAction * action, GstRealPad * pad, GstData * data)
{ {
GstBuffer *buf = GST_BUFFER (_data); GstBuffer *buf;
GstIdentity *identity; GstIdentity *identity = GST_IDENTITY (gst_pad_get_parent (GST_PAD (pad)));
guint i;
g_return_if_fail (pad != NULL);
g_return_if_fail (GST_IS_PAD (pad));
g_return_if_fail (buf != NULL);
identity = GST_IDENTITY (gst_pad_get_parent (pad));
buf = GST_BUFFER (data);
if (GST_IS_EVENT (buf)) { if (GST_IS_EVENT (buf)) {
GstEvent *event = GST_EVENT (buf); GstEvent *event = GST_EVENT (buf);
@ -261,11 +231,12 @@ gst_identity_chain (GstPad * pad, GstData * _data)
identity->last_message = identity->last_message =
g_strdup_printf ("chain ******* (%s:%s)E (type: %d) %p", g_strdup_printf ("chain ******* (%s:%s)E (type: %d) %p",
GST_DEBUG_PAD_NAME (pad), GST_EVENT_TYPE (event), event); GST_DEBUG_PAD_NAME (identity->sinkpad), GST_EVENT_TYPE (event),
event);
g_object_notify (G_OBJECT (identity), "last_message"); g_object_notify (G_OBJECT (identity), "last_message");
} }
gst_pad_event_default (pad, event); gst_pad_event_default (identity->sinkpad, event);
return; return;
} }
@ -328,75 +299,31 @@ gst_identity_chain (GstPad * pad, GstData * _data)
gst_util_dump_mem (GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf)); gst_util_dump_mem (GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf));
} }
for (i = identity->duplicate; i; i--) { if (identity->duplicate > 1) {
GstClockTime time; identity->current = buf;
gst_data_ref (GST_DATA (buf));
if (!identity->silent) { identity->missing = identity->duplicate - 1;
g_free (identity->last_message); gst_action_set_active (action, FALSE);
identity->last_message = gst_action_set_active (identity->wakeup, TRUE);
g_strdup_printf ("chain ******* (%s:%s)i (%d bytes, timestamp: %"
GST_TIME_FORMAT ", duration: %" GST_TIME_FORMAT ", offset: %"
G_GINT64_FORMAT ", offset_end: % " G_GINT64_FORMAT ", flags: %d) %p",
GST_DEBUG_PAD_NAME (identity->sinkpad), GST_BUFFER_SIZE (buf),
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
GST_TIME_ARGS (GST_BUFFER_DURATION (buf)), GST_BUFFER_OFFSET (buf),
GST_BUFFER_OFFSET_END (buf), GST_BUFFER_FLAGS (buf), buf);
g_object_notify (G_OBJECT (identity), "last-message");
}
time = GST_BUFFER_TIMESTAMP (buf);
if (identity->datarate > 0) {
time = identity->bytes_handled * GST_SECOND / identity->datarate;
GST_BUFFER_TIMESTAMP (buf) = time;
GST_BUFFER_DURATION (buf) =
GST_BUFFER_SIZE (buf) * GST_SECOND / identity->datarate;
}
g_signal_emit (G_OBJECT (identity), gst_identity_signals[SIGNAL_HANDOFF], 0,
buf);
if (i > 1)
gst_buffer_ref (buf);
if (identity->sync) {
if (identity->clock) {
gst_element_wait (GST_ELEMENT (identity), time);
}
}
identity->bytes_handled += GST_BUFFER_SIZE (buf);
gst_pad_push (identity->srcpad, GST_DATA (buf));
if (identity->sleep_time)
g_usleep (identity->sleep_time);
} }
gst_identity_push (identity, buf);
} }
static void static void
gst_identity_loop (GstElement * element) gst_identity_wakeup (GstAction * action, GstElement * element, gpointer unused)
{ {
GstIdentity *identity; GstIdentity *identity = GST_IDENTITY (element);
GstBuffer *buf; GstBuffer *buf = identity->current;
g_return_if_fail (element != NULL); g_assert (buf);
g_return_if_fail (GST_IS_IDENTITY (element)); if (--identity->missing) {
gst_data_ref (GST_DATA (buf));
identity = GST_IDENTITY (element);
buf = GST_BUFFER (gst_pad_pull (identity->sinkpad));
if (GST_IS_EVENT (buf)) {
GstEvent *event = GST_EVENT (buf);
if (GST_EVENT_IS_INTERRUPT (event)) {
gst_event_unref (event);
} else { } else {
gst_pad_event_default (identity->sinkpad, event); identity->current = NULL;
} gst_action_set_active (action, FALSE);
} else { gst_real_pad_set_active (GST_REAL_PAD (identity->sinkpad), TRUE);
gst_identity_chain (identity->sinkpad, GST_DATA (buf));
} }
gst_identity_push (identity, buf);
} }
static void static void
@ -411,17 +338,6 @@ gst_identity_set_property (GObject * object, guint prop_id,
identity = GST_IDENTITY (object); identity = GST_IDENTITY (object);
switch (prop_id) { switch (prop_id) {
case ARG_LOOP_BASED:
identity->loop_based = g_value_get_boolean (value);
if (identity->loop_based) {
gst_element_set_loop_function (GST_ELEMENT (identity),
gst_identity_loop);
gst_pad_set_chain_function (identity->sinkpad, NULL);
} else {
gst_pad_set_chain_function (identity->sinkpad, gst_identity_chain);
gst_element_set_loop_function (GST_ELEMENT (identity), NULL);
}
break;
case ARG_SLEEP_TIME: case ARG_SLEEP_TIME:
identity->sleep_time = g_value_get_uint (value); identity->sleep_time = g_value_get_uint (value);
break; break;
@ -440,12 +356,6 @@ gst_identity_set_property (GObject * object, guint prop_id,
case ARG_DROP_PROBABILITY: case ARG_DROP_PROBABILITY:
identity->drop_probability = g_value_get_float (value); identity->drop_probability = g_value_get_float (value);
break; break;
case ARG_DATARATE:
identity->datarate = g_value_get_int (value);
break;
case ARG_SYNC:
identity->sync = g_value_get_boolean (value);
break;
case ARG_CHECK_PERFECT: case ARG_CHECK_PERFECT:
identity->check_perfect = g_value_get_boolean (value); identity->check_perfect = g_value_get_boolean (value);
break; break;
@ -467,9 +377,6 @@ gst_identity_get_property (GObject * object, guint prop_id, GValue * value,
identity = GST_IDENTITY (object); identity = GST_IDENTITY (object);
switch (prop_id) { switch (prop_id) {
case ARG_LOOP_BASED:
g_value_set_boolean (value, identity->loop_based);
break;
case ARG_SLEEP_TIME: case ARG_SLEEP_TIME:
g_value_set_uint (value, identity->sleep_time); g_value_set_uint (value, identity->sleep_time);
break; break;
@ -482,9 +389,6 @@ gst_identity_get_property (GObject * object, guint prop_id, GValue * value,
case ARG_DROP_PROBABILITY: case ARG_DROP_PROBABILITY:
g_value_set_float (value, identity->drop_probability); g_value_set_float (value, identity->drop_probability);
break; break;
case ARG_DATARATE:
g_value_set_int (value, identity->datarate);
break;
case ARG_SILENT: case ARG_SILENT:
g_value_set_boolean (value, identity->silent); g_value_set_boolean (value, identity->silent);
break; break;
@ -494,9 +398,6 @@ gst_identity_get_property (GObject * object, guint prop_id, GValue * value,
case ARG_LAST_MESSAGE: case ARG_LAST_MESSAGE:
g_value_set_string (value, identity->last_message); g_value_set_string (value, identity->last_message);
break; break;
case ARG_SYNC:
g_value_set_boolean (value, identity->sync);
break;
case ARG_CHECK_PERFECT: case ARG_CHECK_PERFECT:
g_value_set_boolean (value, identity->check_perfect); g_value_set_boolean (value, identity->check_perfect);
break; break;
@ -509,29 +410,14 @@ gst_identity_get_property (GObject * object, guint prop_id, GValue * value,
static GstElementStateReturn static GstElementStateReturn
gst_identity_change_state (GstElement * element) gst_identity_change_state (GstElement * element)
{ {
GstIdentity *identity; GstIdentity *identity = GST_IDENTITY (element);
g_return_val_if_fail (GST_IS_IDENTITY (element), GST_STATE_FAILURE);
identity = GST_IDENTITY (element);
switch (GST_STATE_TRANSITION (element)) { switch (GST_STATE_TRANSITION (element)) {
case GST_STATE_NULL_TO_READY:
break;
case GST_STATE_READY_TO_PAUSED:
identity->bytes_handled = 0;
identity->prev_timestamp = GST_CLOCK_TIME_NONE;
identity->prev_duration = GST_CLOCK_TIME_NONE;
identity->prev_offset_end = -1;
break;
case GST_STATE_PAUSED_TO_PLAYING:
case GST_STATE_PLAYING_TO_PAUSED:
break;
case GST_STATE_PAUSED_TO_READY: case GST_STATE_PAUSED_TO_READY:
g_free (identity->last_message); if (identity->current) {
identity->last_message = NULL; gst_data_unref (GST_DATA (identity->current));
break; identity->current = NULL;
case GST_STATE_READY_TO_NULL: }
break; break;
default: default:
break; break;

View file

@ -50,24 +50,24 @@ struct _GstIdentity {
GstPad * sinkpad; GstPad * sinkpad;
GstPad * srcpad; GstPad * srcpad;
GstAction * wakeup;
gboolean loop_based; gboolean loop_based;
guint duplicate; guint duplicate;
gint error_after; gint error_after;
gfloat drop_probability; gfloat drop_probability;
gint datarate;
guint sleep_time; guint sleep_time;
gboolean silent; gboolean silent;
gboolean dump; gboolean dump;
gboolean sync;
gboolean check_perfect; gboolean check_perfect;
GstClockTime prev_timestamp; GstClockTime prev_timestamp;
GstClockTime prev_duration; GstClockTime prev_duration;
guint64 prev_offset_end; guint64 prev_offset_end;
GstClock *clock;
gchar *last_message; gchar *last_message;
GstCaps *srccaps; GstCaps *srccaps;
guint64 bytes_handled; GstBuffer * current;
guint missing;
}; };
struct _GstIdentityClass { struct _GstIdentityClass {

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,7 @@
/* GStreamer /* GStreamer
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu> * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
* 2000 Wim Taymans <wtay@chello.be> * 2000 Wim Taymans <wtay@chello.be>
* 2004,2005 Benjamin Otte <otte@gnome.org>
* *
* gstqueue.h: * gstqueue.h:
* *
@ -52,9 +53,10 @@ typedef struct _GstQueueSize GstQueueSize;
typedef struct _GstQueueClass GstQueueClass; typedef struct _GstQueueClass GstQueueClass;
struct _GstQueueSize { struct _GstQueueSize {
guint items; /* no. of items */
guint buffers; /* no. of buffers */ guint buffers; /* no. of buffers */
guint bytes; /* no. of bytes */ guint bytes; /* no. of bytes */
guint64 time; /* amount of time */ GstClockTime time; /* amount of time */
}; };
struct _GstQueue { struct _GstQueue {
@ -69,39 +71,25 @@ struct _GstQueue {
GstQueueSize GstQueueSize
cur_level, /* currently in the queue */ cur_level, /* currently in the queue */
max_size, /* max. amount of data allowed in the queue */ max_size, /* max. amount of data allowed in the queue */
min_threshold; /* min. amount of data required to wake reader */ min_threshold, /* min. amount of data required to wake reader */
max_threshold; /* min. amount of data required to wake writer */
/* whether we leak data, and at which end */ /* whether we leak data, and at which end */
gint leaky; gint leaky;
gboolean got_eos;
/* number of nanoseconds until a blocked queue 'times out'
* to receive data and returns a filler event. -1 = disable */
guint64 block_timeout;
/* it the queue should fail on possible deadlocks */
gboolean may_deadlock;
gboolean interrupt;
gboolean flush;
GMutex *qlock; /* lock for queue (vs object lock) */ GMutex *qlock; /* lock for queue (vs object lock) */
GCond *item_add; /* signals buffers now available for reading */
GCond *item_del; /* signals space now available for writing */
GCond *event_done; /* upstream event signaller */
GTimeVal *timeval; /* the timeout for the queue locking */
GQueue *events; /* upstream events get decoupled here */
GstCaps *negotiated_caps; GstCaps *negotiated_caps;
GMutex *event_lock; /* lock when handling the events queue */
gpointer _gst_reserved[GST_PADDING - 1]; gpointer _gst_reserved[GST_PADDING - 1];
}; };
struct _GstQueueClass { struct _GstQueueClass {
GstElementClass parent_class; GstElementClass parent_class;
/* vtable */
/* signals - 'running' is called from both sides /* signals - 'running' is called from both sides
* which might make it sort of non-useful... */ * which might make it sort of non-useful... */
void (*underrun) (GstQueue *queue); void (*underrun) (GstQueue *queue);

View file

@ -27,15 +27,10 @@
#include "gsttee.h" #include "gsttee.h"
#include <string.h> #include <string.h>
#if 0
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", GST_DEBUG_CATEGORY_STATIC (gst_tee_debug, "tee", 0, "tee element");
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
GST_DEBUG_CATEGORY_STATIC (gst_tee_debug);
#define GST_CAT_DEFAULT gst_tee_debug #define GST_CAT_DEFAULT gst_tee_debug
#endif
GstElementDetails gst_tee_details = GST_ELEMENT_DETAILS ("Tee pipe fitting", GstElementDetails gst_tee_details = GST_ELEMENT_DETAILS ("Tee pipe fitting",
"Generic", "Generic",
"1-to-N pipe fitting", "1-to-N pipe fitting",
@ -63,10 +58,7 @@ GstStaticPadTemplate tee_src_template = GST_STATIC_PAD_TEMPLATE ("src%d",
GST_PAD_REQUEST, GST_PAD_REQUEST,
GST_STATIC_CAPS_ANY); GST_STATIC_CAPS_ANY);
#define _do_init(bla) \ GST_BOILERPLATE (GstTee, gst_tee, GstElement, GST_TYPE_ELEMENT);
GST_DEBUG_CATEGORY_INIT (gst_tee_debug, "tee", 0, "tee element");
GST_BOILERPLATE_FULL (GstTee, gst_tee, GstElement, GST_TYPE_ELEMENT, _do_init);
static GstPad *gst_tee_request_new_pad (GstElement * element, static GstPad *gst_tee_request_new_pad (GstElement * element,
GstPadTemplate * temp, const gchar * unused); GstPadTemplate * temp, const gchar * unused);
@ -77,7 +69,10 @@ static void gst_tee_set_property (GObject * object, guint prop_id,
static void gst_tee_get_property (GObject * object, guint prop_id, static void gst_tee_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec); GValue * value, GParamSpec * pspec);
static void gst_tee_chain (GstPad * pad, GstData * _data); static void gst_tee_chain (GstAction * action, GstRealPad * pad,
GstData * data);
static GstData *gst_tee_get (GstAction * action, GstRealPad * pad);
static GstElementStateReturn gst_tee_change_state (GstElement * element);
static void static void
@ -85,8 +80,6 @@ gst_tee_base_init (gpointer g_class)
{ {
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
gst_element_class_set_details (gstelement_class, &gst_tee_details); gst_element_class_set_details (gstelement_class, &gst_tee_details);
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&tee_src_template)); gst_static_pad_template_get (&tee_src_template));
@ -114,6 +107,9 @@ gst_tee_class_init (GstTeeClass * klass)
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_tee_get_property);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_tee_set_property);
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_NUM_PADS, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_NUM_PADS,
g_param_spec_int ("num_pads", "num_pads", "num_pads", g_param_spec_int ("num_pads", "num_pads", "num_pads",
0, G_MAXINT, 0, G_PARAM_READABLE)); 0, G_MAXINT, 0, G_PARAM_READABLE));
@ -126,9 +122,8 @@ gst_tee_class_init (GstTeeClass * klass)
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_tee_finalize); gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_tee_finalize);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_tee_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_tee_get_property);
gstelement_class->change_state = gst_tee_change_state;
gstelement_class->request_new_pad = gstelement_class->request_new_pad =
GST_DEBUG_FUNCPTR (gst_tee_request_new_pad); GST_DEBUG_FUNCPTR (gst_tee_request_new_pad);
} }
@ -136,17 +131,16 @@ gst_tee_class_init (GstTeeClass * klass)
static void static void
gst_tee_init (GstTee * tee) gst_tee_init (GstTee * tee)
{ {
tee->sinkpad = tee->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate), gst_sink_pad_set_action_handler (tee->sinkpad, gst_tee_chain);
"sink");
gst_element_add_pad (GST_ELEMENT (tee), tee->sinkpad); gst_element_add_pad (GST_ELEMENT (tee), tee->sinkpad);
gst_pad_set_chain_function (tee->sinkpad, GST_DEBUG_FUNCPTR (gst_tee_chain));
gst_pad_set_link_function (tee->sinkpad, gst_pad_set_link_function (tee->sinkpad,
GST_DEBUG_FUNCPTR (gst_pad_proxy_pad_link)); GST_DEBUG_FUNCPTR (gst_pad_proxy_pad_link));
gst_pad_set_getcaps_function (tee->sinkpad, gst_pad_set_getcaps_function (tee->sinkpad,
GST_DEBUG_FUNCPTR (gst_pad_proxy_getcaps)); GST_DEBUG_FUNCPTR (gst_pad_proxy_getcaps));
tee->last_message = NULL; tee->last_message = NULL;
GST_FLAG_SET (tee, GST_ELEMENT_EVENT_AWARE);
} }
/* helper compare function */ /* helper compare function */
@ -161,56 +155,6 @@ name_pad_compare (gconstpointer a, gconstpointer b)
return strcmp (name, gst_pad_get_name (pad)); /* returns 0 if match */ return strcmp (name, gst_pad_get_name (pad)); /* returns 0 if match */
} }
static GstCaps *
gst_tee_getcaps (GstPad * _pad)
{
GstTee *tee = GST_TEE (gst_pad_get_parent (_pad));
GstCaps *caps = gst_caps_new_any (), *tmp, *res;
GstPad *pad;
const GList *pads;
for (pads = gst_element_get_pad_list (GST_ELEMENT (tee));
pads != NULL; pads = pads->next) {
pad = GST_PAD (pads->data);
if (pad == _pad)
continue;
tmp = gst_pad_get_allowed_caps (pad);
res = gst_caps_intersect (caps, tmp);
gst_caps_free (tmp);
gst_caps_free (caps);
caps = res;
}
return caps;
}
static GstPadLinkReturn
gst_tee_link (GstPad * _pad, const GstCaps * caps)
{
GstTee *tee = GST_TEE (gst_pad_get_parent (_pad));
GstPadLinkReturn res;
GstPad *pad;
const GList *pads;
GST_DEBUG_OBJECT (tee, "Forwarding link to all other pads");
for (pads = gst_element_get_pad_list (GST_ELEMENT (tee));
pads != NULL; pads = pads->next) {
pad = GST_PAD (pads->data);
if (pad == _pad)
continue;
res = gst_pad_try_set_caps (pad, caps);
GST_DEBUG_OBJECT (tee, "Pad %s:%s gave response %d",
GST_DEBUG_PAD_NAME (pad), res);
if (GST_PAD_LINK_FAILED (res))
return res;
}
return GST_PAD_LINK_OK;
}
static GstPad * static GstPad *
gst_tee_request_new_pad (GstElement * element, GstPadTemplate * templ, gst_tee_request_new_pad (GstElement * element, GstPadTemplate * templ,
const gchar * unused) const gchar * unused)
@ -252,8 +196,11 @@ gst_tee_request_new_pad (GstElement * element, GstPadTemplate * templ,
srcpad = gst_pad_new_from_template (templ, name); srcpad = gst_pad_new_from_template (templ, name);
g_free (name); g_free (name);
gst_pad_set_link_function (srcpad, GST_DEBUG_FUNCPTR (gst_tee_link)); gst_src_pad_set_action_handler (srcpad, gst_tee_get);
gst_pad_set_getcaps_function (srcpad, GST_DEBUG_FUNCPTR (gst_tee_getcaps)); gst_pad_set_link_function (srcpad,
GST_DEBUG_FUNCPTR (gst_pad_proxy_pad_link));
gst_pad_set_getcaps_function (srcpad,
GST_DEBUG_FUNCPTR (gst_pad_proxy_getcaps));
gst_element_add_pad (GST_ELEMENT (tee), srcpad); gst_element_add_pad (GST_ELEMENT (tee), srcpad);
GST_PAD_ELEMENT_PRIVATE (srcpad) = NULL; GST_PAD_ELEMENT_PRIVATE (srcpad) = NULL;
@ -313,50 +260,82 @@ gst_tee_get_property (GObject * object, guint prop_id, GValue * value,
} }
} }
/** static GstData *
* gst_tee_chain: gst_tee_get (GstAction * action, GstRealPad * pad)
* @pad: the pad to follow {
* @buf: the buffer to pass GstData *data;
* GstTee *tee = GST_TEE (gst_action_get_element (action));
* Chain a buffer on a pad.
*/ g_assert (tee->current);
static void if (!tee->silent) {
gst_tee_chain (GstPad * pad, GstData * _data) GstData *data = tee->current;
g_free (tee->last_message);
tee->last_message =
g_strdup_printf ("request ******* (%s:%s)t (%d bytes, %"
G_GUINT64_FORMAT ") %p", GST_DEBUG_PAD_NAME (pad),
GST_IS_BUFFER (data) ? GST_BUFFER_SIZE (data) : 0,
GST_IS_BUFFER (data) ? GST_BUFFER_TIMESTAMP (data) :
GST_CLOCK_TIME_NONE, data);
g_object_notify (G_OBJECT (tee), "last_message");
}
data = tee->current;
gst_action_set_active (action, FALSE);
tee->missing_pads--;
if (tee->missing_pads == 0) {
gst_real_pad_set_active (GST_REAL_PAD (tee->sinkpad), TRUE);
if (GST_IS_EVENT (tee->current) &&
GST_EVENT_TYPE (tee->current) == GST_EVENT_EOS) {
gst_element_set_eos (GST_ELEMENT (tee));
}
tee->current = NULL;
} else {
gst_data_ref (tee->current);
}
return data;
}
static void
gst_tee_chain (GstAction * action, GstRealPad * pad, GstData * data)
{ {
GstBuffer *buf = GST_BUFFER (_data);
GstTee *tee;
const GList *pads; const GList *pads;
GstTee *tee = GST_TEE (gst_action_get_element (action));
g_return_if_fail (pad != NULL); g_assert (tee->current == NULL);
g_return_if_fail (GST_IS_PAD (pad)); g_assert (tee->missing_pads == 0);
g_return_if_fail (buf != NULL); tee->current = data;
for (pads = gst_element_get_pad_list (GST_ELEMENT (tee)); pads;
tee = GST_TEE (gst_pad_get_parent (pad)); pads = g_list_next (pads)) {
gst_buffer_ref_by_count (buf, GST_ELEMENT (tee)->numsrcpads - 1);
pads = gst_element_get_pad_list (GST_ELEMENT (tee));
while (pads) {
GstPad *outpad = GST_PAD (pads->data); GstPad *outpad = GST_PAD (pads->data);
pads = g_list_next (pads);
if (GST_PAD_DIRECTION (outpad) != GST_PAD_SRC) if (GST_PAD_DIRECTION (outpad) != GST_PAD_SRC)
continue; continue;
if (!tee->silent) { gst_real_pad_set_active (GST_REAL_PAD (outpad), TRUE);
g_free (tee->last_message); tee->missing_pads++;
tee->last_message = }
g_strdup_printf ("chain ******* (%s:%s)t (%d bytes, %" gst_real_pad_set_active (GST_REAL_PAD (tee->sinkpad), FALSE);
G_GUINT64_FORMAT ") %p", GST_DEBUG_PAD_NAME (outpad),
GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf), buf);
g_object_notify (G_OBJECT (tee), "last_message");
} }
if (GST_PAD_IS_USABLE (outpad)) static GstElementStateReturn
gst_pad_push (outpad, GST_DATA (buf)); gst_tee_change_state (GstElement * element)
else {
gst_buffer_unref (buf); GstTee *tee = GST_TEE (element);
switch (GST_STATE_TRANSITION (element)) {
case GST_STATE_PAUSED_TO_READY:
if (tee->current) {
gst_data_unref (tee->current);
tee->current = NULL;
tee->missing_pads = 0;
} }
break;
default:
break;
}
if (GST_ELEMENT_CLASS (parent_class)->change_state)
return GST_ELEMENT_CLASS (parent_class)->change_state (element);
return GST_STATE_SUCCESS;
} }

View file

@ -48,6 +48,9 @@ struct _GstTee {
GstPad *sinkpad; GstPad *sinkpad;
GstData *current; /* current data peers should pull */
gint missing_pads; /* number of pads that haven't pulled yet */
gboolean silent; gboolean silent;
gchar *last_message; gchar *last_message;
}; };

View file

@ -45,6 +45,7 @@
#include <gst/gsttypefind.h> #include <gst/gsttypefind.h>
#include <gst/gstutils.h> #include <gst/gstutils.h>
#include <gst/gsterror.h> #include <gst/gsterror.h>
#include <gst/gstaction.h>
GST_DEBUG_CATEGORY_STATIC (gst_type_find_element_debug); GST_DEBUG_CATEGORY_STATIC (gst_type_find_element_debug);
#define GST_CAT_DEFAULT gst_type_find_element_debug #define GST_CAT_DEFAULT gst_type_find_element_debug
@ -103,16 +104,17 @@ static void gst_type_find_element_set_property (GObject * object,
static void gst_type_find_element_get_property (GObject * object, static void gst_type_find_element_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec); guint prop_id, GValue * value, GParamSpec * pspec);
static const GstEventMask *gst_type_find_element_src_event_mask (GstPad * pad);
static gboolean gst_type_find_element_src_event (GstPad * pad, static gboolean gst_type_find_element_src_event (GstPad * pad,
GstEvent * event); GstEvent * event);
static gboolean gst_type_find_handle_src_query (GstPad * pad, static gboolean gst_type_find_handle_src_query (GstPad * pad,
GstQueryType type, GstFormat * fmt, gint64 * value); GstQueryType type, GstFormat * fmt, gint64 * value);
static void push_buffer_store (GstTypeFindElement * typefind);
static void gst_type_find_element_chain (GstPad * sinkpad, GstData * data); static void gst_type_find_element_wakeup (GstAction * action,
static GstElementStateReturn GstElement * element, gpointer unused);
gst_type_find_element_change_state (GstElement * element); static void gst_type_find_element_chain (GstAction * action,
GstRealPad * sinkpad, GstData * data);
static GstElementStateReturn gst_type_find_element_change_state (GstElement *
element);
static guint gst_type_find_element_signals[LAST_SIGNAL] = { 0 }; static guint gst_type_find_element_signals[LAST_SIGNAL] = { 0 };
@ -178,33 +180,35 @@ gst_type_find_element_class_init (GstTypeFindElementClass * typefind_class)
static void static void
gst_type_find_element_init (GstTypeFindElement * typefind) gst_type_find_element_init (GstTypeFindElement * typefind)
{ {
GST_FLAG_SET (typefind, GST_ELEMENT_EVENT_AWARE);
GST_FLAG_SET (typefind, GST_ELEMENT_PUSHING);
/* sinkpad */ /* sinkpad */
typefind->sink = typefind->sink =
gst_pad_new_from_template (gst_static_pad_template_get gst_pad_new_from_template (gst_static_pad_template_get
(&type_find_element_sink_template), "sink"); (&type_find_element_sink_template), "sink");
gst_pad_set_chain_function (typefind->sink, gst_type_find_element_chain); gst_sink_pad_set_action_handler (typefind->sink, gst_type_find_element_chain);
gst_element_add_pad (GST_ELEMENT (typefind), typefind->sink); gst_element_add_pad (GST_ELEMENT (typefind), typefind->sink);
/* srcpad */ /* srcpad */
typefind->src = typefind->src =
gst_pad_new_from_template (gst_static_pad_template_get gst_pad_new_from_template (gst_static_pad_template_get
(&type_find_element_src_template), "src"); (&type_find_element_src_template), "src");
gst_pad_set_event_function (typefind->src, gst_type_find_element_src_event); gst_pad_set_event_function (typefind->src, gst_type_find_element_src_event);
gst_pad_set_event_mask_function (typefind->src,
gst_type_find_element_src_event_mask);
gst_pad_set_query_function (typefind->src, gst_pad_set_query_function (typefind->src,
GST_DEBUG_FUNCPTR (gst_type_find_handle_src_query)); GST_DEBUG_FUNCPTR (gst_type_find_handle_src_query));
gst_pad_use_explicit_caps (typefind->src); gst_pad_use_explicit_caps (typefind->src);
gst_element_add_pad (GST_ELEMENT (typefind), typefind->src); gst_element_add_pad (GST_ELEMENT (typefind), typefind->src);
typefind->wakeup = gst_element_add_wakeup (GST_ELEMENT (typefind), FALSE,
gst_type_find_element_wakeup, NULL);
typefind->caps = NULL; typefind->caps = NULL;
typefind->pending_events = NULL; typefind->pending_events = NULL;
typefind->min_probability = 1; typefind->min_probability = 1;
typefind->max_probability = GST_TYPE_FIND_MAXIMUM; typefind->max_probability = GST_TYPE_FIND_MAXIMUM;
typefind->store = gst_buffer_store_new (); typefind->store = gst_buffer_store_new ();
GST_FLAG_SET (typefind, GST_ELEMENT_EVENT_AWARE);
} }
static void static void
gst_type_find_element_dispose (GObject * object) gst_type_find_element_dispose (GObject * object)
{ {
@ -294,20 +298,6 @@ gst_type_find_handle_src_query (GstPad * pad,
return TRUE; return TRUE;
} }
static const GstEventMask *
gst_type_find_element_src_event_mask (GstPad * pad)
{
static const GstEventMask mask[] = {
{GST_EVENT_SEEK,
GST_SEEK_METHOD_SET | GST_SEEK_METHOD_CUR | GST_SEEK_METHOD_END |
GST_SEEK_FLAG_FLUSH},
/* add more if you want, event masks suck and need to die anyway */
{0,}
};
return mask;
}
static gboolean static gboolean
gst_type_find_element_src_event (GstPad * pad, GstEvent * event) gst_type_find_element_src_event (GstPad * pad, GstEvent * event)
{ {
@ -368,6 +358,19 @@ start_typefinding (GstTypeFindElement * typefind)
typefind->stream_length_available = TRUE; typefind->stream_length_available = TRUE;
typefind->stream_length = 0; typefind->stream_length = 0;
} }
static void
push_buffer_store (GstTypeFindElement * typefind, GstEvent * event)
{
if (!event)
event = gst_event_new_discontinuous (TRUE,
GST_FORMAT_DEFAULT, (guint64) 0, GST_FORMAT_BYTES, (guint64) 0,
GST_FORMAT_UNDEFINED);
typefind->pending_events = g_list_append (typefind->pending_events, event);
gst_real_pad_set_active (GST_REAL_PAD (typefind->sink), FALSE);
gst_action_set_active (typefind->wakeup, TRUE);
}
static void static void
stop_typefinding (GstTypeFindElement * typefind) stop_typefinding (GstTypeFindElement * typefind)
{ {
@ -401,7 +404,7 @@ stop_typefinding (GstTypeFindElement * typefind)
"could not seek to required position %u, hope for the best", size); "could not seek to required position %u, hope for the best", size);
typefind->mode = MODE_NORMAL; typefind->mode = MODE_NORMAL;
/* push out our queued buffers here */ /* push out our queued buffers here */
push_buffer_store (typefind); push_buffer_store (typefind, NULL);
} else { } else {
typefind->waiting_for_discont_offset = size; typefind->waiting_for_discont_offset = size;
} }
@ -409,25 +412,26 @@ stop_typefinding (GstTypeFindElement * typefind)
} }
static void static void
push_buffer_store (GstTypeFindElement * typefind) gst_type_find_element_wakeup (GstAction * action, GstElement * element,
gpointer unused)
{ {
guint size = gst_buffer_store_get_size (typefind->store, 0); guint size;
GstBuffer *buffer; GstBuffer *buffer;
const GList *item; const GList *item;
GstTypeFindElement *typefind = GST_TYPE_FIND_ELEMENT (element);
/* handle pending events */ /* handle pending events */
for (item = typefind->pending_events; item; item = item->next) { if (typefind->pending_events) {
GstEvent *e = item->data; GstEvent *e = item->data;
typefind->pending_events = g_list_remove (typefind->pending_events,
typefind->pending_events->data);
gst_pad_push (typefind->src, GST_DATA (e)); gst_pad_push (typefind->src, GST_DATA (e));
return;
} }
g_list_free (typefind->pending_events);
typefind->pending_events = NULL;
/* data */ /* data */
gst_pad_push (typefind->src, GST_DATA (gst_event_new_discontinuous (TRUE, size = gst_buffer_store_get_size (typefind->store, 0);
GST_FORMAT_DEFAULT, (guint64) 0, GST_FORMAT_BYTES, (guint64) 0,
GST_FORMAT_UNDEFINED)));
if (size && (buffer = gst_buffer_store_get_buffer (typefind->store, 0, size))) { if (size && (buffer = gst_buffer_store_get_buffer (typefind->store, 0, size))) {
GST_DEBUG_OBJECT (typefind, "pushing cached data (%u bytes)", size); GST_DEBUG_OBJECT (typefind, "pushing cached data (%u bytes)", size);
gst_pad_push (typefind->src, GST_DATA (buffer)); gst_pad_push (typefind->src, GST_DATA (buffer));
@ -437,6 +441,8 @@ push_buffer_store (GstTypeFindElement * typefind)
} }
gst_buffer_store_clear (typefind->store); gst_buffer_store_clear (typefind->store);
gst_action_set_active (action, FALSE);
gst_real_pad_set_active (GST_REAL_PAD (typefind->sink), TRUE);
} }
static guint64 static guint64
@ -496,8 +502,7 @@ gst_type_find_element_handle_event (GstPad * pad, GstEvent * event)
g_signal_emit (typefind, gst_type_find_element_signals[HAVE_TYPE], g_signal_emit (typefind, gst_type_find_element_signals[HAVE_TYPE],
0, entry->probability, entry->caps); 0, entry->probability, entry->caps);
stop_typefinding (typefind); stop_typefinding (typefind);
push_buffer_store (typefind); push_buffer_store (typefind, event);
gst_pad_event_default (pad, event);
} else { } else {
gst_pad_event_default (pad, event); gst_pad_event_default (pad, event);
GST_ELEMENT_ERROR (typefind, STREAM, TYPE_NOT_FOUND, (NULL), GST_ELEMENT_ERROR (typefind, STREAM, TYPE_NOT_FOUND, (NULL),
@ -526,13 +531,11 @@ gst_type_find_element_handle_event (GstPad * pad, GstEvent * event)
if (gst_event_discont_get_value (event, GST_FORMAT_BYTES, &off) && if (gst_event_discont_get_value (event, GST_FORMAT_BYTES, &off) &&
off == typefind->waiting_for_discont_offset) { off == typefind->waiting_for_discont_offset) {
typefind->mode = MODE_NORMAL; typefind->mode = MODE_NORMAL;
push_buffer_store (typefind); push_buffer_store (typefind, NULL);
} }
gst_event_unref (event);
} }
} else if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) { } else if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
push_buffer_store (typefind); push_buffer_store (typefind, event);
gst_pad_event_default (pad, event);
} else { } else {
gst_event_unref (event); gst_event_unref (event);
} }
@ -618,7 +621,8 @@ compare_type_find_factory (gconstpointer fac1, gconstpointer fac2)
return GST_PLUGIN_FEATURE (fac1)->rank - GST_PLUGIN_FEATURE (fac2)->rank; return GST_PLUGIN_FEATURE (fac1)->rank - GST_PLUGIN_FEATURE (fac2)->rank;
} }
static void static void
gst_type_find_element_chain (GstPad * pad, GstData * data) gst_type_find_element_chain (GstAction * action, GstRealPad * pad,
GstData * data)
{ {
GstTypeFindElement *typefind; GstTypeFindElement *typefind;
GList *entries; GList *entries;
@ -626,9 +630,9 @@ gst_type_find_element_chain (GstPad * pad, GstData * data)
GList *walk; GList *walk;
GstTypeFind find = { find_peek, find_suggest, NULL, find_element_get_length }; GstTypeFind find = { find_peek, find_suggest, NULL, find_element_get_length };
typefind = GST_TYPE_FIND_ELEMENT (GST_PAD_PARENT (pad)); typefind = GST_TYPE_FIND_ELEMENT (GST_PAD_PARENT (GST_PAD (pad)));
if (GST_IS_EVENT (data)) { if (GST_IS_EVENT (data)) {
gst_type_find_element_handle_event (pad, GST_EVENT (data)); gst_type_find_element_handle_event (GST_PAD (pad), GST_EVENT (data));
return; return;
} }
switch (typefind->mode) { switch (typefind->mode) {

View file

@ -48,6 +48,8 @@ struct _GstTypeFindElement {
GstPad * sink; GstPad * sink;
GstPad * src; GstPad * src;
GstAction * wakeup;
guint min_probability; guint min_probability;
guint max_probability; guint max_probability;
GstCaps * caps; GstCaps * caps;

189
po/af.po
View file

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gstreamer 0.8.0\n" "Project-Id-Version: gstreamer 0.8.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-05-02 19:36+0200\n" "POT-Creation-Date: 2005-05-17 18:37+0200\n"
"PO-Revision-Date: 2004-03-24 11:28+0200\n" "PO-Revision-Date: 2004-03-24 11:28+0200\n"
"Last-Translator: Petri Jooste <rkwjpj@puk.ac.za>\n" "Last-Translator: Petri Jooste <rkwjpj@puk.ac.za>\n"
"Language-Team: Afrikaans <i18n@af.org.za>\n" "Language-Team: Afrikaans <i18n@af.org.za>\n"
@ -15,30 +15,30 @@ msgstr ""
"Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: gst/gst.c:160 #: gst/gst.c:157
msgid "Print the GStreamer version" msgid "Print the GStreamer version"
msgstr "Vertoon die GStreamer weergawe" msgstr "Vertoon die GStreamer weergawe"
#: gst/gst.c:162 #: gst/gst.c:159
msgid "Make all warnings fatal" msgid "Make all warnings fatal"
msgstr "Maak alle waarskuwings fataal" msgstr "Maak alle waarskuwings fataal"
#: gst/gst.c:166 #: gst/gst.c:163
msgid "Print available debug categories and exit" msgid "Print available debug categories and exit"
msgstr "Vertoon beskikbare ontfoutkategorië en stop" msgstr "Vertoon beskikbare ontfoutkategorië en stop"
#: gst/gst.c:169 #: gst/gst.c:166
msgid "" msgid ""
"Default debug level from 1 (only error) to 5 (anything) or 0 for no output" "Default debug level from 1 (only error) to 5 (anything) or 0 for no output"
msgstr "" msgstr ""
"Verstek ontfoutvlak vanaf 1 (slegs fout) tot 5 (enigiets) of 0 vir geen " "Verstek ontfoutvlak vanaf 1 (slegs fout) tot 5 (enigiets) of 0 vir geen "
"afvoer" "afvoer"
#: gst/gst.c:171 #: gst/gst.c:168
msgid "LEVEL" msgid "LEVEL"
msgstr "VLAK" msgstr "VLAK"
#: gst/gst.c:173 #: gst/gst.c:170
msgid "" msgid ""
"Comma-separated list of category_name:level pairs to set specific levels for " "Comma-separated list of category_name:level pairs to set specific levels for "
"the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
@ -46,31 +46,27 @@ msgstr ""
"Komma-geskeide lys van kategorie_naam:vlak pare om die individuele " "Komma-geskeide lys van kategorie_naam:vlak pare om die individuele "
"kategorieë op te stel. Byvoorbeeld: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "kategorieë op te stel. Byvoorbeeld: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
#: gst/gst.c:176 #: gst/gst.c:173
msgid "LIST" msgid "LIST"
msgstr "LYS" msgstr "LYS"
#: gst/gst.c:178 #: gst/gst.c:175
msgid "Disable colored debugging output" msgid "Disable colored debugging output"
msgstr "Skakel gekleurde ontfout-afvoer af" msgstr "Skakel gekleurde ontfout-afvoer af"
#: gst/gst.c:180 #: gst/gst.c:177
msgid "Disable debugging" msgid "Disable debugging"
msgstr "Skakel ontfouting af" msgstr "Skakel ontfouting af"
#: gst/gst.c:184 #: gst/gst.c:181
msgid "Disable accelerated CPU instructions"
msgstr "Skakel versnelde SVE-instruksies af"
#: gst/gst.c:186
msgid "Enable verbose plugin loading diagnostics" msgid "Enable verbose plugin loading diagnostics"
msgstr "Aktiveer volledige diagnostiese boodskappe vir inproplaaiing" msgstr "Aktiveer volledige diagnostiese boodskappe vir inproplaaiing"
#: gst/gst.c:188 #: gst/gst.c:183
msgid "PATHS" msgid "PATHS"
msgstr "PAAIE" msgstr "PAAIE"
#: gst/gst.c:191 #: gst/gst.c:186
#, fuzzy #, fuzzy
msgid "" msgid ""
"Comma-separated list of plugins to preload in addition to the list stored in " "Comma-separated list of plugins to preload in addition to the list stored in "
@ -79,32 +75,32 @@ msgstr ""
"Komma-geskeide lys van inproppe om vooraf te laai by die lys gestoor in die " "Komma-geskeide lys van inproppe om vooraf te laai by die lys gestoor in die "
"omgewingsveranderlike GST_PLUGIN_PATH" "omgewingsveranderlike GST_PLUGIN_PATH"
#: gst/gst.c:193 #: gst/gst.c:188
msgid "PLUGINS" msgid "PLUGINS"
msgstr "INPROPPE" msgstr "INPROPPE"
#: gst/gst.c:196 #: gst/gst.c:191
msgid "Disable trapping of segmentation faults during plugin loading" msgid "Disable trapping of segmentation faults during plugin loading"
msgstr "Moenie segmenteringsfoute tydens inproplaaiing ondervang nie" msgstr "Moenie segmenteringsfoute tydens inproplaaiing ondervang nie"
#: gst/gst.c:199 #: gst/gst.c:194
msgid "SCHEDULER" msgid "SCHEDULER"
msgstr "SKEDULEERDER" msgstr "SKEDULEERDER"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "Registry to use" msgid "Registry to use"
msgstr "Register om te gebruik" msgstr "Register om te gebruik"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "REGISTRY" msgid "REGISTRY"
msgstr "REGISTER" msgstr "REGISTER"
#: gst/gst.c:214 #: gst/gst.c:209
#, fuzzy, c-format #, fuzzy, c-format
msgid "path list for loading plugins (separated by '%s')" msgid "path list for loading plugins (separated by '%s')"
msgstr "lys van paaie waaruit inproppe gelaai word (geskei met '" msgstr "lys van paaie waaruit inproppe gelaai word (geskei met '"
#: gst/gst.c:218 #: gst/gst.c:213
#, fuzzy, c-format #, fuzzy, c-format
msgid "Scheduler to use (default is '%s')" msgid "Scheduler to use (default is '%s')"
msgstr "Skeduleerder om te gebruik ('" msgstr "Skeduleerder om te gebruik ('"
@ -586,52 +582,46 @@ msgstr ""
msgid ", " msgid ", "
msgstr ", " msgstr ", "
#: gst/autoplug/gstspider.c:466 #: gst/elements/gstfilesink.c:243
#, c-format
msgid "There is no element present to handle the stream's mime type %s."
msgstr ""
"Daar is geen element beskikbaar om die stroom se mime-tipe %s te hanteer nie."
#: gst/elements/gstfilesink.c:268
msgid "No file name specified for writing." msgid "No file name specified for writing."
msgstr "Geen lêernaam om heen te skryf nie." msgstr "Geen lêernaam om heen te skryf nie."
#: gst/elements/gstfilesink.c:275 #: gst/elements/gstfilesink.c:250
#, c-format #, c-format
msgid "Could not open file \"%s\" for writing." msgid "Could not open file \"%s\" for writing."
msgstr "Kon nie lêer \"%s\" oopmaak om in te skryf nie." msgstr "Kon nie lêer \"%s\" oopmaak om in te skryf nie."
#: gst/elements/gstfilesink.c:294 #: gst/elements/gstfilesink.c:269
#, c-format #, c-format
msgid "Error closing file \"%s\"." msgid "Error closing file \"%s\"."
msgstr "Fout met toemaak van lêer \"%s\"." msgstr "Fout met toemaak van lêer \"%s\"."
#: gst/elements/gstfilesink.c:364 gst/elements/gstfilesink.c:400 #: gst/elements/gstfilesink.c:339 gst/elements/gstfilesink.c:375
#: gst/elements/gstfilesink.c:453 #: gst/elements/gstfilesink.c:428
#, c-format #, c-format
msgid "Error while writing to file \"%s\"." msgid "Error while writing to file \"%s\"."
msgstr "Fout tydens skryf na lêer \"%s\"." msgstr "Fout tydens skryf na lêer \"%s\"."
#: gst/elements/gstfilesrc.c:764 gst/elements/gstmultifilesrc.c:298 #: gst/elements/gstfilesrc.c:725
msgid "No file name specified for reading." msgid "No file name specified for reading."
msgstr "Geen lêernaam om uit te lees nie." msgstr "Geen lêernaam om uit te lees nie."
#: gst/elements/gstfilesrc.c:779 gst/elements/gstmultifilesrc.c:306 #: gst/elements/gstfilesrc.c:740
#, c-format #, c-format
msgid "Could not open file \"%s\" for reading." msgid "Could not open file \"%s\" for reading."
msgstr "Kon nie lêer \"%s\" oopmaak om te lees nie." msgstr "Kon nie lêer \"%s\" oopmaak om te lees nie."
#: gst/elements/gstfilesrc.c:790 #: gst/elements/gstfilesrc.c:751
#, c-format #, c-format
msgid "\"%s\" is a directory." msgid "\"%s\" is a directory."
msgstr "" msgstr ""
#: gst/elements/gstfilesrc.c:796 #: gst/elements/gstfilesrc.c:757
#, fuzzy, c-format #, fuzzy, c-format
msgid "File \"%s\" is a socket." msgid "File \"%s\" is a socket."
msgstr "Lêer \"%s\" is nie 'n gewone lêer nie." msgstr "Lêer \"%s\" is nie 'n gewone lêer nie."
#: gst/elements/gstidentity.c:306 #: gst/elements/gstidentity.c:276
msgid "Failed after iterations as requested." msgid "Failed after iterations as requested."
msgstr "Mislukking na die vasgestelde aantal probeerslae." msgstr "Mislukking na die vasgestelde aantal probeerslae."
@ -720,123 +710,79 @@ msgstr "kon nie aan bestemming-element vir URI \"%s\" verbind nie"
msgid "empty pipeline not allowed" msgid "empty pipeline not allowed"
msgstr "leë pyplyn word nie toegelaat nie" msgstr "leë pyplyn word nie toegelaat nie"
#: tools/gst-inspect.c:1151 #: tools/gst-inspect.c:1032
#, fuzzy #, fuzzy
msgid "Print all elements" msgid "Print all elements"
msgstr "geen element \"%s\"" msgstr "geen element \"%s\""
#: tools/gst-launch.c:114 #: tools/gst-launch.c:190
#, c-format
msgid ""
"Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
"max %s ns).\n"
msgstr ""
#: tools/gst-launch.c:141
msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
msgstr "Gebruik so: gst-xmllaunch <lêer.xml> [ element.eienskap=waarde ... ]\n"
#: tools/gst-launch.c:149
#, c-format
msgid "ERROR: parse of xml file '%s' failed.\n"
msgstr "FOUT: ontleding van xml-lêer '%s' het misluk.\n"
#: tools/gst-launch.c:155
#, c-format
msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
msgstr "FOUT: geen topvlak pyplynelement in lêer '%s' nie.\n"
#: tools/gst-launch.c:162
#, c-format
msgid "WARNING: only one toplevel element is supported at this time."
msgstr "WAARSKUWING: slegs een topvlak element word tans ondersteun."
#: tools/gst-launch.c:173
#, c-format
msgid "ERROR: could not parse command line argument %d: %s.\n"
msgstr "FOUT: onverstaanbare bevellynparameter %d: %s.\n"
#: tools/gst-launch.c:184
#, c-format
msgid "WARNING: element named '%s' not found.\n"
msgstr "WAARSKUWING: element genaamd '%s' nie gevind nie.\n"
#: tools/gst-launch.c:327
#, c-format #, c-format
msgid "FOUND TAG : found by element \"%s\".\n" msgid "FOUND TAG : found by element \"%s\".\n"
msgstr "ETIKET GEVIND : gevind by element \"%s\".\n" msgstr "ETIKET GEVIND : gevind by element \"%s\".\n"
#: tools/gst-launch.c:412 #: tools/gst-launch.c:304
msgid "Output tags (also known as metadata)" msgid "Output tags (also known as metadata)"
msgstr "Wys etikette (ook bekend as metadata)" msgstr "Wys etikette (ook bekend as metadata)"
#: tools/gst-launch.c:414 #: tools/gst-launch.c:306
msgid "Output status information and property notifications" msgid "Output status information and property notifications"
msgstr "Wys statusinligting en kennisgewings van eienskappe" msgstr "Wys statusinligting en kennisgewings van eienskappe"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "Do not output status information of TYPE" msgid "Do not output status information of TYPE"
msgstr "Moenie statusinligting van TIPE wys nie" msgstr "Moenie statusinligting van TIPE wys nie"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "TYPE1,TYPE2,..." msgid "TYPE1,TYPE2,..."
msgstr "TIPE1, TIPE2,..." msgstr "TIPE1, TIPE2,..."
#: tools/gst-launch.c:419 #: tools/gst-launch.c:310
msgid "Save xml representation of pipeline to FILE and exit"
msgstr "Stoor xml-voorstelling van pyplyn na LÊER en stop"
#: tools/gst-launch.c:419
msgid "FILE"
msgstr "LÊER"
#: tools/gst-launch.c:422
msgid "Do not install a fault handler" msgid "Do not install a fault handler"
msgstr "Moenie 'n fouthanteerder installeer nie" msgstr "Moenie 'n fouthanteerder installeer nie"
#: tools/gst-launch.c:424 #: tools/gst-launch.c:312
msgid "Print alloc trace (if enabled at compile time)" msgid "Print alloc trace (if enabled at compile time)"
msgstr "Druk \"alloc trace\" (indien aangeskakel tydens kompilering)" msgstr "Druk \"alloc trace\" (indien aangeskakel tydens kompilering)"
#: tools/gst-launch.c:426 #: tools/gst-launch.c:314
msgid "Number of times to iterate pipeline" msgid "Number of times to iterate pipeline"
msgstr "Aantal kere wat pyplyn herhaal moet word" msgstr "Aantal kere wat pyplyn herhaal moet word"
#: tools/gst-launch.c:496 #: tools/gst-launch.c:379
#, c-format #, c-format
msgid "ERROR: pipeline could not be constructed: %s.\n" msgid "ERROR: pipeline could not be constructed: %s.\n"
msgstr "FOUT: pyplyn kon nie opgestel word nie: %s.\n" msgstr "FOUT: pyplyn kon nie opgestel word nie: %s.\n"
#: tools/gst-launch.c:500 #: tools/gst-launch.c:383
#, c-format
msgid "ERROR: pipeline could not be constructed.\n" msgid "ERROR: pipeline could not be constructed.\n"
msgstr "FOUT: pyplyn kon nie opgestel word nie.\n" msgstr "FOUT: pyplyn kon nie opgestel word nie.\n"
#: tools/gst-launch.c:504 #: tools/gst-launch.c:387
#, c-format #, c-format
msgid "WARNING: erroneous pipeline: %s\n" msgid "WARNING: erroneous pipeline: %s\n"
msgstr "WAARSKUWING: foutiewe pyplyn: %s\n" msgstr "WAARSKUWING: foutiewe pyplyn: %s\n"
#: tools/gst-launch.c:505 #: tools/gst-launch.c:388
#, c-format
msgid " Trying to run anyway.\n" msgid " Trying to run anyway.\n"
msgstr " Probeer om weg te hardloop.\n" msgstr " Probeer om weg te hardloop.\n"
#: tools/gst-launch.c:532 #: tools/gst-launch.c:408
#, c-format
msgid "ERROR: the 'pipeline' element wasn't found.\n" msgid "ERROR: the 'pipeline' element wasn't found.\n"
msgstr "FOUT: die pyplynelement kon nie gevind word nie.\n" msgstr "FOUT: die pyplynelement kon nie gevind word nie.\n"
#: tools/gst-launch.c:539 #: tools/gst-launch.c:417
#, c-format
msgid "RUNNING pipeline ...\n" msgid "RUNNING pipeline ...\n"
msgstr "LOOP pyplyn ...\n" msgstr "LOOP pyplyn ...\n"
#: tools/gst-launch.c:542 #: tools/gst-launch.c:421
#, c-format
msgid "ERROR: pipeline doesn't want to play.\n" msgid "ERROR: pipeline doesn't want to play.\n"
msgstr "FOUT: pyplyn wil nie speel nie.\n" msgstr "FOUT: pyplyn wil nie speel nie.\n"
#: tools/gst-launch.c:445
#, c-format
msgid "Execution ended after %.2fs (%.2fs or %.2f%% idling).\n"
msgstr ""
#: tools/gst-register.c:49 #: tools/gst-register.c:49
#, c-format #, c-format
msgid "Added plugin %s with %d feature.\n" msgid "Added plugin %s with %d feature.\n"
@ -871,6 +817,39 @@ msgid_plural "Loaded %d plugins with %d features.\n"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#~ msgid "Disable accelerated CPU instructions"
#~ msgstr "Skakel versnelde SVE-instruksies af"
#~ msgid "There is no element present to handle the stream's mime type %s."
#~ msgstr ""
#~ "Daar is geen element beskikbaar om die stroom se mime-tipe %s te hanteer "
#~ "nie."
#~ msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
#~ msgstr ""
#~ "Gebruik so: gst-xmllaunch <lêer.xml> [ element.eienskap=waarde ... ]\n"
#~ msgid "ERROR: parse of xml file '%s' failed.\n"
#~ msgstr "FOUT: ontleding van xml-lêer '%s' het misluk.\n"
#~ msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
#~ msgstr "FOUT: geen topvlak pyplynelement in lêer '%s' nie.\n"
#~ msgid "WARNING: only one toplevel element is supported at this time."
#~ msgstr "WAARSKUWING: slegs een topvlak element word tans ondersteun."
#~ msgid "ERROR: could not parse command line argument %d: %s.\n"
#~ msgstr "FOUT: onverstaanbare bevellynparameter %d: %s.\n"
#~ msgid "WARNING: element named '%s' not found.\n"
#~ msgstr "WAARSKUWING: element genaamd '%s' nie gevind nie.\n"
#~ msgid "Save xml representation of pipeline to FILE and exit"
#~ msgstr "Stoor xml-voorstelling van pyplyn na LÊER en stop"
#~ msgid "FILE"
#~ msgstr "LÊER"
#~ msgid "caps" #~ msgid "caps"
#~ msgstr "caps" #~ msgstr "caps"

158
po/az.po
View file

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gstreamer-0.8.0\n" "Project-Id-Version: gstreamer-0.8.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-05-02 19:36+0200\n" "POT-Creation-Date: 2005-05-17 18:37+0200\n"
"PO-Revision-Date: 2004-03-19 18:40+0200\n" "PO-Revision-Date: 2004-03-19 18:40+0200\n"
"Last-Translator: Metin Amiroff <metin@karegen.com>\n" "Last-Translator: Metin Amiroff <metin@karegen.com>\n"
"Language-Team: Azerbaijani <translation-team-az@lists.sourceforge.net>\n" "Language-Team: Azerbaijani <translation-team-az@lists.sourceforge.net>\n"
@ -16,89 +16,85 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.0.2\n" "X-Generator: KBabel 1.0.2\n"
#: gst/gst.c:160 #: gst/gst.c:157
msgid "Print the GStreamer version" msgid "Print the GStreamer version"
msgstr "GStreamer buraxılışını göstər" msgstr "GStreamer buraxılışını göstər"
#: gst/gst.c:162 #: gst/gst.c:159
msgid "Make all warnings fatal" msgid "Make all warnings fatal"
msgstr "Bütün xətaları ölümcül et" msgstr "Bütün xətaları ölümcül et"
#: gst/gst.c:166 #: gst/gst.c:163
msgid "Print available debug categories and exit" msgid "Print available debug categories and exit"
msgstr "" msgstr ""
#: gst/gst.c:169 #: gst/gst.c:166
msgid "" msgid ""
"Default debug level from 1 (only error) to 5 (anything) or 0 for no output" "Default debug level from 1 (only error) to 5 (anything) or 0 for no output"
msgstr "" msgstr ""
#: gst/gst.c:171 #: gst/gst.c:168
msgid "LEVEL" msgid "LEVEL"
msgstr "SƏVİYYƏ" msgstr "SƏVİYYƏ"
#: gst/gst.c:173 #: gst/gst.c:170
msgid "" msgid ""
"Comma-separated list of category_name:level pairs to set specific levels for " "Comma-separated list of category_name:level pairs to set specific levels for "
"the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
msgstr "" msgstr ""
#: gst/gst.c:176 #: gst/gst.c:173
msgid "LIST" msgid "LIST"
msgstr "SİYAHI" msgstr "SİYAHI"
#: gst/gst.c:178 #: gst/gst.c:175
msgid "Disable colored debugging output" msgid "Disable colored debugging output"
msgstr "" msgstr ""
#: gst/gst.c:180 #: gst/gst.c:177
msgid "Disable debugging" msgid "Disable debugging"
msgstr "Xəta ayırmasını bağla" msgstr "Xəta ayırmasını bağla"
#: gst/gst.c:184 #: gst/gst.c:181
msgid "Disable accelerated CPU instructions"
msgstr ""
#: gst/gst.c:186
msgid "Enable verbose plugin loading diagnostics" msgid "Enable verbose plugin loading diagnostics"
msgstr "" msgstr ""
#: gst/gst.c:188 #: gst/gst.c:183
msgid "PATHS" msgid "PATHS"
msgstr "CIĞIRLAR" msgstr "CIĞIRLAR"
#: gst/gst.c:191 #: gst/gst.c:186
msgid "" msgid ""
"Comma-separated list of plugins to preload in addition to the list stored in " "Comma-separated list of plugins to preload in addition to the list stored in "
"environment variable GST_PLUGIN_PATH" "environment variable GST_PLUGIN_PATH"
msgstr "" msgstr ""
#: gst/gst.c:193 #: gst/gst.c:188
msgid "PLUGINS" msgid "PLUGINS"
msgstr "ƏLAVƏLƏR" msgstr "ƏLAVƏLƏR"
#: gst/gst.c:196 #: gst/gst.c:191
msgid "Disable trapping of segmentation faults during plugin loading" msgid "Disable trapping of segmentation faults during plugin loading"
msgstr "" msgstr ""
#: gst/gst.c:199 #: gst/gst.c:194
msgid "SCHEDULER" msgid "SCHEDULER"
msgstr "VAXTLAŞDIRICI" msgstr "VAXTLAŞDIRICI"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "Registry to use" msgid "Registry to use"
msgstr "İşlədiləcək qeyd bazası" msgstr "İşlədiləcək qeyd bazası"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "REGISTRY" msgid "REGISTRY"
msgstr "QEYDBAZASI" msgstr "QEYDBAZASI"
#: gst/gst.c:214 #: gst/gst.c:209
#, c-format #, c-format
msgid "path list for loading plugins (separated by '%s')" msgid "path list for loading plugins (separated by '%s')"
msgstr "" msgstr ""
#: gst/gst.c:218 #: gst/gst.c:213
#, c-format #, c-format
msgid "Scheduler to use (default is '%s')" msgid "Scheduler to use (default is '%s')"
msgstr "" msgstr ""
@ -563,51 +559,46 @@ msgstr ""
msgid ", " msgid ", "
msgstr ", " msgstr ", "
#: gst/autoplug/gstspider.c:466 #: gst/elements/gstfilesink.c:243
#, c-format
msgid "There is no element present to handle the stream's mime type %s."
msgstr ""
#: gst/elements/gstfilesink.c:268
msgid "No file name specified for writing." msgid "No file name specified for writing."
msgstr "" msgstr ""
#: gst/elements/gstfilesink.c:275 #: gst/elements/gstfilesink.c:250
#, c-format #, c-format
msgid "Could not open file \"%s\" for writing." msgid "Could not open file \"%s\" for writing."
msgstr "" msgstr ""
#: gst/elements/gstfilesink.c:294 #: gst/elements/gstfilesink.c:269
#, c-format #, c-format
msgid "Error closing file \"%s\"." msgid "Error closing file \"%s\"."
msgstr "" msgstr ""
#: gst/elements/gstfilesink.c:364 gst/elements/gstfilesink.c:400 #: gst/elements/gstfilesink.c:339 gst/elements/gstfilesink.c:375
#: gst/elements/gstfilesink.c:453 #: gst/elements/gstfilesink.c:428
#, c-format #, c-format
msgid "Error while writing to file \"%s\"." msgid "Error while writing to file \"%s\"."
msgstr "" msgstr ""
#: gst/elements/gstfilesrc.c:764 gst/elements/gstmultifilesrc.c:298 #: gst/elements/gstfilesrc.c:725
msgid "No file name specified for reading." msgid "No file name specified for reading."
msgstr "" msgstr ""
#: gst/elements/gstfilesrc.c:779 gst/elements/gstmultifilesrc.c:306 #: gst/elements/gstfilesrc.c:740
#, c-format #, c-format
msgid "Could not open file \"%s\" for reading." msgid "Could not open file \"%s\" for reading."
msgstr "" msgstr ""
#: gst/elements/gstfilesrc.c:790 #: gst/elements/gstfilesrc.c:751
#, c-format #, c-format
msgid "\"%s\" is a directory." msgid "\"%s\" is a directory."
msgstr "" msgstr ""
#: gst/elements/gstfilesrc.c:796 #: gst/elements/gstfilesrc.c:757
#, c-format #, c-format
msgid "File \"%s\" is a socket." msgid "File \"%s\" is a socket."
msgstr "" msgstr ""
#: gst/elements/gstidentity.c:306 #: gst/elements/gstidentity.c:276
msgid "Failed after iterations as requested." msgid "Failed after iterations as requested."
msgstr "" msgstr ""
@ -695,122 +686,78 @@ msgstr ""
msgid "empty pipeline not allowed" msgid "empty pipeline not allowed"
msgstr "" msgstr ""
#: tools/gst-inspect.c:1151 #: tools/gst-inspect.c:1032
msgid "Print all elements" msgid "Print all elements"
msgstr "" msgstr ""
#: tools/gst-launch.c:114 #: tools/gst-launch.c:190
#, c-format
msgid ""
"Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
"max %s ns).\n"
msgstr ""
#: tools/gst-launch.c:141
msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
msgstr ""
#: tools/gst-launch.c:149
#, c-format
msgid "ERROR: parse of xml file '%s' failed.\n"
msgstr ""
#: tools/gst-launch.c:155
#, c-format
msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
msgstr ""
#: tools/gst-launch.c:162
#, c-format
msgid "WARNING: only one toplevel element is supported at this time."
msgstr ""
#: tools/gst-launch.c:173
#, c-format
msgid "ERROR: could not parse command line argument %d: %s.\n"
msgstr ""
#: tools/gst-launch.c:184
#, c-format
msgid "WARNING: element named '%s' not found.\n"
msgstr ""
#: tools/gst-launch.c:327
#, c-format #, c-format
msgid "FOUND TAG : found by element \"%s\".\n" msgid "FOUND TAG : found by element \"%s\".\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:412 #: tools/gst-launch.c:304
msgid "Output tags (also known as metadata)" msgid "Output tags (also known as metadata)"
msgstr "" msgstr ""
#: tools/gst-launch.c:414 #: tools/gst-launch.c:306
msgid "Output status information and property notifications" msgid "Output status information and property notifications"
msgstr "" msgstr ""
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "Do not output status information of TYPE" msgid "Do not output status information of TYPE"
msgstr "" msgstr ""
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "TYPE1,TYPE2,..." msgid "TYPE1,TYPE2,..."
msgstr "" msgstr ""
#: tools/gst-launch.c:419 #: tools/gst-launch.c:310
msgid "Save xml representation of pipeline to FILE and exit"
msgstr ""
#: tools/gst-launch.c:419
msgid "FILE"
msgstr "FAYL"
#: tools/gst-launch.c:422
msgid "Do not install a fault handler" msgid "Do not install a fault handler"
msgstr "" msgstr ""
#: tools/gst-launch.c:424 #: tools/gst-launch.c:312
msgid "Print alloc trace (if enabled at compile time)" msgid "Print alloc trace (if enabled at compile time)"
msgstr "" msgstr ""
#: tools/gst-launch.c:426 #: tools/gst-launch.c:314
msgid "Number of times to iterate pipeline" msgid "Number of times to iterate pipeline"
msgstr "" msgstr ""
#: tools/gst-launch.c:496 #: tools/gst-launch.c:379
#, c-format #, c-format
msgid "ERROR: pipeline could not be constructed: %s.\n" msgid "ERROR: pipeline could not be constructed: %s.\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:500 #: tools/gst-launch.c:383
#, c-format
msgid "ERROR: pipeline could not be constructed.\n" msgid "ERROR: pipeline could not be constructed.\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:504 #: tools/gst-launch.c:387
#, c-format #, c-format
msgid "WARNING: erroneous pipeline: %s\n" msgid "WARNING: erroneous pipeline: %s\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:505 #: tools/gst-launch.c:388
#, c-format
msgid " Trying to run anyway.\n" msgid " Trying to run anyway.\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:532 #: tools/gst-launch.c:408
#, c-format
msgid "ERROR: the 'pipeline' element wasn't found.\n" msgid "ERROR: the 'pipeline' element wasn't found.\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:539 #: tools/gst-launch.c:417
#, c-format
msgid "RUNNING pipeline ...\n" msgid "RUNNING pipeline ...\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:542 #: tools/gst-launch.c:421
#, c-format
msgid "ERROR: pipeline doesn't want to play.\n" msgid "ERROR: pipeline doesn't want to play.\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:445
#, c-format
msgid "Execution ended after %.2fs (%.2fs or %.2f%% idling).\n"
msgstr ""
#: tools/gst-register.c:49 #: tools/gst-register.c:49
#, c-format #, c-format
msgid "Added plugin %s with %d feature.\n" msgid "Added plugin %s with %d feature.\n"
@ -845,5 +792,8 @@ msgid_plural "Loaded %d plugins with %d features.\n"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#~ msgid "FILE"
#~ msgstr "FAYL"
#~ msgid "')" #~ msgid "')"
#~ msgstr "')" #~ msgstr "')"

200
po/ca.po
View file

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gstreamer 0.8.7pre2\n" "Project-Id-Version: gstreamer 0.8.7pre2\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-05-02 19:36+0200\n" "POT-Creation-Date: 2005-05-17 18:37+0200\n"
"PO-Revision-Date: 2004-12-22 17:44+0100\n" "PO-Revision-Date: 2004-12-22 17:44+0100\n"
"Last-Translator: Jordi Mallach <jordi@sindominio.net>\n" "Last-Translator: Jordi Mallach <jordi@sindominio.net>\n"
"Language-Team: Catalan <ca@dodds.net>\n" "Language-Team: Catalan <ca@dodds.net>\n"
@ -16,30 +16,30 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n!=1;\n" "Plural-Forms: nplurals=2; plural=n!=1;\n"
#: gst/gst.c:160 #: gst/gst.c:157
msgid "Print the GStreamer version" msgid "Print the GStreamer version"
msgstr "Imprimeix la versió de GStreamer" msgstr "Imprimeix la versió de GStreamer"
#: gst/gst.c:162 #: gst/gst.c:159
msgid "Make all warnings fatal" msgid "Make all warnings fatal"
msgstr "Fes fatals tots els avisos" msgstr "Fes fatals tots els avisos"
#: gst/gst.c:166 #: gst/gst.c:163
msgid "Print available debug categories and exit" msgid "Print available debug categories and exit"
msgstr "Imprimeix les categories de depuració disponibles i surt" msgstr "Imprimeix les categories de depuració disponibles i surt"
#: gst/gst.c:169 #: gst/gst.c:166
msgid "" msgid ""
"Default debug level from 1 (only error) to 5 (anything) or 0 for no output" "Default debug level from 1 (only error) to 5 (anything) or 0 for no output"
msgstr "" msgstr ""
"Nivell de depuració per defecte des de 1 (només errors) a 5 (tot) o 0 per a " "Nivell de depuració per defecte des de 1 (només errors) a 5 (tot) o 0 per a "
"cap sortida" "cap sortida"
#: gst/gst.c:171 #: gst/gst.c:168
msgid "LEVEL" msgid "LEVEL"
msgstr "NIVELL" msgstr "NIVELL"
#: gst/gst.c:173 #: gst/gst.c:170
msgid "" msgid ""
"Comma-separated list of category_name:level pairs to set specific levels for " "Comma-separated list of category_name:level pairs to set specific levels for "
"the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
@ -48,31 +48,27 @@ msgstr ""
"nivells específics per a les categories individuals. Per exemple: " "nivells específics per a les categories individuals. Per exemple: "
"GST_AUTOPLUG:5, GST_ELEMENT_*:3" "GST_AUTOPLUG:5, GST_ELEMENT_*:3"
#: gst/gst.c:176 #: gst/gst.c:173
msgid "LIST" msgid "LIST"
msgstr "LLISTA" msgstr "LLISTA"
#: gst/gst.c:178 #: gst/gst.c:175
msgid "Disable colored debugging output" msgid "Disable colored debugging output"
msgstr "Inhabilita la sortida de depuració colorejada" msgstr "Inhabilita la sortida de depuració colorejada"
#: gst/gst.c:180 #: gst/gst.c:177
msgid "Disable debugging" msgid "Disable debugging"
msgstr "Inhabilita la depuració" msgstr "Inhabilita la depuració"
#: gst/gst.c:184 #: gst/gst.c:181
msgid "Disable accelerated CPU instructions"
msgstr "Inhabilita les intruccions d'UCP accelerades"
#: gst/gst.c:186
msgid "Enable verbose plugin loading diagnostics" msgid "Enable verbose plugin loading diagnostics"
msgstr "Habilita els diagnòstics detallats de càrrega de connectors" msgstr "Habilita els diagnòstics detallats de càrrega de connectors"
#: gst/gst.c:188 #: gst/gst.c:183
msgid "PATHS" msgid "PATHS"
msgstr "CAMINS" msgstr "CAMINS"
#: gst/gst.c:191 #: gst/gst.c:186
#, fuzzy #, fuzzy
msgid "" msgid ""
"Comma-separated list of plugins to preload in addition to the list stored in " "Comma-separated list of plugins to preload in addition to the list stored in "
@ -81,34 +77,34 @@ msgstr ""
"Llista separada per comes de connectors a precarregar a més de la llista " "Llista separada per comes de connectors a precarregar a més de la llista "
"emmagatzemada en la variable d'entorn GST_PLUGIN_PATH" "emmagatzemada en la variable d'entorn GST_PLUGIN_PATH"
#: gst/gst.c:193 #: gst/gst.c:188
msgid "PLUGINS" msgid "PLUGINS"
msgstr "CONNECTORS" msgstr "CONNECTORS"
#: gst/gst.c:196 #: gst/gst.c:191
msgid "Disable trapping of segmentation faults during plugin loading" msgid "Disable trapping of segmentation faults during plugin loading"
msgstr "" msgstr ""
"Inhabilita la captura de violacions de segment durant la càrrega de " "Inhabilita la captura de violacions de segment durant la càrrega de "
"connectors" "connectors"
#: gst/gst.c:199 #: gst/gst.c:194
msgid "SCHEDULER" msgid "SCHEDULER"
msgstr "PLANIFICADOR" msgstr "PLANIFICADOR"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "Registry to use" msgid "Registry to use"
msgstr "Registre a utilitzar" msgstr "Registre a utilitzar"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "REGISTRY" msgid "REGISTRY"
msgstr "REGISTRE" msgstr "REGISTRE"
#: gst/gst.c:214 #: gst/gst.c:209
#, c-format #, c-format
msgid "path list for loading plugins (separated by '%s')" msgid "path list for loading plugins (separated by '%s')"
msgstr "llista de camins per a carregar connectors (separats per «%s»)" msgstr "llista de camins per a carregar connectors (separats per «%s»)"
#: gst/gst.c:218 #: gst/gst.c:213
#, c-format #, c-format
msgid "Scheduler to use (default is '%s')" msgid "Scheduler to use (default is '%s')"
msgstr "Planificador a utilitzar (per defecte és «%s»)" msgstr "Planificador a utilitzar (per defecte és «%s»)"
@ -605,52 +601,46 @@ msgstr ""
msgid ", " msgid ", "
msgstr ", " msgstr ", "
#: gst/autoplug/gstspider.c:466 #: gst/elements/gstfilesink.c:243
#, c-format
msgid "There is no element present to handle the stream's mime type %s."
msgstr ""
"No hi ha cap element present per a gestionar el tipus mime %s del flux."
#: gst/elements/gstfilesink.c:268
msgid "No file name specified for writing." msgid "No file name specified for writing."
msgstr "No s'ha especificat cap nom de fitxer per a l'escriptura." msgstr "No s'ha especificat cap nom de fitxer per a l'escriptura."
#: gst/elements/gstfilesink.c:275 #: gst/elements/gstfilesink.c:250
#, c-format #, c-format
msgid "Could not open file \"%s\" for writing." msgid "Could not open file \"%s\" for writing."
msgstr "No s'ha pogut obrir «%s» per a l'escriptura." msgstr "No s'ha pogut obrir «%s» per a l'escriptura."
#: gst/elements/gstfilesink.c:294 #: gst/elements/gstfilesink.c:269
#, c-format #, c-format
msgid "Error closing file \"%s\"." msgid "Error closing file \"%s\"."
msgstr "S'ha produït un error en tancar el fitxer «%s»." msgstr "S'ha produït un error en tancar el fitxer «%s»."
#: gst/elements/gstfilesink.c:364 gst/elements/gstfilesink.c:400 #: gst/elements/gstfilesink.c:339 gst/elements/gstfilesink.c:375
#: gst/elements/gstfilesink.c:453 #: gst/elements/gstfilesink.c:428
#, c-format #, c-format
msgid "Error while writing to file \"%s\"." msgid "Error while writing to file \"%s\"."
msgstr "S'ha produït un error en escriure al fitxer «%s»." msgstr "S'ha produït un error en escriure al fitxer «%s»."
#: gst/elements/gstfilesrc.c:764 gst/elements/gstmultifilesrc.c:298 #: gst/elements/gstfilesrc.c:725
msgid "No file name specified for reading." msgid "No file name specified for reading."
msgstr "No s'ha especificat cap fitxer per a llegir." msgstr "No s'ha especificat cap fitxer per a llegir."
#: gst/elements/gstfilesrc.c:779 gst/elements/gstmultifilesrc.c:306 #: gst/elements/gstfilesrc.c:740
#, c-format #, c-format
msgid "Could not open file \"%s\" for reading." msgid "Could not open file \"%s\" for reading."
msgstr "No s'ha pogut obrir el fitxer «%s» per a la lectura." msgstr "No s'ha pogut obrir el fitxer «%s» per a la lectura."
#: gst/elements/gstfilesrc.c:790 #: gst/elements/gstfilesrc.c:751
#, c-format #, c-format
msgid "\"%s\" is a directory." msgid "\"%s\" is a directory."
msgstr "«%s» és un directori." msgstr "«%s» és un directori."
#: gst/elements/gstfilesrc.c:796 #: gst/elements/gstfilesrc.c:757
#, c-format #, c-format
msgid "File \"%s\" is a socket." msgid "File \"%s\" is a socket."
msgstr "El fitxer «%s» és un sòcol." msgstr "El fitxer «%s» és un sòcol."
#: gst/elements/gstidentity.c:306 #: gst/elements/gstidentity.c:276
msgid "Failed after iterations as requested." msgid "Failed after iterations as requested."
msgstr "Ha fallat després de les iteracions com s'ha demanat." msgstr "Ha fallat després de les iteracions com s'ha demanat."
@ -739,125 +729,78 @@ msgstr "No s'ha pogut enllaçar l'element de sortida per a l'URI «%s»"
msgid "empty pipeline not allowed" msgid "empty pipeline not allowed"
msgstr "no es permet un conducte buit" msgstr "no es permet un conducte buit"
#: tools/gst-inspect.c:1151 #: tools/gst-inspect.c:1032
msgid "Print all elements" msgid "Print all elements"
msgstr "Imprimeix tots els elements" msgstr "Imprimeix tots els elements"
#: tools/gst-launch.c:114 #: tools/gst-launch.c:190
#, c-format
msgid ""
"Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
"max %s ns).\n"
msgstr ""
"L'execució ha finalitzat després de %s iteracions (suma %s ns, mitja %s ns, "
"mín %s, màx %s).\n"
#: tools/gst-launch.c:141
msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
msgstr "Forma d'ús: gst-xmllaunch <file.xml> [ element.propietat=valor ... ]\n"
#: tools/gst-launch.c:149
#, c-format
msgid "ERROR: parse of xml file '%s' failed.\n"
msgstr "ERROR: l'anàlisi del fitxer xml «%s» ha fallat.\n"
#: tools/gst-launch.c:155
#, c-format
msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
msgstr "ERROR: no hi ha cap conducte de nivell superior en el fitxer «%s».\n"
#: tools/gst-launch.c:162
#, c-format
msgid "WARNING: only one toplevel element is supported at this time."
msgstr "AVÍS: només es gestiona un element de primer nivell ara mateix."
#: tools/gst-launch.c:173
#, c-format
msgid "ERROR: could not parse command line argument %d: %s.\n"
msgstr ""
"ERROR: no s'ha pogut analitzar l'argument de la línia d'ordres %d: %s.\n"
#: tools/gst-launch.c:184
#, c-format
msgid "WARNING: element named '%s' not found.\n"
msgstr "AVÍS: no s'ha trobat l'element anomenat «%s».\n"
#: tools/gst-launch.c:327
#, c-format #, c-format
msgid "FOUND TAG : found by element \"%s\".\n" msgid "FOUND TAG : found by element \"%s\".\n"
msgstr "MARCADOR TROBAT: trobat per l'element «%s».\n" msgstr "MARCADOR TROBAT: trobat per l'element «%s».\n"
#: tools/gst-launch.c:412 #: tools/gst-launch.c:304
msgid "Output tags (also known as metadata)" msgid "Output tags (also known as metadata)"
msgstr "Mostra els marcadors (també coneguts com metadades)" msgstr "Mostra els marcadors (també coneguts com metadades)"
#: tools/gst-launch.c:414 #: tools/gst-launch.c:306
msgid "Output status information and property notifications" msgid "Output status information and property notifications"
msgstr "Mostra la informació d'estat i notificacions de propietats" msgstr "Mostra la informació d'estat i notificacions de propietats"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "Do not output status information of TYPE" msgid "Do not output status information of TYPE"
msgstr "No mostres informació d'estat de TIPUS" msgstr "No mostres informació d'estat de TIPUS"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "TYPE1,TYPE2,..." msgid "TYPE1,TYPE2,..."
msgstr "TIPUS1,TIPUS2,..." msgstr "TIPUS1,TIPUS2,..."
#: tools/gst-launch.c:419 #: tools/gst-launch.c:310
msgid "Save xml representation of pipeline to FILE and exit"
msgstr "Desa la representació xml del conducte a FITXER i surt"
#: tools/gst-launch.c:419
msgid "FILE"
msgstr "FITXER"
#: tools/gst-launch.c:422
msgid "Do not install a fault handler" msgid "Do not install a fault handler"
msgstr "No instal·les un gestor de fallades" msgstr "No instal·les un gestor de fallades"
#: tools/gst-launch.c:424 #: tools/gst-launch.c:312
msgid "Print alloc trace (if enabled at compile time)" msgid "Print alloc trace (if enabled at compile time)"
msgstr "Imprimeix una traça d'alloc (si s'ha habilitat al compilar)" msgstr "Imprimeix una traça d'alloc (si s'ha habilitat al compilar)"
#: tools/gst-launch.c:426 #: tools/gst-launch.c:314
msgid "Number of times to iterate pipeline" msgid "Number of times to iterate pipeline"
msgstr "Nombre de vegades a iterar el conducte" msgstr "Nombre de vegades a iterar el conducte"
#: tools/gst-launch.c:496 #: tools/gst-launch.c:379
#, c-format #, c-format
msgid "ERROR: pipeline could not be constructed: %s.\n" msgid "ERROR: pipeline could not be constructed: %s.\n"
msgstr "ERROR: no s'ha pogut construir el conducte: %s.\n" msgstr "ERROR: no s'ha pogut construir el conducte: %s.\n"
#: tools/gst-launch.c:500 #: tools/gst-launch.c:383
#, c-format
msgid "ERROR: pipeline could not be constructed.\n" msgid "ERROR: pipeline could not be constructed.\n"
msgstr "ERROR: no s'ha pogut construir el conducte.\n" msgstr "ERROR: no s'ha pogut construir el conducte.\n"
#: tools/gst-launch.c:504 #: tools/gst-launch.c:387
#, c-format #, c-format
msgid "WARNING: erroneous pipeline: %s\n" msgid "WARNING: erroneous pipeline: %s\n"
msgstr "AVÍS: el conducte és erroni: %s\n" msgstr "AVÍS: el conducte és erroni: %s\n"
#: tools/gst-launch.c:505 #: tools/gst-launch.c:388
#, c-format
msgid " Trying to run anyway.\n" msgid " Trying to run anyway.\n"
msgstr " S'està intentant executar tot i així.\n" msgstr " S'està intentant executar tot i així.\n"
#: tools/gst-launch.c:532 #: tools/gst-launch.c:408
#, c-format
msgid "ERROR: the 'pipeline' element wasn't found.\n" msgid "ERROR: the 'pipeline' element wasn't found.\n"
msgstr "ERROR: l'element «conducte» no s'ha trobat.\n" msgstr "ERROR: l'element «conducte» no s'ha trobat.\n"
#: tools/gst-launch.c:539 #: tools/gst-launch.c:417
#, c-format
msgid "RUNNING pipeline ...\n" msgid "RUNNING pipeline ...\n"
msgstr "S'ESTÀ EXECUTANT el conducte ...\n" msgstr "S'ESTÀ EXECUTANT el conducte ...\n"
#: tools/gst-launch.c:542 #: tools/gst-launch.c:421
#, c-format
msgid "ERROR: pipeline doesn't want to play.\n" msgid "ERROR: pipeline doesn't want to play.\n"
msgstr "ERROR: el conducte no vol reproduir-se.\n" msgstr "ERROR: el conducte no vol reproduir-se.\n"
#: tools/gst-launch.c:445
#, c-format
msgid "Execution ended after %.2fs (%.2fs or %.2f%% idling).\n"
msgstr ""
#: tools/gst-register.c:49 #: tools/gst-register.c:49
#, fuzzy, c-format #, fuzzy, c-format
msgid "Added plugin %s with %d feature.\n" msgid "Added plugin %s with %d feature.\n"
@ -892,6 +835,47 @@ msgid_plural "Loaded %d plugins with %d features.\n"
msgstr[0] "S'han carregat %d connectors amb %d %s.\n" msgstr[0] "S'han carregat %d connectors amb %d %s.\n"
msgstr[1] "S'han carregat %d connectors amb %d %s.\n" msgstr[1] "S'han carregat %d connectors amb %d %s.\n"
#~ msgid "Disable accelerated CPU instructions"
#~ msgstr "Inhabilita les intruccions d'UCP accelerades"
#~ msgid "There is no element present to handle the stream's mime type %s."
#~ msgstr ""
#~ "No hi ha cap element present per a gestionar el tipus mime %s del flux."
#~ msgid ""
#~ "Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
#~ "max %s ns).\n"
#~ msgstr ""
#~ "L'execució ha finalitzat després de %s iteracions (suma %s ns, mitja %s "
#~ "ns, mín %s, màx %s).\n"
#~ msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
#~ msgstr ""
#~ "Forma d'ús: gst-xmllaunch <file.xml> [ element.propietat=valor ... ]\n"
#~ msgid "ERROR: parse of xml file '%s' failed.\n"
#~ msgstr "ERROR: l'anàlisi del fitxer xml «%s» ha fallat.\n"
#~ msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
#~ msgstr ""
#~ "ERROR: no hi ha cap conducte de nivell superior en el fitxer «%s».\n"
#~ msgid "WARNING: only one toplevel element is supported at this time."
#~ msgstr "AVÍS: només es gestiona un element de primer nivell ara mateix."
#~ msgid "ERROR: could not parse command line argument %d: %s.\n"
#~ msgstr ""
#~ "ERROR: no s'ha pogut analitzar l'argument de la línia d'ordres %d: %s.\n"
#~ msgid "WARNING: element named '%s' not found.\n"
#~ msgstr "AVÍS: no s'ha trobat l'element anomenat «%s».\n"
#~ msgid "Save xml representation of pipeline to FILE and exit"
#~ msgstr "Desa la representació xml del conducte a FITXER i surt"
#~ msgid "FILE"
#~ msgstr "FITXER"
#~ msgid "caps" #~ msgid "caps"
#~ msgstr "capacitats" #~ msgstr "capacitats"

198
po/cs.po
View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gstreamer 0.8.8\n" "Project-Id-Version: gstreamer 0.8.8\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-05-02 19:36+0200\n" "POT-Creation-Date: 2005-05-17 18:37+0200\n"
"PO-Revision-Date: 2005-04-15 14:36+0200\n" "PO-Revision-Date: 2005-04-15 14:36+0200\n"
"Last-Translator: Miloslav Trmac <mitr@volny.cz>\n" "Last-Translator: Miloslav Trmac <mitr@volny.cz>\n"
"Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n" "Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n"
@ -18,29 +18,29 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: gst/gst.c:160 #: gst/gst.c:157
msgid "Print the GStreamer version" msgid "Print the GStreamer version"
msgstr "Vypsat verzi GStreamer" msgstr "Vypsat verzi GStreamer"
#: gst/gst.c:162 #: gst/gst.c:159
msgid "Make all warnings fatal" msgid "Make all warnings fatal"
msgstr "Chápat všechna varování jako fatální" msgstr "Chápat všechna varování jako fatální"
#: gst/gst.c:166 #: gst/gst.c:163
msgid "Print available debug categories and exit" msgid "Print available debug categories and exit"
msgstr "Vypsat dostupné kategorie ladění a skončit" msgstr "Vypsat dostupné kategorie ladění a skončit"
#: gst/gst.c:169 #: gst/gst.c:166
msgid "" msgid ""
"Default debug level from 1 (only error) to 5 (anything) or 0 for no output" "Default debug level from 1 (only error) to 5 (anything) or 0 for no output"
msgstr "" msgstr ""
"Implicitní úroveň ladění od 1 (jen chyby) do 5 (vše) nebo 0 pro žádný výstup" "Implicitní úroveň ladění od 1 (jen chyby) do 5 (vše) nebo 0 pro žádný výstup"
#: gst/gst.c:171 #: gst/gst.c:168
msgid "LEVEL" msgid "LEVEL"
msgstr "ÚROVEŇ" msgstr "ÚROVEŇ"
#: gst/gst.c:173 #: gst/gst.c:170
msgid "" msgid ""
"Comma-separated list of category_name:level pairs to set specific levels for " "Comma-separated list of category_name:level pairs to set specific levels for "
"the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
@ -49,31 +49,27 @@ msgstr ""
"konkrétních úrovní pro jednotlivé kategorie. Příklad: GST_AUTOPLUG:5," "konkrétních úrovní pro jednotlivé kategorie. Příklad: GST_AUTOPLUG:5,"
"GST_ELEMENT_*:3" "GST_ELEMENT_*:3"
#: gst/gst.c:176 #: gst/gst.c:173
msgid "LIST" msgid "LIST"
msgstr "SEZNAM" msgstr "SEZNAM"
#: gst/gst.c:178 #: gst/gst.c:175
msgid "Disable colored debugging output" msgid "Disable colored debugging output"
msgstr "Zakázat obarvený ladicí výstup" msgstr "Zakázat obarvený ladicí výstup"
#: gst/gst.c:180 #: gst/gst.c:177
msgid "Disable debugging" msgid "Disable debugging"
msgstr "Zakázat ladění" msgstr "Zakázat ladění"
#: gst/gst.c:184 #: gst/gst.c:181
msgid "Disable accelerated CPU instructions"
msgstr "Zakázat akcelerované instrukce CPU"
#: gst/gst.c:186
msgid "Enable verbose plugin loading diagnostics" msgid "Enable verbose plugin loading diagnostics"
msgstr "Povolit podrobnou diagnostiku načítání modulů" msgstr "Povolit podrobnou diagnostiku načítání modulů"
#: gst/gst.c:188 #: gst/gst.c:183
msgid "PATHS" msgid "PATHS"
msgstr "CESTY" msgstr "CESTY"
#: gst/gst.c:191 #: gst/gst.c:186
#, fuzzy #, fuzzy
msgid "" msgid ""
"Comma-separated list of plugins to preload in addition to the list stored in " "Comma-separated list of plugins to preload in addition to the list stored in "
@ -82,32 +78,32 @@ msgstr ""
"Čárkami oddělený seznam modulů, které přednačíst kromě seznamu uloženém v " "Čárkami oddělený seznam modulů, které přednačíst kromě seznamu uloženém v "
"proměnné prostředí GST_PLUGIN_PATH" "proměnné prostředí GST_PLUGIN_PATH"
#: gst/gst.c:193 #: gst/gst.c:188
msgid "PLUGINS" msgid "PLUGINS"
msgstr "MODULY" msgstr "MODULY"
#: gst/gst.c:196 #: gst/gst.c:191
msgid "Disable trapping of segmentation faults during plugin loading" msgid "Disable trapping of segmentation faults during plugin loading"
msgstr "Zakázat zachycování porušení segmentace při načítání modulů" msgstr "Zakázat zachycování porušení segmentace při načítání modulů"
#: gst/gst.c:199 #: gst/gst.c:194
msgid "SCHEDULER" msgid "SCHEDULER"
msgstr "PLÁNOVAČ" msgstr "PLÁNOVAČ"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "Registry to use" msgid "Registry to use"
msgstr "Registr, který používat" msgstr "Registr, který používat"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "REGISTRY" msgid "REGISTRY"
msgstr "REGISTR" msgstr "REGISTR"
#: gst/gst.c:214 #: gst/gst.c:209
#, c-format #, c-format
msgid "path list for loading plugins (separated by '%s')" msgid "path list for loading plugins (separated by '%s')"
msgstr "seznam cest pro načítání modulů (oddělený '%s')" msgstr "seznam cest pro načítání modulů (oddělený '%s')"
#: gst/gst.c:218 #: gst/gst.c:213
#, c-format #, c-format
msgid "Scheduler to use (default is '%s')" msgid "Scheduler to use (default is '%s')"
msgstr "Plánovač, který používat (implicitní je '%s')" msgstr "Plánovač, který používat (implicitní je '%s')"
@ -581,51 +577,46 @@ msgstr ""
msgid ", " msgid ", "
msgstr ", " msgstr ", "
#: gst/autoplug/gstspider.c:466 #: gst/elements/gstfilesink.c:243
#, c-format
msgid "There is no element present to handle the stream's mime type %s."
msgstr "Není přítomen žádý element pro obsloužení proudu s typem mime %s."
#: gst/elements/gstfilesink.c:268
msgid "No file name specified for writing." msgid "No file name specified for writing."
msgstr "Nezadán název souboru pro zápis." msgstr "Nezadán název souboru pro zápis."
#: gst/elements/gstfilesink.c:275 #: gst/elements/gstfilesink.c:250
#, c-format #, c-format
msgid "Could not open file \"%s\" for writing." msgid "Could not open file \"%s\" for writing."
msgstr "Nemohu otevřít soubor \"%s\" pro zápis." msgstr "Nemohu otevřít soubor \"%s\" pro zápis."
#: gst/elements/gstfilesink.c:294 #: gst/elements/gstfilesink.c:269
#, c-format #, c-format
msgid "Error closing file \"%s\"." msgid "Error closing file \"%s\"."
msgstr "Chyba při zavírání souboru \"%s\"." msgstr "Chyba při zavírání souboru \"%s\"."
#: gst/elements/gstfilesink.c:364 gst/elements/gstfilesink.c:400 #: gst/elements/gstfilesink.c:339 gst/elements/gstfilesink.c:375
#: gst/elements/gstfilesink.c:453 #: gst/elements/gstfilesink.c:428
#, c-format #, c-format
msgid "Error while writing to file \"%s\"." msgid "Error while writing to file \"%s\"."
msgstr "Chyba při zápisu do souboru \"%s\"." msgstr "Chyba při zápisu do souboru \"%s\"."
#: gst/elements/gstfilesrc.c:764 gst/elements/gstmultifilesrc.c:298 #: gst/elements/gstfilesrc.c:725
msgid "No file name specified for reading." msgid "No file name specified for reading."
msgstr "Nezadán název souboru pro čtení." msgstr "Nezadán název souboru pro čtení."
#: gst/elements/gstfilesrc.c:779 gst/elements/gstmultifilesrc.c:306 #: gst/elements/gstfilesrc.c:740
#, c-format #, c-format
msgid "Could not open file \"%s\" for reading." msgid "Could not open file \"%s\" for reading."
msgstr "Nemohu otevřít soubor \"%s\" pro čtení." msgstr "Nemohu otevřít soubor \"%s\" pro čtení."
#: gst/elements/gstfilesrc.c:790 #: gst/elements/gstfilesrc.c:751
#, c-format #, c-format
msgid "\"%s\" is a directory." msgid "\"%s\" is a directory."
msgstr "\"%s\" je adresář." msgstr "\"%s\" je adresář."
#: gst/elements/gstfilesrc.c:796 #: gst/elements/gstfilesrc.c:757
#, c-format #, c-format
msgid "File \"%s\" is a socket." msgid "File \"%s\" is a socket."
msgstr "Soubor \"%s\" je socket." msgstr "Soubor \"%s\" je socket."
#: gst/elements/gstidentity.c:306 #: gst/elements/gstidentity.c:276
msgid "Failed after iterations as requested." msgid "Failed after iterations as requested."
msgstr "Selhání po iteracích podle požadavku." msgstr "Selhání po iteracích podle požadavku."
@ -714,127 +705,79 @@ msgstr "nemohu připojit element spotřebiče pro URI \"%s\""
msgid "empty pipeline not allowed" msgid "empty pipeline not allowed"
msgstr "prázdná roura není povolena" msgstr "prázdná roura není povolena"
#: tools/gst-inspect.c:1151 #: tools/gst-inspect.c:1032
msgid "Print all elements" msgid "Print all elements"
msgstr "Vypsat všechny elementy" msgstr "Vypsat všechny elementy"
#: tools/gst-launch.c:114 #: tools/gst-launch.c:190
#, c-format
msgid ""
"Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
"max %s ns).\n"
msgstr ""
"Provádění skončilo po %s iteracích (celkem %s ns, průměr %s ns, min %s ns, "
"max %s ns).\n"
#: tools/gst-launch.c:141
msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
msgstr ""
"Použití: gst-xmllaunch <soubor.xml> [ element.vlastnost=hodnota ... ]\n"
#: tools/gst-launch.c:149
#, c-format
msgid "ERROR: parse of xml file '%s' failed.\n"
msgstr "CHYBA: zpracovávání xml souboru '%s' selhalo.\n"
#: tools/gst-launch.c:155
#, c-format
msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
msgstr "CHYBA: v souboru '%s' není element nejvyšší úrovně pipeline.\n"
#: tools/gst-launch.c:162
#, c-format
msgid "WARNING: only one toplevel element is supported at this time."
msgstr ""
"VAROVÁNÍ: v současné době je podporován jen jeden element nejvyšší úrovně."
#: tools/gst-launch.c:173
#, c-format
msgid "ERROR: could not parse command line argument %d: %s.\n"
msgstr "CHYBA: nemohu zpracovat argument %d na příkazovém řádku: %s.\n"
#: tools/gst-launch.c:184
#, c-format
msgid "WARNING: element named '%s' not found.\n"
msgstr "VAROVÁNÍ: element nazvaný '%s' nenalezen.\n"
#: tools/gst-launch.c:327
#, c-format #, c-format
msgid "FOUND TAG : found by element \"%s\".\n" msgid "FOUND TAG : found by element \"%s\".\n"
msgstr "NALEZEN TAG : nalezen elementem \"%s\".\n" msgstr "NALEZEN TAG : nalezen elementem \"%s\".\n"
#: tools/gst-launch.c:412 #: tools/gst-launch.c:304
msgid "Output tags (also known as metadata)" msgid "Output tags (also known as metadata)"
msgstr "Vypsat tagy (také známé jako metadata)" msgstr "Vypsat tagy (také známé jako metadata)"
#: tools/gst-launch.c:414 #: tools/gst-launch.c:306
msgid "Output status information and property notifications" msgid "Output status information and property notifications"
msgstr "Vypsat informace o stavu a upozornění na vlastnosti" msgstr "Vypsat informace o stavu a upozornění na vlastnosti"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "Do not output status information of TYPE" msgid "Do not output status information of TYPE"
msgstr "Nevypisovat informace o stavu s TYPEM" msgstr "Nevypisovat informace o stavu s TYPEM"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "TYPE1,TYPE2,..." msgid "TYPE1,TYPE2,..."
msgstr "TYP1,TYP2,..." msgstr "TYP1,TYP2,..."
#: tools/gst-launch.c:419 #: tools/gst-launch.c:310
msgid "Save xml representation of pipeline to FILE and exit"
msgstr "Uložit reprezentaci roury v xml do SOUBORu a skončit"
#: tools/gst-launch.c:419
msgid "FILE"
msgstr "SOUBOR"
#: tools/gst-launch.c:422
msgid "Do not install a fault handler" msgid "Do not install a fault handler"
msgstr "Neinstalovat obsluhu výjimek" msgstr "Neinstalovat obsluhu výjimek"
#: tools/gst-launch.c:424 #: tools/gst-launch.c:312
msgid "Print alloc trace (if enabled at compile time)" msgid "Print alloc trace (if enabled at compile time)"
msgstr "Vypisovat stopu alokace (je-li povoleno při kompilaci)" msgstr "Vypisovat stopu alokace (je-li povoleno při kompilaci)"
#: tools/gst-launch.c:426 #: tools/gst-launch.c:314
msgid "Number of times to iterate pipeline" msgid "Number of times to iterate pipeline"
msgstr "Kolikrát iterovat rouru" msgstr "Kolikrát iterovat rouru"
#: tools/gst-launch.c:496 #: tools/gst-launch.c:379
#, c-format #, c-format
msgid "ERROR: pipeline could not be constructed: %s.\n" msgid "ERROR: pipeline could not be constructed: %s.\n"
msgstr "CHYBA: nelze vytvořit rouru: %s.\n" msgstr "CHYBA: nelze vytvořit rouru: %s.\n"
#: tools/gst-launch.c:500 #: tools/gst-launch.c:383
#, c-format
msgid "ERROR: pipeline could not be constructed.\n" msgid "ERROR: pipeline could not be constructed.\n"
msgstr "CHYBA: nelze vytvořit rouru.\n" msgstr "CHYBA: nelze vytvořit rouru.\n"
#: tools/gst-launch.c:504 #: tools/gst-launch.c:387
#, c-format #, c-format
msgid "WARNING: erroneous pipeline: %s\n" msgid "WARNING: erroneous pipeline: %s\n"
msgstr "VAROVÁNÍ: chybná roura: %s\n" msgstr "VAROVÁNÍ: chybná roura: %s\n"
#: tools/gst-launch.c:505 #: tools/gst-launch.c:388
#, c-format
msgid " Trying to run anyway.\n" msgid " Trying to run anyway.\n"
msgstr " Přesto se ji pokouším spustit.\n" msgstr " Přesto se ji pokouším spustit.\n"
#: tools/gst-launch.c:532 #: tools/gst-launch.c:408
#, c-format
msgid "ERROR: the 'pipeline' element wasn't found.\n" msgid "ERROR: the 'pipeline' element wasn't found.\n"
msgstr "CHYBA: element 'pipeline' nebyl nalezen.\n" msgstr "CHYBA: element 'pipeline' nebyl nalezen.\n"
#: tools/gst-launch.c:539 #: tools/gst-launch.c:417
#, c-format
msgid "RUNNING pipeline ...\n" msgid "RUNNING pipeline ...\n"
msgstr "SPOUŠTÍM rouru ...\n" msgstr "SPOUŠTÍM rouru ...\n"
# On strike? # On strike?
#: tools/gst-launch.c:542 #: tools/gst-launch.c:421
#, c-format
msgid "ERROR: pipeline doesn't want to play.\n" msgid "ERROR: pipeline doesn't want to play.\n"
msgstr "CHYBA: roura nechce hrát.\n" msgstr "CHYBA: roura nechce hrát.\n"
#: tools/gst-launch.c:445
#, c-format
msgid "Execution ended after %.2fs (%.2fs or %.2f%% idling).\n"
msgstr ""
#: tools/gst-register.c:49 #: tools/gst-register.c:49
#, fuzzy, c-format #, fuzzy, c-format
msgid "Added plugin %s with %d feature.\n" msgid "Added plugin %s with %d feature.\n"
@ -871,6 +814,45 @@ msgstr[0] "Načteno %d modulů s %d %s.\n"
msgstr[1] "Načteno %d modulů s %d %s.\n" msgstr[1] "Načteno %d modulů s %d %s.\n"
msgstr[2] "Načteno %d modulů s %d %s.\n" msgstr[2] "Načteno %d modulů s %d %s.\n"
#~ msgid "Disable accelerated CPU instructions"
#~ msgstr "Zakázat akcelerované instrukce CPU"
#~ msgid "There is no element present to handle the stream's mime type %s."
#~ msgstr "Není přítomen žádý element pro obsloužení proudu s typem mime %s."
#~ msgid ""
#~ "Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
#~ "max %s ns).\n"
#~ msgstr ""
#~ "Provádění skončilo po %s iteracích (celkem %s ns, průměr %s ns, min %s "
#~ "ns, max %s ns).\n"
#~ msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
#~ msgstr ""
#~ "Použití: gst-xmllaunch <soubor.xml> [ element.vlastnost=hodnota ... ]\n"
#~ msgid "ERROR: parse of xml file '%s' failed.\n"
#~ msgstr "CHYBA: zpracovávání xml souboru '%s' selhalo.\n"
#~ msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
#~ msgstr "CHYBA: v souboru '%s' není element nejvyšší úrovně pipeline.\n"
#~ msgid "WARNING: only one toplevel element is supported at this time."
#~ msgstr ""
#~ "VAROVÁNÍ: v současné době je podporován jen jeden element nejvyšší úrovně."
#~ msgid "ERROR: could not parse command line argument %d: %s.\n"
#~ msgstr "CHYBA: nemohu zpracovat argument %d na příkazovém řádku: %s.\n"
#~ msgid "WARNING: element named '%s' not found.\n"
#~ msgstr "VAROVÁNÍ: element nazvaný '%s' nenalezen.\n"
#~ msgid "Save xml representation of pipeline to FILE and exit"
#~ msgstr "Uložit reprezentaci roury v xml do SOUBORu a skončit"
#~ msgid "FILE"
#~ msgstr "SOUBOR"
#~ msgid "caps" #~ msgid "caps"
#~ msgstr "schopnosti" #~ msgstr "schopnosti"

189
po/de.po
View file

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gstreamer 0.8.1\n" "Project-Id-Version: gstreamer 0.8.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-05-02 19:36+0200\n" "POT-Creation-Date: 2005-05-17 18:37+0200\n"
"PO-Revision-Date: 2004-06-05 09:32+0100\n" "PO-Revision-Date: 2004-06-05 09:32+0100\n"
"Last-Translator: Roland Illig <roland.illig@gmx.de>\n" "Last-Translator: Roland Illig <roland.illig@gmx.de>\n"
"Language-Team: German <de@li.org>\n" "Language-Team: German <de@li.org>\n"
@ -15,30 +15,30 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n" "Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: gst/gst.c:160 #: gst/gst.c:157
msgid "Print the GStreamer version" msgid "Print the GStreamer version"
msgstr "Die Version von GStreamer ausgeben" msgstr "Die Version von GStreamer ausgeben"
#: gst/gst.c:162 #: gst/gst.c:159
msgid "Make all warnings fatal" msgid "Make all warnings fatal"
msgstr "Alle Warnungen wie Fehler behandeln" msgstr "Alle Warnungen wie Fehler behandeln"
#: gst/gst.c:166 #: gst/gst.c:163
msgid "Print available debug categories and exit" msgid "Print available debug categories and exit"
msgstr "Verfügbare Debuggingkategorien ausgeben und Programm beenden" msgstr "Verfügbare Debuggingkategorien ausgeben und Programm beenden"
#: gst/gst.c:169 #: gst/gst.c:166
msgid "" msgid ""
"Default debug level from 1 (only error) to 5 (anything) or 0 for no output" "Default debug level from 1 (only error) to 5 (anything) or 0 for no output"
msgstr "" msgstr ""
"Standarddebugginglevel von 1 (nur Fehler) bis 5 (Alles) oder 0 für keine " "Standarddebugginglevel von 1 (nur Fehler) bis 5 (Alles) oder 0 für keine "
"Ausgabe" "Ausgabe"
#: gst/gst.c:171 #: gst/gst.c:168
msgid "LEVEL" msgid "LEVEL"
msgstr "LEVEL" msgstr "LEVEL"
#: gst/gst.c:173 #: gst/gst.c:170
msgid "" msgid ""
"Comma-separated list of category_name:level pairs to set specific levels for " "Comma-separated list of category_name:level pairs to set specific levels for "
"the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
@ -47,31 +47,27 @@ msgstr ""
"Meldungsarten individuelle Level zuzuordnen. Beispiel: GST_AUTOPLUG:5," "Meldungsarten individuelle Level zuzuordnen. Beispiel: GST_AUTOPLUG:5,"
"GST_ELEMENT_*:3" "GST_ELEMENT_*:3"
#: gst/gst.c:176 #: gst/gst.c:173
msgid "LIST" msgid "LIST"
msgstr "LIST" msgstr "LIST"
#: gst/gst.c:178 #: gst/gst.c:175
msgid "Disable colored debugging output" msgid "Disable colored debugging output"
msgstr "Farbige Debuggingausgabe deaktivieren" msgstr "Farbige Debuggingausgabe deaktivieren"
#: gst/gst.c:180 #: gst/gst.c:177
msgid "Disable debugging" msgid "Disable debugging"
msgstr "Debugging deaktivieren" msgstr "Debugging deaktivieren"
#: gst/gst.c:184 #: gst/gst.c:181
msgid "Disable accelerated CPU instructions"
msgstr "Beschleunigte CPU-Befehle deaktivieren"
#: gst/gst.c:186
msgid "Enable verbose plugin loading diagnostics" msgid "Enable verbose plugin loading diagnostics"
msgstr "Gesprächige Meldungen beim Laden von Plugins aktivieren" msgstr "Gesprächige Meldungen beim Laden von Plugins aktivieren"
#: gst/gst.c:188 #: gst/gst.c:183
msgid "PATHS" msgid "PATHS"
msgstr "PATHS" msgstr "PATHS"
#: gst/gst.c:191 #: gst/gst.c:186
#, fuzzy #, fuzzy
msgid "" msgid ""
"Comma-separated list of plugins to preload in addition to the list stored in " "Comma-separated list of plugins to preload in addition to the list stored in "
@ -80,32 +76,32 @@ msgstr ""
"Kommagetrennte Liste von Plugins, die zusätzliche zu den Plugins in der " "Kommagetrennte Liste von Plugins, die zusätzliche zu den Plugins in der "
"Umgebungsvariable GST_PLUGIN_PATH geladen werden" "Umgebungsvariable GST_PLUGIN_PATH geladen werden"
#: gst/gst.c:193 #: gst/gst.c:188
msgid "PLUGINS" msgid "PLUGINS"
msgstr "PLUGINS" msgstr "PLUGINS"
#: gst/gst.c:196 #: gst/gst.c:191
msgid "Disable trapping of segmentation faults during plugin loading" msgid "Disable trapping of segmentation faults during plugin loading"
msgstr "Verfolgen von Speicherfehlern beim Laden von Plugins deaktivieren" msgstr "Verfolgen von Speicherfehlern beim Laden von Plugins deaktivieren"
#: gst/gst.c:199 #: gst/gst.c:194
msgid "SCHEDULER" msgid "SCHEDULER"
msgstr "SCHEDULER" msgstr "SCHEDULER"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "Registry to use" msgid "Registry to use"
msgstr "Zu benutzende Registry" msgstr "Zu benutzende Registry"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "REGISTRY" msgid "REGISTRY"
msgstr "REGISTRY" msgstr "REGISTRY"
#: gst/gst.c:214 #: gst/gst.c:209
#, c-format #, c-format
msgid "path list for loading plugins (separated by '%s')" msgid "path list for loading plugins (separated by '%s')"
msgstr "Pfadliste zum Laden von Plugins (Durch »%s« getrennt)" msgstr "Pfadliste zum Laden von Plugins (Durch »%s« getrennt)"
#: gst/gst.c:218 #: gst/gst.c:213
#, c-format #, c-format
msgid "Scheduler to use (default is '%s')" msgid "Scheduler to use (default is '%s')"
msgstr "Zu benutzender Scheduler (Standard: »%s«)" msgstr "Zu benutzender Scheduler (Standard: »%s«)"
@ -615,53 +611,46 @@ msgstr ""
msgid ", " msgid ", "
msgstr ", " msgstr ", "
#: gst/autoplug/gstspider.c:466 #: gst/elements/gstfilesink.c:243
#, c-format
msgid "There is no element present to handle the stream's mime type %s."
msgstr ""
"Es gibt kein Element, das den MIME-Typ »%s« dieses Datenstroms verarbeiten "
"kann."
#: gst/elements/gstfilesink.c:268
msgid "No file name specified for writing." msgid "No file name specified for writing."
msgstr "Kein Dateiname zum Schreiben angegeben." msgstr "Kein Dateiname zum Schreiben angegeben."
#: gst/elements/gstfilesink.c:275 #: gst/elements/gstfilesink.c:250
#, c-format #, c-format
msgid "Could not open file \"%s\" for writing." msgid "Could not open file \"%s\" for writing."
msgstr "Konnte Datei »%s« nicht zum Schreiben öffnen." msgstr "Konnte Datei »%s« nicht zum Schreiben öffnen."
#: gst/elements/gstfilesink.c:294 #: gst/elements/gstfilesink.c:269
#, c-format #, c-format
msgid "Error closing file \"%s\"." msgid "Error closing file \"%s\"."
msgstr "Fehler beim Schließen der Datei »%s«." msgstr "Fehler beim Schließen der Datei »%s«."
#: gst/elements/gstfilesink.c:364 gst/elements/gstfilesink.c:400 #: gst/elements/gstfilesink.c:339 gst/elements/gstfilesink.c:375
#: gst/elements/gstfilesink.c:453 #: gst/elements/gstfilesink.c:428
#, c-format #, c-format
msgid "Error while writing to file \"%s\"." msgid "Error while writing to file \"%s\"."
msgstr "Fehler beim Schreiben der Daten »%s«." msgstr "Fehler beim Schreiben der Daten »%s«."
#: gst/elements/gstfilesrc.c:764 gst/elements/gstmultifilesrc.c:298 #: gst/elements/gstfilesrc.c:725
msgid "No file name specified for reading." msgid "No file name specified for reading."
msgstr "Kein Dateiname zum Lesen angegeben." msgstr "Kein Dateiname zum Lesen angegeben."
#: gst/elements/gstfilesrc.c:779 gst/elements/gstmultifilesrc.c:306 #: gst/elements/gstfilesrc.c:740
#, c-format #, c-format
msgid "Could not open file \"%s\" for reading." msgid "Could not open file \"%s\" for reading."
msgstr "Konnte die Datei »%s« nicht zum Lesen öffnen." msgstr "Konnte die Datei »%s« nicht zum Lesen öffnen."
#: gst/elements/gstfilesrc.c:790 #: gst/elements/gstfilesrc.c:751
#, c-format #, c-format
msgid "\"%s\" is a directory." msgid "\"%s\" is a directory."
msgstr "" msgstr ""
#: gst/elements/gstfilesrc.c:796 #: gst/elements/gstfilesrc.c:757
#, fuzzy, c-format #, fuzzy, c-format
msgid "File \"%s\" is a socket." msgid "File \"%s\" is a socket."
msgstr "Die Datei »%s« ist keine normale Datei." msgstr "Die Datei »%s« ist keine normale Datei."
#: gst/elements/gstidentity.c:306 #: gst/elements/gstidentity.c:276
msgid "Failed after iterations as requested." msgid "Failed after iterations as requested."
msgstr "Nach dem Durchlaufen fehlgeschlagen. Wie gewünscht." msgstr "Nach dem Durchlaufen fehlgeschlagen. Wie gewünscht."
@ -750,124 +739,80 @@ msgstr "Konnte Zielelement für URI »%s« nicht verbinden"
msgid "empty pipeline not allowed" msgid "empty pipeline not allowed"
msgstr "Leere Leitung ist nicht erlaubt" msgstr "Leere Leitung ist nicht erlaubt"
#: tools/gst-inspect.c:1151 #: tools/gst-inspect.c:1032
#, fuzzy #, fuzzy
msgid "Print all elements" msgid "Print all elements"
msgstr "Kein Element »%s«" msgstr "Kein Element »%s«"
#: tools/gst-launch.c:114 #: tools/gst-launch.c:190
#, c-format
msgid ""
"Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
"max %s ns).\n"
msgstr ""
#: tools/gst-launch.c:141
msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
msgstr "Aufruf: gst-xmllaunch <file.xml> [ element.eigenschaft=wert ...]\n"
#: tools/gst-launch.c:149
#, c-format
msgid "ERROR: parse of xml file '%s' failed.\n"
msgstr "FEHLER: Parsen der XML-Datei »%s« fehlgeschlagen.\n"
#: tools/gst-launch.c:155
#, c-format
msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
msgstr "FEHLER: Kein Hauptleitungselement in Datei »%s«.\n"
#: tools/gst-launch.c:162
#, c-format
msgid "WARNING: only one toplevel element is supported at this time."
msgstr "WARNUNG: Zur Zeit wird nur ein Hauptleitungselement unterstützt."
#: tools/gst-launch.c:173
#, c-format
msgid "ERROR: could not parse command line argument %d: %s.\n"
msgstr "FEHLER: Konnte das Kommandozeilenargument %d nicht parsen: %s.\n"
#: tools/gst-launch.c:184
#, c-format
msgid "WARNING: element named '%s' not found.\n"
msgstr "WARNUNG: Element namens »%s« nicht gefunden.\n"
#: tools/gst-launch.c:327
#, c-format #, c-format
msgid "FOUND TAG : found by element \"%s\".\n" msgid "FOUND TAG : found by element \"%s\".\n"
msgstr "KENNZEICHEN GEFUNDEN: Von Element »%s« gefunden.\n" msgstr "KENNZEICHEN GEFUNDEN: Von Element »%s« gefunden.\n"
#: tools/gst-launch.c:412 #: tools/gst-launch.c:304
msgid "Output tags (also known as metadata)" msgid "Output tags (also known as metadata)"
msgstr "Kennzeichen (auch bekannt als Metadaten) ausgeben" msgstr "Kennzeichen (auch bekannt als Metadaten) ausgeben"
#: tools/gst-launch.c:414 #: tools/gst-launch.c:306
msgid "Output status information and property notifications" msgid "Output status information and property notifications"
msgstr "Zustandsinformation und Eigenschaftsmitteilungen ausgeben" msgstr "Zustandsinformation und Eigenschaftsmitteilungen ausgeben"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "Do not output status information of TYPE" msgid "Do not output status information of TYPE"
msgstr "Zustandsinformation der Art ART nicht ausgeben" msgstr "Zustandsinformation der Art ART nicht ausgeben"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "TYPE1,TYPE2,..." msgid "TYPE1,TYPE2,..."
msgstr "ART1,ART2,..." msgstr "ART1,ART2,..."
#: tools/gst-launch.c:419 #: tools/gst-launch.c:310
msgid "Save xml representation of pipeline to FILE and exit"
msgstr "XML-Repräsentation der Pipeline in DATEI speichern und beenden"
#: tools/gst-launch.c:419
msgid "FILE"
msgstr "DATEI"
#: tools/gst-launch.c:422
msgid "Do not install a fault handler" msgid "Do not install a fault handler"
msgstr "Keine Routine zum Abfangen von Fehlern installieren" msgstr "Keine Routine zum Abfangen von Fehlern installieren"
#: tools/gst-launch.c:424 #: tools/gst-launch.c:312
msgid "Print alloc trace (if enabled at compile time)" msgid "Print alloc trace (if enabled at compile time)"
msgstr "" msgstr ""
"Speicherzuordnungsverfolgung ausgeben (falls zur Compilierzeit aktiviert)" "Speicherzuordnungsverfolgung ausgeben (falls zur Compilierzeit aktiviert)"
#: tools/gst-launch.c:426 #: tools/gst-launch.c:314
msgid "Number of times to iterate pipeline" msgid "Number of times to iterate pipeline"
msgstr "Anzahl, wie oft die Leitung durchlaufen wird" msgstr "Anzahl, wie oft die Leitung durchlaufen wird"
#: tools/gst-launch.c:496 #: tools/gst-launch.c:379
#, c-format #, c-format
msgid "ERROR: pipeline could not be constructed: %s.\n" msgid "ERROR: pipeline could not be constructed: %s.\n"
msgstr "FEHLER: Leitung konnte nicht konstruiert werden: %s.\n" msgstr "FEHLER: Leitung konnte nicht konstruiert werden: %s.\n"
#: tools/gst-launch.c:500 #: tools/gst-launch.c:383
#, c-format
msgid "ERROR: pipeline could not be constructed.\n" msgid "ERROR: pipeline could not be constructed.\n"
msgstr "FEHLER: Leitung konnte nicht konstruiert werden.\n" msgstr "FEHLER: Leitung konnte nicht konstruiert werden.\n"
#: tools/gst-launch.c:504 #: tools/gst-launch.c:387
#, c-format #, c-format
msgid "WARNING: erroneous pipeline: %s\n" msgid "WARNING: erroneous pipeline: %s\n"
msgstr "WARNUNG: Fehlerhafte Leitung: %s\n" msgstr "WARNUNG: Fehlerhafte Leitung: %s\n"
#: tools/gst-launch.c:505 #: tools/gst-launch.c:388
#, c-format
msgid " Trying to run anyway.\n" msgid " Trying to run anyway.\n"
msgstr " Versuche trotzdem zu laufen.\n" msgstr " Versuche trotzdem zu laufen.\n"
#: tools/gst-launch.c:532 #: tools/gst-launch.c:408
#, c-format
msgid "ERROR: the 'pipeline' element wasn't found.\n" msgid "ERROR: the 'pipeline' element wasn't found.\n"
msgstr "FEHLER: Das »pipeline«-Element wurde nicht gefunden.\n" msgstr "FEHLER: Das »pipeline«-Element wurde nicht gefunden.\n"
#: tools/gst-launch.c:539 #: tools/gst-launch.c:417
#, c-format
msgid "RUNNING pipeline ...\n" msgid "RUNNING pipeline ...\n"
msgstr "FÜHRE Leitung AUS ...\n" msgstr "FÜHRE Leitung AUS ...\n"
#: tools/gst-launch.c:542 #: tools/gst-launch.c:421
#, c-format
msgid "ERROR: pipeline doesn't want to play.\n" msgid "ERROR: pipeline doesn't want to play.\n"
msgstr "FEHLER: Leitung möchte nicht abgespielt werden.\n" msgstr "FEHLER: Leitung möchte nicht abgespielt werden.\n"
#: tools/gst-launch.c:445
#, c-format
msgid "Execution ended after %.2fs (%.2fs or %.2f%% idling).\n"
msgstr ""
#: tools/gst-register.c:49 #: tools/gst-register.c:49
#, c-format #, c-format
msgid "Added plugin %s with %d feature.\n" msgid "Added plugin %s with %d feature.\n"
@ -902,6 +847,38 @@ msgid_plural "Loaded %d plugins with %d features.\n"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#~ msgid "Disable accelerated CPU instructions"
#~ msgstr "Beschleunigte CPU-Befehle deaktivieren"
#~ msgid "There is no element present to handle the stream's mime type %s."
#~ msgstr ""
#~ "Es gibt kein Element, das den MIME-Typ »%s« dieses Datenstroms "
#~ "verarbeiten kann."
#~ msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
#~ msgstr "Aufruf: gst-xmllaunch <file.xml> [ element.eigenschaft=wert ...]\n"
#~ msgid "ERROR: parse of xml file '%s' failed.\n"
#~ msgstr "FEHLER: Parsen der XML-Datei »%s« fehlgeschlagen.\n"
#~ msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
#~ msgstr "FEHLER: Kein Hauptleitungselement in Datei »%s«.\n"
#~ msgid "WARNING: only one toplevel element is supported at this time."
#~ msgstr "WARNUNG: Zur Zeit wird nur ein Hauptleitungselement unterstützt."
#~ msgid "ERROR: could not parse command line argument %d: %s.\n"
#~ msgstr "FEHLER: Konnte das Kommandozeilenargument %d nicht parsen: %s.\n"
#~ msgid "WARNING: element named '%s' not found.\n"
#~ msgstr "WARNUNG: Element namens »%s« nicht gefunden.\n"
#~ msgid "Save xml representation of pipeline to FILE and exit"
#~ msgstr "XML-Repräsentation der Pipeline in DATEI speichern und beenden"
#~ msgid "FILE"
#~ msgstr "DATEI"
#~ msgid "caps" #~ msgid "caps"
#~ msgstr "Fähigkeiten" #~ msgstr "Fähigkeiten"

View file

@ -6,7 +6,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gstreamer 0.8.1\n" "Project-Id-Version: gstreamer 0.8.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-05-02 19:36+0200\n" "POT-Creation-Date: 2005-05-17 18:37+0200\n"
"PO-Revision-Date: 2004-04-26 10:36-0400\n" "PO-Revision-Date: 2004-04-26 10:36-0400\n"
"Last-Translator: Gareth Owen <gowen72@yahoo.com>\n" "Last-Translator: Gareth Owen <gowen72@yahoo.com>\n"
"Language-Team: English (British) <en_gb@li.org>\n" "Language-Team: English (British) <en_gb@li.org>\n"
@ -14,29 +14,29 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: gst/gst.c:160 #: gst/gst.c:157
msgid "Print the GStreamer version" msgid "Print the GStreamer version"
msgstr "Print the GStreamer version" msgstr "Print the GStreamer version"
#: gst/gst.c:162 #: gst/gst.c:159
msgid "Make all warnings fatal" msgid "Make all warnings fatal"
msgstr "Make all warnings fatal" msgstr "Make all warnings fatal"
#: gst/gst.c:166 #: gst/gst.c:163
msgid "Print available debug categories and exit" msgid "Print available debug categories and exit"
msgstr "Print available debug categories and exit" msgstr "Print available debug categories and exit"
#: gst/gst.c:169 #: gst/gst.c:166
msgid "" msgid ""
"Default debug level from 1 (only error) to 5 (anything) or 0 for no output" "Default debug level from 1 (only error) to 5 (anything) or 0 for no output"
msgstr "" msgstr ""
"Default debug level from 1 (only error) to 5 (anything) or 0 for no output" "Default debug level from 1 (only error) to 5 (anything) or 0 for no output"
#: gst/gst.c:171 #: gst/gst.c:168
msgid "LEVEL" msgid "LEVEL"
msgstr "LEVEL" msgstr "LEVEL"
#: gst/gst.c:173 #: gst/gst.c:170
msgid "" msgid ""
"Comma-separated list of category_name:level pairs to set specific levels for " "Comma-separated list of category_name:level pairs to set specific levels for "
"the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
@ -44,31 +44,27 @@ msgstr ""
"Comma-separated list of category_name:level pairs to set specific levels for " "Comma-separated list of category_name:level pairs to set specific levels for "
"the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
#: gst/gst.c:176 #: gst/gst.c:173
msgid "LIST" msgid "LIST"
msgstr "LIST" msgstr "LIST"
#: gst/gst.c:178 #: gst/gst.c:175
msgid "Disable colored debugging output" msgid "Disable colored debugging output"
msgstr "Disable coloured debugging output" msgstr "Disable coloured debugging output"
#: gst/gst.c:180 #: gst/gst.c:177
msgid "Disable debugging" msgid "Disable debugging"
msgstr "Disable debugging" msgstr "Disable debugging"
#: gst/gst.c:184 #: gst/gst.c:181
msgid "Disable accelerated CPU instructions"
msgstr "Disable accelerated CPU instructions"
#: gst/gst.c:186
msgid "Enable verbose plugin loading diagnostics" msgid "Enable verbose plugin loading diagnostics"
msgstr "Enable verbose plugin loading diagnostics" msgstr "Enable verbose plugin loading diagnostics"
#: gst/gst.c:188 #: gst/gst.c:183
msgid "PATHS" msgid "PATHS"
msgstr "PATHS" msgstr "PATHS"
#: gst/gst.c:191 #: gst/gst.c:186
#, fuzzy #, fuzzy
msgid "" msgid ""
"Comma-separated list of plugins to preload in addition to the list stored in " "Comma-separated list of plugins to preload in addition to the list stored in "
@ -77,32 +73,32 @@ msgstr ""
"Comma-separated list of plugins to preload in addition to the list stored in " "Comma-separated list of plugins to preload in addition to the list stored in "
"environment variable GST_PLUGIN_PATH" "environment variable GST_PLUGIN_PATH"
#: gst/gst.c:193 #: gst/gst.c:188
msgid "PLUGINS" msgid "PLUGINS"
msgstr "PLUGINS" msgstr "PLUGINS"
#: gst/gst.c:196 #: gst/gst.c:191
msgid "Disable trapping of segmentation faults during plugin loading" msgid "Disable trapping of segmentation faults during plugin loading"
msgstr "Disable trapping of segmentation faults during plugin loading" msgstr "Disable trapping of segmentation faults during plugin loading"
#: gst/gst.c:199 #: gst/gst.c:194
msgid "SCHEDULER" msgid "SCHEDULER"
msgstr "SCHEDULER" msgstr "SCHEDULER"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "Registry to use" msgid "Registry to use"
msgstr "Registry to use" msgstr "Registry to use"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "REGISTRY" msgid "REGISTRY"
msgstr "REGISTRY" msgstr "REGISTRY"
#: gst/gst.c:214 #: gst/gst.c:209
#, c-format #, c-format
msgid "path list for loading plugins (separated by '%s')" msgid "path list for loading plugins (separated by '%s')"
msgstr "path list for loading plugins (separated by '%s')" msgstr "path list for loading plugins (separated by '%s')"
#: gst/gst.c:218 #: gst/gst.c:213
#, c-format #, c-format
msgid "Scheduler to use (default is '%s')" msgid "Scheduler to use (default is '%s')"
msgstr "Scheduler to use (default is '%s')" msgstr "Scheduler to use (default is '%s')"
@ -575,51 +571,46 @@ msgstr ""
msgid ", " msgid ", "
msgstr ", " msgstr ", "
#: gst/autoplug/gstspider.c:466 #: gst/elements/gstfilesink.c:243
#, c-format
msgid "There is no element present to handle the stream's mime type %s."
msgstr "There is no element present to handle the stream's mime type %s."
#: gst/elements/gstfilesink.c:268
msgid "No file name specified for writing." msgid "No file name specified for writing."
msgstr "No file name specified for writing." msgstr "No file name specified for writing."
#: gst/elements/gstfilesink.c:275 #: gst/elements/gstfilesink.c:250
#, c-format #, c-format
msgid "Could not open file \"%s\" for writing." msgid "Could not open file \"%s\" for writing."
msgstr "Could not open file \"%s\" for writing." msgstr "Could not open file \"%s\" for writing."
#: gst/elements/gstfilesink.c:294 #: gst/elements/gstfilesink.c:269
#, c-format #, c-format
msgid "Error closing file \"%s\"." msgid "Error closing file \"%s\"."
msgstr "Error closing file \"%s\"." msgstr "Error closing file \"%s\"."
#: gst/elements/gstfilesink.c:364 gst/elements/gstfilesink.c:400 #: gst/elements/gstfilesink.c:339 gst/elements/gstfilesink.c:375
#: gst/elements/gstfilesink.c:453 #: gst/elements/gstfilesink.c:428
#, c-format #, c-format
msgid "Error while writing to file \"%s\"." msgid "Error while writing to file \"%s\"."
msgstr "Error while writing to file \"%s\"." msgstr "Error while writing to file \"%s\"."
#: gst/elements/gstfilesrc.c:764 gst/elements/gstmultifilesrc.c:298 #: gst/elements/gstfilesrc.c:725
msgid "No file name specified for reading." msgid "No file name specified for reading."
msgstr "No file name specified for reading." msgstr "No file name specified for reading."
#: gst/elements/gstfilesrc.c:779 gst/elements/gstmultifilesrc.c:306 #: gst/elements/gstfilesrc.c:740
#, c-format #, c-format
msgid "Could not open file \"%s\" for reading." msgid "Could not open file \"%s\" for reading."
msgstr "Could not open file \"%s\" for reading." msgstr "Could not open file \"%s\" for reading."
#: gst/elements/gstfilesrc.c:790 #: gst/elements/gstfilesrc.c:751
#, c-format #, c-format
msgid "\"%s\" is a directory." msgid "\"%s\" is a directory."
msgstr "" msgstr ""
#: gst/elements/gstfilesrc.c:796 #: gst/elements/gstfilesrc.c:757
#, fuzzy, c-format #, fuzzy, c-format
msgid "File \"%s\" is a socket." msgid "File \"%s\" is a socket."
msgstr "File \"%s\" isn't a regular file." msgstr "File \"%s\" isn't a regular file."
#: gst/elements/gstidentity.c:306 #: gst/elements/gstidentity.c:276
msgid "Failed after iterations as requested." msgid "Failed after iterations as requested."
msgstr "Failed after iterations as requested." msgstr "Failed after iterations as requested."
@ -708,123 +699,79 @@ msgstr "could not link sink element for URI \"%s\""
msgid "empty pipeline not allowed" msgid "empty pipeline not allowed"
msgstr "empty pipeline not allowed" msgstr "empty pipeline not allowed"
#: tools/gst-inspect.c:1151 #: tools/gst-inspect.c:1032
#, fuzzy #, fuzzy
msgid "Print all elements" msgid "Print all elements"
msgstr "no element \"%s\"" msgstr "no element \"%s\""
#: tools/gst-launch.c:114 #: tools/gst-launch.c:190
#, c-format
msgid ""
"Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
"max %s ns).\n"
msgstr ""
#: tools/gst-launch.c:141
msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
msgstr "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
#: tools/gst-launch.c:149
#, c-format
msgid "ERROR: parse of xml file '%s' failed.\n"
msgstr "ERROR: parsing of xml file '%s' failed.\n"
#: tools/gst-launch.c:155
#, c-format
msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
msgstr "ERROR: no toplevel pipeline element in file '%s'.\n"
#: tools/gst-launch.c:162
#, c-format
msgid "WARNING: only one toplevel element is supported at this time."
msgstr "WARNING: only one toplevel element is supported at this time."
#: tools/gst-launch.c:173
#, c-format
msgid "ERROR: could not parse command line argument %d: %s.\n"
msgstr "ERROR: could not parse command line argument %d: %s.\n"
#: tools/gst-launch.c:184
#, c-format
msgid "WARNING: element named '%s' not found.\n"
msgstr "WARNING: element named '%s' not found.\n"
#: tools/gst-launch.c:327
#, c-format #, c-format
msgid "FOUND TAG : found by element \"%s\".\n" msgid "FOUND TAG : found by element \"%s\".\n"
msgstr "FOUND TAG : found by element \"%s\".\n" msgstr "FOUND TAG : found by element \"%s\".\n"
#: tools/gst-launch.c:412 #: tools/gst-launch.c:304
msgid "Output tags (also known as metadata)" msgid "Output tags (also known as metadata)"
msgstr "Output tags (also known as metadata)" msgstr "Output tags (also known as metadata)"
#: tools/gst-launch.c:414 #: tools/gst-launch.c:306
msgid "Output status information and property notifications" msgid "Output status information and property notifications"
msgstr "Output status information and property notifications" msgstr "Output status information and property notifications"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "Do not output status information of TYPE" msgid "Do not output status information of TYPE"
msgstr "Do not output status information of TYPE" msgstr "Do not output status information of TYPE"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "TYPE1,TYPE2,..." msgid "TYPE1,TYPE2,..."
msgstr "TYPE1,TYPE2,..." msgstr "TYPE1,TYPE2,..."
#: tools/gst-launch.c:419 #: tools/gst-launch.c:310
msgid "Save xml representation of pipeline to FILE and exit"
msgstr "Save xml representation of pipeline to FILE and exit"
#: tools/gst-launch.c:419
msgid "FILE"
msgstr "FILE"
#: tools/gst-launch.c:422
msgid "Do not install a fault handler" msgid "Do not install a fault handler"
msgstr "Do not install a fault handler" msgstr "Do not install a fault handler"
#: tools/gst-launch.c:424 #: tools/gst-launch.c:312
msgid "Print alloc trace (if enabled at compile time)" msgid "Print alloc trace (if enabled at compile time)"
msgstr "Print alloc trace (if enabled at compile time)" msgstr "Print alloc trace (if enabled at compile time)"
#: tools/gst-launch.c:426 #: tools/gst-launch.c:314
msgid "Number of times to iterate pipeline" msgid "Number of times to iterate pipeline"
msgstr "Number of times to iterate pipeline" msgstr "Number of times to iterate pipeline"
#: tools/gst-launch.c:496 #: tools/gst-launch.c:379
#, c-format #, c-format
msgid "ERROR: pipeline could not be constructed: %s.\n" msgid "ERROR: pipeline could not be constructed: %s.\n"
msgstr "ERROR: pipeline could not be constructed: %s.\n" msgstr "ERROR: pipeline could not be constructed: %s.\n"
#: tools/gst-launch.c:500 #: tools/gst-launch.c:383
#, c-format
msgid "ERROR: pipeline could not be constructed.\n" msgid "ERROR: pipeline could not be constructed.\n"
msgstr "ERROR: pipeline could not be constructed.\n" msgstr "ERROR: pipeline could not be constructed.\n"
#: tools/gst-launch.c:504 #: tools/gst-launch.c:387
#, c-format #, c-format
msgid "WARNING: erroneous pipeline: %s\n" msgid "WARNING: erroneous pipeline: %s\n"
msgstr "WARNING: erroneous pipeline: %s\n" msgstr "WARNING: erroneous pipeline: %s\n"
#: tools/gst-launch.c:505 #: tools/gst-launch.c:388
#, c-format
msgid " Trying to run anyway.\n" msgid " Trying to run anyway.\n"
msgstr " Trying to run anyway.\n" msgstr " Trying to run anyway.\n"
#: tools/gst-launch.c:532 #: tools/gst-launch.c:408
#, c-format
msgid "ERROR: the 'pipeline' element wasn't found.\n" msgid "ERROR: the 'pipeline' element wasn't found.\n"
msgstr "ERROR: the 'pipeline' element wasn't found.\n" msgstr "ERROR: the 'pipeline' element wasn't found.\n"
#: tools/gst-launch.c:539 #: tools/gst-launch.c:417
#, c-format
msgid "RUNNING pipeline ...\n" msgid "RUNNING pipeline ...\n"
msgstr "RUNNING pipeline ...\n" msgstr "RUNNING pipeline ...\n"
#: tools/gst-launch.c:542 #: tools/gst-launch.c:421
#, c-format
msgid "ERROR: pipeline doesn't want to play.\n" msgid "ERROR: pipeline doesn't want to play.\n"
msgstr "ERROR: pipeline doesn't want to play.\n" msgstr "ERROR: pipeline doesn't want to play.\n"
#: tools/gst-launch.c:445
#, c-format
msgid "Execution ended after %.2fs (%.2fs or %.2f%% idling).\n"
msgstr ""
#: tools/gst-register.c:49 #: tools/gst-register.c:49
#, c-format #, c-format
msgid "Added plugin %s with %d feature.\n" msgid "Added plugin %s with %d feature.\n"
@ -859,6 +806,36 @@ msgid_plural "Loaded %d plugins with %d features.\n"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#~ msgid "Disable accelerated CPU instructions"
#~ msgstr "Disable accelerated CPU instructions"
#~ msgid "There is no element present to handle the stream's mime type %s."
#~ msgstr "There is no element present to handle the stream's mime type %s."
#~ msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
#~ msgstr "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
#~ msgid "ERROR: parse of xml file '%s' failed.\n"
#~ msgstr "ERROR: parsing of xml file '%s' failed.\n"
#~ msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
#~ msgstr "ERROR: no toplevel pipeline element in file '%s'.\n"
#~ msgid "WARNING: only one toplevel element is supported at this time."
#~ msgstr "WARNING: only one toplevel element is supported at this time."
#~ msgid "ERROR: could not parse command line argument %d: %s.\n"
#~ msgstr "ERROR: could not parse command line argument %d: %s.\n"
#~ msgid "WARNING: element named '%s' not found.\n"
#~ msgstr "WARNING: element named '%s' not found.\n"
#~ msgid "Save xml representation of pipeline to FILE and exit"
#~ msgstr "Save xml representation of pipeline to FILE and exit"
#~ msgid "FILE"
#~ msgstr "FILE"
#~ msgid "caps" #~ msgid "caps"
#~ msgstr "caps" #~ msgstr "caps"

193
po/fr.po
View file

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: GStreamer\n" "Project-Id-Version: GStreamer\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-05-02 19:36+0200\n" "POT-Creation-Date: 2005-05-17 18:37+0200\n"
"PO-Revision-Date: 2004-01-13 16:52+0100\n" "PO-Revision-Date: 2004-01-13 16:52+0100\n"
"Last-Translator: Julien Moutte <julien@moutte.net>\n" "Last-Translator: Julien Moutte <julien@moutte.net>\n"
"Language-Team: French <fr@li.org>\n" "Language-Team: French <fr@li.org>\n"
@ -15,30 +15,30 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: gst/gst.c:160 #: gst/gst.c:157
msgid "Print the GStreamer version" msgid "Print the GStreamer version"
msgstr "Afficher la version de GStreamer" msgstr "Afficher la version de GStreamer"
#: gst/gst.c:162 #: gst/gst.c:159
msgid "Make all warnings fatal" msgid "Make all warnings fatal"
msgstr "Rendre tout les avertissements bloquants" msgstr "Rendre tout les avertissements bloquants"
#: gst/gst.c:166 #: gst/gst.c:163
msgid "Print available debug categories and exit" msgid "Print available debug categories and exit"
msgstr "Afficher les catégories de deboguage disponibles et quitter" msgstr "Afficher les catégories de deboguage disponibles et quitter"
#: gst/gst.c:169 #: gst/gst.c:166
msgid "" msgid ""
"Default debug level from 1 (only error) to 5 (anything) or 0 for no output" "Default debug level from 1 (only error) to 5 (anything) or 0 for no output"
msgstr "" msgstr ""
"Niveau de deboguage par defaut de 1 (que les erreurs) a 5 (tout) ou 0 pour " "Niveau de deboguage par defaut de 1 (que les erreurs) a 5 (tout) ou 0 pour "
"n'avoir aucun affichage" "n'avoir aucun affichage"
#: gst/gst.c:171 #: gst/gst.c:168
msgid "LEVEL" msgid "LEVEL"
msgstr "NIVEAU" msgstr "NIVEAU"
#: gst/gst.c:173 #: gst/gst.c:170
#, fuzzy #, fuzzy
msgid "" msgid ""
"Comma-separated list of category_name:level pairs to set specific levels for " "Comma-separated list of category_name:level pairs to set specific levels for "
@ -48,32 +48,28 @@ msgstr ""
"des niveaux spécifiques pour chaque catégorie.\n" "des niveaux spécifiques pour chaque catégorie.\n"
"Exemple: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "Exemple: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
#: gst/gst.c:176 #: gst/gst.c:173
msgid "LIST" msgid "LIST"
msgstr "" msgstr ""
#: gst/gst.c:178 #: gst/gst.c:175
#, fuzzy #, fuzzy
msgid "Disable colored debugging output" msgid "Disable colored debugging output"
msgstr "Désactiver la couleur dans la sortie de deboguage" msgstr "Désactiver la couleur dans la sortie de deboguage"
#: gst/gst.c:180 #: gst/gst.c:177
msgid "Disable debugging" msgid "Disable debugging"
msgstr "Désactiver la sortie de deboguage" msgstr "Désactiver la sortie de deboguage"
#: gst/gst.c:184 #: gst/gst.c:181
msgid "Disable accelerated CPU instructions"
msgstr "Désactiver les instructions accélerées du processeur"
#: gst/gst.c:186
msgid "Enable verbose plugin loading diagnostics" msgid "Enable verbose plugin loading diagnostics"
msgstr "Activer un diagnostique détaillé du chargement des plugins" msgstr "Activer un diagnostique détaillé du chargement des plugins"
#: gst/gst.c:188 #: gst/gst.c:183
msgid "PATHS" msgid "PATHS"
msgstr "CHEMINS" msgstr "CHEMINS"
#: gst/gst.c:191 #: gst/gst.c:186
#, fuzzy #, fuzzy
msgid "" msgid ""
"Comma-separated list of plugins to preload in addition to the list stored in " "Comma-separated list of plugins to preload in addition to the list stored in "
@ -82,34 +78,34 @@ msgstr ""
"Liste séparée par des virgules de plugins a precharger en plus de la liste " "Liste séparée par des virgules de plugins a precharger en plus de la liste "
"contenue dans la variable d'environnement GST_PLUGIN_PATH" "contenue dans la variable d'environnement GST_PLUGIN_PATH"
#: gst/gst.c:193 #: gst/gst.c:188
msgid "PLUGINS" msgid "PLUGINS"
msgstr "PLUGINS" msgstr "PLUGINS"
#: gst/gst.c:196 #: gst/gst.c:191
msgid "Disable trapping of segmentation faults during plugin loading" msgid "Disable trapping of segmentation faults during plugin loading"
msgstr "" msgstr ""
"Désactiver la detection des erreurs de segmentation pendant le chargement " "Désactiver la detection des erreurs de segmentation pendant le chargement "
"des plugins" "des plugins"
#: gst/gst.c:199 #: gst/gst.c:194
msgid "SCHEDULER" msgid "SCHEDULER"
msgstr "PLANIFICATEUR" msgstr "PLANIFICATEUR"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "Registry to use" msgid "Registry to use"
msgstr "Registre a utiliser" msgstr "Registre a utiliser"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "REGISTRY" msgid "REGISTRY"
msgstr "REGISTRE" msgstr "REGISTRE"
#: gst/gst.c:214 #: gst/gst.c:209
#, fuzzy, c-format #, fuzzy, c-format
msgid "path list for loading plugins (separated by '%s')" msgid "path list for loading plugins (separated by '%s')"
msgstr "liste de chemins pour le chargement des plugins (séparés par '" msgstr "liste de chemins pour le chargement des plugins (séparés par '"
#: gst/gst.c:218 #: gst/gst.c:213
#, fuzzy, c-format #, fuzzy, c-format
msgid "Scheduler to use (default is '%s')" msgid "Scheduler to use (default is '%s')"
msgstr "Planificateur a utiliser ('" msgstr "Planificateur a utiliser ('"
@ -606,53 +602,48 @@ msgstr ""
msgid ", " msgid ", "
msgstr ", " msgstr ", "
#: gst/autoplug/gstspider.c:466 #: gst/elements/gstfilesink.c:243
#, c-format
msgid "There is no element present to handle the stream's mime type %s."
msgstr ""
#: gst/elements/gstfilesink.c:268
#, fuzzy #, fuzzy
msgid "No file name specified for writing." msgid "No file name specified for writing."
msgstr "Echoué a déterminer le type du flux" msgstr "Echoué a déterminer le type du flux"
#: gst/elements/gstfilesink.c:275 #: gst/elements/gstfilesink.c:250
#, c-format #, c-format
msgid "Could not open file \"%s\" for writing." msgid "Could not open file \"%s\" for writing."
msgstr "" msgstr ""
#: gst/elements/gstfilesink.c:294 #: gst/elements/gstfilesink.c:269
#, c-format #, c-format
msgid "Error closing file \"%s\"." msgid "Error closing file \"%s\"."
msgstr "" msgstr ""
#: gst/elements/gstfilesink.c:364 gst/elements/gstfilesink.c:400 #: gst/elements/gstfilesink.c:339 gst/elements/gstfilesink.c:375
#: gst/elements/gstfilesink.c:453 #: gst/elements/gstfilesink.c:428
#, c-format #, c-format
msgid "Error while writing to file \"%s\"." msgid "Error while writing to file \"%s\"."
msgstr "" msgstr ""
#: gst/elements/gstfilesrc.c:764 gst/elements/gstmultifilesrc.c:298 #: gst/elements/gstfilesrc.c:725
#, fuzzy #, fuzzy
msgid "No file name specified for reading." msgid "No file name specified for reading."
msgstr "Echoué a déterminer le type du flux" msgstr "Echoué a déterminer le type du flux"
#: gst/elements/gstfilesrc.c:779 gst/elements/gstmultifilesrc.c:306 #: gst/elements/gstfilesrc.c:740
#, fuzzy, c-format #, fuzzy, c-format
msgid "Could not open file \"%s\" for reading." msgid "Could not open file \"%s\" for reading."
msgstr "Echoué a déterminer le type du flux" msgstr "Echoué a déterminer le type du flux"
#: gst/elements/gstfilesrc.c:790 #: gst/elements/gstfilesrc.c:751
#, c-format #, c-format
msgid "\"%s\" is a directory." msgid "\"%s\" is a directory."
msgstr "" msgstr ""
#: gst/elements/gstfilesrc.c:796 #: gst/elements/gstfilesrc.c:757
#, c-format #, c-format
msgid "File \"%s\" is a socket." msgid "File \"%s\" is a socket."
msgstr "" msgstr ""
#: gst/elements/gstidentity.c:306 #: gst/elements/gstidentity.c:276
msgid "Failed after iterations as requested." msgid "Failed after iterations as requested."
msgstr "" msgstr ""
@ -742,129 +733,80 @@ msgstr "impossible de lier un element destination pour l'URI \"%s\""
msgid "empty pipeline not allowed" msgid "empty pipeline not allowed"
msgstr "tube vide non autorisé" msgstr "tube vide non autorisé"
#: tools/gst-inspect.c:1151 #: tools/gst-inspect.c:1032
#, fuzzy #, fuzzy
msgid "Print all elements" msgid "Print all elements"
msgstr "pas d'element \"%s\"" msgstr "pas d'element \"%s\""
#: tools/gst-launch.c:114 #: tools/gst-launch.c:190
#, c-format
msgid ""
"Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
"max %s ns).\n"
msgstr ""
#: tools/gst-launch.c:141
msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
msgstr ""
"Utilisation: gst-xmllaunch <fichier.xml> [ element.property=valeur ... ]\n"
#: tools/gst-launch.c:149
#, c-format
msgid "ERROR: parse of xml file '%s' failed.\n"
msgstr "ERREUR: l'interpretation du fichier xml '%s' a echoué.\n"
#: tools/gst-launch.c:155
#, c-format
msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
msgstr "ERREUR: pas d'element tube de plus haut niveau dans le fichier '%s'.\n"
#: tools/gst-launch.c:162
#, c-format
msgid "WARNING: only one toplevel element is supported at this time."
msgstr ""
"AVERTISSEMENT: actuellement seul un element tube de plus haut niveau est "
"supporté."
#: tools/gst-launch.c:173
#, c-format
msgid "ERROR: could not parse command line argument %d: %s.\n"
msgstr ""
"ERREUR: impossible d'interpreter l'argument de la ligne de commande numero %"
"d: %s.\n"
#: tools/gst-launch.c:184
#, c-format
msgid "WARNING: element named '%s' not found.\n"
msgstr "AVERTISSEMENT: l'element nommé '%s' est introuvable.\n"
#: tools/gst-launch.c:327
#, c-format #, c-format
msgid "FOUND TAG : found by element \"%s\".\n" msgid "FOUND TAG : found by element \"%s\".\n"
msgstr "TAG DECOUVERT : decouvert par l'element \"%s\".\n" msgstr "TAG DECOUVERT : decouvert par l'element \"%s\".\n"
#: tools/gst-launch.c:412 #: tools/gst-launch.c:304
msgid "Output tags (also known as metadata)" msgid "Output tags (also known as metadata)"
msgstr "tags de sortie (aussi connus sous le nom de metadata)" msgstr "tags de sortie (aussi connus sous le nom de metadata)"
#: tools/gst-launch.c:414 #: tools/gst-launch.c:306
msgid "Output status information and property notifications" msgid "Output status information and property notifications"
msgstr "" msgstr ""
"Afficher des informations sur le status et les notifications de proprietés" "Afficher des informations sur le status et les notifications de proprietés"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "Do not output status information of TYPE" msgid "Do not output status information of TYPE"
msgstr "Ne pas afficher d'informations sur les status de TYPE" msgstr "Ne pas afficher d'informations sur les status de TYPE"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "TYPE1,TYPE2,..." msgid "TYPE1,TYPE2,..."
msgstr "TYPE1,TYPE2,..." msgstr "TYPE1,TYPE2,..."
#: tools/gst-launch.c:419 #: tools/gst-launch.c:310
msgid "Save xml representation of pipeline to FILE and exit"
msgstr "Sauvegarder la representation xml du tube dans FICHIER et quitter"
#: tools/gst-launch.c:419
msgid "FILE"
msgstr "FICHIER"
#: tools/gst-launch.c:422
msgid "Do not install a fault handler" msgid "Do not install a fault handler"
msgstr "Ne pas installer un gestionaire de dysfonctionement" msgstr "Ne pas installer un gestionaire de dysfonctionement"
#: tools/gst-launch.c:424 #: tools/gst-launch.c:312
msgid "Print alloc trace (if enabled at compile time)" msgid "Print alloc trace (if enabled at compile time)"
msgstr "Imprimer les traces d'allocations (si activées lors de la compilation)" msgstr "Imprimer les traces d'allocations (si activées lors de la compilation)"
#: tools/gst-launch.c:426 #: tools/gst-launch.c:314
msgid "Number of times to iterate pipeline" msgid "Number of times to iterate pipeline"
msgstr "Nombres d'iterations du tube a accomplir" msgstr "Nombres d'iterations du tube a accomplir"
#: tools/gst-launch.c:496 #: tools/gst-launch.c:379
#, c-format #, c-format
msgid "ERROR: pipeline could not be constructed: %s.\n" msgid "ERROR: pipeline could not be constructed: %s.\n"
msgstr "ERREUR: le tube n'a pas pu etre construit: %s.\n" msgstr "ERREUR: le tube n'a pas pu etre construit: %s.\n"
#: tools/gst-launch.c:500 #: tools/gst-launch.c:383
#, c-format
msgid "ERROR: pipeline could not be constructed.\n" msgid "ERROR: pipeline could not be constructed.\n"
msgstr "ERREUR: le tube n'a pas pu etre construit.\n" msgstr "ERREUR: le tube n'a pas pu etre construit.\n"
#: tools/gst-launch.c:504 #: tools/gst-launch.c:387
#, c-format #, c-format
msgid "WARNING: erroneous pipeline: %s\n" msgid "WARNING: erroneous pipeline: %s\n"
msgstr "AVERTISSEMENT: tube erroné: %s\n" msgstr "AVERTISSEMENT: tube erroné: %s\n"
#: tools/gst-launch.c:505 #: tools/gst-launch.c:388
#, c-format
msgid " Trying to run anyway.\n" msgid " Trying to run anyway.\n"
msgstr " Tentative d'execution malgrè tout.\n" msgstr " Tentative d'execution malgrè tout.\n"
#: tools/gst-launch.c:532 #: tools/gst-launch.c:408
#, c-format
msgid "ERROR: the 'pipeline' element wasn't found.\n" msgid "ERROR: the 'pipeline' element wasn't found.\n"
msgstr "ERREUR: l'element 'tube' est introuvable.\n" msgstr "ERREUR: l'element 'tube' est introuvable.\n"
#: tools/gst-launch.c:539 #: tools/gst-launch.c:417
#, c-format
msgid "RUNNING pipeline ...\n" msgid "RUNNING pipeline ...\n"
msgstr "EXECUTION du tube en cours ...\n" msgstr "EXECUTION du tube en cours ...\n"
#: tools/gst-launch.c:542 #: tools/gst-launch.c:421
#, c-format
msgid "ERROR: pipeline doesn't want to play.\n" msgid "ERROR: pipeline doesn't want to play.\n"
msgstr "ERREUR: le tube refuse de s'executer.\n" msgstr "ERREUR: le tube refuse de s'executer.\n"
#: tools/gst-launch.c:445
#, c-format
msgid "Execution ended after %.2fs (%.2fs or %.2f%% idling).\n"
msgstr ""
#: tools/gst-register.c:49 #: tools/gst-register.c:49
#, c-format #, c-format
msgid "Added plugin %s with %d feature.\n" msgid "Added plugin %s with %d feature.\n"
@ -899,6 +841,39 @@ msgid_plural "Loaded %d plugins with %d features.\n"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#~ msgid "Disable accelerated CPU instructions"
#~ msgstr "Désactiver les instructions accélerées du processeur"
#~ msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
#~ msgstr ""
#~ "Utilisation: gst-xmllaunch <fichier.xml> [ element.property=valeur ... ]\n"
#~ msgid "ERROR: parse of xml file '%s' failed.\n"
#~ msgstr "ERREUR: l'interpretation du fichier xml '%s' a echoué.\n"
#~ msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
#~ msgstr ""
#~ "ERREUR: pas d'element tube de plus haut niveau dans le fichier '%s'.\n"
#~ msgid "WARNING: only one toplevel element is supported at this time."
#~ msgstr ""
#~ "AVERTISSEMENT: actuellement seul un element tube de plus haut niveau est "
#~ "supporté."
#~ msgid "ERROR: could not parse command line argument %d: %s.\n"
#~ msgstr ""
#~ "ERREUR: impossible d'interpreter l'argument de la ligne de commande "
#~ "numero %d: %s.\n"
#~ msgid "WARNING: element named '%s' not found.\n"
#~ msgstr "AVERTISSEMENT: l'element nommé '%s' est introuvable.\n"
#~ msgid "Save xml representation of pipeline to FILE and exit"
#~ msgstr "Sauvegarder la representation xml du tube dans FICHIER et quitter"
#~ msgid "FILE"
#~ msgstr "FICHIER"
#~ msgid "caps" #~ msgid "caps"
#~ msgstr "capacités" #~ msgstr "capacités"

198
po/it.po
View file

@ -108,7 +108,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gstreamer 0.8.7pre2\n" "Project-Id-Version: gstreamer 0.8.7pre2\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-05-02 19:36+0200\n" "POT-Creation-Date: 2005-05-17 18:37+0200\n"
"PO-Revision-Date: 2004-12-21 08:23+0100\n" "PO-Revision-Date: 2004-12-21 08:23+0100\n"
"Last-Translator: Luca Ferretti <elle.uca@infinito.it>\n" "Last-Translator: Luca Ferretti <elle.uca@infinito.it>\n"
"Language-Team: Italian <tp@lists.linux.it>\n" "Language-Team: Italian <tp@lists.linux.it>\n"
@ -117,30 +117,30 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: gst/gst.c:160 #: gst/gst.c:157
msgid "Print the GStreamer version" msgid "Print the GStreamer version"
msgstr "Stampa la versione di GStreamer" msgstr "Stampa la versione di GStreamer"
#: gst/gst.c:162 #: gst/gst.c:159
msgid "Make all warnings fatal" msgid "Make all warnings fatal"
msgstr "Rende tutti i warning fatali" msgstr "Rende tutti i warning fatali"
#: gst/gst.c:166 #: gst/gst.c:163
msgid "Print available debug categories and exit" msgid "Print available debug categories and exit"
msgstr "Stampa le categorie di debug disponibili ed esce" msgstr "Stampa le categorie di debug disponibili ed esce"
#: gst/gst.c:169 #: gst/gst.c:166
msgid "" msgid ""
"Default debug level from 1 (only error) to 5 (anything) or 0 for no output" "Default debug level from 1 (only error) to 5 (anything) or 0 for no output"
msgstr "" msgstr ""
"Livello di debug predefinito da 1 (solo errori) a 5 (tutto), oppure 0 per " "Livello di debug predefinito da 1 (solo errori) a 5 (tutto), oppure 0 per "
"nessun output" "nessun output"
#: gst/gst.c:171 #: gst/gst.c:168
msgid "LEVEL" msgid "LEVEL"
msgstr "LIVELLO" msgstr "LIVELLO"
#: gst/gst.c:173 #: gst/gst.c:170
msgid "" msgid ""
"Comma-separated list of category_name:level pairs to set specific levels for " "Comma-separated list of category_name:level pairs to set specific levels for "
"the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
@ -149,31 +149,27 @@ msgstr ""
"impostare i livelli specifici per ogni singola categoria. Esempio: " "impostare i livelli specifici per ogni singola categoria. Esempio: "
"GST_AUTOPLUG:5,GST_ELEMENT_*:3" "GST_AUTOPLUG:5,GST_ELEMENT_*:3"
#: gst/gst.c:176 #: gst/gst.c:173
msgid "LIST" msgid "LIST"
msgstr "ELENCO" msgstr "ELENCO"
#: gst/gst.c:178 #: gst/gst.c:175
msgid "Disable colored debugging output" msgid "Disable colored debugging output"
msgstr "Disabilita output di debug colorato" msgstr "Disabilita output di debug colorato"
#: gst/gst.c:180 #: gst/gst.c:177
msgid "Disable debugging" msgid "Disable debugging"
msgstr "Disabilita debug" msgstr "Disabilita debug"
#: gst/gst.c:184 #: gst/gst.c:181
msgid "Disable accelerated CPU instructions"
msgstr "Disabilita istruzioni accelerate CPU"
#: gst/gst.c:186
msgid "Enable verbose plugin loading diagnostics" msgid "Enable verbose plugin loading diagnostics"
msgstr "Abilita diagnostica prolissa del caricamento plugin" msgstr "Abilita diagnostica prolissa del caricamento plugin"
#: gst/gst.c:188 #: gst/gst.c:183
msgid "PATHS" msgid "PATHS"
msgstr "PERCORSI" msgstr "PERCORSI"
#: gst/gst.c:191 #: gst/gst.c:186
#, fuzzy #, fuzzy
msgid "" msgid ""
"Comma-separated list of plugins to preload in addition to the list stored in " "Comma-separated list of plugins to preload in addition to the list stored in "
@ -182,32 +178,32 @@ msgstr ""
"Elenco separato da virgole dei plugin da pre-caricare in aggiunta all'elenco " "Elenco separato da virgole dei plugin da pre-caricare in aggiunta all'elenco "
"memorizzato nella variabile d'ambiente GST_PLUGIN_PATH" "memorizzato nella variabile d'ambiente GST_PLUGIN_PATH"
#: gst/gst.c:193 #: gst/gst.c:188
msgid "PLUGINS" msgid "PLUGINS"
msgstr "PLUGIN" msgstr "PLUGIN"
#: gst/gst.c:196 #: gst/gst.c:191
msgid "Disable trapping of segmentation faults during plugin loading" msgid "Disable trapping of segmentation faults during plugin loading"
msgstr "Disabilita il trapping dei segfault durante il caricamento dei plugin" msgstr "Disabilita il trapping dei segfault durante il caricamento dei plugin"
#: gst/gst.c:199 #: gst/gst.c:194
msgid "SCHEDULER" msgid "SCHEDULER"
msgstr "SCHEDULER" msgstr "SCHEDULER"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "Registry to use" msgid "Registry to use"
msgstr "Registro da usare" msgstr "Registro da usare"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "REGISTRY" msgid "REGISTRY"
msgstr "REGISTRO" msgstr "REGISTRO"
#: gst/gst.c:214 #: gst/gst.c:209
#, c-format #, c-format
msgid "path list for loading plugins (separated by '%s')" msgid "path list for loading plugins (separated by '%s')"
msgstr "elenco dei percorsi per caricare i plugin (separati da '%s')" msgstr "elenco dei percorsi per caricare i plugin (separati da '%s')"
#: gst/gst.c:218 #: gst/gst.c:213
#, c-format #, c-format
msgid "Scheduler to use (default is '%s')" msgid "Scheduler to use (default is '%s')"
msgstr "Scheduler da usare (predefinito è '%s')" msgstr "Scheduler da usare (predefinito è '%s')"
@ -693,52 +689,46 @@ msgstr ""
msgid ", " msgid ", "
msgstr ", " msgstr ", "
#: gst/autoplug/gstspider.c:466 #: gst/elements/gstfilesink.c:243
#, c-format
msgid "There is no element present to handle the stream's mime type %s."
msgstr ""
"Non vi è alcun elemento presente per gestire il tipo MIME %s dello stream."
#: gst/elements/gstfilesink.c:268
msgid "No file name specified for writing." msgid "No file name specified for writing."
msgstr "Nessun nome di file specificato per la scrittura." msgstr "Nessun nome di file specificato per la scrittura."
#: gst/elements/gstfilesink.c:275 #: gst/elements/gstfilesink.c:250
#, c-format #, c-format
msgid "Could not open file \"%s\" for writing." msgid "Could not open file \"%s\" for writing."
msgstr "Impossibile aprire il file «%s» in scrittura." msgstr "Impossibile aprire il file «%s» in scrittura."
#: gst/elements/gstfilesink.c:294 #: gst/elements/gstfilesink.c:269
#, c-format #, c-format
msgid "Error closing file \"%s\"." msgid "Error closing file \"%s\"."
msgstr "Errore nel chiudere il file «%s»." msgstr "Errore nel chiudere il file «%s»."
#: gst/elements/gstfilesink.c:364 gst/elements/gstfilesink.c:400 #: gst/elements/gstfilesink.c:339 gst/elements/gstfilesink.c:375
#: gst/elements/gstfilesink.c:453 #: gst/elements/gstfilesink.c:428
#, c-format #, c-format
msgid "Error while writing to file \"%s\"." msgid "Error while writing to file \"%s\"."
msgstr "Errore durante la scrittura sul file «%s»." msgstr "Errore durante la scrittura sul file «%s»."
#: gst/elements/gstfilesrc.c:764 gst/elements/gstmultifilesrc.c:298 #: gst/elements/gstfilesrc.c:725
msgid "No file name specified for reading." msgid "No file name specified for reading."
msgstr "Nessun nome di file specificato per la lettura." msgstr "Nessun nome di file specificato per la lettura."
#: gst/elements/gstfilesrc.c:779 gst/elements/gstmultifilesrc.c:306 #: gst/elements/gstfilesrc.c:740
#, c-format #, c-format
msgid "Could not open file \"%s\" for reading." msgid "Could not open file \"%s\" for reading."
msgstr "Impossibile aprire il file «%s» in lettura." msgstr "Impossibile aprire il file «%s» in lettura."
#: gst/elements/gstfilesrc.c:790 #: gst/elements/gstfilesrc.c:751
#, c-format #, c-format
msgid "\"%s\" is a directory." msgid "\"%s\" is a directory."
msgstr "«%s» è una directory." msgstr "«%s» è una directory."
#: gst/elements/gstfilesrc.c:796 #: gst/elements/gstfilesrc.c:757
#, c-format #, c-format
msgid "File \"%s\" is a socket." msgid "File \"%s\" is a socket."
msgstr "Il file «%s» è un socket." msgstr "Il file «%s» è un socket."
#: gst/elements/gstidentity.c:306 #: gst/elements/gstidentity.c:276
msgid "Failed after iterations as requested." msgid "Failed after iterations as requested."
msgstr "Fallito dopo le iterazioni come richiesto." msgstr "Fallito dopo le iterazioni come richiesto."
@ -827,125 +817,78 @@ msgstr "impossibile collegare l'elemento sink per l'URI «%s»"
msgid "empty pipeline not allowed" msgid "empty pipeline not allowed"
msgstr "pipeline vuota non consentito" msgstr "pipeline vuota non consentito"
#: tools/gst-inspect.c:1151 #: tools/gst-inspect.c:1032
msgid "Print all elements" msgid "Print all elements"
msgstr "Stampa tutti gli elementi" msgstr "Stampa tutti gli elementi"
#: tools/gst-launch.c:114 #: tools/gst-launch.c:190
#, c-format
msgid ""
"Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
"max %s ns).\n"
msgstr ""
"Eseuzione terminata dopo %s iterazioni (somma %s ns, media %s ns, min %s ns, "
"max %s ns).\n"
#: tools/gst-launch.c:141
msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
msgstr "Uso: gst-xmllaunch <FILE.XML> [ ELEMENTO.PROPRIETA=VALORE ... ]\n"
#: tools/gst-launch.c:149
#, c-format
msgid "ERROR: parse of xml file '%s' failed.\n"
msgstr "ERRORE: analisi del file xml «%s» fallita.\n"
#: tools/gst-launch.c:155
#, c-format
msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
msgstr "ERRORE: nessun elemento pipeline toplevel nel file «%s».\n"
#: tools/gst-launch.c:162
#, c-format
msgid "WARNING: only one toplevel element is supported at this time."
msgstr "AVVISO: al momento è supportato sono un elemento toplevel."
#: tools/gst-launch.c:173
#, c-format
msgid "ERROR: could not parse command line argument %d: %s.\n"
msgstr ""
"ERRORE: impossibile analizzare l'argomento %d della riga di comando: %s.\n"
#: tools/gst-launch.c:184
#, c-format
msgid "WARNING: element named '%s' not found.\n"
msgstr "AVVISO: elemento di nome «%s» non trovato.\n"
#: tools/gst-launch.c:327
#, c-format #, c-format
msgid "FOUND TAG : found by element \"%s\".\n" msgid "FOUND TAG : found by element \"%s\".\n"
msgstr "TAG TROVATO : trovato dall'elemento «%s».\n" msgstr "TAG TROVATO : trovato dall'elemento «%s».\n"
#: tools/gst-launch.c:412 #: tools/gst-launch.c:304
msgid "Output tags (also known as metadata)" msgid "Output tags (also known as metadata)"
msgstr "Stampa i tag (anche noti come metadati)" msgstr "Stampa i tag (anche noti come metadati)"
#: tools/gst-launch.c:414 #: tools/gst-launch.c:306
msgid "Output status information and property notifications" msgid "Output status information and property notifications"
msgstr "Stampa informazioni di stato e notifiche delle proprietà" msgstr "Stampa informazioni di stato e notifiche delle proprietà"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "Do not output status information of TYPE" msgid "Do not output status information of TYPE"
msgstr "Non fornisce informazioni di stato per TIPO" msgstr "Non fornisce informazioni di stato per TIPO"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "TYPE1,TYPE2,..." msgid "TYPE1,TYPE2,..."
msgstr "TIPO1,TIPO2,..." msgstr "TIPO1,TIPO2,..."
#: tools/gst-launch.c:419 #: tools/gst-launch.c:310
msgid "Save xml representation of pipeline to FILE and exit"
msgstr "Salva su FILE una rappresentazione xml della pipeline ed esce"
#: tools/gst-launch.c:419
msgid "FILE"
msgstr "FILE"
#: tools/gst-launch.c:422
msgid "Do not install a fault handler" msgid "Do not install a fault handler"
msgstr "Non installa un gestore di fault" msgstr "Non installa un gestore di fault"
#: tools/gst-launch.c:424 #: tools/gst-launch.c:312
msgid "Print alloc trace (if enabled at compile time)" msgid "Print alloc trace (if enabled at compile time)"
msgstr "Stampa traccia di alloc (se abilitato in compilazione)" msgstr "Stampa traccia di alloc (se abilitato in compilazione)"
#: tools/gst-launch.c:426 #: tools/gst-launch.c:314
msgid "Number of times to iterate pipeline" msgid "Number of times to iterate pipeline"
msgstr "Numero di iterazioni della pipeline" msgstr "Numero di iterazioni della pipeline"
#: tools/gst-launch.c:496 #: tools/gst-launch.c:379
#, c-format #, c-format
msgid "ERROR: pipeline could not be constructed: %s.\n" msgid "ERROR: pipeline could not be constructed: %s.\n"
msgstr "ERRORE: impossibile costruire la pipeline: %s.\n" msgstr "ERRORE: impossibile costruire la pipeline: %s.\n"
#: tools/gst-launch.c:500 #: tools/gst-launch.c:383
#, c-format
msgid "ERROR: pipeline could not be constructed.\n" msgid "ERROR: pipeline could not be constructed.\n"
msgstr "ERRORE: impossibile costruire la pipeline.\n" msgstr "ERRORE: impossibile costruire la pipeline.\n"
#: tools/gst-launch.c:504 #: tools/gst-launch.c:387
#, c-format #, c-format
msgid "WARNING: erroneous pipeline: %s\n" msgid "WARNING: erroneous pipeline: %s\n"
msgstr "AVVISO: pipeline errata: %s.\n" msgstr "AVVISO: pipeline errata: %s.\n"
#: tools/gst-launch.c:505 #: tools/gst-launch.c:388
#, c-format
msgid " Trying to run anyway.\n" msgid " Trying to run anyway.\n"
msgstr " Tentata esecuzione in ogni caso.\n" msgstr " Tentata esecuzione in ogni caso.\n"
#: tools/gst-launch.c:532 #: tools/gst-launch.c:408
#, c-format
msgid "ERROR: the 'pipeline' element wasn't found.\n" msgid "ERROR: the 'pipeline' element wasn't found.\n"
msgstr "ERRORE: l'elemento «pipeline» non è stato trovato.\n" msgstr "ERRORE: l'elemento «pipeline» non è stato trovato.\n"
#: tools/gst-launch.c:539 #: tools/gst-launch.c:417
#, c-format
msgid "RUNNING pipeline ...\n" msgid "RUNNING pipeline ...\n"
msgstr "ESECUZIONE della pipeline...\n" msgstr "ESECUZIONE della pipeline...\n"
#: tools/gst-launch.c:542 #: tools/gst-launch.c:421
#, c-format
msgid "ERROR: pipeline doesn't want to play.\n" msgid "ERROR: pipeline doesn't want to play.\n"
msgstr "ERRORE: la pipeline non vuole riprodurre.\n" msgstr "ERRORE: la pipeline non vuole riprodurre.\n"
#: tools/gst-launch.c:445
#, c-format
msgid "Execution ended after %.2fs (%.2fs or %.2f%% idling).\n"
msgstr ""
#: tools/gst-register.c:49 #: tools/gst-register.c:49
#, fuzzy, c-format #, fuzzy, c-format
msgid "Added plugin %s with %d feature.\n" msgid "Added plugin %s with %d feature.\n"
@ -980,6 +923,45 @@ msgid_plural "Loaded %d plugins with %d features.\n"
msgstr[0] "Caricati %d plugin con %d %s.\n" msgstr[0] "Caricati %d plugin con %d %s.\n"
msgstr[1] "Caricati %d plugin con %d %s.\n" msgstr[1] "Caricati %d plugin con %d %s.\n"
#~ msgid "Disable accelerated CPU instructions"
#~ msgstr "Disabilita istruzioni accelerate CPU"
#~ msgid "There is no element present to handle the stream's mime type %s."
#~ msgstr ""
#~ "Non vi è alcun elemento presente per gestire il tipo MIME %s dello stream."
#~ msgid ""
#~ "Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
#~ "max %s ns).\n"
#~ msgstr ""
#~ "Eseuzione terminata dopo %s iterazioni (somma %s ns, media %s ns, min %s "
#~ "ns, max %s ns).\n"
#~ msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
#~ msgstr "Uso: gst-xmllaunch <FILE.XML> [ ELEMENTO.PROPRIETA=VALORE ... ]\n"
#~ msgid "ERROR: parse of xml file '%s' failed.\n"
#~ msgstr "ERRORE: analisi del file xml «%s» fallita.\n"
#~ msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
#~ msgstr "ERRORE: nessun elemento pipeline toplevel nel file «%s».\n"
#~ msgid "WARNING: only one toplevel element is supported at this time."
#~ msgstr "AVVISO: al momento è supportato sono un elemento toplevel."
#~ msgid "ERROR: could not parse command line argument %d: %s.\n"
#~ msgstr ""
#~ "ERRORE: impossibile analizzare l'argomento %d della riga di comando: %s.\n"
#~ msgid "WARNING: element named '%s' not found.\n"
#~ msgstr "AVVISO: elemento di nome «%s» non trovato.\n"
#~ msgid "Save xml representation of pipeline to FILE and exit"
#~ msgstr "Salva su FILE una rappresentazione xml della pipeline ed esce"
#~ msgid "FILE"
#~ msgstr "FILE"
#~ msgid "caps" #~ msgid "caps"
#~ msgstr "caps" #~ msgstr "caps"

158
po/nb.po
View file

@ -6,7 +6,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gstreamer 0.8.8\n" "Project-Id-Version: gstreamer 0.8.8\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-05-02 19:36+0200\n" "POT-Creation-Date: 2005-05-17 18:37+0200\n"
"PO-Revision-Date: 2005-02-17 12:00+0100\n" "PO-Revision-Date: 2005-02-17 12:00+0100\n"
"Last-Translator: Kjartan Maraas <kmaraas@broadpark.no>\n" "Last-Translator: Kjartan Maraas <kmaraas@broadpark.no>\n"
"Language-Team: Norwegian Bokmaal <i18n-nb@lister.ping.uio.no>\n" "Language-Team: Norwegian Bokmaal <i18n-nb@lister.ping.uio.no>\n"
@ -14,89 +14,85 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: gst/gst.c:160 #: gst/gst.c:157
msgid "Print the GStreamer version" msgid "Print the GStreamer version"
msgstr "Skriv ut versjonsnummer for GStreamer" msgstr "Skriv ut versjonsnummer for GStreamer"
#: gst/gst.c:162 #: gst/gst.c:159
msgid "Make all warnings fatal" msgid "Make all warnings fatal"
msgstr "La alle advarsler være fatale" msgstr "La alle advarsler være fatale"
#: gst/gst.c:166 #: gst/gst.c:163
msgid "Print available debug categories and exit" msgid "Print available debug categories and exit"
msgstr "Skriv ut tilgjengelige feilsøkingskategorier og avslutt" msgstr "Skriv ut tilgjengelige feilsøkingskategorier og avslutt"
#: gst/gst.c:169 #: gst/gst.c:166
msgid "" msgid ""
"Default debug level from 1 (only error) to 5 (anything) or 0 for no output" "Default debug level from 1 (only error) to 5 (anything) or 0 for no output"
msgstr "" msgstr ""
#: gst/gst.c:171 #: gst/gst.c:168
msgid "LEVEL" msgid "LEVEL"
msgstr "NIVÅ" msgstr "NIVÅ"
#: gst/gst.c:173 #: gst/gst.c:170
msgid "" msgid ""
"Comma-separated list of category_name:level pairs to set specific levels for " "Comma-separated list of category_name:level pairs to set specific levels for "
"the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
msgstr "" msgstr ""
#: gst/gst.c:176 #: gst/gst.c:173
msgid "LIST" msgid "LIST"
msgstr "LISTE" msgstr "LISTE"
#: gst/gst.c:178 #: gst/gst.c:175
msgid "Disable colored debugging output" msgid "Disable colored debugging output"
msgstr "Deaktiver farget feilsøkingsinformasjon" msgstr "Deaktiver farget feilsøkingsinformasjon"
#: gst/gst.c:180 #: gst/gst.c:177
msgid "Disable debugging" msgid "Disable debugging"
msgstr "Slå av feilsøking" msgstr "Slå av feilsøking"
#: gst/gst.c:184 #: gst/gst.c:181
msgid "Disable accelerated CPU instructions"
msgstr ""
#: gst/gst.c:186
msgid "Enable verbose plugin loading diagnostics" msgid "Enable verbose plugin loading diagnostics"
msgstr "" msgstr ""
#: gst/gst.c:188 #: gst/gst.c:183
msgid "PATHS" msgid "PATHS"
msgstr "STIER" msgstr "STIER"
#: gst/gst.c:191 #: gst/gst.c:186
msgid "" msgid ""
"Comma-separated list of plugins to preload in addition to the list stored in " "Comma-separated list of plugins to preload in addition to the list stored in "
"environment variable GST_PLUGIN_PATH" "environment variable GST_PLUGIN_PATH"
msgstr "" msgstr ""
#: gst/gst.c:193 #: gst/gst.c:188
msgid "PLUGINS" msgid "PLUGINS"
msgstr "TILLEGG" msgstr "TILLEGG"
#: gst/gst.c:196 #: gst/gst.c:191
msgid "Disable trapping of segmentation faults during plugin loading" msgid "Disable trapping of segmentation faults during plugin loading"
msgstr "" msgstr ""
#: gst/gst.c:199 #: gst/gst.c:194
msgid "SCHEDULER" msgid "SCHEDULER"
msgstr "PLANLEGGER" msgstr "PLANLEGGER"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "Registry to use" msgid "Registry to use"
msgstr "Register som skal brukes" msgstr "Register som skal brukes"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "REGISTRY" msgid "REGISTRY"
msgstr "REGISTER" msgstr "REGISTER"
#: gst/gst.c:214 #: gst/gst.c:209
#, c-format #, c-format
msgid "path list for loading plugins (separated by '%s')" msgid "path list for loading plugins (separated by '%s')"
msgstr "" msgstr ""
#: gst/gst.c:218 #: gst/gst.c:213
#, c-format #, c-format
msgid "Scheduler to use (default is '%s')" msgid "Scheduler to use (default is '%s')"
msgstr "Planlegger som skal brukes («%s» er forvalgt)" msgstr "Planlegger som skal brukes («%s» er forvalgt)"
@ -565,51 +561,46 @@ msgstr ""
msgid ", " msgid ", "
msgstr ", " msgstr ", "
#: gst/autoplug/gstspider.c:466 #: gst/elements/gstfilesink.c:243
#, c-format
msgid "There is no element present to handle the stream's mime type %s."
msgstr ""
#: gst/elements/gstfilesink.c:268
msgid "No file name specified for writing." msgid "No file name specified for writing."
msgstr "Ingen filnavn oppgitt for skriving." msgstr "Ingen filnavn oppgitt for skriving."
#: gst/elements/gstfilesink.c:275 #: gst/elements/gstfilesink.c:250
#, c-format #, c-format
msgid "Could not open file \"%s\" for writing." msgid "Could not open file \"%s\" for writing."
msgstr "Kunne ikke åpne fil «%s» for skriving." msgstr "Kunne ikke åpne fil «%s» for skriving."
#: gst/elements/gstfilesink.c:294 #: gst/elements/gstfilesink.c:269
#, c-format #, c-format
msgid "Error closing file \"%s\"." msgid "Error closing file \"%s\"."
msgstr "Feil ved lukking av fil «%s»." msgstr "Feil ved lukking av fil «%s»."
#: gst/elements/gstfilesink.c:364 gst/elements/gstfilesink.c:400 #: gst/elements/gstfilesink.c:339 gst/elements/gstfilesink.c:375
#: gst/elements/gstfilesink.c:453 #: gst/elements/gstfilesink.c:428
#, c-format #, c-format
msgid "Error while writing to file \"%s\"." msgid "Error while writing to file \"%s\"."
msgstr "Feil ved skriving til fil «%s»." msgstr "Feil ved skriving til fil «%s»."
#: gst/elements/gstfilesrc.c:764 gst/elements/gstmultifilesrc.c:298 #: gst/elements/gstfilesrc.c:725
msgid "No file name specified for reading." msgid "No file name specified for reading."
msgstr "Ingen filnavn oppgitt for lesing." msgstr "Ingen filnavn oppgitt for lesing."
#: gst/elements/gstfilesrc.c:779 gst/elements/gstmultifilesrc.c:306 #: gst/elements/gstfilesrc.c:740
#, c-format #, c-format
msgid "Could not open file \"%s\" for reading." msgid "Could not open file \"%s\" for reading."
msgstr "Kunne ikke åpne fil «%s» for lesing." msgstr "Kunne ikke åpne fil «%s» for lesing."
#: gst/elements/gstfilesrc.c:790 #: gst/elements/gstfilesrc.c:751
#, c-format #, c-format
msgid "\"%s\" is a directory." msgid "\"%s\" is a directory."
msgstr "«%s» er en katalog." msgstr "«%s» er en katalog."
#: gst/elements/gstfilesrc.c:796 #: gst/elements/gstfilesrc.c:757
#, c-format #, c-format
msgid "File \"%s\" is a socket." msgid "File \"%s\" is a socket."
msgstr "Fil «%s» er en plugg." msgstr "Fil «%s» er en plugg."
#: gst/elements/gstidentity.c:306 #: gst/elements/gstidentity.c:276
msgid "Failed after iterations as requested." msgid "Failed after iterations as requested."
msgstr "" msgstr ""
@ -698,122 +689,78 @@ msgstr ""
msgid "empty pipeline not allowed" msgid "empty pipeline not allowed"
msgstr "" msgstr ""
#: tools/gst-inspect.c:1151 #: tools/gst-inspect.c:1032
msgid "Print all elements" msgid "Print all elements"
msgstr "" msgstr ""
#: tools/gst-launch.c:114 #: tools/gst-launch.c:190
#, c-format
msgid ""
"Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
"max %s ns).\n"
msgstr ""
#: tools/gst-launch.c:141
msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
msgstr ""
#: tools/gst-launch.c:149
#, c-format
msgid "ERROR: parse of xml file '%s' failed.\n"
msgstr ""
#: tools/gst-launch.c:155
#, c-format
msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
msgstr ""
#: tools/gst-launch.c:162
#, c-format
msgid "WARNING: only one toplevel element is supported at this time."
msgstr ""
#: tools/gst-launch.c:173
#, c-format
msgid "ERROR: could not parse command line argument %d: %s.\n"
msgstr ""
#: tools/gst-launch.c:184
#, c-format
msgid "WARNING: element named '%s' not found.\n"
msgstr ""
#: tools/gst-launch.c:327
#, c-format #, c-format
msgid "FOUND TAG : found by element \"%s\".\n" msgid "FOUND TAG : found by element \"%s\".\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:412 #: tools/gst-launch.c:304
msgid "Output tags (also known as metadata)" msgid "Output tags (also known as metadata)"
msgstr "" msgstr ""
#: tools/gst-launch.c:414 #: tools/gst-launch.c:306
msgid "Output status information and property notifications" msgid "Output status information and property notifications"
msgstr "" msgstr ""
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "Do not output status information of TYPE" msgid "Do not output status information of TYPE"
msgstr "" msgstr ""
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "TYPE1,TYPE2,..." msgid "TYPE1,TYPE2,..."
msgstr "TYPE1,TYPE2,..." msgstr "TYPE1,TYPE2,..."
#: tools/gst-launch.c:419 #: tools/gst-launch.c:310
msgid "Save xml representation of pipeline to FILE and exit"
msgstr ""
#: tools/gst-launch.c:419
msgid "FILE"
msgstr "FIL"
#: tools/gst-launch.c:422
msgid "Do not install a fault handler" msgid "Do not install a fault handler"
msgstr "" msgstr ""
#: tools/gst-launch.c:424 #: tools/gst-launch.c:312
msgid "Print alloc trace (if enabled at compile time)" msgid "Print alloc trace (if enabled at compile time)"
msgstr "" msgstr ""
#: tools/gst-launch.c:426 #: tools/gst-launch.c:314
msgid "Number of times to iterate pipeline" msgid "Number of times to iterate pipeline"
msgstr "" msgstr ""
#: tools/gst-launch.c:496 #: tools/gst-launch.c:379
#, c-format #, c-format
msgid "ERROR: pipeline could not be constructed: %s.\n" msgid "ERROR: pipeline could not be constructed: %s.\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:500 #: tools/gst-launch.c:383
#, c-format
msgid "ERROR: pipeline could not be constructed.\n" msgid "ERROR: pipeline could not be constructed.\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:504 #: tools/gst-launch.c:387
#, c-format #, c-format
msgid "WARNING: erroneous pipeline: %s\n" msgid "WARNING: erroneous pipeline: %s\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:505 #: tools/gst-launch.c:388
#, c-format
msgid " Trying to run anyway.\n" msgid " Trying to run anyway.\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:532 #: tools/gst-launch.c:408
#, c-format
msgid "ERROR: the 'pipeline' element wasn't found.\n" msgid "ERROR: the 'pipeline' element wasn't found.\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:539 #: tools/gst-launch.c:417
#, c-format
msgid "RUNNING pipeline ...\n" msgid "RUNNING pipeline ...\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:542 #: tools/gst-launch.c:421
#, c-format
msgid "ERROR: pipeline doesn't want to play.\n" msgid "ERROR: pipeline doesn't want to play.\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:445
#, c-format
msgid "Execution ended after %.2fs (%.2fs or %.2f%% idling).\n"
msgstr ""
#: tools/gst-register.c:49 #: tools/gst-register.c:49
#, fuzzy, c-format #, fuzzy, c-format
msgid "Added plugin %s with %d feature.\n" msgid "Added plugin %s with %d feature.\n"
@ -847,3 +794,6 @@ msgid "Loaded %d plugins with %d feature.\n"
msgid_plural "Loaded %d plugins with %d features.\n" msgid_plural "Loaded %d plugins with %d features.\n"
msgstr[0] "Lastet %d tillegg med %d %s.\n" msgstr[0] "Lastet %d tillegg med %d %s.\n"
msgstr[1] "Lastet %d tillegg med %d %s.\n" msgstr[1] "Lastet %d tillegg med %d %s.\n"
#~ msgid "FILE"
#~ msgstr "FIL"

194
po/nl.po
View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gstreamer 0.8.4\n" "Project-Id-Version: gstreamer 0.8.4\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-05-02 19:36+0200\n" "POT-Creation-Date: 2005-05-17 18:37+0200\n"
"PO-Revision-Date: 2004-08-05 16:56+0200\n" "PO-Revision-Date: 2004-08-05 16:56+0200\n"
"Last-Translator: Elros Cyriatan <cyriatan@fastmail.fm>\n" "Last-Translator: Elros Cyriatan <cyriatan@fastmail.fm>\n"
"Language-Team: Dutch <vertaling@nl.linux.org>\n" "Language-Team: Dutch <vertaling@nl.linux.org>\n"
@ -17,30 +17,30 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: gst/gst.c:160 #: gst/gst.c:157
msgid "Print the GStreamer version" msgid "Print the GStreamer version"
msgstr "Geeft de GStreamer versie weer" msgstr "Geeft de GStreamer versie weer"
#: gst/gst.c:162 #: gst/gst.c:159
msgid "Make all warnings fatal" msgid "Make all warnings fatal"
msgstr "Alle waarschuwingen fataal maken" msgstr "Alle waarschuwingen fataal maken"
#: gst/gst.c:166 #: gst/gst.c:163
msgid "Print available debug categories and exit" msgid "Print available debug categories and exit"
msgstr "Beschikbare debug-categorieën weergeven en afsluiten" msgstr "Beschikbare debug-categorieën weergeven en afsluiten"
#: gst/gst.c:169 #: gst/gst.c:166
msgid "" msgid ""
"Default debug level from 1 (only error) to 5 (anything) or 0 for no output" "Default debug level from 1 (only error) to 5 (anything) or 0 for no output"
msgstr "" msgstr ""
"Standaard debug-niveau van 1 (enkel fouten) tot 5 (alles) of 0 voor geen " "Standaard debug-niveau van 1 (enkel fouten) tot 5 (alles) of 0 voor geen "
"uitvoer" "uitvoer"
#: gst/gst.c:171 #: gst/gst.c:168
msgid "LEVEL" msgid "LEVEL"
msgstr "NIVEAU" msgstr "NIVEAU"
#: gst/gst.c:173 #: gst/gst.c:170
msgid "" msgid ""
"Comma-separated list of category_name:level pairs to set specific levels for " "Comma-separated list of category_name:level pairs to set specific levels for "
"the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
@ -49,31 +49,27 @@ msgstr ""
"niveau's in te stellen voor de individuele categorieën. Voorbeeld: " "niveau's in te stellen voor de individuele categorieën. Voorbeeld: "
"GST_AUTOPLUG:5,GST_ELEMENT_*:3" "GST_AUTOPLUG:5,GST_ELEMENT_*:3"
#: gst/gst.c:176 #: gst/gst.c:173
msgid "LIST" msgid "LIST"
msgstr "LIJST" msgstr "LIJST"
#: gst/gst.c:178 #: gst/gst.c:175
msgid "Disable colored debugging output" msgid "Disable colored debugging output"
msgstr "Kleuren uit zetten in debug-uitvoer" msgstr "Kleuren uit zetten in debug-uitvoer"
#: gst/gst.c:180 #: gst/gst.c:177
msgid "Disable debugging" msgid "Disable debugging"
msgstr "Debugging uit zetten" msgstr "Debugging uit zetten"
#: gst/gst.c:184 #: gst/gst.c:181
msgid "Disable accelerated CPU instructions"
msgstr "Versnelde CPU-instructies uit zetten"
#: gst/gst.c:186
msgid "Enable verbose plugin loading diagnostics" msgid "Enable verbose plugin loading diagnostics"
msgstr "Uitgebreide diagnostiek voor het laden van plugins aan zetten" msgstr "Uitgebreide diagnostiek voor het laden van plugins aan zetten"
#: gst/gst.c:188 #: gst/gst.c:183
msgid "PATHS" msgid "PATHS"
msgstr "PADEN" msgstr "PADEN"
#: gst/gst.c:191 #: gst/gst.c:186
#, fuzzy #, fuzzy
msgid "" msgid ""
"Comma-separated list of plugins to preload in addition to the list stored in " "Comma-separated list of plugins to preload in addition to the list stored in "
@ -82,33 +78,33 @@ msgstr ""
"Komma-gescheiden lijst van plugins om voor te laden naast de lijst " "Komma-gescheiden lijst van plugins om voor te laden naast de lijst "
"opgeslagen in omgevingsvariable GST_PLUGIN_PATH" "opgeslagen in omgevingsvariable GST_PLUGIN_PATH"
#: gst/gst.c:193 #: gst/gst.c:188
msgid "PLUGINS" msgid "PLUGINS"
msgstr "PLUGINS" msgstr "PLUGINS"
#: gst/gst.c:196 #: gst/gst.c:191
msgid "Disable trapping of segmentation faults during plugin loading" msgid "Disable trapping of segmentation faults during plugin loading"
msgstr "" msgstr ""
"Het opvangen van segmentatiefouten uit zetten tijdens laden van plugins" "Het opvangen van segmentatiefouten uit zetten tijdens laden van plugins"
#: gst/gst.c:199 #: gst/gst.c:194
msgid "SCHEDULER" msgid "SCHEDULER"
msgstr "PLANNER" msgstr "PLANNER"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "Registry to use" msgid "Registry to use"
msgstr "Register om te gebruiken" msgstr "Register om te gebruiken"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "REGISTRY" msgid "REGISTRY"
msgstr "REGISTER" msgstr "REGISTER"
#: gst/gst.c:214 #: gst/gst.c:209
#, c-format #, c-format
msgid "path list for loading plugins (separated by '%s')" msgid "path list for loading plugins (separated by '%s')"
msgstr "padlijst voor het laden van plugins (gescheiden door '%s')" msgstr "padlijst voor het laden van plugins (gescheiden door '%s')"
#: gst/gst.c:218 #: gst/gst.c:213
#, c-format #, c-format
msgid "Scheduler to use (default is '%s')" msgid "Scheduler to use (default is '%s')"
msgstr "Planner om te gebruiken (standaard is '%s')" msgstr "Planner om te gebruiken (standaard is '%s')"
@ -585,52 +581,46 @@ msgstr ""
msgid ", " msgid ", "
msgstr ", " msgstr ", "
#: gst/autoplug/gstspider.c:466 #: gst/elements/gstfilesink.c:243
#, c-format
msgid "There is no element present to handle the stream's mime type %s."
msgstr ""
"Er is geen element aanwezig dat de MIME-soort %s van de stroom kan verwerken."
#: gst/elements/gstfilesink.c:268
msgid "No file name specified for writing." msgid "No file name specified for writing."
msgstr "Geen bestandsnaam gegeven om te schrijven." msgstr "Geen bestandsnaam gegeven om te schrijven."
#: gst/elements/gstfilesink.c:275 #: gst/elements/gstfilesink.c:250
#, c-format #, c-format
msgid "Could not open file \"%s\" for writing." msgid "Could not open file \"%s\" for writing."
msgstr "Kon bestand \"%s\" niet openen om te schrijven." msgstr "Kon bestand \"%s\" niet openen om te schrijven."
#: gst/elements/gstfilesink.c:294 #: gst/elements/gstfilesink.c:269
#, c-format #, c-format
msgid "Error closing file \"%s\"." msgid "Error closing file \"%s\"."
msgstr "Fout bij het sluiten van bestand \"%s\"." msgstr "Fout bij het sluiten van bestand \"%s\"."
#: gst/elements/gstfilesink.c:364 gst/elements/gstfilesink.c:400 #: gst/elements/gstfilesink.c:339 gst/elements/gstfilesink.c:375
#: gst/elements/gstfilesink.c:453 #: gst/elements/gstfilesink.c:428
#, c-format #, c-format
msgid "Error while writing to file \"%s\"." msgid "Error while writing to file \"%s\"."
msgstr "Fout bij het schrijven naar bestand \"%s\"." msgstr "Fout bij het schrijven naar bestand \"%s\"."
#: gst/elements/gstfilesrc.c:764 gst/elements/gstmultifilesrc.c:298 #: gst/elements/gstfilesrc.c:725
msgid "No file name specified for reading." msgid "No file name specified for reading."
msgstr "Geen bestandsnaam gegeven om te lezen." msgstr "Geen bestandsnaam gegeven om te lezen."
#: gst/elements/gstfilesrc.c:779 gst/elements/gstmultifilesrc.c:306 #: gst/elements/gstfilesrc.c:740
#, c-format #, c-format
msgid "Could not open file \"%s\" for reading." msgid "Could not open file \"%s\" for reading."
msgstr "Kon bestand \"%s\" niet openen om te lezen." msgstr "Kon bestand \"%s\" niet openen om te lezen."
#: gst/elements/gstfilesrc.c:790 #: gst/elements/gstfilesrc.c:751
#, c-format #, c-format
msgid "\"%s\" is a directory." msgid "\"%s\" is a directory."
msgstr "\"%s\" is een map." msgstr "\"%s\" is een map."
#: gst/elements/gstfilesrc.c:796 #: gst/elements/gstfilesrc.c:757
#, c-format #, c-format
msgid "File \"%s\" is a socket." msgid "File \"%s\" is a socket."
msgstr "Bestand \"%s\" is een socket." msgstr "Bestand \"%s\" is een socket."
#: gst/elements/gstidentity.c:306 #: gst/elements/gstidentity.c:276
msgid "Failed after iterations as requested." msgid "Failed after iterations as requested."
msgstr "Mislukt na iteraties zoals gevraagd." msgstr "Mislukt na iteraties zoals gevraagd."
@ -719,125 +709,78 @@ msgstr "kon doelelement niet verbinden voor URI \"%s\""
msgid "empty pipeline not allowed" msgid "empty pipeline not allowed"
msgstr "lege pijplijn niet toegelaten" msgstr "lege pijplijn niet toegelaten"
#: tools/gst-inspect.c:1151 #: tools/gst-inspect.c:1032
msgid "Print all elements" msgid "Print all elements"
msgstr "Alle elementen weergeven" msgstr "Alle elementen weergeven"
#: tools/gst-launch.c:114 #: tools/gst-launch.c:190
#, c-format
msgid ""
"Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
"max %s ns).\n"
msgstr ""
#: tools/gst-launch.c:141
msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
msgstr ""
"Gebruik: gst-xmllaunch <bestand.xml> [ element.eigenschap=waarde ... ]\n"
#: tools/gst-launch.c:149
#, c-format
msgid "ERROR: parse of xml file '%s' failed.\n"
msgstr "FOUT: verwerken van xml-bestand '%s' mislukt.\n"
#: tools/gst-launch.c:155
#, c-format
msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
msgstr "FOUT: geen bovenste pijplijn-element gevonden in file '%s'.\n"
#: tools/gst-launch.c:162
#, c-format
msgid "WARNING: only one toplevel element is supported at this time."
msgstr ""
"WAARSCHUWING: slechts één element op het hoogste niveau ondersteund op dit "
"moment."
#: tools/gst-launch.c:173
#, c-format
msgid "ERROR: could not parse command line argument %d: %s.\n"
msgstr "FOUT: kon argument %d op opdrachtregel niet verwerken: %s.\n"
#: tools/gst-launch.c:184
#, c-format
msgid "WARNING: element named '%s' not found.\n"
msgstr "WAARSCHUWING: element met naam '%s' niet gevonden.\n"
#: tools/gst-launch.c:327
#, c-format #, c-format
msgid "FOUND TAG : found by element \"%s\".\n" msgid "FOUND TAG : found by element \"%s\".\n"
msgstr "TAG GEVONDEN : gevonden door element \"%s\".\n" msgstr "TAG GEVONDEN : gevonden door element \"%s\".\n"
#: tools/gst-launch.c:412 #: tools/gst-launch.c:304
msgid "Output tags (also known as metadata)" msgid "Output tags (also known as metadata)"
msgstr "Tags (ook bekend als metadata) weergeven" msgstr "Tags (ook bekend als metadata) weergeven"
#: tools/gst-launch.c:414 #: tools/gst-launch.c:306
msgid "Output status information and property notifications" msgid "Output status information and property notifications"
msgstr "Statusinformatie en eigenschapswaarschuwingen weergeven" msgstr "Statusinformatie en eigenschapswaarschuwingen weergeven"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "Do not output status information of TYPE" msgid "Do not output status information of TYPE"
msgstr "Statusinformatie van soort SOORT niet weergeven" msgstr "Statusinformatie van soort SOORT niet weergeven"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "TYPE1,TYPE2,..." msgid "TYPE1,TYPE2,..."
msgstr "SOORT1,SOORT2,..." msgstr "SOORT1,SOORT2,..."
#: tools/gst-launch.c:419 #: tools/gst-launch.c:310
msgid "Save xml representation of pipeline to FILE and exit"
msgstr "XML-representatie van pijplijn in BESTAND opslaan en afsluiten"
#: tools/gst-launch.c:419
msgid "FILE"
msgstr "BESTAND"
#: tools/gst-launch.c:422
msgid "Do not install a fault handler" msgid "Do not install a fault handler"
msgstr "Geen foutafhandelaar installeren" msgstr "Geen foutafhandelaar installeren"
#: tools/gst-launch.c:424 #: tools/gst-launch.c:312
msgid "Print alloc trace (if enabled at compile time)" msgid "Print alloc trace (if enabled at compile time)"
msgstr "Toewijzingsspoor weergeven (indien aangezet tijdens compileren)" msgstr "Toewijzingsspoor weergeven (indien aangezet tijdens compileren)"
#: tools/gst-launch.c:426 #: tools/gst-launch.c:314
msgid "Number of times to iterate pipeline" msgid "Number of times to iterate pipeline"
msgstr "Aantal keren om de pijplijn te herhalen" msgstr "Aantal keren om de pijplijn te herhalen"
#: tools/gst-launch.c:496 #: tools/gst-launch.c:379
#, c-format #, c-format
msgid "ERROR: pipeline could not be constructed: %s.\n" msgid "ERROR: pipeline could not be constructed: %s.\n"
msgstr "FOUT: pijplijn kon niet gemaakt worden: %s.\n" msgstr "FOUT: pijplijn kon niet gemaakt worden: %s.\n"
#: tools/gst-launch.c:500 #: tools/gst-launch.c:383
#, c-format
msgid "ERROR: pipeline could not be constructed.\n" msgid "ERROR: pipeline could not be constructed.\n"
msgstr "FOUT: pijplijn kon niet gemaakt worden.\n" msgstr "FOUT: pijplijn kon niet gemaakt worden.\n"
#: tools/gst-launch.c:504 #: tools/gst-launch.c:387
#, c-format #, c-format
msgid "WARNING: erroneous pipeline: %s\n" msgid "WARNING: erroneous pipeline: %s\n"
msgstr "WAARSCHUWING: foutieve pijplijn: %s\n" msgstr "WAARSCHUWING: foutieve pijplijn: %s\n"
#: tools/gst-launch.c:505 #: tools/gst-launch.c:388
#, c-format
msgid " Trying to run anyway.\n" msgid " Trying to run anyway.\n"
msgstr " Probeer toch uit te voeren.\n" msgstr " Probeer toch uit te voeren.\n"
#: tools/gst-launch.c:532 #: tools/gst-launch.c:408
#, c-format
msgid "ERROR: the 'pipeline' element wasn't found.\n" msgid "ERROR: the 'pipeline' element wasn't found.\n"
msgstr "FOUT: het 'pijplijn' element werd niet gevonden.\n" msgstr "FOUT: het 'pijplijn' element werd niet gevonden.\n"
#: tools/gst-launch.c:539 #: tools/gst-launch.c:417
#, c-format
msgid "RUNNING pipeline ...\n" msgid "RUNNING pipeline ...\n"
msgstr "BEZIG met pijplijn ...\n" msgstr "BEZIG met pijplijn ...\n"
#: tools/gst-launch.c:542 #: tools/gst-launch.c:421
#, c-format
msgid "ERROR: pipeline doesn't want to play.\n" msgid "ERROR: pipeline doesn't want to play.\n"
msgstr "FOUT: pijplijn wil niet spelen.\n" msgstr "FOUT: pijplijn wil niet spelen.\n"
#: tools/gst-launch.c:445
#, c-format
msgid "Execution ended after %.2fs (%.2fs or %.2f%% idling).\n"
msgstr ""
#: tools/gst-register.c:49 #: tools/gst-register.c:49
#, fuzzy, c-format #, fuzzy, c-format
msgid "Added plugin %s with %d feature.\n" msgid "Added plugin %s with %d feature.\n"
@ -872,6 +815,41 @@ msgid_plural "Loaded %d plugins with %d features.\n"
msgstr[0] "%d plugins geladen met %d %s.\n" msgstr[0] "%d plugins geladen met %d %s.\n"
msgstr[1] "%d plugins geladen met %d %s.\n" msgstr[1] "%d plugins geladen met %d %s.\n"
#~ msgid "Disable accelerated CPU instructions"
#~ msgstr "Versnelde CPU-instructies uit zetten"
#~ msgid "There is no element present to handle the stream's mime type %s."
#~ msgstr ""
#~ "Er is geen element aanwezig dat de MIME-soort %s van de stroom kan "
#~ "verwerken."
#~ msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
#~ msgstr ""
#~ "Gebruik: gst-xmllaunch <bestand.xml> [ element.eigenschap=waarde ... ]\n"
#~ msgid "ERROR: parse of xml file '%s' failed.\n"
#~ msgstr "FOUT: verwerken van xml-bestand '%s' mislukt.\n"
#~ msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
#~ msgstr "FOUT: geen bovenste pijplijn-element gevonden in file '%s'.\n"
#~ msgid "WARNING: only one toplevel element is supported at this time."
#~ msgstr ""
#~ "WAARSCHUWING: slechts één element op het hoogste niveau ondersteund op "
#~ "dit moment."
#~ msgid "ERROR: could not parse command line argument %d: %s.\n"
#~ msgstr "FOUT: kon argument %d op opdrachtregel niet verwerken: %s.\n"
#~ msgid "WARNING: element named '%s' not found.\n"
#~ msgstr "WAARSCHUWING: element met naam '%s' niet gevonden.\n"
#~ msgid "Save xml representation of pipeline to FILE and exit"
#~ msgstr "XML-representatie van pijplijn in BESTAND opslaan en afsluiten"
#~ msgid "FILE"
#~ msgstr "BESTAND"
#~ msgid "caps" #~ msgid "caps"
#~ msgstr "mogelijkheden" #~ msgstr "mogelijkheden"

184
po/ru.po
View file

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gstreamer 0.8.8\n" "Project-Id-Version: gstreamer 0.8.8\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-05-02 19:36+0200\n" "POT-Creation-Date: 2005-05-17 18:37+0200\n"
"PO-Revision-Date: 2005-02-15 22:33+0300\n" "PO-Revision-Date: 2005-02-15 22:33+0300\n"
"Last-Translator: Peter Astakhov <astakhovp@mail.ru>\n" "Last-Translator: Peter Astakhov <astakhovp@mail.ru>\n"
"Language-Team: Russian <ru@li.org>\n" "Language-Team: Russian <ru@li.org>\n"
@ -18,30 +18,30 @@ msgstr ""
"100<10||n%100>=20)?1:2);\n" "100<10||n%100>=20)?1:2);\n"
"X-Generator: KBabel 1.9.1\n" "X-Generator: KBabel 1.9.1\n"
#: gst/gst.c:160 #: gst/gst.c:157
msgid "Print the GStreamer version" msgid "Print the GStreamer version"
msgstr "Печатает версию GStreamer" msgstr "Печатает версию GStreamer"
#: gst/gst.c:162 #: gst/gst.c:159
msgid "Make all warnings fatal" msgid "Make all warnings fatal"
msgstr "Расценивать все предупреждения как фатальные" msgstr "Расценивать все предупреждения как фатальные"
#: gst/gst.c:166 #: gst/gst.c:163
msgid "Print available debug categories and exit" msgid "Print available debug categories and exit"
msgstr "Печатает доступные категории отладки и выходит" msgstr "Печатает доступные категории отладки и выходит"
#: gst/gst.c:169 #: gst/gst.c:166
msgid "" msgid ""
"Default debug level from 1 (only error) to 5 (anything) or 0 for no output" "Default debug level from 1 (only error) to 5 (anything) or 0 for no output"
msgstr "" msgstr ""
"Уровень отладки по умолчанию от 1 (только ошибки) до 5(все) или 0 - ничего " "Уровень отладки по умолчанию от 1 (только ошибки) до 5(все) или 0 - ничего "
"не печатать" "не печатать"
#: gst/gst.c:171 #: gst/gst.c:168
msgid "LEVEL" msgid "LEVEL"
msgstr "УРОВЕНЬ" msgstr "УРОВЕНЬ"
#: gst/gst.c:173 #: gst/gst.c:170
msgid "" msgid ""
"Comma-separated list of category_name:level pairs to set specific levels for " "Comma-separated list of category_name:level pairs to set specific levels for "
"the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
@ -49,31 +49,27 @@ msgstr ""
"Список пар, разделенных запятыми вида имя_категории:уровень для установки " "Список пар, разделенных запятыми вида имя_категории:уровень для установки "
"уровнейотдельных категорий. Пример: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "уровнейотдельных категорий. Пример: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
#: gst/gst.c:176 #: gst/gst.c:173
msgid "LIST" msgid "LIST"
msgstr "СПИСОК" msgstr "СПИСОК"
#: gst/gst.c:178 #: gst/gst.c:175
msgid "Disable colored debugging output" msgid "Disable colored debugging output"
msgstr "Отключить раскрашенный вывод отладочных сообщений" msgstr "Отключить раскрашенный вывод отладочных сообщений"
#: gst/gst.c:180 #: gst/gst.c:177
msgid "Disable debugging" msgid "Disable debugging"
msgstr "Отключить отладку" msgstr "Отключить отладку"
#: gst/gst.c:184 #: gst/gst.c:181
msgid "Disable accelerated CPU instructions"
msgstr "Отключить специфические команды процессора"
#: gst/gst.c:186
msgid "Enable verbose plugin loading diagnostics" msgid "Enable verbose plugin loading diagnostics"
msgstr "Разрешить расширенную диагностику при загрузке расширений" msgstr "Разрешить расширенную диагностику при загрузке расширений"
#: gst/gst.c:188 #: gst/gst.c:183
msgid "PATHS" msgid "PATHS"
msgstr "ПУТИ" msgstr "ПУТИ"
#: gst/gst.c:191 #: gst/gst.c:186
#, fuzzy #, fuzzy
msgid "" msgid ""
"Comma-separated list of plugins to preload in addition to the list stored in " "Comma-separated list of plugins to preload in addition to the list stored in "
@ -82,32 +78,32 @@ msgstr ""
"Список расширений (через запятую) для загрузки, вдобавок к списку, " "Список расширений (через запятую) для загрузки, вдобавок к списку, "
"сохраненному в переменной окружения GST_PLUGIN_PATH" "сохраненному в переменной окружения GST_PLUGIN_PATH"
#: gst/gst.c:193 #: gst/gst.c:188
msgid "PLUGINS" msgid "PLUGINS"
msgstr "РАСШИРЕНИЯ" msgstr "РАСШИРЕНИЯ"
#: gst/gst.c:196 #: gst/gst.c:191
msgid "Disable trapping of segmentation faults during plugin loading" msgid "Disable trapping of segmentation faults during plugin loading"
msgstr "" msgstr ""
#: gst/gst.c:199 #: gst/gst.c:194
msgid "SCHEDULER" msgid "SCHEDULER"
msgstr "ПЛАНИРОВЩИК" msgstr "ПЛАНИРОВЩИК"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "Registry to use" msgid "Registry to use"
msgstr "" msgstr ""
#: gst/gst.c:201 #: gst/gst.c:196
msgid "REGISTRY" msgid "REGISTRY"
msgstr "" msgstr ""
#: gst/gst.c:214 #: gst/gst.c:209
#, c-format #, c-format
msgid "path list for loading plugins (separated by '%s')" msgid "path list for loading plugins (separated by '%s')"
msgstr "список путей для загрузки расширений (разделенных '%s')" msgstr "список путей для загрузки расширений (разделенных '%s')"
#: gst/gst.c:218 #: gst/gst.c:213
#, c-format #, c-format
msgid "Scheduler to use (default is '%s')" msgid "Scheduler to use (default is '%s')"
msgstr "Планировщик для использования (по умолчанию - '%s')" msgstr "Планировщик для использования (по умолчанию - '%s')"
@ -588,51 +584,46 @@ msgstr ""
msgid ", " msgid ", "
msgstr ", " msgstr ", "
#: gst/autoplug/gstspider.c:466 #: gst/elements/gstfilesink.c:243
#, c-format
msgid "There is no element present to handle the stream's mime type %s."
msgstr ""
#: gst/elements/gstfilesink.c:268
msgid "No file name specified for writing." msgid "No file name specified for writing."
msgstr "Не указано имя файла для записи." msgstr "Не указано имя файла для записи."
#: gst/elements/gstfilesink.c:275 #: gst/elements/gstfilesink.c:250
#, c-format #, c-format
msgid "Could not open file \"%s\" for writing." msgid "Could not open file \"%s\" for writing."
msgstr "Не могу открыть файл \"%s\" для записи." msgstr "Не могу открыть файл \"%s\" для записи."
#: gst/elements/gstfilesink.c:294 #: gst/elements/gstfilesink.c:269
#, c-format #, c-format
msgid "Error closing file \"%s\"." msgid "Error closing file \"%s\"."
msgstr "Ошибка закрытия файла \"%s\"." msgstr "Ошибка закрытия файла \"%s\"."
#: gst/elements/gstfilesink.c:364 gst/elements/gstfilesink.c:400 #: gst/elements/gstfilesink.c:339 gst/elements/gstfilesink.c:375
#: gst/elements/gstfilesink.c:453 #: gst/elements/gstfilesink.c:428
#, c-format #, c-format
msgid "Error while writing to file \"%s\"." msgid "Error while writing to file \"%s\"."
msgstr "Ошибка записи в файл \"%s\"." msgstr "Ошибка записи в файл \"%s\"."
#: gst/elements/gstfilesrc.c:764 gst/elements/gstmultifilesrc.c:298 #: gst/elements/gstfilesrc.c:725
msgid "No file name specified for reading." msgid "No file name specified for reading."
msgstr "Не указано имя файла для чтения." msgstr "Не указано имя файла для чтения."
#: gst/elements/gstfilesrc.c:779 gst/elements/gstmultifilesrc.c:306 #: gst/elements/gstfilesrc.c:740
#, c-format #, c-format
msgid "Could not open file \"%s\" for reading." msgid "Could not open file \"%s\" for reading."
msgstr "Не могу открыть файл \"%s\" для чтения." msgstr "Не могу открыть файл \"%s\" для чтения."
#: gst/elements/gstfilesrc.c:790 #: gst/elements/gstfilesrc.c:751
#, c-format #, c-format
msgid "\"%s\" is a directory." msgid "\"%s\" is a directory."
msgstr "\"%s\" - это каталог." msgstr "\"%s\" - это каталог."
#: gst/elements/gstfilesrc.c:796 #: gst/elements/gstfilesrc.c:757
#, c-format #, c-format
msgid "File \"%s\" is a socket." msgid "File \"%s\" is a socket."
msgstr "Файл \"%s\" является сокетом." msgstr "Файл \"%s\" является сокетом."
#: gst/elements/gstidentity.c:306 #: gst/elements/gstidentity.c:276
msgid "Failed after iterations as requested." msgid "Failed after iterations as requested."
msgstr "" msgstr ""
@ -721,125 +712,78 @@ msgstr ""
msgid "empty pipeline not allowed" msgid "empty pipeline not allowed"
msgstr "" msgstr ""
#: tools/gst-inspect.c:1151 #: tools/gst-inspect.c:1032
msgid "Print all elements" msgid "Print all elements"
msgstr "Печатать все элементы" msgstr "Печатать все элементы"
#: tools/gst-launch.c:114 #: tools/gst-launch.c:190
#, c-format
msgid ""
"Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
"max %s ns).\n"
msgstr ""
"Выполнение завершилось после %s итераций (всего %s ns, среднее %s ns, "
"минимум %s ns, максимум %s ns).\n"
#: tools/gst-launch.c:141
msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
msgstr ""
"Использование: gst-xmllaunch <файл.xml> [ элемент.поле=значение ... ]\n"
#: tools/gst-launch.c:149
#, c-format
msgid "ERROR: parse of xml file '%s' failed.\n"
msgstr "ОШИБКА: не могу разобрать xml файл '%s'.\n"
#: tools/gst-launch.c:155
#, c-format
msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
msgstr ""
#: tools/gst-launch.c:162
#, c-format
msgid "WARNING: only one toplevel element is supported at this time."
msgstr ""
#: tools/gst-launch.c:173
#, c-format
msgid "ERROR: could not parse command line argument %d: %s.\n"
msgstr "ОШИБКА: не могу разобрать аргумент командной строки %d: %s.\n"
#: tools/gst-launch.c:184
#, c-format
msgid "WARNING: element named '%s' not found.\n"
msgstr "ПРЕДУПРЕЖДЕНИЕ: элемент '%s' не найден.\n"
#: tools/gst-launch.c:327
#, c-format #, c-format
msgid "FOUND TAG : found by element \"%s\".\n" msgid "FOUND TAG : found by element \"%s\".\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:412 #: tools/gst-launch.c:304
msgid "Output tags (also known as metadata)" msgid "Output tags (also known as metadata)"
msgstr "Выводить тэги (такжи называемые 'метаданные')" msgstr "Выводить тэги (такжи называемые 'метаданные')"
#: tools/gst-launch.c:414 #: tools/gst-launch.c:306
msgid "Output status information and property notifications" msgid "Output status information and property notifications"
msgstr "" msgstr ""
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "Do not output status information of TYPE" msgid "Do not output status information of TYPE"
msgstr "" msgstr ""
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "TYPE1,TYPE2,..." msgid "TYPE1,TYPE2,..."
msgstr "ТИП1, ТИП2,..." msgstr "ТИП1, ТИП2,..."
#: tools/gst-launch.c:419 #: tools/gst-launch.c:310
msgid "Save xml representation of pipeline to FILE and exit"
msgstr ""
#: tools/gst-launch.c:419
msgid "FILE"
msgstr "ФАЙЛ"
#: tools/gst-launch.c:422
msgid "Do not install a fault handler" msgid "Do not install a fault handler"
msgstr "Не устанавливать ошибочный обработчик" msgstr "Не устанавливать ошибочный обработчик"
#: tools/gst-launch.c:424 #: tools/gst-launch.c:312
msgid "Print alloc trace (if enabled at compile time)" msgid "Print alloc trace (if enabled at compile time)"
msgstr "" msgstr ""
#: tools/gst-launch.c:426 #: tools/gst-launch.c:314
msgid "Number of times to iterate pipeline" msgid "Number of times to iterate pipeline"
msgstr "" msgstr ""
#: tools/gst-launch.c:496 #: tools/gst-launch.c:379
#, c-format #, c-format
msgid "ERROR: pipeline could not be constructed: %s.\n" msgid "ERROR: pipeline could not be constructed: %s.\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:500 #: tools/gst-launch.c:383
#, c-format
msgid "ERROR: pipeline could not be constructed.\n" msgid "ERROR: pipeline could not be constructed.\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:504 #: tools/gst-launch.c:387
#, c-format #, c-format
msgid "WARNING: erroneous pipeline: %s\n" msgid "WARNING: erroneous pipeline: %s\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:505 #: tools/gst-launch.c:388
#, c-format
msgid " Trying to run anyway.\n" msgid " Trying to run anyway.\n"
msgstr " Все равно пытаюсь запустить.\n" msgstr " Все равно пытаюсь запустить.\n"
#: tools/gst-launch.c:532 #: tools/gst-launch.c:408
#, c-format
msgid "ERROR: the 'pipeline' element wasn't found.\n" msgid "ERROR: the 'pipeline' element wasn't found.\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:539 #: tools/gst-launch.c:417
#, c-format
msgid "RUNNING pipeline ...\n" msgid "RUNNING pipeline ...\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:542 #: tools/gst-launch.c:421
#, c-format
msgid "ERROR: pipeline doesn't want to play.\n" msgid "ERROR: pipeline doesn't want to play.\n"
msgstr "" msgstr ""
#: tools/gst-launch.c:445
#, c-format
msgid "Execution ended after %.2fs (%.2fs or %.2f%% idling).\n"
msgstr ""
#: tools/gst-register.c:49 #: tools/gst-register.c:49
#, fuzzy, c-format #, fuzzy, c-format
msgid "Added plugin %s with %d feature.\n" msgid "Added plugin %s with %d feature.\n"
@ -875,3 +819,29 @@ msgid_plural "Loaded %d plugins with %d features.\n"
msgstr[0] "Загружено %d расширений с %d %s.\n" msgstr[0] "Загружено %d расширений с %d %s.\n"
msgstr[1] "Загружено %d расширений с %d %s.\n" msgstr[1] "Загружено %d расширений с %d %s.\n"
msgstr[2] "Загружено %d расширений с %d %s.\n" msgstr[2] "Загружено %d расширений с %d %s.\n"
#~ msgid "Disable accelerated CPU instructions"
#~ msgstr "Отключить специфические команды процессора"
#~ msgid ""
#~ "Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
#~ "max %s ns).\n"
#~ msgstr ""
#~ "Выполнение завершилось после %s итераций (всего %s ns, среднее %s ns, "
#~ "минимум %s ns, максимум %s ns).\n"
#~ msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
#~ msgstr ""
#~ "Использование: gst-xmllaunch <файл.xml> [ элемент.поле=значение ... ]\n"
#~ msgid "ERROR: parse of xml file '%s' failed.\n"
#~ msgstr "ОШИБКА: не могу разобрать xml файл '%s'.\n"
#~ msgid "ERROR: could not parse command line argument %d: %s.\n"
#~ msgstr "ОШИБКА: не могу разобрать аргумент командной строки %d: %s.\n"
#~ msgid "WARNING: element named '%s' not found.\n"
#~ msgstr "ПРЕДУПРЕЖДЕНИЕ: элемент '%s' не найден.\n"
#~ msgid "FILE"
#~ msgstr "ФАЙЛ"

189
po/sq.po
View file

@ -6,7 +6,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gstreamer 0.8.4\n" "Project-Id-Version: gstreamer 0.8.4\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-05-02 19:36+0200\n" "POT-Creation-Date: 2005-05-17 18:37+0200\n"
"PO-Revision-Date: 2004-08-07 23:46+0200\n" "PO-Revision-Date: 2004-08-07 23:46+0200\n"
"Last-Translator: Laurent Dhima <laurenti@alblinux.net>\n" "Last-Translator: Laurent Dhima <laurenti@alblinux.net>\n"
"Language-Team: Albanian <begraj@hotmail.com>\n" "Language-Team: Albanian <begraj@hotmail.com>\n"
@ -15,30 +15,30 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: gst/gst.c:160 #: gst/gst.c:157
msgid "Print the GStreamer version" msgid "Print the GStreamer version"
msgstr "Printo versionin e GStreamer" msgstr "Printo versionin e GStreamer"
#: gst/gst.c:162 #: gst/gst.c:159
msgid "Make all warnings fatal" msgid "Make all warnings fatal"
msgstr "Bëj që të gjithë paralajmërimet të jenë fatale" msgstr "Bëj që të gjithë paralajmërimet të jenë fatale"
#: gst/gst.c:166 #: gst/gst.c:163
msgid "Print available debug categories and exit" msgid "Print available debug categories and exit"
msgstr "Printo kategoritë e debug në dispozicion dhe dil" msgstr "Printo kategoritë e debug në dispozicion dhe dil"
#: gst/gst.c:169 #: gst/gst.c:166
msgid "" msgid ""
"Default debug level from 1 (only error) to 5 (anything) or 0 for no output" "Default debug level from 1 (only error) to 5 (anything) or 0 for no output"
msgstr "" msgstr ""
"Niveli i prezgjedhur i debug nga 1 (vetëm gabimi) në 5 (gjithçka) ose 0 për " "Niveli i prezgjedhur i debug nga 1 (vetëm gabimi) në 5 (gjithçka) ose 0 për "
"jo output" "jo output"
#: gst/gst.c:171 #: gst/gst.c:168
msgid "LEVEL" msgid "LEVEL"
msgstr "NIVELI" msgstr "NIVELI"
#: gst/gst.c:173 #: gst/gst.c:170
msgid "" msgid ""
"Comma-separated list of category_name:level pairs to set specific levels for " "Comma-separated list of category_name:level pairs to set specific levels for "
"the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
@ -47,31 +47,27 @@ msgstr ""
"etiketa specifike për kategoritë individuale. Shembull: GST_AUTOPLUG:5," "etiketa specifike për kategoritë individuale. Shembull: GST_AUTOPLUG:5,"
"GST_ELEMENT_*:3" "GST_ELEMENT_*:3"
#: gst/gst.c:176 #: gst/gst.c:173
msgid "LIST" msgid "LIST"
msgstr "LISTË" msgstr "LISTË"
#: gst/gst.c:178 #: gst/gst.c:175
msgid "Disable colored debugging output" msgid "Disable colored debugging output"
msgstr "Ç'aktivo output shumëngjyrësh të debug" msgstr "Ç'aktivo output shumëngjyrësh të debug"
#: gst/gst.c:180 #: gst/gst.c:177
msgid "Disable debugging" msgid "Disable debugging"
msgstr "Ç'aktivo debug" msgstr "Ç'aktivo debug"
#: gst/gst.c:184 #: gst/gst.c:181
msgid "Disable accelerated CPU instructions"
msgstr "Ç'aktivo instruksionet e përshpejtimit të CPU"
#: gst/gst.c:186
msgid "Enable verbose plugin loading diagnostics" msgid "Enable verbose plugin loading diagnostics"
msgstr "Aktivo kërkesën e plugin të ngarkimit të diagnostikimeve" msgstr "Aktivo kërkesën e plugin të ngarkimit të diagnostikimeve"
#: gst/gst.c:188 #: gst/gst.c:183
msgid "PATHS" msgid "PATHS"
msgstr "POZICIONET" msgstr "POZICIONET"
#: gst/gst.c:191 #: gst/gst.c:186
#, fuzzy #, fuzzy
msgid "" msgid ""
"Comma-separated list of plugins to preload in addition to the list stored in " "Comma-separated list of plugins to preload in addition to the list stored in "
@ -80,33 +76,33 @@ msgstr ""
"Lista e plugin, të ndarë me presje, që duhen parangarkuar në plotësim të " "Lista e plugin, të ndarë me presje, që duhen parangarkuar në plotësim të "
"listës së regjistruar tek e ndryshueshmja e ambientit GST_PLUGIN_PATH" "listës së regjistruar tek e ndryshueshmja e ambientit GST_PLUGIN_PATH"
#: gst/gst.c:193 #: gst/gst.c:188
msgid "PLUGINS" msgid "PLUGINS"
msgstr "PLUGINS" msgstr "PLUGINS"
#: gst/gst.c:196 #: gst/gst.c:191
msgid "Disable trapping of segmentation faults during plugin loading" msgid "Disable trapping of segmentation faults during plugin loading"
msgstr "" msgstr ""
"Ç'aktivo regjistrimin e dështimeve të segmentuara gjatë ngarkimit të plugin" "Ç'aktivo regjistrimin e dështimeve të segmentuara gjatë ngarkimit të plugin"
#: gst/gst.c:199 #: gst/gst.c:194
msgid "SCHEDULER" msgid "SCHEDULER"
msgstr "PLANIFIKUES" msgstr "PLANIFIKUES"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "Registry to use" msgid "Registry to use"
msgstr "Regjistri që duhet përdorur" msgstr "Regjistri që duhet përdorur"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "REGISTRY" msgid "REGISTRY"
msgstr "REGJISTRI" msgstr "REGJISTRI"
#: gst/gst.c:214 #: gst/gst.c:209
#, c-format #, c-format
msgid "path list for loading plugins (separated by '%s')" msgid "path list for loading plugins (separated by '%s')"
msgstr "pozicioni i listës për ngarkimin e plugins (ndarë me '%s')" msgstr "pozicioni i listës për ngarkimin e plugins (ndarë me '%s')"
#: gst/gst.c:218 #: gst/gst.c:213
#, c-format #, c-format
msgid "Scheduler to use (default is '%s')" msgid "Scheduler to use (default is '%s')"
msgstr "Planifikuesi që duhet përdorur (i prezgjedhuri është '%s')" msgstr "Planifikuesi që duhet përdorur (i prezgjedhuri është '%s')"
@ -582,51 +578,46 @@ msgstr ""
msgid ", " msgid ", "
msgstr ", " msgstr ", "
#: gst/autoplug/gstspider.c:466 #: gst/elements/gstfilesink.c:243
#, c-format
msgid "There is no element present to handle the stream's mime type %s."
msgstr "Nuk ekziston asnjë element për të trajtuar llojin mime %s të fluksit."
#: gst/elements/gstfilesink.c:268
msgid "No file name specified for writing." msgid "No file name specified for writing."
msgstr "Nuk është përcaktuar asnjë emër file për tu shkruar." msgstr "Nuk është përcaktuar asnjë emër file për tu shkruar."
#: gst/elements/gstfilesink.c:275 #: gst/elements/gstfilesink.c:250
#, c-format #, c-format
msgid "Could not open file \"%s\" for writing." msgid "Could not open file \"%s\" for writing."
msgstr "E pamundur hapja e file \"%s\" në shkrim." msgstr "E pamundur hapja e file \"%s\" në shkrim."
#: gst/elements/gstfilesink.c:294 #: gst/elements/gstfilesink.c:269
#, c-format #, c-format
msgid "Error closing file \"%s\"." msgid "Error closing file \"%s\"."
msgstr "Gabim gjatë mbylljes së file \"%s\"." msgstr "Gabim gjatë mbylljes së file \"%s\"."
#: gst/elements/gstfilesink.c:364 gst/elements/gstfilesink.c:400 #: gst/elements/gstfilesink.c:339 gst/elements/gstfilesink.c:375
#: gst/elements/gstfilesink.c:453 #: gst/elements/gstfilesink.c:428
#, c-format #, c-format
msgid "Error while writing to file \"%s\"." msgid "Error while writing to file \"%s\"."
msgstr "Gabim gjatë shkrimit tek file \"%s\"." msgstr "Gabim gjatë shkrimit tek file \"%s\"."
#: gst/elements/gstfilesrc.c:764 gst/elements/gstmultifilesrc.c:298 #: gst/elements/gstfilesrc.c:725
msgid "No file name specified for reading." msgid "No file name specified for reading."
msgstr "Nuk është përcaktuar asnjë emër file për tu lexuar." msgstr "Nuk është përcaktuar asnjë emër file për tu lexuar."
#: gst/elements/gstfilesrc.c:779 gst/elements/gstmultifilesrc.c:306 #: gst/elements/gstfilesrc.c:740
#, c-format #, c-format
msgid "Could not open file \"%s\" for reading." msgid "Could not open file \"%s\" for reading."
msgstr "E pamundur hapja e file \"%s\" për lexim." msgstr "E pamundur hapja e file \"%s\" për lexim."
#: gst/elements/gstfilesrc.c:790 #: gst/elements/gstfilesrc.c:751
#, c-format #, c-format
msgid "\"%s\" is a directory." msgid "\"%s\" is a directory."
msgstr "\"%s\" është një directory." msgstr "\"%s\" është një directory."
#: gst/elements/gstfilesrc.c:796 #: gst/elements/gstfilesrc.c:757
#, c-format #, c-format
msgid "File \"%s\" is a socket." msgid "File \"%s\" is a socket."
msgstr "File \"%s\" është një socket." msgstr "File \"%s\" është një socket."
#: gst/elements/gstidentity.c:306 #: gst/elements/gstidentity.c:276
msgid "Failed after iterations as requested." msgid "Failed after iterations as requested."
msgstr "Dështoi mbas përsëritjeve sikurse të kërkuara." msgstr "Dështoi mbas përsëritjeve sikurse të kërkuara."
@ -715,123 +706,78 @@ msgstr "e pamundur lidhja e elementit sink për URI \"%s\""
msgid "empty pipeline not allowed" msgid "empty pipeline not allowed"
msgstr "nuk lejohet konduktori bosh" msgstr "nuk lejohet konduktori bosh"
#: tools/gst-inspect.c:1151 #: tools/gst-inspect.c:1032
msgid "Print all elements" msgid "Print all elements"
msgstr "Printo të gjithë elementët" msgstr "Printo të gjithë elementët"
#: tools/gst-launch.c:114 #: tools/gst-launch.c:190
#, c-format
msgid ""
"Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
"max %s ns).\n"
msgstr ""
#: tools/gst-launch.c:141
msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
msgstr "Përdorimi: gst-xmllaunch <file.xml> [ element.property=vlera ... ]\n"
#: tools/gst-launch.c:149
#, c-format
msgid "ERROR: parse of xml file '%s' failed.\n"
msgstr "GABIM: analizimi i file xml '%s' dështoi.\n"
#: tools/gst-launch.c:155
#, c-format
msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
msgstr "GABIM: asnjë element i pipline të toplevel tek file '%s'.\n"
#: tools/gst-launch.c:162
#, c-format
msgid "WARNING: only one toplevel element is supported at this time."
msgstr "KUJDES: vetëm një element toplevel suportohet aktualisht."
#: tools/gst-launch.c:173
#, c-format
msgid "ERROR: could not parse command line argument %d: %s.\n"
msgstr ""
"GABIM: i pamundur analizimi i argumentit %d të rreshtit të komandës: %s.\n"
#: tools/gst-launch.c:184
#, c-format
msgid "WARNING: element named '%s' not found.\n"
msgstr "KUJDES: elementi me emrin '%s' nuk u gjet.\n"
#: tools/gst-launch.c:327
#, c-format #, c-format
msgid "FOUND TAG : found by element \"%s\".\n" msgid "FOUND TAG : found by element \"%s\".\n"
msgstr "NDRYSHIM I GJETUR : u gjet nga elementi \"%s\".\n" msgstr "NDRYSHIM I GJETUR : u gjet nga elementi \"%s\".\n"
#: tools/gst-launch.c:412 #: tools/gst-launch.c:304
msgid "Output tags (also known as metadata)" msgid "Output tags (also known as metadata)"
msgstr "Tags e output (njohur gjithashtu si metadata)" msgstr "Tags e output (njohur gjithashtu si metadata)"
#: tools/gst-launch.c:414 #: tools/gst-launch.c:306
msgid "Output status information and property notifications" msgid "Output status information and property notifications"
msgstr "Njoftime të informacioneve dhe pronësisë së kondicionit të daljes" msgstr "Njoftime të informacioneve dhe pronësisë së kondicionit të daljes"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "Do not output status information of TYPE" msgid "Do not output status information of TYPE"
msgstr "Mos jep informacionin e gjendjes së LLOJIT" msgstr "Mos jep informacionin e gjendjes së LLOJIT"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "TYPE1,TYPE2,..." msgid "TYPE1,TYPE2,..."
msgstr "LLOJI1,LLOJI2,..." msgstr "LLOJI1,LLOJI2,..."
#: tools/gst-launch.c:419 #: tools/gst-launch.c:310
msgid "Save xml representation of pipeline to FILE and exit"
msgstr "Ruaj prezantimin xml të pipeline tek FILE dhe dil"
#: tools/gst-launch.c:419
msgid "FILE"
msgstr "FILE"
#: tools/gst-launch.c:422
msgid "Do not install a fault handler" msgid "Do not install a fault handler"
msgstr "Mos instalo një ushqyes të dëmtuar" msgstr "Mos instalo një ushqyes të dëmtuar"
#: tools/gst-launch.c:424 #: tools/gst-launch.c:312
msgid "Print alloc trace (if enabled at compile time)" msgid "Print alloc trace (if enabled at compile time)"
msgstr "Printo shenjat e alloc (nëse aktivuar në kohën e kompilimit)" msgstr "Printo shenjat e alloc (nëse aktivuar në kohën e kompilimit)"
#: tools/gst-launch.c:426 #: tools/gst-launch.c:314
msgid "Number of times to iterate pipeline" msgid "Number of times to iterate pipeline"
msgstr "Numri i herëve të përsëritjes së kanalit" msgstr "Numri i herëve të përsëritjes së kanalit"
#: tools/gst-launch.c:496 #: tools/gst-launch.c:379
#, c-format #, c-format
msgid "ERROR: pipeline could not be constructed: %s.\n" msgid "ERROR: pipeline could not be constructed: %s.\n"
msgstr "GABIM: i pamundur ndërtimi i pipeline: %s.\n" msgstr "GABIM: i pamundur ndërtimi i pipeline: %s.\n"
#: tools/gst-launch.c:500 #: tools/gst-launch.c:383
#, c-format
msgid "ERROR: pipeline could not be constructed.\n" msgid "ERROR: pipeline could not be constructed.\n"
msgstr "GABIM: i pamundur ndërtimi i pipeline.\n" msgstr "GABIM: i pamundur ndërtimi i pipeline.\n"
#: tools/gst-launch.c:504 #: tools/gst-launch.c:387
#, c-format #, c-format
msgid "WARNING: erroneous pipeline: %s\n" msgid "WARNING: erroneous pipeline: %s\n"
msgstr "KUJDES: pipline e gabuar: %s\n" msgstr "KUJDES: pipline e gabuar: %s\n"
#: tools/gst-launch.c:505 #: tools/gst-launch.c:388
#, c-format
msgid " Trying to run anyway.\n" msgid " Trying to run anyway.\n"
msgstr " Duke u përpjekur të zbatohet sidoqoftë.\n" msgstr " Duke u përpjekur të zbatohet sidoqoftë.\n"
#: tools/gst-launch.c:532 #: tools/gst-launch.c:408
#, c-format
msgid "ERROR: the 'pipeline' element wasn't found.\n" msgid "ERROR: the 'pipeline' element wasn't found.\n"
msgstr "GABIM: elementi 'konduktor' nuk u gjet.\n" msgstr "GABIM: elementi 'konduktor' nuk u gjet.\n"
#: tools/gst-launch.c:539 #: tools/gst-launch.c:417
#, c-format
msgid "RUNNING pipeline ...\n" msgid "RUNNING pipeline ...\n"
msgstr "DUKE ZBATUAR pipeline ...\n" msgstr "DUKE ZBATUAR pipeline ...\n"
#: tools/gst-launch.c:542 #: tools/gst-launch.c:421
#, c-format
msgid "ERROR: pipeline doesn't want to play.\n" msgid "ERROR: pipeline doesn't want to play.\n"
msgstr "GABIM: pipeline nuk dëshiron të luajë.\n" msgstr "GABIM: pipeline nuk dëshiron të luajë.\n"
#: tools/gst-launch.c:445
#, c-format
msgid "Execution ended after %.2fs (%.2fs or %.2f%% idling).\n"
msgstr ""
#: tools/gst-register.c:49 #: tools/gst-register.c:49
#, fuzzy, c-format #, fuzzy, c-format
msgid "Added plugin %s with %d feature.\n" msgid "Added plugin %s with %d feature.\n"
@ -866,6 +812,39 @@ msgid_plural "Loaded %d plugins with %d features.\n"
msgstr[0] "U ngarkuan %d plugins me %d %s.\n" msgstr[0] "U ngarkuan %d plugins me %d %s.\n"
msgstr[1] "U ngarkuan %d plugins me %d %s.\n" msgstr[1] "U ngarkuan %d plugins me %d %s.\n"
#~ msgid "Disable accelerated CPU instructions"
#~ msgstr "Ç'aktivo instruksionet e përshpejtimit të CPU"
#~ msgid "There is no element present to handle the stream's mime type %s."
#~ msgstr ""
#~ "Nuk ekziston asnjë element për të trajtuar llojin mime %s të fluksit."
#~ msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
#~ msgstr ""
#~ "Përdorimi: gst-xmllaunch <file.xml> [ element.property=vlera ... ]\n"
#~ msgid "ERROR: parse of xml file '%s' failed.\n"
#~ msgstr "GABIM: analizimi i file xml '%s' dështoi.\n"
#~ msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
#~ msgstr "GABIM: asnjë element i pipline të toplevel tek file '%s'.\n"
#~ msgid "WARNING: only one toplevel element is supported at this time."
#~ msgstr "KUJDES: vetëm një element toplevel suportohet aktualisht."
#~ msgid "ERROR: could not parse command line argument %d: %s.\n"
#~ msgstr ""
#~ "GABIM: i pamundur analizimi i argumentit %d të rreshtit të komandës: %s.\n"
#~ msgid "WARNING: element named '%s' not found.\n"
#~ msgstr "KUJDES: elementi me emrin '%s' nuk u gjet.\n"
#~ msgid "Save xml representation of pipeline to FILE and exit"
#~ msgstr "Ruaj prezantimin xml të pipeline tek FILE dhe dil"
#~ msgid "FILE"
#~ msgstr "FILE"
#~ msgid "caps" #~ msgid "caps"
#~ msgstr "mbrojtëse" #~ msgstr "mbrojtëse"

196
po/sr.po
View file

@ -6,7 +6,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gstreamer 0.8.8\n" "Project-Id-Version: gstreamer 0.8.8\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-05-02 19:36+0200\n" "POT-Creation-Date: 2005-05-17 18:37+0200\n"
"PO-Revision-Date: 2005-01-27 16:58+0100\n" "PO-Revision-Date: 2005-01-27 16:58+0100\n"
"Last-Translator: Danilo Segan <dsegan@gmx.net>\n" "Last-Translator: Danilo Segan <dsegan@gmx.net>\n"
"Language-Team: Serbian <gnu@prevod.org>\n" "Language-Team: Serbian <gnu@prevod.org>\n"
@ -16,30 +16,30 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#: gst/gst.c:160 #: gst/gst.c:157
msgid "Print the GStreamer version" msgid "Print the GStreamer version"
msgstr "Испиши издање Гстримера" msgstr "Испиши издање Гстримера"
#: gst/gst.c:162 #: gst/gst.c:159
msgid "Make all warnings fatal" msgid "Make all warnings fatal"
msgstr "Учини сва упозорења кобним" msgstr "Учини сва упозорења кобним"
#: gst/gst.c:166 #: gst/gst.c:163
msgid "Print available debug categories and exit" msgid "Print available debug categories and exit"
msgstr "Испиши доступне категорије за налажење грешака и заврши" msgstr "Испиши доступне категорије за налажење грешака и заврши"
#: gst/gst.c:169 #: gst/gst.c:166
msgid "" msgid ""
"Default debug level from 1 (only error) to 5 (anything) or 0 for no output" "Default debug level from 1 (only error) to 5 (anything) or 0 for no output"
msgstr "" msgstr ""
"Подразумевани ниво опширности од 1 (само грешке) до 5 (све) или 0 (без " "Подразумевани ниво опширности од 1 (само грешке) до 5 (све) или 0 (без "
"излаза)" "излаза)"
#: gst/gst.c:171 #: gst/gst.c:168
msgid "LEVEL" msgid "LEVEL"
msgstr "НИВО" msgstr "НИВО"
#: gst/gst.c:173 #: gst/gst.c:170
msgid "" msgid ""
"Comma-separated list of category_name:level pairs to set specific levels for " "Comma-separated list of category_name:level pairs to set specific levels for "
"the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
@ -47,31 +47,27 @@ msgstr ""
"Запетом раздвојени списак парова имеатегорије:ниво за постављање нарочитих " "Запетом раздвојени списак парова имеатегорије:ниво за постављање нарочитих "
"нивоа за појединачне категорије. Пример: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "нивоа за појединачне категорије. Пример: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
#: gst/gst.c:176 #: gst/gst.c:173
msgid "LIST" msgid "LIST"
msgstr "СПИСАК" msgstr "СПИСАК"
#: gst/gst.c:178 #: gst/gst.c:175
msgid "Disable colored debugging output" msgid "Disable colored debugging output"
msgstr "Искључи обојени излаз за исправљање грешака" msgstr "Искључи обојени излаз за исправљање грешака"
#: gst/gst.c:180 #: gst/gst.c:177
msgid "Disable debugging" msgid "Disable debugging"
msgstr "Искључи исправљање грешака" msgstr "Искључи исправљање грешака"
#: gst/gst.c:184 #: gst/gst.c:181
msgid "Disable accelerated CPU instructions"
msgstr "Искључи убрзане инструкције процесора"
#: gst/gst.c:186
msgid "Enable verbose plugin loading diagnostics" msgid "Enable verbose plugin loading diagnostics"
msgstr "Укључи опширну дијагностику при учитавању додатка" msgstr "Укључи опширну дијагностику при учитавању додатка"
#: gst/gst.c:188 #: gst/gst.c:183
msgid "PATHS" msgid "PATHS"
msgstr "ПУТАЊЕ" msgstr "ПУТАЊЕ"
#: gst/gst.c:191 #: gst/gst.c:186
#, fuzzy #, fuzzy
msgid "" msgid ""
"Comma-separated list of plugins to preload in addition to the list stored in " "Comma-separated list of plugins to preload in addition to the list stored in "
@ -80,32 +76,32 @@ msgstr ""
"Запетом раздвојен списак додатака који се предучитавају поред списка из " "Запетом раздвојен списак додатака који се предучитавају поред списка из "
"променљиве окружења GST_PLUGIN_PATH" "променљиве окружења GST_PLUGIN_PATH"
#: gst/gst.c:193 #: gst/gst.c:188
msgid "PLUGINS" msgid "PLUGINS"
msgstr "ДОДАЦИ" msgstr "ДОДАЦИ"
#: gst/gst.c:196 #: gst/gst.c:191
msgid "Disable trapping of segmentation faults during plugin loading" msgid "Disable trapping of segmentation faults during plugin loading"
msgstr "Искључи пресретање погрешних приступа меморији при учитавању додатака" msgstr "Искључи пресретање погрешних приступа меморији при учитавању додатака"
#: gst/gst.c:199 #: gst/gst.c:194
msgid "SCHEDULER" msgid "SCHEDULER"
msgstr "РАСПОРЕЂИВАЧ" msgstr "РАСПОРЕЂИВАЧ"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "Registry to use" msgid "Registry to use"
msgstr "Користи регистар" msgstr "Користи регистар"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "REGISTRY" msgid "REGISTRY"
msgstr "РЕГИСТАР" msgstr "РЕГИСТАР"
#: gst/gst.c:214 #: gst/gst.c:209
#, c-format #, c-format
msgid "path list for loading plugins (separated by '%s')" msgid "path list for loading plugins (separated by '%s')"
msgstr "списак путања за учитавање додатака (раздвојених са '%s')" msgstr "списак путања за учитавање додатака (раздвојених са '%s')"
#: gst/gst.c:218 #: gst/gst.c:213
#, c-format #, c-format
msgid "Scheduler to use (default is '%s')" msgid "Scheduler to use (default is '%s')"
msgstr "Користи распоређивач (подразумева се '%s')" msgstr "Користи распоређивач (подразумева се '%s')"
@ -591,51 +587,46 @@ msgstr ""
msgid ", " msgid ", "
msgstr ", " msgstr ", "
#: gst/autoplug/gstspider.c:466 #: gst/elements/gstfilesink.c:243
#, c-format
msgid "There is no element present to handle the stream's mime type %s."
msgstr "Није присутан елемент за баратање током МИМЕ врсте %s."
#: gst/elements/gstfilesink.c:268
msgid "No file name specified for writing." msgid "No file name specified for writing."
msgstr "Није наведено име датотеке за упис." msgstr "Није наведено име датотеке за упис."
#: gst/elements/gstfilesink.c:275 #: gst/elements/gstfilesink.c:250
#, c-format #, c-format
msgid "Could not open file \"%s\" for writing." msgid "Could not open file \"%s\" for writing."
msgstr "Не могу да отворим датотеку „%s“ ради уписа." msgstr "Не могу да отворим датотеку „%s“ ради уписа."
#: gst/elements/gstfilesink.c:294 #: gst/elements/gstfilesink.c:269
#, c-format #, c-format
msgid "Error closing file \"%s\"." msgid "Error closing file \"%s\"."
msgstr "Грешка при затварању датотеке „%s“." msgstr "Грешка при затварању датотеке „%s“."
#: gst/elements/gstfilesink.c:364 gst/elements/gstfilesink.c:400 #: gst/elements/gstfilesink.c:339 gst/elements/gstfilesink.c:375
#: gst/elements/gstfilesink.c:453 #: gst/elements/gstfilesink.c:428
#, c-format #, c-format
msgid "Error while writing to file \"%s\"." msgid "Error while writing to file \"%s\"."
msgstr "Грешка при упису у датотеку „%s“." msgstr "Грешка при упису у датотеку „%s“."
#: gst/elements/gstfilesrc.c:764 gst/elements/gstmultifilesrc.c:298 #: gst/elements/gstfilesrc.c:725
msgid "No file name specified for reading." msgid "No file name specified for reading."
msgstr "Није наведено име датотеке за читање." msgstr "Није наведено име датотеке за читање."
#: gst/elements/gstfilesrc.c:779 gst/elements/gstmultifilesrc.c:306 #: gst/elements/gstfilesrc.c:740
#, c-format #, c-format
msgid "Could not open file \"%s\" for reading." msgid "Could not open file \"%s\" for reading."
msgstr "Не могу да отворим датотеку „%s“ ради читања." msgstr "Не могу да отворим датотеку „%s“ ради читања."
#: gst/elements/gstfilesrc.c:790 #: gst/elements/gstfilesrc.c:751
#, c-format #, c-format
msgid "\"%s\" is a directory." msgid "\"%s\" is a directory."
msgstr "\"%s\" је директоријум." msgstr "\"%s\" је директоријум."
#: gst/elements/gstfilesrc.c:796 #: gst/elements/gstfilesrc.c:757
#, c-format #, c-format
msgid "File \"%s\" is a socket." msgid "File \"%s\" is a socket."
msgstr "Датотека „%s“ је сокет." msgstr "Датотека „%s“ је сокет."
#: gst/elements/gstidentity.c:306 #: gst/elements/gstidentity.c:276
msgid "Failed after iterations as requested." msgid "Failed after iterations as requested."
msgstr "Неуспех након траженог броја покушаја." msgstr "Неуспех након траженог броја покушаја."
@ -724,125 +715,78 @@ msgstr "не могу да вежем завршни елемент за адр
msgid "empty pipeline not allowed" msgid "empty pipeline not allowed"
msgstr "није допуштен празан цевовод" msgstr "није допуштен празан цевовод"
#: tools/gst-inspect.c:1151 #: tools/gst-inspect.c:1032
msgid "Print all elements" msgid "Print all elements"
msgstr "Испиши све елементе" msgstr "Испиши све елементе"
#: tools/gst-launch.c:114 #: tools/gst-launch.c:190
#, c-format
msgid ""
"Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
"max %s ns).\n"
msgstr ""
"Извршавање завршено након %s покушаја (збир %s ns, просек %s ns, мин %s ns, "
"макс %s ns).\n"
#: tools/gst-launch.c:141
msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
msgstr ""
"Употреба: gst-xmllaunch <датотека.xml> [ елемент.особина=вредност ... ]\n"
#: tools/gst-launch.c:149
#, c-format
msgid "ERROR: parse of xml file '%s' failed.\n"
msgstr "ГРЕШКА: неуспешно рашчлањивање xml датотеке „%s“.\n"
#: tools/gst-launch.c:155
#, c-format
msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
msgstr "ГРЕШКА: нема врховног елемента цевовода у датотеци „%s“.\n"
#: tools/gst-launch.c:162
#, c-format
msgid "WARNING: only one toplevel element is supported at this time."
msgstr "УПОЗОРЕЊЕ: тренутно је подржан само један врховни елемент."
#: tools/gst-launch.c:173
#, c-format
msgid "ERROR: could not parse command line argument %d: %s.\n"
msgstr "ГРЕШКА: не могу да рашчланим %d. аргумент наредбе: %s.\n"
#: tools/gst-launch.c:184
#, c-format
msgid "WARNING: element named '%s' not found.\n"
msgstr "УПОЗОРЕЊЕ: елемент са именом „%s“ није нађен.\n"
#: tools/gst-launch.c:327
#, c-format #, c-format
msgid "FOUND TAG : found by element \"%s\".\n" msgid "FOUND TAG : found by element \"%s\".\n"
msgstr "НАЂОХ ОЗНАКУ : нашао је елемент „%s“.\n" msgstr "НАЂОХ ОЗНАКУ : нашао је елемент „%s“.\n"
#: tools/gst-launch.c:412 #: tools/gst-launch.c:304
msgid "Output tags (also known as metadata)" msgid "Output tags (also known as metadata)"
msgstr "Излазне ознаке (такође познато и као метаподаци)" msgstr "Излазне ознаке (такође познато и као метаподаци)"
#: tools/gst-launch.c:414 #: tools/gst-launch.c:306
msgid "Output status information and property notifications" msgid "Output status information and property notifications"
msgstr "Испиши податке о стању и обавештења о особинама" msgstr "Испиши податке о стању и обавештења о особинама"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "Do not output status information of TYPE" msgid "Do not output status information of TYPE"
msgstr "Не исписуј податке о стању за ВРСТУ" msgstr "Не исписуј податке о стању за ВРСТУ"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "TYPE1,TYPE2,..." msgid "TYPE1,TYPE2,..."
msgstr "ВРСТА1,ВРСТА2,..." msgstr "ВРСТА1,ВРСТА2,..."
#: tools/gst-launch.c:419 #: tools/gst-launch.c:310
msgid "Save xml representation of pipeline to FILE and exit"
msgstr "Сачувај xml облик цевовода у ДАТОТЕКУ и заврши"
#: tools/gst-launch.c:419
msgid "FILE"
msgstr "ДАТОТЕКА"
#: tools/gst-launch.c:422
msgid "Do not install a fault handler" msgid "Do not install a fault handler"
msgstr "Не постављај руковаоца грешкама" msgstr "Не постављај руковаоца грешкама"
#: tools/gst-launch.c:424 #: tools/gst-launch.c:312
msgid "Print alloc trace (if enabled at compile time)" msgid "Print alloc trace (if enabled at compile time)"
msgstr "Испиши траг доделе меморије (ако је укључено при превођењу)" msgstr "Испиши траг доделе меморије (ако је укључено при превођењу)"
#: tools/gst-launch.c:426 #: tools/gst-launch.c:314
msgid "Number of times to iterate pipeline" msgid "Number of times to iterate pipeline"
msgstr "Број покушаја пуштања цевовода" msgstr "Број покушаја пуштања цевовода"
#: tools/gst-launch.c:496 #: tools/gst-launch.c:379
#, c-format #, c-format
msgid "ERROR: pipeline could not be constructed: %s.\n" msgid "ERROR: pipeline could not be constructed: %s.\n"
msgstr "ГРЕШКА: не могу да саставим цевовод: %s.\n" msgstr "ГРЕШКА: не могу да саставим цевовод: %s.\n"
#: tools/gst-launch.c:500 #: tools/gst-launch.c:383
#, c-format
msgid "ERROR: pipeline could not be constructed.\n" msgid "ERROR: pipeline could not be constructed.\n"
msgstr "ГРЕШКА: не могу да саставим цевовод.\n" msgstr "ГРЕШКА: не могу да саставим цевовод.\n"
#: tools/gst-launch.c:504 #: tools/gst-launch.c:387
#, c-format #, c-format
msgid "WARNING: erroneous pipeline: %s\n" msgid "WARNING: erroneous pipeline: %s\n"
msgstr "УПОЗОРЕЊЕ: неисправан цевовод: %s\n" msgstr "УПОЗОРЕЊЕ: неисправан цевовод: %s\n"
#: tools/gst-launch.c:505 #: tools/gst-launch.c:388
#, c-format
msgid " Trying to run anyway.\n" msgid " Trying to run anyway.\n"
msgstr " Ипак покушавам да покренем.\n" msgstr " Ипак покушавам да покренем.\n"
#: tools/gst-launch.c:532 #: tools/gst-launch.c:408
#, c-format
msgid "ERROR: the 'pipeline' element wasn't found.\n" msgid "ERROR: the 'pipeline' element wasn't found.\n"
msgstr "ГРЕШКА: елемент „pipeline“ није нађен.\n" msgstr "ГРЕШКА: елемент „pipeline“ није нађен.\n"
#: tools/gst-launch.c:539 #: tools/gst-launch.c:417
#, c-format
msgid "RUNNING pipeline ...\n" msgid "RUNNING pipeline ...\n"
msgstr "Покрећем цевовод...\n" msgstr "Покрећем цевовод...\n"
#: tools/gst-launch.c:542 #: tools/gst-launch.c:421
#, c-format
msgid "ERROR: pipeline doesn't want to play.\n" msgid "ERROR: pipeline doesn't want to play.\n"
msgstr "ГРЕШКА: цевовод не жели да пусти.\n" msgstr "ГРЕШКА: цевовод не жели да пусти.\n"
#: tools/gst-launch.c:445
#, c-format
msgid "Execution ended after %.2fs (%.2fs or %.2f%% idling).\n"
msgstr ""
#: tools/gst-register.c:49 #: tools/gst-register.c:49
#, fuzzy, c-format #, fuzzy, c-format
msgid "Added plugin %s with %d feature.\n" msgid "Added plugin %s with %d feature.\n"
@ -879,6 +823,44 @@ msgstr[0] "Учитано %d додатака са %d %s.\n"
msgstr[1] "Учитано %d додатака са %d %s.\n" msgstr[1] "Учитано %d додатака са %d %s.\n"
msgstr[2] "Учитано %d додатака са %d %s.\n" msgstr[2] "Учитано %d додатака са %d %s.\n"
#~ msgid "Disable accelerated CPU instructions"
#~ msgstr "Искључи убрзане инструкције процесора"
#~ msgid "There is no element present to handle the stream's mime type %s."
#~ msgstr "Није присутан елемент за баратање током МИМЕ врсте %s."
#~ msgid ""
#~ "Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
#~ "max %s ns).\n"
#~ msgstr ""
#~ "Извршавање завршено након %s покушаја (збир %s ns, просек %s ns, мин %s "
#~ "ns, макс %s ns).\n"
#~ msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
#~ msgstr ""
#~ "Употреба: gst-xmllaunch <датотека.xml> [ елемент.особина=вредност ... ]\n"
#~ msgid "ERROR: parse of xml file '%s' failed.\n"
#~ msgstr "ГРЕШКА: неуспешно рашчлањивање xml датотеке „%s“.\n"
#~ msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
#~ msgstr "ГРЕШКА: нема врховног елемента цевовода у датотеци „%s“.\n"
#~ msgid "WARNING: only one toplevel element is supported at this time."
#~ msgstr "УПОЗОРЕЊЕ: тренутно је подржан само један врховни елемент."
#~ msgid "ERROR: could not parse command line argument %d: %s.\n"
#~ msgstr "ГРЕШКА: не могу да рашчланим %d. аргумент наредбе: %s.\n"
#~ msgid "WARNING: element named '%s' not found.\n"
#~ msgstr "УПОЗОРЕЊЕ: елемент са именом „%s“ није нађен.\n"
#~ msgid "Save xml representation of pipeline to FILE and exit"
#~ msgstr "Сачувај xml облик цевовода у ДАТОТЕКУ и заврши"
#~ msgid "FILE"
#~ msgstr "ДАТОТЕКА"
# bug: this should be full word # bug: this should be full word
#~ msgid "caps" #~ msgid "caps"
#~ msgstr "могућности" #~ msgstr "могућности"

197
po/sv.po
View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gstreamer 0.8.7pre2\n" "Project-Id-Version: gstreamer 0.8.7pre2\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-05-02 19:36+0200\n" "POT-Creation-Date: 2005-05-17 18:37+0200\n"
"PO-Revision-Date: 2004-12-21 14:49+0100\n" "PO-Revision-Date: 2004-12-21 14:49+0100\n"
"Last-Translator: Christian Rose <menthos@menthos.com>\n" "Last-Translator: Christian Rose <menthos@menthos.com>\n"
"Language-Team: Swedish <sv@li.org>\n" "Language-Team: Swedish <sv@li.org>\n"
@ -17,30 +17,30 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: gst/gst.c:160 #: gst/gst.c:157
msgid "Print the GStreamer version" msgid "Print the GStreamer version"
msgstr "Skriv ut Gstreamer-versionen" msgstr "Skriv ut Gstreamer-versionen"
#: gst/gst.c:162 #: gst/gst.c:159
msgid "Make all warnings fatal" msgid "Make all warnings fatal"
msgstr "Gör alla varningar ödesdigra" msgstr "Gör alla varningar ödesdigra"
#: gst/gst.c:166 #: gst/gst.c:163
msgid "Print available debug categories and exit" msgid "Print available debug categories and exit"
msgstr "Skriv ut tillgängliga felsökningskategorier och avsluta" msgstr "Skriv ut tillgängliga felsökningskategorier och avsluta"
#: gst/gst.c:169 #: gst/gst.c:166
msgid "" msgid ""
"Default debug level from 1 (only error) to 5 (anything) or 0 for no output" "Default debug level from 1 (only error) to 5 (anything) or 0 for no output"
msgstr "" msgstr ""
"Standardfelsökningsnivå från 1 (endast fel) till 5 (allting) eller 0 för " "Standardfelsökningsnivå från 1 (endast fel) till 5 (allting) eller 0 för "
"ingen utmatning" "ingen utmatning"
#: gst/gst.c:171 #: gst/gst.c:168
msgid "LEVEL" msgid "LEVEL"
msgstr "NIVÅ" msgstr "NIVÅ"
#: gst/gst.c:173 #: gst/gst.c:170
msgid "" msgid ""
"Comma-separated list of category_name:level pairs to set specific levels for " "Comma-separated list of category_name:level pairs to set specific levels for "
"the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
@ -48,31 +48,27 @@ msgstr ""
"Kommaseparerad lista med kategorinamn:nivå-par för att ställa in specifika " "Kommaseparerad lista med kategorinamn:nivå-par för att ställa in specifika "
"nivåer för de enskilda kategorierna. Exempel: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "nivåer för de enskilda kategorierna. Exempel: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
#: gst/gst.c:176 #: gst/gst.c:173
msgid "LIST" msgid "LIST"
msgstr "LISTA" msgstr "LISTA"
#: gst/gst.c:178 #: gst/gst.c:175
msgid "Disable colored debugging output" msgid "Disable colored debugging output"
msgstr "Inaktivera färglagd felsökningsutmatning" msgstr "Inaktivera färglagd felsökningsutmatning"
#: gst/gst.c:180 #: gst/gst.c:177
msgid "Disable debugging" msgid "Disable debugging"
msgstr "Inaktivera felsökning" msgstr "Inaktivera felsökning"
#: gst/gst.c:184 #: gst/gst.c:181
msgid "Disable accelerated CPU instructions"
msgstr "Inaktivera accelererade processorinstruktioner"
#: gst/gst.c:186
msgid "Enable verbose plugin loading diagnostics" msgid "Enable verbose plugin loading diagnostics"
msgstr "Aktivera utförlig diagnostik vid inläsning av insticksmoduler" msgstr "Aktivera utförlig diagnostik vid inläsning av insticksmoduler"
#: gst/gst.c:188 #: gst/gst.c:183
msgid "PATHS" msgid "PATHS"
msgstr "SÖKVÄGAR" msgstr "SÖKVÄGAR"
#: gst/gst.c:191 #: gst/gst.c:186
msgid "" msgid ""
"Comma-separated list of plugins to preload in addition to the list stored in " "Comma-separated list of plugins to preload in addition to the list stored in "
"environment variable GST_PLUGIN_PATH" "environment variable GST_PLUGIN_PATH"
@ -80,33 +76,33 @@ msgstr ""
"Kommaseparerad lista med insticksmoduler att förhandsinläsa utöver listan " "Kommaseparerad lista med insticksmoduler att förhandsinläsa utöver listan "
"som lagras i miljövariabeln GST_PLUGIN_PATH" "som lagras i miljövariabeln GST_PLUGIN_PATH"
#: gst/gst.c:193 #: gst/gst.c:188
msgid "PLUGINS" msgid "PLUGINS"
msgstr "INSTICKSMODULER" msgstr "INSTICKSMODULER"
#: gst/gst.c:196 #: gst/gst.c:191
msgid "Disable trapping of segmentation faults during plugin loading" msgid "Disable trapping of segmentation faults during plugin loading"
msgstr "" msgstr ""
"Inaktivera fångst av segmenteringsfel under inläsning av insticksmoduler" "Inaktivera fångst av segmenteringsfel under inläsning av insticksmoduler"
#: gst/gst.c:199 #: gst/gst.c:194
msgid "SCHEDULER" msgid "SCHEDULER"
msgstr "SCHEMALÄGGARE" msgstr "SCHEMALÄGGARE"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "Registry to use" msgid "Registry to use"
msgstr "Register att använda" msgstr "Register att använda"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "REGISTRY" msgid "REGISTRY"
msgstr "REGISTER" msgstr "REGISTER"
#: gst/gst.c:214 #: gst/gst.c:209
#, c-format #, c-format
msgid "path list for loading plugins (separated by '%s')" msgid "path list for loading plugins (separated by '%s')"
msgstr "sökvägslista för inläsning av insticksmoduler (åtskild av \"%s\")" msgstr "sökvägslista för inläsning av insticksmoduler (åtskild av \"%s\")"
#: gst/gst.c:218 #: gst/gst.c:213
#, c-format #, c-format
msgid "Scheduler to use (default is '%s')" msgid "Scheduler to use (default is '%s')"
msgstr "Schemaläggare att använda (standardvärdet är \"%s\")" msgstr "Schemaläggare att använda (standardvärdet är \"%s\")"
@ -585,52 +581,46 @@ msgstr ""
msgid ", " msgid ", "
msgstr ", " msgstr ", "
#: gst/autoplug/gstspider.c:466 #: gst/elements/gstfilesink.c:243
#, c-format
msgid "There is no element present to handle the stream's mime type %s."
msgstr ""
"Det finns inget element tillgängligt för att hantera flödets mime-typ %s."
#: gst/elements/gstfilesink.c:268
msgid "No file name specified for writing." msgid "No file name specified for writing."
msgstr "Inget filnamn angivet för skrivning." msgstr "Inget filnamn angivet för skrivning."
#: gst/elements/gstfilesink.c:275 #: gst/elements/gstfilesink.c:250
#, c-format #, c-format
msgid "Could not open file \"%s\" for writing." msgid "Could not open file \"%s\" for writing."
msgstr "Kunde inte öppna filen \"%s\" för skrivning." msgstr "Kunde inte öppna filen \"%s\" för skrivning."
#: gst/elements/gstfilesink.c:294 #: gst/elements/gstfilesink.c:269
#, c-format #, c-format
msgid "Error closing file \"%s\"." msgid "Error closing file \"%s\"."
msgstr "Fel vid stängning av filen \"%s\"." msgstr "Fel vid stängning av filen \"%s\"."
#: gst/elements/gstfilesink.c:364 gst/elements/gstfilesink.c:400 #: gst/elements/gstfilesink.c:339 gst/elements/gstfilesink.c:375
#: gst/elements/gstfilesink.c:453 #: gst/elements/gstfilesink.c:428
#, c-format #, c-format
msgid "Error while writing to file \"%s\"." msgid "Error while writing to file \"%s\"."
msgstr "Fel vid skrivning till filen \"%s\"." msgstr "Fel vid skrivning till filen \"%s\"."
#: gst/elements/gstfilesrc.c:764 gst/elements/gstmultifilesrc.c:298 #: gst/elements/gstfilesrc.c:725
msgid "No file name specified for reading." msgid "No file name specified for reading."
msgstr "Inget filnamn angivet för läsning." msgstr "Inget filnamn angivet för läsning."
#: gst/elements/gstfilesrc.c:779 gst/elements/gstmultifilesrc.c:306 #: gst/elements/gstfilesrc.c:740
#, c-format #, c-format
msgid "Could not open file \"%s\" for reading." msgid "Could not open file \"%s\" for reading."
msgstr "Kunde inte öppna filen \"%s\" för läsning." msgstr "Kunde inte öppna filen \"%s\" för läsning."
#: gst/elements/gstfilesrc.c:790 #: gst/elements/gstfilesrc.c:751
#, c-format #, c-format
msgid "\"%s\" is a directory." msgid "\"%s\" is a directory."
msgstr "\"%s\" är en katalog." msgstr "\"%s\" är en katalog."
#: gst/elements/gstfilesrc.c:796 #: gst/elements/gstfilesrc.c:757
#, c-format #, c-format
msgid "File \"%s\" is a socket." msgid "File \"%s\" is a socket."
msgstr "Filen \"%s\" är ett uttag." msgstr "Filen \"%s\" är ett uttag."
#: gst/elements/gstidentity.c:306 #: gst/elements/gstidentity.c:276
msgid "Failed after iterations as requested." msgid "Failed after iterations as requested."
msgstr "Misslyckades efter iterationer som begärt." msgstr "Misslyckades efter iterationer som begärt."
@ -721,126 +711,80 @@ msgstr "kunde inte länka utgångselementet för URI:n \"%s\""
msgid "empty pipeline not allowed" msgid "empty pipeline not allowed"
msgstr "tom rörledning är inte tillåtet" msgstr "tom rörledning är inte tillåtet"
#: tools/gst-inspect.c:1151 #: tools/gst-inspect.c:1032
msgid "Print all elements" msgid "Print all elements"
msgstr "Skriv ut alla element" msgstr "Skriv ut alla element"
#: tools/gst-launch.c:114 #: tools/gst-launch.c:190
#, c-format
msgid ""
"Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
"max %s ns).\n"
msgstr ""
"Körning avslutades efter %s iterationer (totalt %s ns, medel %s ns, min %s "
"ns, max %s ns).\n"
#: tools/gst-launch.c:141
msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
msgstr "Användning: gst-xmllaunch <fil.xml> [ element.egenskap=värde ... ]\n"
#: tools/gst-launch.c:149
#, c-format
msgid "ERROR: parse of xml file '%s' failed.\n"
msgstr "FEL: tolkning av xml-filen \"%s\" misslyckades.\n"
#: tools/gst-launch.c:155
#, c-format
msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
msgstr "FEL: inget rörledningselement på översta nivån i filen \"%s\".\n"
#: tools/gst-launch.c:162
#, c-format
msgid "WARNING: only one toplevel element is supported at this time."
msgstr "VARNING: endast ett element på översta nivån stöds just nu."
#: tools/gst-launch.c:173
#, c-format
msgid "ERROR: could not parse command line argument %d: %s.\n"
msgstr "FEL: kunde inte tolka kommandoradsargumentet %d: %s.\n"
#: tools/gst-launch.c:184
#, c-format
msgid "WARNING: element named '%s' not found.\n"
msgstr "VARNING: elementet med namnet \"%s\" hittades inte.\n"
#: tools/gst-launch.c:327
#, c-format #, c-format
msgid "FOUND TAG : found by element \"%s\".\n" msgid "FOUND TAG : found by element \"%s\".\n"
msgstr "HITTADE TAGG : hittat av elementet \"%s\".\n" msgstr "HITTADE TAGG : hittat av elementet \"%s\".\n"
#: tools/gst-launch.c:412 #: tools/gst-launch.c:304
msgid "Output tags (also known as metadata)" msgid "Output tags (also known as metadata)"
msgstr "Utmatningstaggar (även känt som metadata)" msgstr "Utmatningstaggar (även känt som metadata)"
#: tools/gst-launch.c:414 #: tools/gst-launch.c:306
msgid "Output status information and property notifications" msgid "Output status information and property notifications"
msgstr "Skriv ut statusinformation och egenskapsnotifieringar" msgstr "Skriv ut statusinformation och egenskapsnotifieringar"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "Do not output status information of TYPE" msgid "Do not output status information of TYPE"
msgstr "Skriv inte ut statusinformation av TYP" msgstr "Skriv inte ut statusinformation av TYP"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "TYPE1,TYPE2,..." msgid "TYPE1,TYPE2,..."
msgstr "TYP1,TYP2,..." msgstr "TYP1,TYP2,..."
#: tools/gst-launch.c:419 #: tools/gst-launch.c:310
msgid "Save xml representation of pipeline to FILE and exit"
msgstr "Spara xml-representation av rörledningen i FIL och avsluta"
#: tools/gst-launch.c:419
msgid "FILE"
msgstr "FIL"
#: tools/gst-launch.c:422
msgid "Do not install a fault handler" msgid "Do not install a fault handler"
msgstr "Installera inte en felhanterare" msgstr "Installera inte en felhanterare"
#: tools/gst-launch.c:424 #: tools/gst-launch.c:312
msgid "Print alloc trace (if enabled at compile time)" msgid "Print alloc trace (if enabled at compile time)"
msgstr "Skriv ut alloc-spår (om aktiverat vid kompileringen)" msgstr "Skriv ut alloc-spår (om aktiverat vid kompileringen)"
#: tools/gst-launch.c:426 #: tools/gst-launch.c:314
msgid "Number of times to iterate pipeline" msgid "Number of times to iterate pipeline"
msgstr "Antalet gånger som rörledningen ska itereras" msgstr "Antalet gånger som rörledningen ska itereras"
#: tools/gst-launch.c:496 #: tools/gst-launch.c:379
#, c-format #, c-format
msgid "ERROR: pipeline could not be constructed: %s.\n" msgid "ERROR: pipeline could not be constructed: %s.\n"
msgstr "FEL: rörledningen kunde inte konstrueras: %s.\n" msgstr "FEL: rörledningen kunde inte konstrueras: %s.\n"
#: tools/gst-launch.c:500 #: tools/gst-launch.c:383
#, c-format
msgid "ERROR: pipeline could not be constructed.\n" msgid "ERROR: pipeline could not be constructed.\n"
msgstr "FEL: rörledningen kunde inte konstrueras.\n" msgstr "FEL: rörledningen kunde inte konstrueras.\n"
# Felrapporterat i http://bugzilla.gnome.org/show_bug.cgi?id=137431 # Felrapporterat i http://bugzilla.gnome.org/show_bug.cgi?id=137431
#: tools/gst-launch.c:504 #: tools/gst-launch.c:387
#, c-format #, c-format
msgid "WARNING: erroneous pipeline: %s\n" msgid "WARNING: erroneous pipeline: %s\n"
msgstr "VARNING: felaktig rörledning: %s\n" msgstr "VARNING: felaktig rörledning: %s\n"
# Felrapporterat i http://bugzilla.gnome.org/show_bug.cgi?id=137431 # Felrapporterat i http://bugzilla.gnome.org/show_bug.cgi?id=137431
#: tools/gst-launch.c:505 #: tools/gst-launch.c:388
#, c-format
msgid " Trying to run anyway.\n" msgid " Trying to run anyway.\n"
msgstr " Försöker köra ändå.\n" msgstr " Försöker köra ändå.\n"
#: tools/gst-launch.c:532 #: tools/gst-launch.c:408
#, c-format
msgid "ERROR: the 'pipeline' element wasn't found.\n" msgid "ERROR: the 'pipeline' element wasn't found.\n"
msgstr "FEL: \"pipeline\"-elementet hittades inte.\n" msgstr "FEL: \"pipeline\"-elementet hittades inte.\n"
#: tools/gst-launch.c:539 #: tools/gst-launch.c:417
#, c-format
msgid "RUNNING pipeline ...\n" msgid "RUNNING pipeline ...\n"
msgstr "KÖR rörledning...\n" msgstr "KÖR rörledning...\n"
#: tools/gst-launch.c:542 #: tools/gst-launch.c:421
#, c-format
msgid "ERROR: pipeline doesn't want to play.\n" msgid "ERROR: pipeline doesn't want to play.\n"
msgstr "FEL: rörledningen vill inte spela.\n" msgstr "FEL: rörledningen vill inte spela.\n"
#: tools/gst-launch.c:445
#, c-format
msgid "Execution ended after %.2fs (%.2fs or %.2f%% idling).\n"
msgstr ""
#: tools/gst-register.c:49 #: tools/gst-register.c:49
#, fuzzy, c-format #, fuzzy, c-format
msgid "Added plugin %s with %d feature.\n" msgid "Added plugin %s with %d feature.\n"
@ -875,6 +819,45 @@ msgid_plural "Loaded %d plugins with %d features.\n"
msgstr[0] "Läste in %d insticksmoduler med %d %s.\n" msgstr[0] "Läste in %d insticksmoduler med %d %s.\n"
msgstr[1] "Läste in %d insticksmoduler med %d %s.\n" msgstr[1] "Läste in %d insticksmoduler med %d %s.\n"
#~ msgid "Disable accelerated CPU instructions"
#~ msgstr "Inaktivera accelererade processorinstruktioner"
#~ msgid "There is no element present to handle the stream's mime type %s."
#~ msgstr ""
#~ "Det finns inget element tillgängligt för att hantera flödets mime-typ %s."
#~ msgid ""
#~ "Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
#~ "max %s ns).\n"
#~ msgstr ""
#~ "Körning avslutades efter %s iterationer (totalt %s ns, medel %s ns, min %"
#~ "s ns, max %s ns).\n"
#~ msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
#~ msgstr ""
#~ "Användning: gst-xmllaunch <fil.xml> [ element.egenskap=värde ... ]\n"
#~ msgid "ERROR: parse of xml file '%s' failed.\n"
#~ msgstr "FEL: tolkning av xml-filen \"%s\" misslyckades.\n"
#~ msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
#~ msgstr "FEL: inget rörledningselement på översta nivån i filen \"%s\".\n"
#~ msgid "WARNING: only one toplevel element is supported at this time."
#~ msgstr "VARNING: endast ett element på översta nivån stöds just nu."
#~ msgid "ERROR: could not parse command line argument %d: %s.\n"
#~ msgstr "FEL: kunde inte tolka kommandoradsargumentet %d: %s.\n"
#~ msgid "WARNING: element named '%s' not found.\n"
#~ msgstr "VARNING: elementet med namnet \"%s\" hittades inte.\n"
#~ msgid "Save xml representation of pipeline to FILE and exit"
#~ msgstr "Spara xml-representation av rörledningen i FIL och avsluta"
#~ msgid "FILE"
#~ msgstr "FIL"
# Osäker. Jag tror "caps" är kort för "capabilities". # Osäker. Jag tror "caps" är kort för "capabilities".
#~ msgid "Internal GStreamer error: caps problem. File a bug." #~ msgid "Internal GStreamer error: caps problem. File a bug."
#~ msgstr "Internt GStreamer-fel: förmågeproblem. Skicka en felrapport." #~ msgstr "Internt GStreamer-fel: förmågeproblem. Skicka en felrapport."

185
po/tr.po
View file

@ -6,7 +6,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gstreamer 0.8.0\n" "Project-Id-Version: gstreamer 0.8.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-05-02 19:36+0200\n" "POT-Creation-Date: 2005-05-17 18:37+0200\n"
"PO-Revision-Date: 2004-04-03 03:14+0300\n" "PO-Revision-Date: 2004-04-03 03:14+0300\n"
"Last-Translator: Baris Cicek <baris@teamforce.name.tr>\n" "Last-Translator: Baris Cicek <baris@teamforce.name.tr>\n"
"Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n" "Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
@ -14,30 +14,30 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: gst/gst.c:160 #: gst/gst.c:157
msgid "Print the GStreamer version" msgid "Print the GStreamer version"
msgstr "GStreamer sürünümü yazdır" msgstr "GStreamer sürünümü yazdır"
#: gst/gst.c:162 #: gst/gst.c:159
msgid "Make all warnings fatal" msgid "Make all warnings fatal"
msgstr "Tüm uyarıları ölümcül yap" msgstr "Tüm uyarıları ölümcül yap"
#: gst/gst.c:166 #: gst/gst.c:163
msgid "Print available debug categories and exit" msgid "Print available debug categories and exit"
msgstr "Geçerli hata ayıklama sınıflarını yazdır ve çık" msgstr "Geçerli hata ayıklama sınıflarını yazdır ve çık"
#: gst/gst.c:169 #: gst/gst.c:166
msgid "" msgid ""
"Default debug level from 1 (only error) to 5 (anything) or 0 for no output" "Default debug level from 1 (only error) to 5 (anything) or 0 for no output"
msgstr "" msgstr ""
"Öntanımlı hata ayıklama seviyesi 1'den (sadece hatalar) 5'e (her şey) kadar " "Öntanımlı hata ayıklama seviyesi 1'den (sadece hatalar) 5'e (her şey) kadar "
"ya da çıktı olmaması için 0" "ya da çıktı olmaması için 0"
#: gst/gst.c:171 #: gst/gst.c:168
msgid "LEVEL" msgid "LEVEL"
msgstr "SEVİYE" msgstr "SEVİYE"
#: gst/gst.c:173 #: gst/gst.c:170
msgid "" msgid ""
"Comma-separated list of category_name:level pairs to set specific levels for " "Comma-separated list of category_name:level pairs to set specific levels for "
"the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
@ -45,31 +45,27 @@ msgstr ""
"Ayrı sınıfların belirli seviyeleri için sınıf_ismi:seviye çiftlerinin virgül " "Ayrı sınıfların belirli seviyeleri için sınıf_ismi:seviye çiftlerinin virgül "
"ile ayrılmış listesi. Örnek: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "ile ayrılmış listesi. Örnek: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
#: gst/gst.c:176 #: gst/gst.c:173
msgid "LIST" msgid "LIST"
msgstr "LİSTE" msgstr "LİSTE"
#: gst/gst.c:178 #: gst/gst.c:175
msgid "Disable colored debugging output" msgid "Disable colored debugging output"
msgstr "Renkli hata ayıklama çıktısını kapat" msgstr "Renkli hata ayıklama çıktısını kapat"
#: gst/gst.c:180 #: gst/gst.c:177
msgid "Disable debugging" msgid "Disable debugging"
msgstr "Hata ayıklamayı kapat" msgstr "Hata ayıklamayı kapat"
#: gst/gst.c:184 #: gst/gst.c:181
msgid "Disable accelerated CPU instructions"
msgstr "Hızlandırılmış CPU işlemlerini kapat"
#: gst/gst.c:186
msgid "Enable verbose plugin loading diagnostics" msgid "Enable verbose plugin loading diagnostics"
msgstr "Ayrıntılı eklenti yükleme detaylarını etkinleştir" msgstr "Ayrıntılı eklenti yükleme detaylarını etkinleştir"
#: gst/gst.c:188 #: gst/gst.c:183
msgid "PATHS" msgid "PATHS"
msgstr "YOLLAR" msgstr "YOLLAR"
#: gst/gst.c:191 #: gst/gst.c:186
#, fuzzy #, fuzzy
msgid "" msgid ""
"Comma-separated list of plugins to preload in addition to the list stored in " "Comma-separated list of plugins to preload in addition to the list stored in "
@ -78,32 +74,32 @@ msgstr ""
"Çevre değişkeni GST_PLUGIN_PATH içinde saklanan listeye ek olarak önceden " "Çevre değişkeni GST_PLUGIN_PATH içinde saklanan listeye ek olarak önceden "
"yüklenecek eklentilerin virgün ile ayırılmış listesi" "yüklenecek eklentilerin virgün ile ayırılmış listesi"
#: gst/gst.c:193 #: gst/gst.c:188
msgid "PLUGINS" msgid "PLUGINS"
msgstr "EKLENTİLER" msgstr "EKLENTİLER"
#: gst/gst.c:196 #: gst/gst.c:191
msgid "Disable trapping of segmentation faults during plugin loading" msgid "Disable trapping of segmentation faults during plugin loading"
msgstr "Eklenti yüklenirken kesimleme hatalarını yakalamayı kapat" msgstr "Eklenti yüklenirken kesimleme hatalarını yakalamayı kapat"
#: gst/gst.c:199 #: gst/gst.c:194
msgid "SCHEDULER" msgid "SCHEDULER"
msgstr "ZAMANLANDIRICI" msgstr "ZAMANLANDIRICI"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "Registry to use" msgid "Registry to use"
msgstr "Kullanılacak kayıt" msgstr "Kullanılacak kayıt"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "REGISTRY" msgid "REGISTRY"
msgstr "KAYIT" msgstr "KAYIT"
#: gst/gst.c:214 #: gst/gst.c:209
#, fuzzy, c-format #, fuzzy, c-format
msgid "path list for loading plugins (separated by '%s')" msgid "path list for loading plugins (separated by '%s')"
msgstr "eklenti yüklemek için yol listesi (' ile ayırılmış" msgstr "eklenti yüklemek için yol listesi (' ile ayırılmış"
#: gst/gst.c:218 #: gst/gst.c:213
#, fuzzy, c-format #, fuzzy, c-format
msgid "Scheduler to use (default is '%s')" msgid "Scheduler to use (default is '%s')"
msgstr "Kullanılacak zamanlandırıcı ('" msgstr "Kullanılacak zamanlandırıcı ('"
@ -583,51 +579,46 @@ msgstr ""
msgid ", " msgid ", "
msgstr ", " msgstr ", "
#: gst/autoplug/gstspider.c:466 #: gst/elements/gstfilesink.c:243
#, c-format
msgid "There is no element present to handle the stream's mime type %s."
msgstr "Akımın %s mime türünü işleyebilecek hiç bir öğe yok."
#: gst/elements/gstfilesink.c:268
msgid "No file name specified for writing." msgid "No file name specified for writing."
msgstr "Yazım için hiç bir dosya adı belirtilmedi." msgstr "Yazım için hiç bir dosya adı belirtilmedi."
#: gst/elements/gstfilesink.c:275 #: gst/elements/gstfilesink.c:250
#, c-format #, c-format
msgid "Could not open file \"%s\" for writing." msgid "Could not open file \"%s\" for writing."
msgstr "\"%s\" dosyası yazım için açılamadı." msgstr "\"%s\" dosyası yazım için açılamadı."
#: gst/elements/gstfilesink.c:294 #: gst/elements/gstfilesink.c:269
#, c-format #, c-format
msgid "Error closing file \"%s\"." msgid "Error closing file \"%s\"."
msgstr "\"%s\" kapatılırken hata." msgstr "\"%s\" kapatılırken hata."
#: gst/elements/gstfilesink.c:364 gst/elements/gstfilesink.c:400 #: gst/elements/gstfilesink.c:339 gst/elements/gstfilesink.c:375
#: gst/elements/gstfilesink.c:453 #: gst/elements/gstfilesink.c:428
#, c-format #, c-format
msgid "Error while writing to file \"%s\"." msgid "Error while writing to file \"%s\"."
msgstr "\"%s\" dosyası yazılırken hata." msgstr "\"%s\" dosyası yazılırken hata."
#: gst/elements/gstfilesrc.c:764 gst/elements/gstmultifilesrc.c:298 #: gst/elements/gstfilesrc.c:725
msgid "No file name specified for reading." msgid "No file name specified for reading."
msgstr "Okuma için hiç bir dosya adı belirtilmedi." msgstr "Okuma için hiç bir dosya adı belirtilmedi."
#: gst/elements/gstfilesrc.c:779 gst/elements/gstmultifilesrc.c:306 #: gst/elements/gstfilesrc.c:740
#, c-format #, c-format
msgid "Could not open file \"%s\" for reading." msgid "Could not open file \"%s\" for reading."
msgstr "\"%s\" dosyası okuma için açılamadı." msgstr "\"%s\" dosyası okuma için açılamadı."
#: gst/elements/gstfilesrc.c:790 #: gst/elements/gstfilesrc.c:751
#, c-format #, c-format
msgid "\"%s\" is a directory." msgid "\"%s\" is a directory."
msgstr "" msgstr ""
#: gst/elements/gstfilesrc.c:796 #: gst/elements/gstfilesrc.c:757
#, fuzzy, c-format #, fuzzy, c-format
msgid "File \"%s\" is a socket." msgid "File \"%s\" is a socket."
msgstr "\"%s\" dosyası düzenli bir dosya değil." msgstr "\"%s\" dosyası düzenli bir dosya değil."
#: gst/elements/gstidentity.c:306 #: gst/elements/gstidentity.c:276
msgid "Failed after iterations as requested." msgid "Failed after iterations as requested."
msgstr "İstenildiği gibi tekrarlama başarısız oldu." msgstr "İstenildiği gibi tekrarlama başarısız oldu."
@ -716,123 +707,79 @@ msgstr "\"%s\" URI'si için 'sink' öğesi bağlanamadı"
msgid "empty pipeline not allowed" msgid "empty pipeline not allowed"
msgstr "boş boruhattına izin verilmiyor" msgstr "boş boruhattına izin verilmiyor"
#: tools/gst-inspect.c:1151 #: tools/gst-inspect.c:1032
#, fuzzy #, fuzzy
msgid "Print all elements" msgid "Print all elements"
msgstr "\"%s\" öğesi yok" msgstr "\"%s\" öğesi yok"
#: tools/gst-launch.c:114 #: tools/gst-launch.c:190
#, c-format
msgid ""
"Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
"max %s ns).\n"
msgstr ""
#: tools/gst-launch.c:141
msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
msgstr "Kullanım: gst-xmllaunch <dosya.xml> [ öğe.özellik=değer ... ]\n"
#: tools/gst-launch.c:149
#, c-format
msgid "ERROR: parse of xml file '%s' failed.\n"
msgstr "HATA: xml dosyası '%s' ayrıştırması başarısız.\n"
#: tools/gst-launch.c:155
#, c-format
msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
msgstr "HATA: '%s' dosyasında üst seviye öğesi bulunamadı.\n"
#: tools/gst-launch.c:162
#, c-format
msgid "WARNING: only one toplevel element is supported at this time."
msgstr "UYARI: Şu anda sadece bir tane üst seviye öğesi destekleniyor."
#: tools/gst-launch.c:173
#, c-format
msgid "ERROR: could not parse command line argument %d: %s.\n"
msgstr "HATA: komut satırı argümanı %d ayrıştırılamadı: %s.\n"
#: tools/gst-launch.c:184
#, c-format
msgid "WARNING: element named '%s' not found.\n"
msgstr "UYARI: '%s' isimli öğe bulunamadı.\n"
#: tools/gst-launch.c:327
#, c-format #, c-format
msgid "FOUND TAG : found by element \"%s\".\n" msgid "FOUND TAG : found by element \"%s\".\n"
msgstr "ETİKET BULUNDU : \"%s\" öğesi tarafından bulundu.\n" msgstr "ETİKET BULUNDU : \"%s\" öğesi tarafından bulundu.\n"
#: tools/gst-launch.c:412 #: tools/gst-launch.c:304
msgid "Output tags (also known as metadata)" msgid "Output tags (also known as metadata)"
msgstr "Çıktı etiketleri (metadata olarak da bilinir)" msgstr "Çıktı etiketleri (metadata olarak da bilinir)"
#: tools/gst-launch.c:414 #: tools/gst-launch.c:306
msgid "Output status information and property notifications" msgid "Output status information and property notifications"
msgstr "Çıktı durum bilgisi ve özellik uyarıları" msgstr "Çıktı durum bilgisi ve özellik uyarıları"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "Do not output status information of TYPE" msgid "Do not output status information of TYPE"
msgstr "TÜRÜN durum bilgisini gösterme" msgstr "TÜRÜN durum bilgisini gösterme"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "TYPE1,TYPE2,..." msgid "TYPE1,TYPE2,..."
msgstr "TÜR1,TÜR2,..." msgstr "TÜR1,TÜR2,..."
#: tools/gst-launch.c:419 #: tools/gst-launch.c:310
msgid "Save xml representation of pipeline to FILE and exit"
msgstr "Boruhattının xml belirtimini DOSYA'ya kaydet ve çık"
#: tools/gst-launch.c:419
msgid "FILE"
msgstr "DOSYA"
#: tools/gst-launch.c:422
msgid "Do not install a fault handler" msgid "Do not install a fault handler"
msgstr "Hatalı işleticiyi kurma" msgstr "Hatalı işleticiyi kurma"
#: tools/gst-launch.c:424 #: tools/gst-launch.c:312
msgid "Print alloc trace (if enabled at compile time)" msgid "Print alloc trace (if enabled at compile time)"
msgstr "'alloc' takibini yazdır (derleme sırasında etkinleştirilmişse)" msgstr "'alloc' takibini yazdır (derleme sırasında etkinleştirilmişse)"
#: tools/gst-launch.c:426 #: tools/gst-launch.c:314
msgid "Number of times to iterate pipeline" msgid "Number of times to iterate pipeline"
msgstr "Boruhattının kaç defa tekrarlanacağı" msgstr "Boruhattının kaç defa tekrarlanacağı"
#: tools/gst-launch.c:496 #: tools/gst-launch.c:379
#, c-format #, c-format
msgid "ERROR: pipeline could not be constructed: %s.\n" msgid "ERROR: pipeline could not be constructed: %s.\n"
msgstr "HATA: boruhattı oluşturulamadı: %s.\n" msgstr "HATA: boruhattı oluşturulamadı: %s.\n"
#: tools/gst-launch.c:500 #: tools/gst-launch.c:383
#, c-format
msgid "ERROR: pipeline could not be constructed.\n" msgid "ERROR: pipeline could not be constructed.\n"
msgstr "HATA: boruhattı oluşturulamadı.\n" msgstr "HATA: boruhattı oluşturulamadı.\n"
#: tools/gst-launch.c:504 #: tools/gst-launch.c:387
#, c-format #, c-format
msgid "WARNING: erroneous pipeline: %s\n" msgid "WARNING: erroneous pipeline: %s\n"
msgstr "UYARI: hatalı boruhattı: %s\n" msgstr "UYARI: hatalı boruhattı: %s\n"
#: tools/gst-launch.c:505 #: tools/gst-launch.c:388
#, c-format
msgid " Trying to run anyway.\n" msgid " Trying to run anyway.\n"
msgstr " Gene de çalıştırma deneniyor.\n" msgstr " Gene de çalıştırma deneniyor.\n"
#: tools/gst-launch.c:532 #: tools/gst-launch.c:408
#, c-format
msgid "ERROR: the 'pipeline' element wasn't found.\n" msgid "ERROR: the 'pipeline' element wasn't found.\n"
msgstr "HATA: 'pipeline' öğesi bulunamadı.\n" msgstr "HATA: 'pipeline' öğesi bulunamadı.\n"
#: tools/gst-launch.c:539 #: tools/gst-launch.c:417
#, c-format
msgid "RUNNING pipeline ...\n" msgid "RUNNING pipeline ...\n"
msgstr "BORUHATTI çalıştırılıyor ...\n" msgstr "BORUHATTI çalıştırılıyor ...\n"
#: tools/gst-launch.c:542 #: tools/gst-launch.c:421
#, c-format
msgid "ERROR: pipeline doesn't want to play.\n" msgid "ERROR: pipeline doesn't want to play.\n"
msgstr "HATA: boruhattı çalmak istemiyor.\n" msgstr "HATA: boruhattı çalmak istemiyor.\n"
#: tools/gst-launch.c:445
#, c-format
msgid "Execution ended after %.2fs (%.2fs or %.2f%% idling).\n"
msgstr ""
#: tools/gst-register.c:49 #: tools/gst-register.c:49
#, c-format #, c-format
msgid "Added plugin %s with %d feature.\n" msgid "Added plugin %s with %d feature.\n"
@ -867,6 +814,36 @@ msgid_plural "Loaded %d plugins with %d features.\n"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#~ msgid "Disable accelerated CPU instructions"
#~ msgstr "Hızlandırılmış CPU işlemlerini kapat"
#~ msgid "There is no element present to handle the stream's mime type %s."
#~ msgstr "Akımın %s mime türünü işleyebilecek hiç bir öğe yok."
#~ msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
#~ msgstr "Kullanım: gst-xmllaunch <dosya.xml> [ öğe.özellik=değer ... ]\n"
#~ msgid "ERROR: parse of xml file '%s' failed.\n"
#~ msgstr "HATA: xml dosyası '%s' ayrıştırması başarısız.\n"
#~ msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
#~ msgstr "HATA: '%s' dosyasında üst seviye öğesi bulunamadı.\n"
#~ msgid "WARNING: only one toplevel element is supported at this time."
#~ msgstr "UYARI: Şu anda sadece bir tane üst seviye öğesi destekleniyor."
#~ msgid "ERROR: could not parse command line argument %d: %s.\n"
#~ msgstr "HATA: komut satırı argümanı %d ayrıştırılamadı: %s.\n"
#~ msgid "WARNING: element named '%s' not found.\n"
#~ msgstr "UYARI: '%s' isimli öğe bulunamadı.\n"
#~ msgid "Save xml representation of pipeline to FILE and exit"
#~ msgstr "Boruhattının xml belirtimini DOSYA'ya kaydet ve çık"
#~ msgid "FILE"
#~ msgstr "DOSYA"
#~ msgid "caps" #~ msgid "caps"
#~ msgstr "kabiliyetler" #~ msgstr "kabiliyetler"

190
po/uk.po
View file

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gstreamer 0.8.4\n" "Project-Id-Version: gstreamer 0.8.4\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-05-02 19:36+0200\n" "POT-Creation-Date: 2005-05-17 18:37+0200\n"
"PO-Revision-Date: 2004-09-06 15:16+0300\n" "PO-Revision-Date: 2004-09-06 15:16+0300\n"
"Last-Translator: Maxim V. Dziumanenko <mvd@mylinux.com.ua>\n" "Last-Translator: Maxim V. Dziumanenko <mvd@mylinux.com.ua>\n"
"Language-Team: Ukrainian <translation-team-uk@lists.sourceforge.net>\n" "Language-Team: Ukrainian <translation-team-uk@lists.sourceforge.net>\n"
@ -17,30 +17,30 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: gst/gst.c:160 #: gst/gst.c:157
msgid "Print the GStreamer version" msgid "Print the GStreamer version"
msgstr "Вивести версію GStreamer" msgstr "Вивести версію GStreamer"
#: gst/gst.c:162 #: gst/gst.c:159
msgid "Make all warnings fatal" msgid "Make all warnings fatal"
msgstr "Вважати всі попередження помилками" msgstr "Вважати всі попередження помилками"
#: gst/gst.c:166 #: gst/gst.c:163
msgid "Print available debug categories and exit" msgid "Print available debug categories and exit"
msgstr "Вивести наявні категорії налагодження та вийти" msgstr "Вивести наявні категорії налагодження та вийти"
#: gst/gst.c:169 #: gst/gst.c:166
msgid "" msgid ""
"Default debug level from 1 (only error) to 5 (anything) or 0 for no output" "Default debug level from 1 (only error) to 5 (anything) or 0 for no output"
msgstr "" msgstr ""
"Типовий рівень налагодження від 1 (лише помилки) до 5 (усе), або 0 - без " "Типовий рівень налагодження від 1 (лише помилки) до 5 (усе), або 0 - без "
"налагодження" "налагодження"
#: gst/gst.c:171 #: gst/gst.c:168
msgid "LEVEL" msgid "LEVEL"
msgstr "РІВЕНЬ" msgstr "РІВЕНЬ"
#: gst/gst.c:173 #: gst/gst.c:170
msgid "" msgid ""
"Comma-separated list of category_name:level pairs to set specific levels for " "Comma-separated list of category_name:level pairs to set specific levels for "
"the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
@ -48,31 +48,27 @@ msgstr ""
"Перелік розділених комою пар \"назваатегорії:рівень\" для встановлення " "Перелік розділених комою пар \"назваатегорії:рівень\" для встановлення "
"певних рівнів окремим категоріям. Наприклад: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "певних рівнів окремим категоріям. Наприклад: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
#: gst/gst.c:176 #: gst/gst.c:173
msgid "LIST" msgid "LIST"
msgstr "ПЕРЕЛІК" msgstr "ПЕРЕЛІК"
#: gst/gst.c:178 #: gst/gst.c:175
msgid "Disable colored debugging output" msgid "Disable colored debugging output"
msgstr "Вимкнути оформлення кольором налагоджувальних повідомлень" msgstr "Вимкнути оформлення кольором налагоджувальних повідомлень"
#: gst/gst.c:180 #: gst/gst.c:177
msgid "Disable debugging" msgid "Disable debugging"
msgstr "Вимкнути налагодження" msgstr "Вимкнути налагодження"
#: gst/gst.c:184 #: gst/gst.c:181
msgid "Disable accelerated CPU instructions"
msgstr "Вимкнути прискорені інструкції процесора"
#: gst/gst.c:186
msgid "Enable verbose plugin loading diagnostics" msgid "Enable verbose plugin loading diagnostics"
msgstr "Вимкнути докладну діагностику завантаження модулів" msgstr "Вимкнути докладну діагностику завантаження модулів"
#: gst/gst.c:188 #: gst/gst.c:183
msgid "PATHS" msgid "PATHS"
msgstr "ШЛЯХИ" msgstr "ШЛЯХИ"
#: gst/gst.c:191 #: gst/gst.c:186
#, fuzzy #, fuzzy
msgid "" msgid ""
"Comma-separated list of plugins to preload in addition to the list stored in " "Comma-separated list of plugins to preload in addition to the list stored in "
@ -81,32 +77,32 @@ msgstr ""
"Перелік розділених комою назв модулів, додаткових до переліку, що " "Перелік розділених комою назв модулів, додаткових до переліку, що "
"зберігається у змінній оточення GST_PLUGIN_PATH" "зберігається у змінній оточення GST_PLUGIN_PATH"
#: gst/gst.c:193 #: gst/gst.c:188
msgid "PLUGINS" msgid "PLUGINS"
msgstr "МОДУЛІ" msgstr "МОДУЛІ"
#: gst/gst.c:196 #: gst/gst.c:191
msgid "Disable trapping of segmentation faults during plugin loading" msgid "Disable trapping of segmentation faults during plugin loading"
msgstr "Вимкнути перехоплення помилок сегментації при завантаженні модулів" msgstr "Вимкнути перехоплення помилок сегментації при завантаженні модулів"
#: gst/gst.c:199 #: gst/gst.c:194
msgid "SCHEDULER" msgid "SCHEDULER"
msgstr "ПЛАНУВАЛЬНИК" msgstr "ПЛАНУВАЛЬНИК"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "Registry to use" msgid "Registry to use"
msgstr "Реєстр, що використовується" msgstr "Реєстр, що використовується"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "REGISTRY" msgid "REGISTRY"
msgstr "РЕЄСТР" msgstr "РЕЄСТР"
#: gst/gst.c:214 #: gst/gst.c:209
#, c-format #, c-format
msgid "path list for loading plugins (separated by '%s')" msgid "path list for loading plugins (separated by '%s')"
msgstr "перелік шляхів у яких шукаються модулі (розділюються символом '%s')" msgstr "перелік шляхів у яких шукаються модулі (розділюються символом '%s')"
#: gst/gst.c:218 #: gst/gst.c:213
#, c-format #, c-format
msgid "Scheduler to use (default is '%s')" msgid "Scheduler to use (default is '%s')"
msgstr "Планувальник, що використовується (типовий '%s')" msgstr "Планувальник, що використовується (типовий '%s')"
@ -591,51 +587,46 @@ msgstr ""
msgid ", " msgid ", "
msgstr ", " msgstr ", "
#: gst/autoplug/gstspider.c:466 #: gst/elements/gstfilesink.c:243
#, c-format
msgid "There is no element present to handle the stream's mime type %s."
msgstr "Немає елементу для обробки потоку з MIME типом %s."
#: gst/elements/gstfilesink.c:268
msgid "No file name specified for writing." msgid "No file name specified for writing."
msgstr "Не вказана назва файлу для запису." msgstr "Не вказана назва файлу для запису."
#: gst/elements/gstfilesink.c:275 #: gst/elements/gstfilesink.c:250
#, c-format #, c-format
msgid "Could not open file \"%s\" for writing." msgid "Could not open file \"%s\" for writing."
msgstr "Не вдається відкрити файл \"%s\" для запису." msgstr "Не вдається відкрити файл \"%s\" для запису."
#: gst/elements/gstfilesink.c:294 #: gst/elements/gstfilesink.c:269
#, c-format #, c-format
msgid "Error closing file \"%s\"." msgid "Error closing file \"%s\"."
msgstr "Помилка закривання файлу \"%s\"." msgstr "Помилка закривання файлу \"%s\"."
#: gst/elements/gstfilesink.c:364 gst/elements/gstfilesink.c:400 #: gst/elements/gstfilesink.c:339 gst/elements/gstfilesink.c:375
#: gst/elements/gstfilesink.c:453 #: gst/elements/gstfilesink.c:428
#, c-format #, c-format
msgid "Error while writing to file \"%s\"." msgid "Error while writing to file \"%s\"."
msgstr "Помилка при записуванні у файл \"%s\"." msgstr "Помилка при записуванні у файл \"%s\"."
#: gst/elements/gstfilesrc.c:764 gst/elements/gstmultifilesrc.c:298 #: gst/elements/gstfilesrc.c:725
msgid "No file name specified for reading." msgid "No file name specified for reading."
msgstr "Не вказана назва файлу для читання." msgstr "Не вказана назва файлу для читання."
#: gst/elements/gstfilesrc.c:779 gst/elements/gstmultifilesrc.c:306 #: gst/elements/gstfilesrc.c:740
#, c-format #, c-format
msgid "Could not open file \"%s\" for reading." msgid "Could not open file \"%s\" for reading."
msgstr "Не вдається відкрити файл \"%s\" для читання." msgstr "Не вдається відкрити файл \"%s\" для читання."
#: gst/elements/gstfilesrc.c:790 #: gst/elements/gstfilesrc.c:751
#, c-format #, c-format
msgid "\"%s\" is a directory." msgid "\"%s\" is a directory."
msgstr "\"%s\" є каталогом." msgstr "\"%s\" є каталогом."
#: gst/elements/gstfilesrc.c:796 #: gst/elements/gstfilesrc.c:757
#, c-format #, c-format
msgid "File \"%s\" is a socket." msgid "File \"%s\" is a socket."
msgstr "Файл \"%s\" є сокетом." msgstr "Файл \"%s\" є сокетом."
#: gst/elements/gstidentity.c:306 #: gst/elements/gstidentity.c:276
msgid "Failed after iterations as requested." msgid "Failed after iterations as requested."
msgstr "Помилка після ітерацій у запитаному порядку." msgstr "Помилка після ітерацій у запитаному порядку."
@ -725,124 +716,78 @@ msgstr "не вдається прив'язати елемент-спожива
msgid "empty pipeline not allowed" msgid "empty pipeline not allowed"
msgstr "порожній канал не допускається" msgstr "порожній канал не допускається"
#: tools/gst-inspect.c:1151 #: tools/gst-inspect.c:1032
msgid "Print all elements" msgid "Print all elements"
msgstr "Вивести усі елементи" msgstr "Вивести усі елементи"
#: tools/gst-launch.c:114 #: tools/gst-launch.c:190
#, c-format
msgid ""
"Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
"max %s ns).\n"
msgstr ""
#: tools/gst-launch.c:141
msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
msgstr ""
"Використання: gst-xmllaunch <file.xml> [ елемент.властивість=значення ... ]\n"
#: tools/gst-launch.c:149
#, c-format
msgid "ERROR: parse of xml file '%s' failed.\n"
msgstr "ПОМИЛКА: помилка при аналізі xml файлу \"%s\".\n"
#: tools/gst-launch.c:155
#, c-format
msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
msgstr "ПОМИЛКА: немає верхнього елементу каналу у файлі \"%s\".\n"
#: tools/gst-launch.c:162
#, c-format
msgid "WARNING: only one toplevel element is supported at this time."
msgstr "ПОПЕРЕДЖЕННЯ: наразі підтримується лише один верхній елемент."
#: tools/gst-launch.c:173
#, c-format
msgid "ERROR: could not parse command line argument %d: %s.\n"
msgstr ""
"ПОМИЛКА: не вдається проаналізувати аргумент командного рядка %d: %s.\n"
#: tools/gst-launch.c:184
#, c-format
msgid "WARNING: element named '%s' not found.\n"
msgstr "ПОПЕРЕДЖЕННЯ: елемент з назвою \"%s\" не існує.\n"
#: tools/gst-launch.c:327
#, c-format #, c-format
msgid "FOUND TAG : found by element \"%s\".\n" msgid "FOUND TAG : found by element \"%s\".\n"
msgstr "ЗНАЙДЕНО ТЕГ : знайдено у елементі \"%s\".\n" msgstr "ЗНАЙДЕНО ТЕГ : знайдено у елементі \"%s\".\n"
#: tools/gst-launch.c:412 #: tools/gst-launch.c:304
msgid "Output tags (also known as metadata)" msgid "Output tags (also known as metadata)"
msgstr "Вивести теги (також відомі як метадані)" msgstr "Вивести теги (також відомі як метадані)"
#: tools/gst-launch.c:414 #: tools/gst-launch.c:306
msgid "Output status information and property notifications" msgid "Output status information and property notifications"
msgstr "Вивести інформацію про статус та сповіщення властивостей" msgstr "Вивести інформацію про статус та сповіщення властивостей"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "Do not output status information of TYPE" msgid "Do not output status information of TYPE"
msgstr "Не виводити інформацію про статус типу ТИП" msgstr "Не виводити інформацію про статус типу ТИП"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "TYPE1,TYPE2,..." msgid "TYPE1,TYPE2,..."
msgstr "ТИП1,ТИП2,..." msgstr "ТИП1,ТИП2,..."
#: tools/gst-launch.c:419 #: tools/gst-launch.c:310
msgid "Save xml representation of pipeline to FILE and exit"
msgstr "Зберегти xml представлення каналу у файл ФАЙЛ та завершитись"
#: tools/gst-launch.c:419
msgid "FILE"
msgstr "ФАЙЛ"
#: tools/gst-launch.c:422
msgid "Do not install a fault handler" msgid "Do not install a fault handler"
msgstr "Не встановлювати обробник збоїв" msgstr "Не встановлювати обробник збоїв"
#: tools/gst-launch.c:424 #: tools/gst-launch.c:312
msgid "Print alloc trace (if enabled at compile time)" msgid "Print alloc trace (if enabled at compile time)"
msgstr "Вивести трасу розподілу (якщо ввімкнено при компіляції)" msgstr "Вивести трасу розподілу (якщо ввімкнено при компіляції)"
#: tools/gst-launch.c:426 #: tools/gst-launch.c:314
msgid "Number of times to iterate pipeline" msgid "Number of times to iterate pipeline"
msgstr "Кількість ітерацій каналу" msgstr "Кількість ітерацій каналу"
#: tools/gst-launch.c:496 #: tools/gst-launch.c:379
#, c-format #, c-format
msgid "ERROR: pipeline could not be constructed: %s.\n" msgid "ERROR: pipeline could not be constructed: %s.\n"
msgstr "ПОМИЛКА: канал не може бути сконструйований: %s.\n" msgstr "ПОМИЛКА: канал не може бути сконструйований: %s.\n"
#: tools/gst-launch.c:500 #: tools/gst-launch.c:383
#, c-format
msgid "ERROR: pipeline could not be constructed.\n" msgid "ERROR: pipeline could not be constructed.\n"
msgstr "ПОМИЛКА: канал не може бути сконструйований.\n" msgstr "ПОМИЛКА: канал не може бути сконструйований.\n"
#: tools/gst-launch.c:504 #: tools/gst-launch.c:387
#, c-format #, c-format
msgid "WARNING: erroneous pipeline: %s\n" msgid "WARNING: erroneous pipeline: %s\n"
msgstr "ПОПЕРЕДЖЕННЯ: помилковий канал: %s\n" msgstr "ПОПЕРЕДЖЕННЯ: помилковий канал: %s\n"
#: tools/gst-launch.c:505 #: tools/gst-launch.c:388
#, c-format
msgid " Trying to run anyway.\n" msgid " Trying to run anyway.\n"
msgstr " Спроба запуститись у будь-якому разі.\n" msgstr " Спроба запуститись у будь-якому разі.\n"
#: tools/gst-launch.c:532 #: tools/gst-launch.c:408
#, c-format
msgid "ERROR: the 'pipeline' element wasn't found.\n" msgid "ERROR: the 'pipeline' element wasn't found.\n"
msgstr "ПОМИЛКА: не знайдений елемент \"pipeline\".\n" msgstr "ПОМИЛКА: не знайдений елемент \"pipeline\".\n"
#: tools/gst-launch.c:539 #: tools/gst-launch.c:417
#, c-format
msgid "RUNNING pipeline ...\n" msgid "RUNNING pipeline ...\n"
msgstr "ЗАПУСКАЄТЬСЯ канал ...\n" msgstr "ЗАПУСКАЄТЬСЯ канал ...\n"
#: tools/gst-launch.c:542 #: tools/gst-launch.c:421
#, c-format
msgid "ERROR: pipeline doesn't want to play.\n" msgid "ERROR: pipeline doesn't want to play.\n"
msgstr "ПОМИЛКА: канал не може почати відтворення.\n" msgstr "ПОМИЛКА: канал не може почати відтворення.\n"
#: tools/gst-launch.c:445
#, c-format
msgid "Execution ended after %.2fs (%.2fs or %.2f%% idling).\n"
msgstr ""
#: tools/gst-register.c:49 #: tools/gst-register.c:49
#, fuzzy, c-format #, fuzzy, c-format
msgid "Added plugin %s with %d feature.\n" msgid "Added plugin %s with %d feature.\n"
@ -879,6 +824,39 @@ msgstr[0] "Завантажено %d модулів з %d %s.\n"
msgstr[1] "Завантажено %d модулів з %d %s.\n" msgstr[1] "Завантажено %d модулів з %d %s.\n"
msgstr[2] "Завантажено %d модулів з %d %s.\n" msgstr[2] "Завантажено %d модулів з %d %s.\n"
#~ msgid "Disable accelerated CPU instructions"
#~ msgstr "Вимкнути прискорені інструкції процесора"
#~ msgid "There is no element present to handle the stream's mime type %s."
#~ msgstr "Немає елементу для обробки потоку з MIME типом %s."
#~ msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
#~ msgstr ""
#~ "Використання: gst-xmllaunch <file.xml> [ елемент."
#~ "властивість=значення ... ]\n"
#~ msgid "ERROR: parse of xml file '%s' failed.\n"
#~ msgstr "ПОМИЛКА: помилка при аналізі xml файлу \"%s\".\n"
#~ msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
#~ msgstr "ПОМИЛКА: немає верхнього елементу каналу у файлі \"%s\".\n"
#~ msgid "WARNING: only one toplevel element is supported at this time."
#~ msgstr "ПОПЕРЕДЖЕННЯ: наразі підтримується лише один верхній елемент."
#~ msgid "ERROR: could not parse command line argument %d: %s.\n"
#~ msgstr ""
#~ "ПОМИЛКА: не вдається проаналізувати аргумент командного рядка %d: %s.\n"
#~ msgid "WARNING: element named '%s' not found.\n"
#~ msgstr "ПОПЕРЕДЖЕННЯ: елемент з назвою \"%s\" не існує.\n"
#~ msgid "Save xml representation of pipeline to FILE and exit"
#~ msgstr "Зберегти xml представлення каналу у файл ФАЙЛ та завершитись"
#~ msgid "FILE"
#~ msgstr "ФАЙЛ"
#~ msgid "caps" #~ msgid "caps"
#~ msgstr "можливості" #~ msgstr "можливості"

196
po/vi.po
View file

@ -6,7 +6,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gstreamer 0.8.8\n" "Project-Id-Version: gstreamer 0.8.8\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-05-02 19:36+0200\n" "POT-Creation-Date: 2005-05-17 18:37+0200\n"
"PO-Revision-Date: 2005-02-05 16:35+1030\n" "PO-Revision-Date: 2005-02-05 16:35+1030\n"
"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n" "Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
"Language-Team: Vietnamese <gnomevi-list@lists.sourceforge.net> \n" "Language-Team: Vietnamese <gnomevi-list@lists.sourceforge.net> \n"
@ -15,30 +15,30 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n" "Plural-Forms: nplurals=1; plural=0;\n"
#: gst/gst.c:160 #: gst/gst.c:157
msgid "Print the GStreamer version" msgid "Print the GStreamer version"
msgstr "Hiển thị phiên bản GStreamer" msgstr "Hiển thị phiên bản GStreamer"
#: gst/gst.c:162 #: gst/gst.c:159
msgid "Make all warnings fatal" msgid "Make all warnings fatal"
msgstr "Lập tất cả cảnh báo là nghiêm trọng" msgstr "Lập tất cả cảnh báo là nghiêm trọng"
#: gst/gst.c:166 #: gst/gst.c:163
msgid "Print available debug categories and exit" msgid "Print available debug categories and exit"
msgstr "Hiển thị tất cả loại gỡ lỗi sẵn sàng rồi thoát" msgstr "Hiển thị tất cả loại gỡ lỗi sẵn sàng rồi thoát"
#: gst/gst.c:169 #: gst/gst.c:166
msgid "" msgid ""
"Default debug level from 1 (only error) to 5 (anything) or 0 for no output" "Default debug level from 1 (only error) to 5 (anything) or 0 for no output"
msgstr "" msgstr ""
"Mức gỡ lỗi mặc định từ 1 (chỉ lỗi) đến 5 (bất cứ điều nào) hay 0 (không xuất " "Mức gỡ lỗi mặc định từ 1 (chỉ lỗi) đến 5 (bất cứ điều nào) hay 0 (không xuất "
"gì)" "gì)"
#: gst/gst.c:171 #: gst/gst.c:168
msgid "LEVEL" msgid "LEVEL"
msgstr "MỨC" msgstr "MỨC"
#: gst/gst.c:173 #: gst/gst.c:170
msgid "" msgid ""
"Comma-separated list of category_name:level pairs to set specific levels for " "Comma-separated list of category_name:level pairs to set specific levels for "
"the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
@ -46,31 +46,27 @@ msgstr ""
"Danh sách định giới bằng dấu phẩy của đôi tên_loại:mức để lập mức dứt khoát " "Danh sách định giới bằng dấu phẩy của đôi tên_loại:mức để lập mức dứt khoát "
"cho mỗi loại. Thí dụ: GST_AUTOPLUG:5,GST_ELEMENT_*:3" "cho mỗi loại. Thí dụ: GST_AUTOPLUG:5,GST_ELEMENT_*:3"
#: gst/gst.c:176 #: gst/gst.c:173
msgid "LIST" msgid "LIST"
msgstr "DANH SÁCH" msgstr "DANH SÁCH"
#: gst/gst.c:178 #: gst/gst.c:175
msgid "Disable colored debugging output" msgid "Disable colored debugging output"
msgstr "Không xuất dữ liệu gỡ lỗi với màu" msgstr "Không xuất dữ liệu gỡ lỗi với màu"
#: gst/gst.c:180 #: gst/gst.c:177
msgid "Disable debugging" msgid "Disable debugging"
msgstr "Không gỡ lỗi" msgstr "Không gỡ lỗi"
#: gst/gst.c:184 #: gst/gst.c:181
msgid "Disable accelerated CPU instructions"
msgstr "Không gởi lệnh CPU đã tăng tốc"
#: gst/gst.c:186
msgid "Enable verbose plugin loading diagnostics" msgid "Enable verbose plugin loading diagnostics"
msgstr "Chẩn đoán chi tiết việc tải trình cầm phít" msgstr "Chẩn đoán chi tiết việc tải trình cầm phít"
#: gst/gst.c:188 #: gst/gst.c:183
msgid "PATHS" msgid "PATHS"
msgstr "ĐƯỜNG DẪN" msgstr "ĐƯỜNG DẪN"
#: gst/gst.c:191 #: gst/gst.c:186
#, fuzzy #, fuzzy
msgid "" msgid ""
"Comma-separated list of plugins to preload in addition to the list stored in " "Comma-separated list of plugins to preload in addition to the list stored in "
@ -79,32 +75,32 @@ msgstr ""
"Danh sách định giới bằng dấu phẩy của các trình cầm phít để tải trước, thêm " "Danh sách định giới bằng dấu phẩy của các trình cầm phít để tải trước, thêm "
"vào danh sách được cất giữ trong biến môi trường GST_PLUGIN_PATH" "vào danh sách được cất giữ trong biến môi trường GST_PLUGIN_PATH"
#: gst/gst.c:193 #: gst/gst.c:188
msgid "PLUGINS" msgid "PLUGINS"
msgstr "CẦM PHÍT" msgstr "CẦM PHÍT"
#: gst/gst.c:196 #: gst/gst.c:191
msgid "Disable trapping of segmentation faults during plugin loading" msgid "Disable trapping of segmentation faults during plugin loading"
msgstr "Không bắt lỗi phân đoạn trong khi tải trình cầm phít" msgstr "Không bắt lỗi phân đoạn trong khi tải trình cầm phít"
#: gst/gst.c:199 #: gst/gst.c:194
msgid "SCHEDULER" msgid "SCHEDULER"
msgstr "TRÌNH ĐỊNH" msgstr "TRÌNH ĐỊNH"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "Registry to use" msgid "Registry to use"
msgstr "Cơ quan đăng ký để sử dụng" msgstr "Cơ quan đăng ký để sử dụng"
#: gst/gst.c:201 #: gst/gst.c:196
msgid "REGISTRY" msgid "REGISTRY"
msgstr "CƠ QUAN ĐĂNG KÝ" msgstr "CƠ QUAN ĐĂNG KÝ"
#: gst/gst.c:214 #: gst/gst.c:209
#, c-format #, c-format
msgid "path list for loading plugins (separated by '%s')" msgid "path list for loading plugins (separated by '%s')"
msgstr "danh sách đường dẫn để tải trình cầm phít (định giới bằng '%s')" msgstr "danh sách đường dẫn để tải trình cầm phít (định giới bằng '%s')"
#: gst/gst.c:218 #: gst/gst.c:213
#, c-format #, c-format
msgid "Scheduler to use (default is '%s')" msgid "Scheduler to use (default is '%s')"
msgstr "Sử dụng trình định này (mặc định là '%s')" msgstr "Sử dụng trình định này (mặc định là '%s')"
@ -587,51 +583,46 @@ msgstr ""
msgid ", " msgid ", "
msgstr ", " msgstr ", "
#: gst/autoplug/gstspider.c:466 #: gst/elements/gstfilesink.c:243
#, c-format
msgid "There is no element present to handle the stream's mime type %s."
msgstr "Hiện không có yếu tố có thể quản lý loại mime %s của dòng này."
#: gst/elements/gstfilesink.c:268
msgid "No file name specified for writing." msgid "No file name specified for writing."
msgstr "Chưa ghi rõ tên tập tin để ghi vào." msgstr "Chưa ghi rõ tên tập tin để ghi vào."
#: gst/elements/gstfilesink.c:275 #: gst/elements/gstfilesink.c:250
#, c-format #, c-format
msgid "Could not open file \"%s\" for writing." msgid "Could not open file \"%s\" for writing."
msgstr "Không mở được tập tin \"%s\" để ghi." msgstr "Không mở được tập tin \"%s\" để ghi."
#: gst/elements/gstfilesink.c:294 #: gst/elements/gstfilesink.c:269
#, c-format #, c-format
msgid "Error closing file \"%s\"." msgid "Error closing file \"%s\"."
msgstr "Gặp lỗi khi đóng tập tin \"%s\"." msgstr "Gặp lỗi khi đóng tập tin \"%s\"."
#: gst/elements/gstfilesink.c:364 gst/elements/gstfilesink.c:400 #: gst/elements/gstfilesink.c:339 gst/elements/gstfilesink.c:375
#: gst/elements/gstfilesink.c:453 #: gst/elements/gstfilesink.c:428
#, c-format #, c-format
msgid "Error while writing to file \"%s\"." msgid "Error while writing to file \"%s\"."
msgstr "Gặp lỗi khi ghi vào tập tin \"%s\"." msgstr "Gặp lỗi khi ghi vào tập tin \"%s\"."
#: gst/elements/gstfilesrc.c:764 gst/elements/gstmultifilesrc.c:298 #: gst/elements/gstfilesrc.c:725
msgid "No file name specified for reading." msgid "No file name specified for reading."
msgstr "Chưa ghi rõ tên tập tin để đọc." msgstr "Chưa ghi rõ tên tập tin để đọc."
#: gst/elements/gstfilesrc.c:779 gst/elements/gstmultifilesrc.c:306 #: gst/elements/gstfilesrc.c:740
#, c-format #, c-format
msgid "Could not open file \"%s\" for reading." msgid "Could not open file \"%s\" for reading."
msgstr "Không mở được tập tin \"%s\" để đọc." msgstr "Không mở được tập tin \"%s\" để đọc."
#: gst/elements/gstfilesrc.c:790 #: gst/elements/gstfilesrc.c:751
#, c-format #, c-format
msgid "\"%s\" is a directory." msgid "\"%s\" is a directory."
msgstr " \"%s\" là thư mục." msgstr " \"%s\" là thư mục."
#: gst/elements/gstfilesrc.c:796 #: gst/elements/gstfilesrc.c:757
#, c-format #, c-format
msgid "File \"%s\" is a socket." msgid "File \"%s\" is a socket."
msgstr "Tập tin \"%s\" là ổ cắm." msgstr "Tập tin \"%s\" là ổ cắm."
#: gst/elements/gstidentity.c:306 #: gst/elements/gstidentity.c:276
msgid "Failed after iterations as requested." msgid "Failed after iterations as requested."
msgstr "Không làm được sau khi làm việc ấy số lần được chọn." msgstr "Không làm được sau khi làm việc ấy số lần được chọn."
@ -725,125 +716,78 @@ msgstr ""
msgid "empty pipeline not allowed" msgid "empty pipeline not allowed"
msgstr "không cho phép đường ống trống" msgstr "không cho phép đường ống trống"
#: tools/gst-inspect.c:1151 #: tools/gst-inspect.c:1032
msgid "Print all elements" msgid "Print all elements"
msgstr "Hiển thị tất cả yếu tố" msgstr "Hiển thị tất cả yếu tố"
#: tools/gst-launch.c:114 #: tools/gst-launch.c:190
#, c-format
msgid ""
"Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
"max %s ns).\n"
msgstr ""
"Thi hành xong sau khi làm việc ấy %s lần (tổng số %s ns (phần tỷ giây), số "
"trung bình %s ns, tối thiểu %s ns, tối đa %s ns).\n"
#: tools/gst-launch.c:141
msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
msgstr ""
"Cách sử dụng: gst-xmllaunch <tập_tin.xml> [ yếu_tố.đặc_tính=trị_số ...]\n"
#: tools/gst-launch.c:149
#, c-format
msgid "ERROR: parse of xml file '%s' failed.\n"
msgstr "LỖI: không phân tách được tập tin xml '%s'.\n"
#: tools/gst-launch.c:155
#, c-format
msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
msgstr "LỖI: không có yếu tố đường ống mức đầu trong tập tin '%s'.\n"
#: tools/gst-launch.c:162
#, c-format
msgid "WARNING: only one toplevel element is supported at this time."
msgstr "CẢNH BÁO: hiện hỗ trợ chỉ một yếu tố mức đầu riêng lẻ."
#: tools/gst-launch.c:173
#, c-format
msgid "ERROR: could not parse command line argument %d: %s.\n"
msgstr "LỖI: không phân tách được đối số đường lệnh %d: %s.\n"
#: tools/gst-launch.c:184
#, c-format
msgid "WARNING: element named '%s' not found.\n"
msgstr "CẢNH BÁO: chưa tìm được yếu tố có tên '%s'.\n"
#: tools/gst-launch.c:327
#, c-format #, c-format
msgid "FOUND TAG : found by element \"%s\".\n" msgid "FOUND TAG : found by element \"%s\".\n"
msgstr "THẺ ĐÃ TÌM : được tìm do yếu tố \"%s\".\n" msgstr "THẺ ĐÃ TÌM : được tìm do yếu tố \"%s\".\n"
#: tools/gst-launch.c:412 #: tools/gst-launch.c:304
msgid "Output tags (also known as metadata)" msgid "Output tags (also known as metadata)"
msgstr "Thể xuất (cũng được biết là metadata, dữ liệu về dữ liệu)" msgstr "Thể xuất (cũng được biết là metadata, dữ liệu về dữ liệu)"
#: tools/gst-launch.c:414 #: tools/gst-launch.c:306
msgid "Output status information and property notifications" msgid "Output status information and property notifications"
msgstr "Xuất thông tin trạng thái và thông báo đặc tính" msgstr "Xuất thông tin trạng thái và thông báo đặc tính"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "Do not output status information of TYPE" msgid "Do not output status information of TYPE"
msgstr "Không xuất thông tin trạng thái LOẠI" msgstr "Không xuất thông tin trạng thái LOẠI"
#: tools/gst-launch.c:416 #: tools/gst-launch.c:308
msgid "TYPE1,TYPE2,..." msgid "TYPE1,TYPE2,..."
msgstr "LOẠI1,LOẠI2,..." msgstr "LOẠI1,LOẠI2,..."
#: tools/gst-launch.c:419 #: tools/gst-launch.c:310
msgid "Save xml representation of pipeline to FILE and exit"
msgstr "Lưu đường ống dạng xml vào TẬP_TIN rồi thoát"
#: tools/gst-launch.c:419
msgid "FILE"
msgstr "TẬP_TIN"
#: tools/gst-launch.c:422
msgid "Do not install a fault handler" msgid "Do not install a fault handler"
msgstr "Không cài trình quản lý lỗi" msgstr "Không cài trình quản lý lỗi"
#: tools/gst-launch.c:424 #: tools/gst-launch.c:312
msgid "Print alloc trace (if enabled at compile time)" msgid "Print alloc trace (if enabled at compile time)"
msgstr "Hiển thị việc chỉ theo cấp phát (nếu được hiệu lực khi biên dich)" msgstr "Hiển thị việc chỉ theo cấp phát (nếu được hiệu lực khi biên dich)"
#: tools/gst-launch.c:426 #: tools/gst-launch.c:314
msgid "Number of times to iterate pipeline" msgid "Number of times to iterate pipeline"
msgstr "Số lần sử dụng đường ống" msgstr "Số lần sử dụng đường ống"
#: tools/gst-launch.c:496 #: tools/gst-launch.c:379
#, c-format #, c-format
msgid "ERROR: pipeline could not be constructed: %s.\n" msgid "ERROR: pipeline could not be constructed: %s.\n"
msgstr "LỖI: không cấu tạo đường ống được: %s.\n" msgstr "LỖI: không cấu tạo đường ống được: %s.\n"
#: tools/gst-launch.c:500 #: tools/gst-launch.c:383
#, c-format
msgid "ERROR: pipeline could not be constructed.\n" msgid "ERROR: pipeline could not be constructed.\n"
msgstr "LỖI: không cấu tạo đường ống được.\n" msgstr "LỖI: không cấu tạo đường ống được.\n"
#: tools/gst-launch.c:504 #: tools/gst-launch.c:387
#, c-format #, c-format
msgid "WARNING: erroneous pipeline: %s\n" msgid "WARNING: erroneous pipeline: %s\n"
msgstr "CẢNH BÁO: đường ống có lỗi: %s\n" msgstr "CẢNH BÁO: đường ống có lỗi: %s\n"
#: tools/gst-launch.c:505 #: tools/gst-launch.c:388
#, c-format
msgid " Trying to run anyway.\n" msgid " Trying to run anyway.\n"
msgstr " Dù sao đang thử chạy.\n" msgstr " Dù sao đang thử chạy.\n"
#: tools/gst-launch.c:532 #: tools/gst-launch.c:408
#, c-format
msgid "ERROR: the 'pipeline' element wasn't found.\n" msgid "ERROR: the 'pipeline' element wasn't found.\n"
msgstr "LỖI: chưa tìm được yếu tố 'đường ống'.\n" msgstr "LỖI: chưa tìm được yếu tố 'đường ống'.\n"
#: tools/gst-launch.c:539 #: tools/gst-launch.c:417
#, c-format
msgid "RUNNING pipeline ...\n" msgid "RUNNING pipeline ...\n"
msgstr "ĐANG CHẠY đường ống ...\n" msgstr "ĐANG CHẠY đường ống ...\n"
#: tools/gst-launch.c:542 #: tools/gst-launch.c:421
#, c-format
msgid "ERROR: pipeline doesn't want to play.\n" msgid "ERROR: pipeline doesn't want to play.\n"
msgstr "LỖI: đường ống không phát được.\n" msgstr "LỖI: đường ống không phát được.\n"
#: tools/gst-launch.c:445
#, c-format
msgid "Execution ended after %.2fs (%.2fs or %.2f%% idling).\n"
msgstr ""
#: tools/gst-register.c:49 #: tools/gst-register.c:49
#, fuzzy, c-format #, fuzzy, c-format
msgid "Added plugin %s with %d feature.\n" msgid "Added plugin %s with %d feature.\n"
@ -876,6 +820,44 @@ msgid "Loaded %d plugins with %d feature.\n"
msgid_plural "Loaded %d plugins with %d features.\n" msgid_plural "Loaded %d plugins with %d features.\n"
msgstr[0] "Mới tải %d trình cầm phít với %d %s.\n" msgstr[0] "Mới tải %d trình cầm phít với %d %s.\n"
#~ msgid "Disable accelerated CPU instructions"
#~ msgstr "Không gởi lệnh CPU đã tăng tốc"
#~ msgid "There is no element present to handle the stream's mime type %s."
#~ msgstr "Hiện không có yếu tố có thể quản lý loại mime %s của dòng này."
#~ msgid ""
#~ "Execution ended after %s iterations (sum %s ns, average %s ns, min %s ns, "
#~ "max %s ns).\n"
#~ msgstr ""
#~ "Thi hành xong sau khi làm việc ấy %s lần (tổng số %s ns (phần tỷ giây), "
#~ "số trung bình %s ns, tối thiểu %s ns, tối đa %s ns).\n"
#~ msgid "Usage: gst-xmllaunch <file.xml> [ element.property=value ... ]\n"
#~ msgstr ""
#~ "Cách sử dụng: gst-xmllaunch <tập_tin.xml> [ yếu_tố.đặc_tính=trị_số ...]\n"
#~ msgid "ERROR: parse of xml file '%s' failed.\n"
#~ msgstr "LỖI: không phân tách được tập tin xml '%s'.\n"
#~ msgid "ERROR: no toplevel pipeline element in file '%s'.\n"
#~ msgstr "LỖI: không có yếu tố đường ống mức đầu trong tập tin '%s'.\n"
#~ msgid "WARNING: only one toplevel element is supported at this time."
#~ msgstr "CẢNH BÁO: hiện hỗ trợ chỉ một yếu tố mức đầu riêng lẻ."
#~ msgid "ERROR: could not parse command line argument %d: %s.\n"
#~ msgstr "LỖI: không phân tách được đối số đường lệnh %d: %s.\n"
#~ msgid "WARNING: element named '%s' not found.\n"
#~ msgstr "CẢNH BÁO: chưa tìm được yếu tố có tên '%s'.\n"
#~ msgid "Save xml representation of pipeline to FILE and exit"
#~ msgstr "Lưu đường ống dạng xml vào TẬP_TIN rồi thoát"
#~ msgid "FILE"
#~ msgstr "TẬP_TIN"
#~ msgid "caps" #~ msgid "caps"
#~ msgstr "khả năng" #~ msgstr "khả năng"

View file

@ -1,12 +1,5 @@
SUBDIRS = instantiate memchunk muxing sched threadstate seeking # bufspeed SUBDIRS = instantiate memchunk seeking # bufspeed
if GST_DISABLE_TRACE
LAT =
else
LAT = lat
endif
noinst_PROGRAMS = $(LAT) spidey_bench mass_elements noinst_PROGRAMS = $(LAT) spidey_bench mass_elements
@ -14,4 +7,4 @@ AM_CFLAGS = $(GST_OBJ_CFLAGS)
LIBS = $(GST_OBJ_LIBS) LIBS = $(GST_OBJ_LIBS)
EXTRA_DIST = README EXTRA_DIST = README
DIST_SUBDIRS= bufspeed instantiate memchunk muxing sched threadstate seeking DIST_SUBDIRS= bufspeed instantiate memchunk sched threadstate seeking

View file

@ -1,237 +0,0 @@
#include <gst/gst.h>
#include <stdlib.h>
#include <string.h>
/* FIXME: WTF does this do? */
static guint64 max = 0, min = -1, total = 0;
static guint count = 0;
static guint print_del = 1;
static guint iterations = 0;
static guint mhz = 0;
void
handoff_src (GstElement * src, GstBuffer * buf, gpointer user_data)
{
gst_trace_read_tsc (&GST_BUFFER_TIMESTAMP (buf));
}
void
handoff_sink (GstElement * sink, GstBuffer * buf, gpointer user_data)
{
guint64 end, d, avg;
guint avg_ns;
gst_trace_read_tsc (&end);
d = end - GST_BUFFER_TIMESTAMP (buf);
if (d > max)
max = d;
if (d < min)
min = d;
total += d;
count++;
avg = total / count;
avg_ns = (guint) (1000.0 * (double) avg / (double) mhz);
if ((count % print_del) == 0) {
g_print ("%07d:%08" G_GUINT64_FORMAT " min:%08" G_GUINT64_FORMAT " max:%08"
G_GUINT64_FORMAT " avg:%08" G_GUINT64_FORMAT " avg-s:0.%09d\r", count,
d, min, max, avg, avg_ns);
}
}
GstElement *
identity_add (GstPipeline * pipeline, GstElement * first, int count)
{
GstElement *last, *ident;
int i;
char buf[20];
last = first;
for (i = 0; i < count; i++) {
snprintf (buf, 20, "identity_%03d", i);
ident = gst_element_factory_make ("identity", buf);
g_return_val_if_fail (ident != NULL, NULL);
g_object_set (G_OBJECT (ident), "silent", TRUE, NULL);
gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (ident));
gst_pad_link (gst_element_get_pad (last, "src"),
gst_element_get_pad (ident, "sink"));
last = ident;
}
return last;
}
GstElement *
fakesrc (void)
{
GstElement *src;
src = gst_element_factory_make ("fakesrc", "src");
g_return_val_if_fail (src != NULL, NULL);
g_object_set (G_OBJECT (src), "silent", TRUE, NULL);
g_object_set (G_OBJECT (src), "num_buffers", iterations, NULL);
g_signal_connect (G_OBJECT (src), "handoff", G_CALLBACK (handoff_src), NULL);
return src;
}
GstElement *
fakesink (void)
{
GstElement *sink;
sink = gst_element_factory_make ("fakesink", "fakesink");
g_return_val_if_fail (sink != NULL, NULL);
g_object_set (G_OBJECT (sink), "silent", TRUE, NULL);
g_signal_connect (G_OBJECT (sink),
"handoff", G_CALLBACK (handoff_sink), NULL);
return sink;
}
GstPipeline *
simple (int argc, int argi, char *argv[])
{
GstPipeline *pipeline;
GstElement *last, *src, *sink;
int idents;
if ((argc - argi) < 1) {
fprintf (stderr, "bad params");
return NULL;
}
idents = atoi (argv[argi]);
if ((argc - argi) == 2) {
gst_scheduler_factory_set_default_name (argv[argi + 1]);
}
pipeline = GST_PIPELINE (gst_pipeline_new ("pipeline"));
g_return_val_if_fail (pipeline != NULL, NULL);
src = fakesrc ();
gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (src));
last = identity_add (pipeline, src, idents);
sink = fakesink ();
gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (sink));
gst_pad_link (gst_element_get_pad (last, "src"),
gst_element_get_pad (sink, "sink"));
return pipeline;
}
GstPipeline *
queue (int argc, int argi, char *argv[])
{
GstPipeline *pipeline;
GstElement *last, *src, *sink, *src_thr, *src_q, *sink_q, *sink_thr;
int idents;
if ((argc - argi) < 1) {
fprintf (stderr, "bad params");
return NULL;
}
idents = atoi (argv[argi]);
if ((argc - argi) == 2) {
gst_scheduler_factory_set_default_name (argv[argi + 1]);
}
pipeline = GST_PIPELINE (gst_pipeline_new ("pipeline"));
g_return_val_if_fail (pipeline != NULL, NULL);
src_thr = GST_ELEMENT (gst_thread_new ("src_thread"));
g_return_val_if_fail (src_thr != NULL, NULL);
src = fakesrc ();
g_return_val_if_fail (src != NULL, NULL);
gst_bin_add (GST_BIN (src_thr), GST_ELEMENT (src));
src_q = gst_element_factory_make ("queue", "src_q");
g_return_val_if_fail (src_q != NULL, NULL);
gst_bin_add (GST_BIN (src_thr), GST_ELEMENT (src_q));
gst_pad_link (gst_element_get_pad (src, "src"),
gst_element_get_pad (src_q, "sink"));
gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (src_thr));
last = identity_add (pipeline, src_q, idents);
sink_q = gst_element_factory_make ("queue", "sink_q");
g_return_val_if_fail (sink_q != NULL, NULL);
gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (sink_q));
gst_pad_link (gst_element_get_pad (last, "src"),
gst_element_get_pad (sink_q, "sink"));
sink_thr = GST_ELEMENT (gst_thread_new ("sink_thread"));
g_return_val_if_fail (sink_thr != NULL, NULL);
sink = fakesink ();
g_return_val_if_fail (sink != NULL, NULL);
gst_bin_add (GST_BIN (sink_thr), GST_ELEMENT (sink));
gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (sink_thr));
gst_pad_link (gst_element_get_pad (sink_q, "src"),
gst_element_get_pad (sink, "sink"));
return pipeline;
}
struct test
{
char *name;
char *params;
GstPipeline *(*func) (int argc, int argi, char *argv[]);
};
static struct test tests[] = {
{"simple", "ident_count [scheduler_name]", simple},
{"queue", "ident_count [scheduler_name]", queue},
{NULL, NULL, NULL}
};
int
main (int argc, char *argv[])
{
GstPipeline *pipeline;
int i;
char *name;
gst_init (&argc, &argv);
if (argc < 3) {
fprintf (stderr,
"usage: %s iterations print_del mhz test_name [test_params...]\n",
argv[0]);
for (i = 0; tests[i].name; i++) {
fprintf (stderr, " %s %s\n", tests[i].name, tests[i].params);
}
exit (1);
} else {
iterations = atoi (argv[1]);
print_del = atoi (argv[2]);
mhz = atoi (argv[3]);
name = argv[4];
}
pipeline = NULL;
for (i = 0; tests[i].name && !pipeline; i++) {
if (!strcmp (name, tests[i].name)) {
pipeline = tests[i].func (argc, 5, argv);
}
}
g_return_val_if_fail (pipeline != NULL, -1);
/*xmlSaveFile("lat.gst", gst_xml_write(GST_ELEMENT(pipeline))); */
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
while (count < iterations) {
gst_bin_iterate (GST_BIN (pipeline));
}
g_print ("\n");
return 0;
}

View file

@ -1,4 +0,0 @@
noinst_PROGRAMS = case1
LDADD = $(GST_OBJ_LIBS)
AM_CFLAGS = $(GST_OBJ_CFLAGS)

View file

@ -1,74 +0,0 @@
#include <stdlib.h>
#include <gst/gst.h>
gboolean playing = TRUE;
static void
handoff_signal (GstElement * element, GstBuffer * buf)
{
g_print ("handoff \"%s\" %" G_GINT64_FORMAT "\n",
gst_element_get_name (element), GST_BUFFER_TIMESTAMP (buf));
}
static void
eos_signal (GstElement * element)
{
g_print ("eos received from \"%s\"\n", gst_element_get_name (element));
playing = FALSE;
}
int
main (int argc, char *argv[])
{
GstBin *pipeline;
GstElement *src, *tee, *identity1, *identity2, *aggregator, *sink;
gst_init (&argc, &argv);
pipeline = GST_BIN (gst_pipeline_new ("pipeline"));
g_return_val_if_fail (pipeline != NULL, 1);
src = gst_element_factory_make ("fakesrc", "src");
g_object_set (G_OBJECT (src), "num_buffers", 40, NULL);
g_return_val_if_fail (src != NULL, 2);
tee = gst_element_factory_make ("tee", "tee");
g_return_val_if_fail (tee != NULL, 3);
identity1 = gst_element_factory_make ("identity", "identity0");
g_return_val_if_fail (identity1 != NULL, 3);
identity2 = gst_element_factory_make ("identity", "identity1");
g_object_set (G_OBJECT (identity2), "duplicate", 2, NULL);
g_object_set (G_OBJECT (identity2), "loop_based", TRUE, NULL);
g_return_val_if_fail (identity2 != NULL, 3);
aggregator = gst_element_factory_make ("aggregator", "aggregator");
g_object_set (G_OBJECT (aggregator), "sched", 4, NULL);
g_return_val_if_fail (aggregator != NULL, 3);
sink = gst_element_factory_make ("fakesink", "sink");
g_return_val_if_fail (sink != NULL, 4);
gst_bin_add_many (pipeline, src, tee, identity1, identity2, aggregator, sink,
NULL);
gst_element_link_pads (src, "src", tee, "sink");
gst_pad_link (gst_element_get_request_pad (tee, "src%d"),
gst_element_get_pad (identity1, "sink"));
gst_pad_link (gst_element_get_request_pad (tee, "src%d"),
gst_element_get_pad (identity2, "sink"));
gst_pad_link (gst_element_get_pad (identity1, "src"),
gst_element_get_request_pad (aggregator, "sink%d"));
gst_pad_link (gst_element_get_pad (identity2, "src"),
gst_element_get_request_pad (aggregator, "sink%d"));
gst_element_link_pads (aggregator, "src", sink, "sink");
g_signal_connect (G_OBJECT (src), "eos", G_CALLBACK (eos_signal), NULL);
g_signal_connect (G_OBJECT (sink), "handoff",
G_CALLBACK (handoff_signal), NULL);
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
while (gst_bin_iterate (pipeline));
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL);
exit (0);
}

View file

@ -19,7 +19,7 @@ SUBDIRS = \
dlopen dynparams \ dlopen dynparams \
elements ghostpads indexers negotiation pad \ elements ghostpads indexers negotiation pad \
$(GST_PARSE_DIRS) \ $(GST_PARSE_DIRS) \
plugin refcounting schedulers states tags threads plugin refcounting schedulers states tags
DIST_SUBDIRS = \ DIST_SUBDIRS = \
bins bytestream caps childproxy cleanup clock \ bins bytestream caps childproxy cleanup clock \

View file

@ -1,11 +1,8 @@
include ../Rules include ../Rules
tests_pass = filepadsink tests_pass = filepadsink
tests_fail = test1 tests_fail =
tests_ignore = tests_ignore =
test1_SOURCES = test1.c gstbstest.c
test1_LDFLAGS = $(top_builddir)/libs/gst/bytestream/libgstbytestream.la
filepadsink_CFLAGS = $(AM_CFLAGS) -DTHE_FILE=\""$(top_srcdir)/configure.ac"\" filepadsink_CFLAGS = $(AM_CFLAGS) -DTHE_FILE=\""$(top_srcdir)/configure.ac"\"
filepadsink_LDFLAGS = $(top_builddir)/libs/gst/bytestream/libgstbytestream.la filepadsink_LDFLAGS = $(top_builddir)/libs/gst/bytestream/libgstbytestream.la

View file

@ -1,419 +0,0 @@
/* GStreamer
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
* 2000 Wim Taymans <wtay@chello.be>
*
* gstbstest.c:
*
* 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.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdlib.h>
#include <string.h>
#include <gst/gst.h>
#include <gst/bytestream/bytestream.h>
#define GST_TYPE_BSTEST (gst_bstest_get_type())
#define GST_BSTEST(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_BSTEST,GstBsTest))
#define GST_BSTEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BSTEST,GstBsTestClass))
#define GST_IS_BSTEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BSTEST))
#define GST_IS_BSTEST_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BSTEST))
typedef struct _GstBsTest GstBsTest;
typedef struct _GstBsTestClass GstBsTestClass;
struct _GstBsTest
{
GstElement element;
GstPad *sinkpad;
GstPad *srcpad;
GstByteStream *bs;
gchar *accesspattern;
guint num_patterns;
gchar **patterns;
guint sizemin;
guint sizemax;
gint count;
gboolean silent;
};
struct _GstBsTestClass
{
GstElementClass parent_class;
};
GType gst_bstest_get_type (void);
GstElementDetails gst_bstest_details = GST_ELEMENT_DETAILS ("ByteStreamTest",
"Filter",
"Test for the GstByteStream code",
"Erik Walthinsen <omega@temple-baptist.com>, "
"Wim Taymans <wim.taymans@chello.be>");
/* BsTest signals and args */
enum
{
/* FILL ME */
LAST_SIGNAL
};
enum
{
ARG_0,
ARG_SIZEMIN,
ARG_SIZEMAX,
ARG_COUNT,
ARG_SILENT,
ARG_ACCESSPATTERN,
};
static void gst_bstest_base_init (gpointer g_class);
static void gst_bstest_class_init (GstBsTestClass * klass);
static void gst_bstest_init (GstBsTest * bstest);
static void gst_bstest_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void gst_bstest_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
static GstElementStateReturn gst_bstest_change_state (GstElement * element);
static void gst_bstest_loop (GstElement * element);
static GstElementClass *parent_class = NULL;
/* static guint gst_bstest_signals[LAST_SIGNAL] = { 0 }; */
GType
gst_bstest_get_type (void)
{
static GType bstest_type = 0;
if (!bstest_type) {
static const GTypeInfo bstest_info = {
sizeof (GstBsTestClass),
gst_bstest_base_init,
NULL,
(GClassInitFunc) gst_bstest_class_init,
NULL,
NULL,
sizeof (GstBsTest),
0,
(GInstanceInitFunc) gst_bstest_init,
};
bstest_type =
g_type_register_static (GST_TYPE_ELEMENT, "BSTest", &bstest_info, 0);
}
return bstest_type;
}
static void
gst_bstest_base_init (gpointer g_class)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details (gstelement_class, &gst_bstest_details);
}
static void
gst_bstest_class_init (GstBsTestClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SIZEMIN,
g_param_spec_int ("sizemin", "sizemin", "sizemin", 0, G_MAXINT,
0, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SIZEMAX,
g_param_spec_int ("sizemax", "sizemax", "sizemax", 0, G_MAXINT,
384, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_ACCESSPATTERN,
g_param_spec_string ("accesspattern", "accesspattern", "accesspattern",
"r", G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_COUNT,
g_param_spec_uint ("count", "count", "count",
0, G_MAXUINT, 0, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SILENT,
g_param_spec_boolean ("silent", "silent", "silent",
FALSE, G_PARAM_READWRITE));
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_bstest_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_bstest_get_property);
gstelement_class->change_state = gst_bstest_change_state;
}
static GstCaps *
gst_bstest_getcaps (GstPad * pad)
{
GstBsTest *bstest = GST_BSTEST (gst_pad_get_parent (pad));
GstPad *otherpad;
otherpad = (pad == bstest->srcpad) ? bstest->sinkpad : bstest->srcpad;
return gst_pad_get_allowed_caps (otherpad);
}
GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
static void
gst_bstest_init (GstBsTest * bstest)
{
bstest->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
"sink");
gst_element_add_pad (GST_ELEMENT (bstest), bstest->sinkpad);
gst_pad_set_getcaps_function (bstest->sinkpad, gst_bstest_getcaps);
bstest->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
"src");
gst_element_add_pad (GST_ELEMENT (bstest), bstest->srcpad);
gst_pad_set_getcaps_function (bstest->srcpad, gst_bstest_getcaps);
gst_element_set_loop_function (GST_ELEMENT (bstest), gst_bstest_loop);
bstest->sizemin = 0;
bstest->sizemax = 384;
bstest->accesspattern = g_strdup ("r");
bstest->patterns = g_strsplit (bstest->accesspattern, ":", 0);
bstest->count = 5;
bstest->silent = FALSE;
bstest->bs = NULL;
}
static guint
gst_bstest_get_size (GstBsTest * bstest, gchar * sizestring, guint prevsize)
{
guint size;
if (sizestring[0] == 0) {
size = bstest->sizemax;
} else if (sizestring[0] == 'r') {
size =
bstest->sizemin +
(guint8) (((gfloat) bstest->sizemax) * rand () / (RAND_MAX +
(gfloat) bstest->sizemin));
} else if (sizestring[0] == '<') {
size = prevsize;
} else {
size = atoi (sizestring);
}
if (size == 0)
size++;
return size;
}
static void
gst_bstest_loop (GstElement * element)
{
GstBsTest *bstest;
GstBuffer *buf = NULL;
g_return_if_fail (element != NULL);
g_return_if_fail (GST_IS_BSTEST (element));
bstest = GST_BSTEST (element);
do {
guint size = 0;
guint i = 0;
guint8 *ptr;
while (i < bstest->num_patterns) {
buf = NULL;
if (bstest->patterns[i][0] == 'r') {
size = gst_bstest_get_size (bstest, &bstest->patterns[i][1], size);
if (!bstest->silent)
g_print ("bstest: ***** read %d bytes\n", size);
gst_bytestream_read (bstest->bs, &buf, size);
} else if (bstest->patterns[i][0] == 'f') {
size = gst_bstest_get_size (bstest, &bstest->patterns[i][1], size);
if (!bstest->silent)
g_print ("bstest: ***** flush %d bytes\n", size);
gst_bytestream_flush (bstest->bs, size);
} else if (!strncmp (bstest->patterns[i], "pb", 2)) {
size = gst_bstest_get_size (bstest, &bstest->patterns[i][2], size);
if (!bstest->silent)
g_print ("bstest: ***** peek bytes %d bytes\n", size);
gst_bytestream_peek_bytes (bstest->bs, &ptr, size);
} else if (bstest->patterns[i][0] == 'p') {
size = gst_bstest_get_size (bstest, &bstest->patterns[i][1], size);
if (!bstest->silent)
g_print ("bstest: ***** peek %d bytes\n", size);
gst_bytestream_peek (bstest->bs, &buf, size);
gst_buffer_unref (buf);
buf = NULL;
}
if (buf)
gst_pad_push (bstest->srcpad, GST_DATA (buf));
i++;
}
/* } while (!GST_ELEMENT_IS_COTHREAD_STOPPING (element)); */
} while (0);
}
static void
gst_bstest_set_property (GObject * object, guint prop_id, const GValue * value,
GParamSpec * pspec)
{
GstBsTest *bstest;
/* it's not null if we got it, but it might not be ours */
g_return_if_fail (GST_IS_BSTEST (object));
bstest = GST_BSTEST (object);
switch (prop_id) {
case ARG_SIZEMIN:
bstest->sizemin = g_value_get_int (value);
break;
case ARG_SIZEMAX:
bstest->sizemax = g_value_get_int (value);
break;
case ARG_ACCESSPATTERN:
if (bstest->accesspattern) {
g_free (bstest->accesspattern);
g_strfreev (bstest->patterns);
}
if (g_value_get_string (value) == NULL) {
gst_element_set_state (GST_ELEMENT (object), GST_STATE_NULL);
bstest->accesspattern = NULL;
bstest->num_patterns = 0;
} else {
guint i = 0;
bstest->accesspattern = g_strdup (g_value_get_string (value));
bstest->patterns = g_strsplit (bstest->accesspattern, ":", 0);
while (bstest->patterns[i++]);
bstest->num_patterns = i - 1;
}
break;
case ARG_COUNT:
bstest->count = g_value_get_uint (value);
break;
case ARG_SILENT:
bstest->silent = g_value_get_boolean (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gst_bstest_get_property (GObject * object, guint prop_id, GValue * value,
GParamSpec * pspec)
{
GstBsTest *bstest;
/* it's not null if we got it, but it might not be ours */
g_return_if_fail (GST_IS_BSTEST (object));
bstest = GST_BSTEST (object);
switch (prop_id) {
case ARG_SIZEMIN:
g_value_set_int (value, bstest->sizemin);
break;
case ARG_SIZEMAX:
g_value_set_int (value, bstest->sizemax);
break;
case ARG_ACCESSPATTERN:
g_value_set_string (value, bstest->accesspattern);
break;
case ARG_COUNT:
g_value_set_uint (value, bstest->count);
break;
case ARG_SILENT:
g_value_set_boolean (value, bstest->silent);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static GstElementStateReturn
gst_bstest_change_state (GstElement * element)
{
GstBsTest *bstest;
g_return_val_if_fail (GST_IS_BSTEST (element), GST_STATE_FAILURE);
bstest = GST_BSTEST (element);
if (GST_STATE_PENDING (element) == GST_STATE_NULL) {
if (bstest->bs) {
gst_bytestream_destroy (bstest->bs);
bstest->bs = NULL;
}
} else {
if (!bstest->bs) {
bstest->bs = gst_bytestream_new (bstest->sinkpad);
}
}
if (GST_ELEMENT_CLASS (parent_class)->change_state)
return GST_ELEMENT_CLASS (parent_class)->change_state (element);
return GST_STATE_SUCCESS;
}
static gboolean
plugin_init (GstPlugin * plugin)
{
/* We need to create an ElementFactory for each element we provide.
* This consists of the name of the element, the GType identifier,
* and a pointer to the details structure at the top of the file.
*/
return gst_element_register (plugin, "bstest", GST_RANK_PRIMARY,
GST_TYPE_BSTEST);
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"bstest",
"test for the bytestream element",
plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)

View file

@ -2,6 +2,3 @@ include ../Rules
tests_pass = cleanup1 cleanup2 cleanup4 cleanup5 tests_pass = cleanup1 cleanup2 cleanup4 cleanup5
tests_fail = tests_fail =
# cleanup3 fails depending on the machine
tests_ignore = cleanup3

View file

@ -1,68 +0,0 @@
#include <gst/gst.h>
static GstElement *
create_pipeline (void)
{
GstElement *fakesrc, *fakesink;
GstElement *pipeline;
GstElement *thread, *queue;
pipeline = gst_pipeline_new ("main_pipeline");
fakesrc = gst_element_factory_make ("fakesrc", "fakesrc");
thread = gst_thread_new ("thread");
fakesink = gst_element_factory_make ("fakesink", "fakesink");
queue = gst_element_factory_make ("queue", "queue");
gst_bin_add (GST_BIN (thread), fakesink);
gst_bin_add (GST_BIN (thread), queue);
gst_element_link (queue, fakesink);
gst_element_add_ghost_pad (thread, gst_element_get_pad (queue, "sink"),
"sink");
gst_element_link (fakesrc, thread);
gst_bin_add (GST_BIN (pipeline), fakesrc);
gst_bin_add (GST_BIN (pipeline), thread);
g_object_set (G_OBJECT (fakesrc), "num_buffers", 5, NULL);
return pipeline;
}
gint
main (gint argc, gchar * argv[])
{
GstElement *pipeline;
gint i = 10000;
gint step = 100;
free (malloc (8)); /* -lefence */
gst_init (&argc, &argv);
g_mem_chunk_info ();
while (i--) {
if (i % step == 0)
fprintf (stderr, "%10d\r", i);
pipeline = create_pipeline ();
gst_element_set_state (pipeline, GST_STATE_PLAYING);
while (gst_bin_iterate (GST_BIN (pipeline)));
gst_element_set_state (pipeline, GST_STATE_NULL);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
while (gst_bin_iterate (GST_BIN (pipeline)));
gst_element_set_state (pipeline, GST_STATE_NULL);
gst_object_unref (GST_OBJECT (pipeline));
}
fprintf (stderr, "\n");
g_mem_chunk_info ();
return 0;
}

View file

@ -1,5 +1,5 @@
include ../Rules include ../Rules
tests_pass = signedness clock1 clock2 tests_pass = signedness clock1
tests_fail = tests_fail =
tests_ignore = tests_ignore =

View file

@ -26,6 +26,7 @@ main (int argc, char *argv[])
g_print ("Could not create a fakesrc element !\n"); g_print ("Could not create a fakesrc element !\n");
return 1; return 1;
} }
g_object_set (G_OBJECT (src), "num-buffers", 1, NULL);
if ((id = gst_element_factory_make ("identity", "filter")) == NULL) { if ((id = gst_element_factory_make ("identity", "filter")) == NULL) {
g_print ("Could not create a identity element !\n"); g_print ("Could not create a identity element !\n");
return 1; return 1;

View file

@ -1,55 +0,0 @@
/*
* testsuite program to test clock behaviour
*
* creates a fakesrc ! identity ! fakesink pipeline
* registers a callback on fakesrc and one on fakesink
* also register a normal GLib timeout which should not be reached
*/
#include <gst/gst.h>
void
gst_clock_debug (GstClock * clock, GstElement * fakesink)
{
g_print ("Clock info: time %" G_GUINT64_FORMAT " - Element info: time %"
G_GUINT64_FORMAT "\n", gst_clock_get_time (clock),
gst_element_get_time (fakesink));
}
int
main (int argc, char *argv[])
{
GstClock *clock = NULL;
GstElement *pipeline, *fakesrc, *fakesink;
gst_init (&argc, &argv);
clock = gst_system_clock_obtain ();
g_assert (clock != NULL);
/* we check the time on an element */
fakesrc = gst_element_factory_make ("fakesrc", NULL);
g_assert (fakesrc);
fakesink = gst_element_factory_make ("fakesink", NULL);
g_assert (fakesink);
pipeline = gst_element_factory_make ("pipeline", NULL);
g_assert (pipeline);
gst_bin_add_many (GST_BIN (pipeline), fakesink, fakesrc, NULL);
gst_element_link (fakesrc, fakesink);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
gst_clock_debug (clock, fakesink);
g_usleep (G_USEC_PER_SEC);
gst_clock_debug (clock, fakesink);
gst_element_wait (fakesink, 2 * GST_SECOND);
gst_clock_debug (clock, fakesink);
gst_element_wait (fakesink, 5 * GST_SECOND);
gst_clock_debug (clock, fakesink);
g_usleep (G_USEC_PER_SEC);
gst_clock_debug (clock, fakesink);
/* success */
return 0;
}

View file

@ -6,23 +6,15 @@ void
do_test (void) do_test (void)
{ {
GstElement *pipeline; GstElement *pipeline;
int i;
gboolean ret;
gst_init (NULL, NULL); gst_init (NULL, NULL);
pipeline = gst_parse_launch ("fakesrc ! fakesink", NULL); pipeline = gst_parse_launch ("fakesrc num-buffers=100 ! fakesink", NULL);
g_assert (pipeline != NULL); g_assert (pipeline != NULL);
gst_element_set_state (pipeline, GST_STATE_PLAYING); gst_element_set_state (pipeline, GST_STATE_PLAYING);
gst_bin_iterate (GST_BIN (pipeline));
for (i = 0; i < 100; i++) {
ret = gst_bin_iterate (GST_BIN (pipeline));
g_assert (ret);
g_print ("%s", (i & 1) ? "+" : "-");
}
g_print ("\n");
gst_object_unref (GST_OBJECT (pipeline)); gst_object_unref (GST_OBJECT (pipeline));
} }

View file

@ -46,9 +46,9 @@ main (int argc, char *argv[])
g_print ("Creating elements\n"); g_print ("Creating elements\n");
if (!(src = element_create ("src", "fakesrc"))) if (!(src = element_create ("src", "fakesrc")))
return 1; return 1;
g_object_set (G_OBJECT (src), "sizetype", 2, NULL);
if (!(sink = element_create ("sink", "fakesink"))) if (!(sink = element_create ("sink", "fakesink")))
return 1; return 1;
g_object_set (G_OBJECT (src), "sizetype", 2, "num-buffers", 100, NULL);
/* add */ /* add */
g_print ("Adding elements to bin\n"); g_print ("Adding elements to bin\n");
@ -59,13 +59,6 @@ main (int argc, char *argv[])
g_print ("Linking elements\n"); g_print ("Linking elements\n");
gst_element_set_state (pipeline, GST_STATE_PLAYING); gst_element_set_state (pipeline, GST_STATE_PLAYING);
/* we expect this to give an error */
if (gst_bin_iterate (GST_BIN (pipeline)) != FALSE) {
g_warning
("Iterating a bin with unlinked elements should return FALSE !\n");
retval = 1;
}
gst_pad_link (gst_element_get_pad (src, "src"), gst_pad_link (gst_element_get_pad (src, "src"),
gst_element_get_pad (sink, "sink")); gst_element_get_pad (sink, "sink"));
@ -73,12 +66,7 @@ main (int argc, char *argv[])
g_print ("Doing 1 iteration\n"); g_print ("Doing 1 iteration\n");
gst_element_set_state (pipeline, GST_STATE_PLAYING); gst_element_set_state (pipeline, GST_STATE_PLAYING);
/* we expect this to work */ gst_bin_iterate (GST_BIN (pipeline));
if (gst_bin_iterate (GST_BIN (pipeline)) != TRUE) {
g_error ("Iterating a bin with linked elements should return TRUE !\n");
retval = 1;
}
g_print ("Done !\n"); g_print ("Done !\n");
return retval; return retval;
} }

Some files were not shown because too many files have changed in this diff Show more