2000-12-29 05:38:06 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
* 2000 Wim Taymans <wtay@chello.be>
|
2005-03-21 17:34:02 +00:00
|
|
|
* 2005 Wim Taymans <wim@fluendo.com>
|
2000-12-29 05:38:06 +00:00
|
|
|
*
|
2005-10-15 15:30:24 +00:00
|
|
|
* gstidentity.c:
|
2000-01-30 09:03:00 +00:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
docs/: Correct fixxrefs options.
Original commit message from CVS:
* docs/gst/Makefile.am:
* docs/libs/Makefile.am:
Correct fixxrefs options.
* docs/plugins/Makefile.am:
* docs/plugins/gstreamer-plugins-docs.sgml:
* docs/plugins/gstreamer-plugins-sections.txt:
* plugins/elements/Makefile.am:
* plugins/elements/gstcapsfilter.c (gst_capsfilter_details):
* plugins/elements/gstcapsfilter.h (__GST_CAPSFILTER_H__,
GST_TYPE_CAPSFILTER, GST_CAPSFILTER, GST_CAPSFILTER_CLASS,
GST_IS_CAPSFILTER, GST_IS_CAPSFILTER_CLASS, GstCapsFilter,
GstCapsFilterClass, _GstCapsFilter, trans, filter_caps,
_GstCapsFilterClass, trans_class):
* plugins/elements/gstelements.c (name, rank, type, _elements):
* plugins/elements/gstidentity.c
(gst_identity_check_imperfect_timestamp,
gst_identity_check_imperfect_offset):
Document capsfilter and add doc-blurb to identity.
2007-05-06 18:27:25 +00:00
|
|
|
/**
|
|
|
|
* SECTION:element-identity
|
|
|
|
*
|
|
|
|
* Dummy element that passes incomming data through unmodified. I has some
|
|
|
|
* useful diagnostic functions, such as offset and timestamp checking.
|
|
|
|
*/
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2003-06-29 14:05:49 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2006-05-04 15:20:14 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
2005-11-29 18:00:15 +00:00
|
|
|
#include "../../gst/gst-i18n-lib.h"
|
2003-06-29 14:05:49 +00:00
|
|
|
#include "gstidentity.h"
|
2004-02-03 03:31:26 +00:00
|
|
|
#include <gst/gstmarshal.h>
|
2003-06-29 14:05:49 +00:00
|
|
|
|
gst/: s/gst_pad_new/&_from_template/ register pad templates in the base_init function add static pad template definit...
Original commit message from CVS:
* gst/autoplug/gstspideridentity.c:
(gst_spider_identity_request_new_pad):
* gst/elements/gstaggregator.c: (gst_aggregator_base_init),
(gst_aggregator_init):
* gst/elements/gstfakesink.c: (gst_fakesink_base_init),
(gst_fakesink_init):
* gst/elements/gstfakesrc.c: (gst_fakesrc_base_init),
(gst_fakesrc_init):
* gst/elements/gstfdsink.c: (gst_fdsink_base_init),
(gst_fdsink_init):
* gst/elements/gstfdsrc.c: (gst_fdsrc_base_init), (gst_fdsrc_init):
* gst/elements/gstfilesink.c: (gst_filesink_base_init),
(gst_filesink_init):
* gst/elements/gstfilesrc.c: (gst_filesrc_base_init),
(gst_filesrc_init):
* gst/elements/gstidentity.c: (gst_identity_base_init),
(gst_identity_init):
* gst/elements/gstmultifilesrc.c: (gst_multifilesrc_base_init),
(gst_multifilesrc_init):
* gst/elements/gstpipefilter.c: (gst_pipefilter_base_init),
(gst_pipefilter_init):
* gst/elements/gststatistics.c: (gst_statistics_base_init),
(gst_statistics_init):
* gst/elements/gsttee.c: (gst_tee_base_init), (gst_tee_init):
* gst/gstqueue.c: (gst_queue_base_init), (gst_queue_init):
s/gst_pad_new/&_from_template/
register pad templates in the base_init function
add static pad template definitions
2004-08-17 14:11:23 +00:00
|
|
|
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
|
|
|
GST_PAD_SINK,
|
|
|
|
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);
|
|
|
|
|
2003-10-31 19:32:47 +00:00
|
|
|
GST_DEBUG_CATEGORY_STATIC (gst_identity_debug);
|
2003-06-29 14:05:49 +00:00
|
|
|
#define GST_CAT_DEFAULT gst_identity_debug
|
2000-01-30 09:03:00 +00:00
|
|
|
|
|
|
|
/* Identity signals and args */
|
2004-03-13 15:27:01 +00:00
|
|
|
enum
|
|
|
|
{
|
2001-07-11 15:51:40 +00:00
|
|
|
SIGNAL_HANDOFF,
|
2000-01-30 09:03:00 +00:00
|
|
|
/* FILL ME */
|
|
|
|
LAST_SIGNAL
|
|
|
|
};
|
|
|
|
|
2005-12-06 19:29:15 +00:00
|
|
|
#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_SINGLE_SEGMENT FALSE
|
|
|
|
#define DEFAULT_DUMP FALSE
|
|
|
|
#define DEFAULT_SYNC FALSE
|
|
|
|
#define DEFAULT_CHECK_PERFECT FALSE
|
2007-03-09 14:20:25 +00:00
|
|
|
#define DEFAULT_CHECK_IMPERFECT_TIMESTAMP FALSE
|
|
|
|
#define DEFAULT_CHECK_IMPERFECT_OFFSET FALSE
|
2007-11-21 13:27:50 +00:00
|
|
|
#define DEFAULT_SIGNAL_HANDOFFS TRUE
|
gst/elements/: Added datarate properties to limit the datarate.
Original commit message from CVS:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_init), (gst_fakesrc_set_clock),
(gst_fakesrc_set_property), (gst_fakesrc_get_property),
(gst_fakesrc_get), (gst_fakesrc_change_state):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_chain),
(gst_identity_set_property), (gst_identity_get_property),
(gst_identity_change_state):
* gst/elements/gstidentity.h:
Added datarate properties to limit the datarate.
2004-09-03 11:40:35 +00:00
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
enum
|
|
|
|
{
|
2005-03-21 17:34:02 +00:00
|
|
|
PROP_0,
|
|
|
|
PROP_SLEEP_TIME,
|
|
|
|
PROP_ERROR_AFTER,
|
|
|
|
PROP_DROP_PROBABILITY,
|
|
|
|
PROP_DATARATE,
|
|
|
|
PROP_SILENT,
|
gst/base/gstbasetransform.c: The event virtual method is now properly implemented, with a default handler
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_class_init),
(gst_base_transform_event), (gst_base_transform_eventfunc):
The event virtual method is now properly implemented, with a default
handler
Sub classes should call the parent_class event method. They should
return FALSE if they had a problem handling the given event, or don't
want GstBaseTransform to send that even downstream
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_event),
(gst_identity_transform_ip), (gst_identity_set_property),
(gst_identity_get_property):
* gst/elements/gstidentity.h:
Added the single-segment boolean property.
If set to TRUE, it will output a single segment of data, starting from
0, will eat up all incoming newsegment, and modify the timestamp of the
buffers accordingly
2005-11-29 14:47:07 +00:00
|
|
|
PROP_SINGLE_SEGMENT,
|
2005-03-21 17:34:02 +00:00
|
|
|
PROP_LAST_MESSAGE,
|
|
|
|
PROP_DUMP,
|
|
|
|
PROP_SYNC,
|
2007-03-09 14:20:25 +00:00
|
|
|
PROP_CHECK_PERFECT,
|
|
|
|
PROP_CHECK_IMPERFECT_TIMESTAMP,
|
2007-11-21 13:27:50 +00:00
|
|
|
PROP_CHECK_IMPERFECT_OFFSET,
|
|
|
|
PROP_SIGNAL_HANDOFFS
|
2000-01-30 09:03:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2004-01-08 04:10:18 +00:00
|
|
|
#define _do_init(bla) \
|
|
|
|
GST_DEBUG_CATEGORY_INIT (gst_identity_debug, "identity", 0, "identity element");
|
|
|
|
|
gst/: Simplify pad activation.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/README:
* gst/base/gstbasesink.c: (gst_basesink_get_type),
(gst_basesink_base_init), (gst_basesink_class_init),
(gst_basesink_pad_getcaps), (gst_basesink_init),
(gst_basesink_activate), (gst_basesink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_base_init), (gst_base_transform_finalize),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_proxy_getcaps), (gst_base_transform_setcaps),
(gst_base_transform_event), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_handle_buffer),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_finalize),
(gst_identity_class_init), (gst_identity_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_set_property),
(gst_identity_get_property), (gst_identity_change_state):
* gst/elements/gstidentity.h:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_lost_state), (gst_element_pads_activate):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_check_pull_range), (gst_pad_pull_range):
* gst/gstpad.h:
Simplify pad activation.
Added function to check if pull_range can be performed.
Error out when pulling inactive or flushing pads.
Removed const from refcounted types as it does not make sense.
Simplify pad templates in basesink
Added base class for simple 1-to-1 transforms.
Make identity subclass the base transform.
2005-03-29 16:18:12 +00:00
|
|
|
GST_BOILERPLATE_FULL (GstIdentity, gst_identity, GstBaseTransform,
|
|
|
|
GST_TYPE_BASE_TRANSFORM, _do_init);
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2004-03-21 03:22:55 +00:00
|
|
|
static void gst_identity_finalize (GObject * object);
|
2004-03-13 15:27:01 +00:00
|
|
|
static void gst_identity_set_property (GObject * object, guint prop_id,
|
|
|
|
const GValue * value, GParamSpec * pspec);
|
|
|
|
static void gst_identity_get_property (GObject * object, guint prop_id,
|
|
|
|
GValue * value, GParamSpec * pspec);
|
2000-11-25 14:18:47 +00:00
|
|
|
|
gst/: Simplify pad activation.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/README:
* gst/base/gstbasesink.c: (gst_basesink_get_type),
(gst_basesink_base_init), (gst_basesink_class_init),
(gst_basesink_pad_getcaps), (gst_basesink_init),
(gst_basesink_activate), (gst_basesink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_base_init), (gst_base_transform_finalize),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_proxy_getcaps), (gst_base_transform_setcaps),
(gst_base_transform_event), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_handle_buffer),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_finalize),
(gst_identity_class_init), (gst_identity_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_set_property),
(gst_identity_get_property), (gst_identity_change_state):
* gst/elements/gstidentity.h:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_lost_state), (gst_element_pads_activate):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_check_pull_range), (gst_pad_pull_range):
* gst/gstpad.h:
Simplify pad activation.
Added function to check if pull_range can be performed.
Error out when pulling inactive or flushing pads.
Removed const from refcounted types as it does not make sense.
Simplify pad templates in basesink
Added base class for simple 1-to-1 transforms.
Make identity subclass the base transform.
2005-03-29 16:18:12 +00:00
|
|
|
static gboolean gst_identity_event (GstBaseTransform * trans, GstEvent * event);
|
docs/design/part-events.txt: Small update.
Original commit message from CVS:
* docs/design/part-events.txt:
Small update.
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_do_sync), (gst_base_sink_activate_push),
(gst_base_sink_activate_pull):
Some more comments.
* gst/elements/gstfakesrc.c: (gst_fake_src_class_init),
(gst_fake_src_create):
Fix handoff marshall.
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_transform_ip):
We're a real inplace element.
* gst/gstbus.c: (gst_bus_post):
Added some comments.
* tests/lat.c: (fakesrc), (fakesink), (simple), (queue), (main):
* tests/muxing/case1.c: (main):
* tests/sched/dynamic-pipeline.c: (main):
* tests/sched/interrupt1.c: (main):
* tests/sched/interrupt2.c: (main):
* tests/sched/interrupt3.c: (main):
* tests/sched/runxml.c: (main):
* tests/sched/sched-stress.c: (main):
* tests/seeking/seeking1.c: (event_received), (main):
* tests/threadstate/threadstate2.c: (bus_handler), (timeout_func),
(main):
* tests/threadstate/threadstate3.c: (main):
* tests/threadstate/threadstate4.c: (main):
* tests/threadstate/threadstate5.c: (main):
Fix the tests.
2005-07-22 11:47:10 +00:00
|
|
|
static GstFlowReturn gst_identity_transform_ip (GstBaseTransform * trans,
|
|
|
|
GstBuffer * buf);
|
2008-03-24 16:56:36 +00:00
|
|
|
static GstFlowReturn gst_identity_prepare_output_buffer (GstBaseTransform
|
|
|
|
* trans, GstBuffer * in_buf, gint out_size, GstCaps * out_caps,
|
|
|
|
GstBuffer ** out_buf);
|
gst/: Added start/stop methods to transform base class so subclasses don't need to deal with state changes even.
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_base_init),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_setcaps), (gst_base_transform_handle_buffer),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_start),
(gst_identity_stop):
Added start/stop methods to transform base class so subclasses
don't need to deal with state changes even.
2005-03-31 10:10:55 +00:00
|
|
|
static gboolean gst_identity_start (GstBaseTransform * trans);
|
|
|
|
static gboolean gst_identity_stop (GstBaseTransform * trans);
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2001-07-11 15:51:40 +00:00
|
|
|
static guint gst_identity_signals[LAST_SIGNAL] = { 0 };
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2003-10-31 19:32:47 +00:00
|
|
|
static void
|
|
|
|
gst_identity_base_init (gpointer g_class)
|
|
|
|
{
|
Revert previous changes to the behaviour of GstPadTemplates, etc and the possiblity to call them in class_init as it ...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_get_type), (gst_bin_base_init),
(gst_bin_class_init):
* gst/gstelement.c: (gst_element_base_class_init),
(gst_element_class_add_pad_template):
* gst/gstpadtemplate.c: (gst_pad_template_init):
* gst/gstpipeline.c: (gst_pipeline_get_type),
(gst_pipeline_base_init), (gst_pipeline_class_init):
* libs/gst/base/gstbasesink.c:
* libs/gst/base/gstbasesrc.c: (gst_base_src_get_type),
(gst_base_src_base_init), (gst_base_src_class_init):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_base_init),
(gst_capsfilter_class_init):
* plugins/elements/gstfakesink.c: (gst_fake_sink_base_init),
(gst_fake_sink_class_init):
* plugins/elements/gstfakesrc.c: (gst_fake_src_base_init),
(gst_fake_src_class_init):
* plugins/elements/gstfdsink.c: (gst_fd_sink_base_init),
(gst_fd_sink_class_init):
* plugins/elements/gstfdsrc.c: (gst_fd_src_base_init),
(gst_fd_src_class_init):
* plugins/elements/gstfilesink.c: (gst_file_sink_base_init),
(gst_file_sink_class_init):
* plugins/elements/gstfilesrc.c: (gst_file_src_base_init),
(gst_file_src_class_init):
* plugins/elements/gstidentity.c: (gst_identity_base_init),
(gst_identity_class_init):
* plugins/elements/gstmultiqueue.c: (gst_multi_queue_base_init),
(gst_multi_queue_class_init):
* plugins/elements/gstqueue.c: (gst_queue_base_init),
(gst_queue_class_init):
* plugins/elements/gsttee.c: (gst_tee_base_init),
(gst_tee_class_init):
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_base_init),
(gst_type_find_element_class_init):
* tests/check/gst/gstelement.c: (gst_element_suite):
Revert previous changes to the behaviour of GstPadTemplates, etc
and the possiblity to call them in class_init as it breaks too
many elements. Reopens bug #491501.
Should be applied again for 0.11, thus added a few FIXME 0.11 at
several places.
2008-02-05 14:15:15 +00:00
|
|
|
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
|
|
|
|
|
|
|
gst_element_class_set_details_simple (gstelement_class,
|
|
|
|
"Identity",
|
|
|
|
"Generic",
|
|
|
|
"Pass data without modification", "Erik Walthinsen <omega@cse.ogi.edu>");
|
|
|
|
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));
|
2003-10-31 19:32:47 +00:00
|
|
|
}
|
2004-03-21 03:22:55 +00:00
|
|
|
|
|
|
|
static void
|
|
|
|
gst_identity_finalize (GObject * object)
|
|
|
|
{
|
|
|
|
GstIdentity *identity;
|
|
|
|
|
|
|
|
identity = GST_IDENTITY (object);
|
|
|
|
|
|
|
|
g_free (identity->last_message);
|
|
|
|
|
|
|
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
|
|
|
}
|
|
|
|
|
2005-07-15 14:59:22 +00:00
|
|
|
/* fixme: do something about this */
|
|
|
|
static void
|
|
|
|
marshal_VOID__MINIOBJECT (GClosure * closure, GValue * return_value,
|
|
|
|
guint n_param_values, const GValue * param_values, gpointer invocation_hint,
|
|
|
|
gpointer marshal_data)
|
|
|
|
{
|
|
|
|
typedef void (*marshalfunc_VOID__MINIOBJECT) (gpointer obj, gpointer arg1,
|
|
|
|
gpointer data2);
|
|
|
|
register marshalfunc_VOID__MINIOBJECT callback;
|
|
|
|
register GCClosure *cc = (GCClosure *) closure;
|
|
|
|
register gpointer data1, data2;
|
|
|
|
|
|
|
|
g_return_if_fail (n_param_values == 2);
|
|
|
|
|
|
|
|
if (G_CCLOSURE_SWAP_DATA (closure)) {
|
|
|
|
data1 = closure->data;
|
|
|
|
data2 = g_value_peek_pointer (param_values + 0);
|
|
|
|
} else {
|
|
|
|
data1 = g_value_peek_pointer (param_values + 0);
|
|
|
|
data2 = closure->data;
|
|
|
|
}
|
|
|
|
callback =
|
|
|
|
(marshalfunc_VOID__MINIOBJECT) (marshal_data ? marshal_data : cc->
|
|
|
|
callback);
|
|
|
|
|
|
|
|
callback (data1, gst_value_get_mini_object (param_values + 1), data2);
|
|
|
|
}
|
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
static void
|
|
|
|
gst_identity_class_init (GstIdentityClass * klass)
|
2000-11-25 14:18:47 +00:00
|
|
|
{
|
2001-06-25 01:20:11 +00:00
|
|
|
GObjectClass *gobject_class;
|
2004-06-18 14:05:55 +00:00
|
|
|
GstElementClass *gstelement_class;
|
gst/: Simplify pad activation.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/README:
* gst/base/gstbasesink.c: (gst_basesink_get_type),
(gst_basesink_base_init), (gst_basesink_class_init),
(gst_basesink_pad_getcaps), (gst_basesink_init),
(gst_basesink_activate), (gst_basesink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_base_init), (gst_base_transform_finalize),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_proxy_getcaps), (gst_base_transform_setcaps),
(gst_base_transform_event), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_handle_buffer),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_finalize),
(gst_identity_class_init), (gst_identity_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_set_property),
(gst_identity_get_property), (gst_identity_change_state):
* gst/elements/gstidentity.h:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_lost_state), (gst_element_pads_activate):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_check_pull_range), (gst_pad_pull_range):
* gst/gstpad.h:
Simplify pad activation.
Added function to check if pull_range can be performed.
Error out when pulling inactive or flushing pads.
Removed const from refcounted types as it does not make sense.
Simplify pad templates in basesink
Added base class for simple 1-to-1 transforms.
Make identity subclass the base transform.
2005-03-29 16:18:12 +00:00
|
|
|
GstBaseTransformClass *gstbasetrans_class;
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2003-10-31 19:32:47 +00:00
|
|
|
gobject_class = G_OBJECT_CLASS (klass);
|
2004-06-18 14:05:55 +00:00
|
|
|
gstelement_class = GST_ELEMENT_CLASS (klass);
|
gst/: Simplify pad activation.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/README:
* gst/base/gstbasesink.c: (gst_basesink_get_type),
(gst_basesink_base_init), (gst_basesink_class_init),
(gst_basesink_pad_getcaps), (gst_basesink_init),
(gst_basesink_activate), (gst_basesink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_base_init), (gst_base_transform_finalize),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_proxy_getcaps), (gst_base_transform_setcaps),
(gst_base_transform_event), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_handle_buffer),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_finalize),
(gst_identity_class_init), (gst_identity_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_set_property),
(gst_identity_get_property), (gst_identity_change_state):
* gst/elements/gstidentity.h:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_lost_state), (gst_element_pads_activate):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_check_pull_range), (gst_pad_pull_range):
* gst/gstpad.h:
Simplify pad activation.
Added function to check if pull_range can be performed.
Error out when pulling inactive or flushing pads.
Removed const from refcounted types as it does not make sense.
Simplify pad templates in basesink
Added base class for simple 1-to-1 transforms.
Make identity subclass the base transform.
2005-03-29 16:18:12 +00:00
|
|
|
gstbasetrans_class = GST_BASE_TRANSFORM_CLASS (klass);
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2005-03-08 17:42:29 +00:00
|
|
|
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_identity_set_property);
|
|
|
|
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_identity_get_property);
|
|
|
|
|
2006-05-11 18:10:34 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_SLEEP_TIME,
|
2004-03-13 15:27:01 +00:00
|
|
|
g_param_spec_uint ("sleep-time", "Sleep time",
|
gst/elements/: Added datarate properties to limit the datarate.
Original commit message from CVS:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_init), (gst_fakesrc_set_clock),
(gst_fakesrc_set_property), (gst_fakesrc_get_property),
(gst_fakesrc_get), (gst_fakesrc_change_state):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_chain),
(gst_identity_set_property), (gst_identity_get_property),
(gst_identity_change_state):
* gst/elements/gstidentity.h:
Added datarate properties to limit the datarate.
2004-09-03 11:40:35 +00:00
|
|
|
"Microseconds to sleep between processing", 0, G_MAXUINT,
|
2008-03-22 14:56:17 +00:00
|
|
|
DEFAULT_SLEEP_TIME, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
2006-05-11 18:10:34 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_ERROR_AFTER,
|
2008-03-22 14:56:17 +00:00
|
|
|
g_param_spec_int ("error-after", "Error After", "Error after N buffers",
|
|
|
|
G_MININT, G_MAXINT, DEFAULT_ERROR_AFTER,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
|
|
g_object_class_install_property (gobject_class, PROP_DROP_PROBABILITY,
|
|
|
|
g_param_spec_float ("drop-probability", "Drop Probability",
|
2007-03-08 11:40:18 +00:00
|
|
|
"The Probability a buffer is dropped", 0.0, 1.0,
|
2008-03-22 14:56:17 +00:00
|
|
|
DEFAULT_DROP_PROBABILITY,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
2006-05-11 18:10:34 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_DATARATE,
|
gst/elements/: Added datarate properties to limit the datarate.
Original commit message from CVS:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_init), (gst_fakesrc_set_clock),
(gst_fakesrc_set_property), (gst_fakesrc_get_property),
(gst_fakesrc_get), (gst_fakesrc_change_state):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_chain),
(gst_identity_set_property), (gst_identity_get_property),
(gst_identity_change_state):
* gst/elements/gstidentity.h:
Added datarate properties to limit the datarate.
2004-09-03 11:40:35 +00:00
|
|
|
g_param_spec_int ("datarate", "Datarate",
|
|
|
|
"(Re)timestamps buffers with number of bytes per second (0 = inactive)",
|
2008-03-22 14:56:17 +00:00
|
|
|
0, G_MAXINT, DEFAULT_DATARATE,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
2006-05-11 18:10:34 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_SILENT,
|
gst/elements/: Added datarate properties to limit the datarate.
Original commit message from CVS:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_init), (gst_fakesrc_set_clock),
(gst_fakesrc_set_property), (gst_fakesrc_get_property),
(gst_fakesrc_get), (gst_fakesrc_change_state):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_chain),
(gst_identity_set_property), (gst_identity_get_property),
(gst_identity_change_state):
* gst/elements/gstidentity.h:
Added datarate properties to limit the datarate.
2004-09-03 11:40:35 +00:00
|
|
|
g_param_spec_boolean ("silent", "silent", "silent", DEFAULT_SILENT,
|
2008-03-22 14:56:17 +00:00
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
2006-05-11 18:10:34 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_SINGLE_SEGMENT,
|
gst/base/gstbasetransform.c: The event virtual method is now properly implemented, with a default handler
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_class_init),
(gst_base_transform_event), (gst_base_transform_eventfunc):
The event virtual method is now properly implemented, with a default
handler
Sub classes should call the parent_class event method. They should
return FALSE if they had a problem handling the given event, or don't
want GstBaseTransform to send that even downstream
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_event),
(gst_identity_transform_ip), (gst_identity_set_property),
(gst_identity_get_property):
* gst/elements/gstidentity.h:
Added the single-segment boolean property.
If set to TRUE, it will output a single segment of data, starting from
0, will eat up all incoming newsegment, and modify the timestamp of the
buffers accordingly
2005-11-29 14:47:07 +00:00
|
|
|
g_param_spec_boolean ("single-segment", "Single Segment",
|
|
|
|
"Timestamp buffers and eat newsegments so as to appear as one segment",
|
2008-03-22 14:56:17 +00:00
|
|
|
DEFAULT_SINGLE_SEGMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
2006-05-11 18:10:34 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_LAST_MESSAGE,
|
2004-03-13 15:27:01 +00:00
|
|
|
g_param_spec_string ("last-message", "last-message", "last-message", NULL,
|
2008-03-22 14:56:17 +00:00
|
|
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
2006-05-11 18:10:34 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_DUMP,
|
2006-09-29 08:22:22 +00:00
|
|
|
g_param_spec_boolean ("dump", "Dump", "Dump buffer contents to stdout",
|
2008-03-22 14:56:17 +00:00
|
|
|
DEFAULT_DUMP, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
2006-05-11 18:10:34 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_SYNC,
|
2004-06-18 14:05:55 +00:00
|
|
|
g_param_spec_boolean ("sync", "Synchronize",
|
2008-03-22 14:56:17 +00:00
|
|
|
"Synchronize to pipeline clock", DEFAULT_SYNC,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
2006-05-11 18:10:34 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_CHECK_PERFECT,
|
2004-06-26 13:08:03 +00:00
|
|
|
g_param_spec_boolean ("check-perfect", "Check For Perfect Stream",
|
2007-03-09 14:20:25 +00:00
|
|
|
"Verify that the stream is time- and data-contiguous. "
|
|
|
|
"This only logs in the debug log. This will be deprecated in favor "
|
|
|
|
"of the check-imperfect-timestamp/offset properties.",
|
2008-03-22 14:56:17 +00:00
|
|
|
DEFAULT_CHECK_PERFECT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
2007-03-09 14:20:25 +00:00
|
|
|
g_object_class_install_property (gobject_class,
|
|
|
|
PROP_CHECK_IMPERFECT_TIMESTAMP,
|
|
|
|
g_param_spec_boolean ("check-imperfect-timestamp",
|
|
|
|
"Check for discontiguous timestamps",
|
|
|
|
"Send element messages if timestamps and durations do not match up",
|
2008-03-22 14:56:17 +00:00
|
|
|
DEFAULT_CHECK_IMPERFECT_TIMESTAMP,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
2007-03-09 14:20:25 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_CHECK_IMPERFECT_OFFSET,
|
|
|
|
g_param_spec_boolean ("check-imperfect-offset",
|
|
|
|
"Check for discontiguous offset",
|
|
|
|
"Send element messages if offset and offset_end do not match up",
|
2008-03-22 14:56:17 +00:00
|
|
|
DEFAULT_CHECK_IMPERFECT_OFFSET,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2007-11-21 13:27:50 +00:00
|
|
|
/**
|
|
|
|
* GstIdentity:signal-handoffs
|
|
|
|
*
|
|
|
|
* If set to #TRUE, the identity will emit a handoff signal when handling a buffer.
|
|
|
|
* When set to #FALSE, no signal will be emited, which might improve performance.
|
|
|
|
*
|
|
|
|
* Since: 0.10.16
|
|
|
|
*/
|
|
|
|
g_object_class_install_property (gobject_class, PROP_SIGNAL_HANDOFFS,
|
|
|
|
g_param_spec_boolean ("signal-handoffs",
|
|
|
|
"Signal handoffs", "Send a signal before pushing the buffer",
|
2008-03-22 14:56:17 +00:00
|
|
|
DEFAULT_SIGNAL_HANDOFFS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
2007-11-21 13:27:50 +00:00
|
|
|
|
|
|
|
/**
|
2006-01-04 12:41:35 +00:00
|
|
|
* GstIdentity::handoff:
|
|
|
|
* @identity: the identity instance
|
|
|
|
* @buffer: the buffer that just has been received
|
|
|
|
* @pad: the pad that received it
|
|
|
|
*
|
|
|
|
* This signal gets emitted before passing the buffer downstream.
|
|
|
|
*/
|
2001-07-11 15:51:40 +00:00
|
|
|
gst_identity_signals[SIGNAL_HANDOFF] =
|
2004-03-13 15:27:01 +00:00
|
|
|
g_signal_new ("handoff", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
|
|
|
G_STRUCT_OFFSET (GstIdentityClass, handoff), NULL, NULL,
|
2005-07-15 14:59:22 +00:00
|
|
|
marshal_VOID__MINIOBJECT, G_TYPE_NONE, 1, GST_TYPE_BUFFER);
|
2001-07-11 15:51:40 +00:00
|
|
|
|
2004-03-21 03:22:55 +00:00
|
|
|
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_identity_finalize);
|
2004-06-18 14:05:55 +00:00
|
|
|
|
gst/: Simplify pad activation.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/README:
* gst/base/gstbasesink.c: (gst_basesink_get_type),
(gst_basesink_base_init), (gst_basesink_class_init),
(gst_basesink_pad_getcaps), (gst_basesink_init),
(gst_basesink_activate), (gst_basesink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_base_init), (gst_base_transform_finalize),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_proxy_getcaps), (gst_base_transform_setcaps),
(gst_base_transform_event), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_handle_buffer),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_finalize),
(gst_identity_class_init), (gst_identity_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_set_property),
(gst_identity_get_property), (gst_identity_change_state):
* gst/elements/gstidentity.h:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_lost_state), (gst_element_pads_activate):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_check_pull_range), (gst_pad_pull_range):
* gst/gstpad.h:
Simplify pad activation.
Added function to check if pull_range can be performed.
Error out when pulling inactive or flushing pads.
Removed const from refcounted types as it does not make sense.
Simplify pad templates in basesink
Added base class for simple 1-to-1 transforms.
Make identity subclass the base transform.
2005-03-29 16:18:12 +00:00
|
|
|
gstbasetrans_class->event = GST_DEBUG_FUNCPTR (gst_identity_event);
|
docs/design/part-events.txt: Small update.
Original commit message from CVS:
* docs/design/part-events.txt:
Small update.
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_do_sync), (gst_base_sink_activate_push),
(gst_base_sink_activate_pull):
Some more comments.
* gst/elements/gstfakesrc.c: (gst_fake_src_class_init),
(gst_fake_src_create):
Fix handoff marshall.
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_transform_ip):
We're a real inplace element.
* gst/gstbus.c: (gst_bus_post):
Added some comments.
* tests/lat.c: (fakesrc), (fakesink), (simple), (queue), (main):
* tests/muxing/case1.c: (main):
* tests/sched/dynamic-pipeline.c: (main):
* tests/sched/interrupt1.c: (main):
* tests/sched/interrupt2.c: (main):
* tests/sched/interrupt3.c: (main):
* tests/sched/runxml.c: (main):
* tests/sched/sched-stress.c: (main):
* tests/seeking/seeking1.c: (event_received), (main):
* tests/threadstate/threadstate2.c: (bus_handler), (timeout_func),
(main):
* tests/threadstate/threadstate3.c: (main):
* tests/threadstate/threadstate4.c: (main):
* tests/threadstate/threadstate5.c: (main):
Fix the tests.
2005-07-22 11:47:10 +00:00
|
|
|
gstbasetrans_class->transform_ip =
|
|
|
|
GST_DEBUG_FUNCPTR (gst_identity_transform_ip);
|
2008-03-24 16:56:36 +00:00
|
|
|
gstbasetrans_class->prepare_output_buffer =
|
|
|
|
GST_DEBUG_FUNCPTR (gst_identity_prepare_output_buffer);
|
gst/: Added start/stop methods to transform base class so subclasses don't need to deal with state changes even.
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_base_init),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_setcaps), (gst_base_transform_handle_buffer),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_start),
(gst_identity_stop):
Added start/stop methods to transform base class so subclasses
don't need to deal with state changes even.
2005-03-31 10:10:55 +00:00
|
|
|
gstbasetrans_class->start = GST_DEBUG_FUNCPTR (gst_identity_start);
|
|
|
|
gstbasetrans_class->stop = GST_DEBUG_FUNCPTR (gst_identity_stop);
|
2000-01-30 09:03:00 +00:00
|
|
|
}
|
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
static void
|
2005-08-28 17:45:58 +00:00
|
|
|
gst_identity_init (GstIdentity * identity, GstIdentityClass * g_class)
|
2000-11-25 14:18:47 +00:00
|
|
|
{
|
gst/elements/: Added datarate properties to limit the datarate.
Original commit message from CVS:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_init), (gst_fakesrc_set_clock),
(gst_fakesrc_set_property), (gst_fakesrc_get_property),
(gst_fakesrc_get), (gst_fakesrc_change_state):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_chain),
(gst_identity_set_property), (gst_identity_get_property),
(gst_identity_change_state):
* gst/elements/gstidentity.h:
Added datarate properties to limit the datarate.
2004-09-03 11:40:35 +00:00
|
|
|
identity->sleep_time = DEFAULT_SLEEP_TIME;
|
|
|
|
identity->error_after = DEFAULT_ERROR_AFTER;
|
|
|
|
identity->drop_probability = DEFAULT_DROP_PROBABILITY;
|
|
|
|
identity->datarate = DEFAULT_DATARATE;
|
|
|
|
identity->silent = DEFAULT_SILENT;
|
gst/base/gstbasetransform.c: The event virtual method is now properly implemented, with a default handler
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_class_init),
(gst_base_transform_event), (gst_base_transform_eventfunc):
The event virtual method is now properly implemented, with a default
handler
Sub classes should call the parent_class event method. They should
return FALSE if they had a problem handling the given event, or don't
want GstBaseTransform to send that even downstream
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_event),
(gst_identity_transform_ip), (gst_identity_set_property),
(gst_identity_get_property):
* gst/elements/gstidentity.h:
Added the single-segment boolean property.
If set to TRUE, it will output a single segment of data, starting from
0, will eat up all incoming newsegment, and modify the timestamp of the
buffers accordingly
2005-11-29 14:47:07 +00:00
|
|
|
identity->single_segment = DEFAULT_SINGLE_SEGMENT;
|
gst/elements/: Added datarate properties to limit the datarate.
Original commit message from CVS:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_init), (gst_fakesrc_set_clock),
(gst_fakesrc_set_property), (gst_fakesrc_get_property),
(gst_fakesrc_get), (gst_fakesrc_change_state):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_chain),
(gst_identity_set_property), (gst_identity_get_property),
(gst_identity_change_state):
* gst/elements/gstidentity.h:
Added datarate properties to limit the datarate.
2004-09-03 11:40:35 +00:00
|
|
|
identity->sync = DEFAULT_SYNC;
|
|
|
|
identity->check_perfect = DEFAULT_CHECK_PERFECT;
|
2007-03-09 14:20:25 +00:00
|
|
|
identity->check_imperfect_timestamp = DEFAULT_CHECK_IMPERFECT_TIMESTAMP;
|
|
|
|
identity->check_imperfect_offset = DEFAULT_CHECK_IMPERFECT_OFFSET;
|
gst/elements/: Added datarate properties to limit the datarate.
Original commit message from CVS:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_init), (gst_fakesrc_set_clock),
(gst_fakesrc_set_property), (gst_fakesrc_get_property),
(gst_fakesrc_get), (gst_fakesrc_change_state):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_chain),
(gst_identity_set_property), (gst_identity_get_property),
(gst_identity_change_state):
* gst/elements/gstidentity.h:
Added datarate properties to limit the datarate.
2004-09-03 11:40:35 +00:00
|
|
|
identity->dump = DEFAULT_DUMP;
|
2002-09-08 18:27:36 +00:00
|
|
|
identity->last_message = NULL;
|
2007-11-21 13:27:50 +00:00
|
|
|
identity->signal_handoffs = DEFAULT_SIGNAL_HANDOFFS;
|
2005-03-21 17:34:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
gst/: Simplify pad activation.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/README:
* gst/base/gstbasesink.c: (gst_basesink_get_type),
(gst_basesink_base_init), (gst_basesink_class_init),
(gst_basesink_pad_getcaps), (gst_basesink_init),
(gst_basesink_activate), (gst_basesink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_base_init), (gst_base_transform_finalize),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_proxy_getcaps), (gst_base_transform_setcaps),
(gst_base_transform_event), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_handle_buffer),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_finalize),
(gst_identity_class_init), (gst_identity_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_set_property),
(gst_identity_get_property), (gst_identity_change_state):
* gst/elements/gstidentity.h:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_lost_state), (gst_element_pads_activate):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_check_pull_range), (gst_pad_pull_range):
* gst/gstpad.h:
Simplify pad activation.
Added function to check if pull_range can be performed.
Error out when pulling inactive or flushing pads.
Removed const from refcounted types as it does not make sense.
Simplify pad templates in basesink
Added base class for simple 1-to-1 transforms.
Make identity subclass the base transform.
2005-03-29 16:18:12 +00:00
|
|
|
gst_identity_event (GstBaseTransform * trans, GstEvent * event)
|
2000-11-25 14:18:47 +00:00
|
|
|
{
|
2000-01-30 09:03:00 +00:00
|
|
|
GstIdentity *identity;
|
gst/base/gstbasetransform.c: The event virtual method is now properly implemented, with a default handler
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_class_init),
(gst_base_transform_event), (gst_base_transform_eventfunc):
The event virtual method is now properly implemented, with a default
handler
Sub classes should call the parent_class event method. They should
return FALSE if they had a problem handling the given event, or don't
want GstBaseTransform to send that even downstream
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_event),
(gst_identity_transform_ip), (gst_identity_set_property),
(gst_identity_get_property):
* gst/elements/gstidentity.h:
Added the single-segment boolean property.
If set to TRUE, it will output a single segment of data, starting from
0, will eat up all incoming newsegment, and modify the timestamp of the
buffers accordingly
2005-11-29 14:47:07 +00:00
|
|
|
gboolean ret = TRUE;
|
2000-01-30 09:03:00 +00:00
|
|
|
|
gst/: Simplify pad activation.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/README:
* gst/base/gstbasesink.c: (gst_basesink_get_type),
(gst_basesink_base_init), (gst_basesink_class_init),
(gst_basesink_pad_getcaps), (gst_basesink_init),
(gst_basesink_activate), (gst_basesink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_base_init), (gst_base_transform_finalize),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_proxy_getcaps), (gst_base_transform_setcaps),
(gst_base_transform_event), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_handle_buffer),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_finalize),
(gst_identity_class_init), (gst_identity_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_set_property),
(gst_identity_get_property), (gst_identity_change_state):
* gst/elements/gstidentity.h:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_lost_state), (gst_element_pads_activate):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_check_pull_range), (gst_pad_pull_range):
* gst/gstpad.h:
Simplify pad activation.
Added function to check if pull_range can be performed.
Error out when pulling inactive or flushing pads.
Removed const from refcounted types as it does not make sense.
Simplify pad templates in basesink
Added base class for simple 1-to-1 transforms.
Make identity subclass the base transform.
2005-03-29 16:18:12 +00:00
|
|
|
identity = GST_IDENTITY (trans);
|
2001-04-20 19:21:51 +00:00
|
|
|
|
2005-03-21 17:34:02 +00:00
|
|
|
if (!identity->silent) {
|
2005-10-12 09:02:42 +00:00
|
|
|
const GstStructure *s;
|
|
|
|
gchar *sstr;
|
|
|
|
|
2005-11-21 16:34:26 +00:00
|
|
|
GST_OBJECT_LOCK (identity);
|
2005-03-21 17:34:02 +00:00
|
|
|
g_free (identity->last_message);
|
2004-06-09 14:19:50 +00:00
|
|
|
|
2005-10-12 09:02:42 +00:00
|
|
|
if ((s = gst_event_get_structure (event)))
|
|
|
|
sstr = gst_structure_to_string (s);
|
|
|
|
else
|
|
|
|
sstr = g_strdup ("");
|
|
|
|
|
2005-03-21 17:34:02 +00:00
|
|
|
identity->last_message =
|
2005-10-12 09:02:42 +00:00
|
|
|
g_strdup_printf ("event ******* (%s:%s) E (type: %d, %s) %p",
|
|
|
|
GST_DEBUG_PAD_NAME (trans->sinkpad), GST_EVENT_TYPE (event), sstr,
|
|
|
|
event);
|
|
|
|
g_free (sstr);
|
2005-11-21 16:34:26 +00:00
|
|
|
GST_OBJECT_UNLOCK (identity);
|
2004-06-09 14:19:50 +00:00
|
|
|
|
2005-03-21 17:34:02 +00:00
|
|
|
g_object_notify (G_OBJECT (identity), "last_message");
|
|
|
|
}
|
gst/base/gstbasetransform.c: The event virtual method is now properly implemented, with a default handler
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_class_init),
(gst_base_transform_event), (gst_base_transform_eventfunc):
The event virtual method is now properly implemented, with a default
handler
Sub classes should call the parent_class event method. They should
return FALSE if they had a problem handling the given event, or don't
want GstBaseTransform to send that even downstream
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_event),
(gst_identity_transform_ip), (gst_identity_set_property),
(gst_identity_get_property):
* gst/elements/gstidentity.h:
Added the single-segment boolean property.
If set to TRUE, it will output a single segment of data, starting from
0, will eat up all incoming newsegment, and modify the timestamp of the
buffers accordingly
2005-11-29 14:47:07 +00:00
|
|
|
|
|
|
|
if (identity->single_segment
|
|
|
|
&& (GST_EVENT_TYPE (event) == GST_EVENT_NEWSEGMENT)) {
|
|
|
|
if (trans->have_newsegment == FALSE) {
|
|
|
|
GstEvent *news;
|
|
|
|
GstFormat format;
|
|
|
|
|
|
|
|
gst_event_parse_new_segment (event, NULL, NULL, &format, NULL, NULL,
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
/* This is the first newsegment, send out a (0, -1) newsegment */
|
|
|
|
news = gst_event_new_new_segment (TRUE, 1.0, format, 0, -1, 0);
|
|
|
|
|
|
|
|
if (!(gst_pad_event_default (trans->sinkpad, news)))
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-04-09 08:19:36 +00:00
|
|
|
/* Reset previous timestamp, duration and offsets on NEWSEGMENT
|
|
|
|
* to prevent false warnings when checking for perfect streams */
|
|
|
|
if (GST_EVENT_TYPE (event) == GST_EVENT_NEWSEGMENT) {
|
|
|
|
identity->prev_timestamp = identity->prev_duration = GST_CLOCK_TIME_NONE;
|
|
|
|
identity->prev_offset = identity->prev_offset_end = GST_BUFFER_OFFSET_NONE;
|
|
|
|
}
|
|
|
|
|
gst/base/gstbasetransform.c: The event virtual method is now properly implemented, with a default handler
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_class_init),
(gst_base_transform_event), (gst_base_transform_eventfunc):
The event virtual method is now properly implemented, with a default
handler
Sub classes should call the parent_class event method. They should
return FALSE if they had a problem handling the given event, or don't
want GstBaseTransform to send that even downstream
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_event),
(gst_identity_transform_ip), (gst_identity_set_property),
(gst_identity_get_property):
* gst/elements/gstidentity.h:
Added the single-segment boolean property.
If set to TRUE, it will output a single segment of data, starting from
0, will eat up all incoming newsegment, and modify the timestamp of the
buffers accordingly
2005-11-29 14:47:07 +00:00
|
|
|
GST_BASE_TRANSFORM_CLASS (parent_class)->event (trans, event);
|
|
|
|
|
|
|
|
if (identity->single_segment
|
|
|
|
&& (GST_EVENT_TYPE (event) == GST_EVENT_NEWSEGMENT)) {
|
|
|
|
/* eat up segments */
|
|
|
|
ret = FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
2005-03-21 17:34:02 +00:00
|
|
|
}
|
|
|
|
|
2008-03-24 16:56:36 +00:00
|
|
|
static GstFlowReturn
|
|
|
|
gst_identity_prepare_output_buffer (GstBaseTransform * trans,
|
|
|
|
GstBuffer * in_buf, gint out_size, GstCaps * out_caps, GstBuffer ** out_buf)
|
|
|
|
{
|
|
|
|
GstIdentity *identity = GST_IDENTITY (trans);
|
|
|
|
|
|
|
|
/* only bother if we may have to alter metadata */
|
|
|
|
if (identity->datarate > 0 || identity->single_segment) {
|
|
|
|
if (gst_buffer_is_metadata_writable (in_buf))
|
|
|
|
*out_buf = gst_buffer_ref (in_buf);
|
|
|
|
else {
|
|
|
|
/* make even less writable */
|
|
|
|
gst_buffer_ref (in_buf);
|
|
|
|
/* extra ref is dropped going through the official process */
|
|
|
|
*out_buf = gst_buffer_make_metadata_writable (in_buf);
|
|
|
|
}
|
|
|
|
} else
|
|
|
|
*out_buf = gst_buffer_ref (in_buf);
|
|
|
|
|
|
|
|
return GST_FLOW_OK;
|
|
|
|
}
|
|
|
|
|
2005-03-21 17:34:02 +00:00
|
|
|
static void
|
gst/: Simplify pad activation.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/README:
* gst/base/gstbasesink.c: (gst_basesink_get_type),
(gst_basesink_base_init), (gst_basesink_class_init),
(gst_basesink_pad_getcaps), (gst_basesink_init),
(gst_basesink_activate), (gst_basesink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_base_init), (gst_base_transform_finalize),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_proxy_getcaps), (gst_base_transform_setcaps),
(gst_base_transform_event), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_handle_buffer),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_finalize),
(gst_identity_class_init), (gst_identity_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_set_property),
(gst_identity_get_property), (gst_identity_change_state):
* gst/elements/gstidentity.h:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_lost_state), (gst_element_pads_activate):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_check_pull_range), (gst_pad_pull_range):
* gst/gstpad.h:
Simplify pad activation.
Added function to check if pull_range can be performed.
Error out when pulling inactive or flushing pads.
Removed const from refcounted types as it does not make sense.
Simplify pad templates in basesink
Added base class for simple 1-to-1 transforms.
Make identity subclass the base transform.
2005-03-29 16:18:12 +00:00
|
|
|
gst_identity_check_perfect (GstIdentity * identity, GstBuffer * buf)
|
2005-03-21 17:34:02 +00:00
|
|
|
{
|
gst/: Simplify pad activation.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/README:
* gst/base/gstbasesink.c: (gst_basesink_get_type),
(gst_basesink_base_init), (gst_basesink_class_init),
(gst_basesink_pad_getcaps), (gst_basesink_init),
(gst_basesink_activate), (gst_basesink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_base_init), (gst_base_transform_finalize),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_proxy_getcaps), (gst_base_transform_setcaps),
(gst_base_transform_event), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_handle_buffer),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_finalize),
(gst_identity_class_init), (gst_identity_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_set_property),
(gst_identity_get_property), (gst_identity_change_state):
* gst/elements/gstidentity.h:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_lost_state), (gst_element_pads_activate):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_check_pull_range), (gst_pad_pull_range):
* gst/gstpad.h:
Simplify pad activation.
Added function to check if pull_range can be performed.
Error out when pulling inactive or flushing pads.
Removed const from refcounted types as it does not make sense.
Simplify pad templates in basesink
Added base class for simple 1-to-1 transforms.
Make identity subclass the base transform.
2005-03-29 16:18:12 +00:00
|
|
|
GstClockTime timestamp;
|
2005-03-21 17:34:02 +00:00
|
|
|
|
gst/: Simplify pad activation.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/README:
* gst/base/gstbasesink.c: (gst_basesink_get_type),
(gst_basesink_base_init), (gst_basesink_class_init),
(gst_basesink_pad_getcaps), (gst_basesink_init),
(gst_basesink_activate), (gst_basesink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_base_init), (gst_base_transform_finalize),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_proxy_getcaps), (gst_base_transform_setcaps),
(gst_base_transform_event), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_handle_buffer),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_finalize),
(gst_identity_class_init), (gst_identity_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_set_property),
(gst_identity_get_property), (gst_identity_change_state):
* gst/elements/gstidentity.h:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_lost_state), (gst_element_pads_activate):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_check_pull_range), (gst_pad_pull_range):
* gst/gstpad.h:
Simplify pad activation.
Added function to check if pull_range can be performed.
Error out when pulling inactive or flushing pads.
Removed const from refcounted types as it does not make sense.
Simplify pad templates in basesink
Added base class for simple 1-to-1 transforms.
Make identity subclass the base transform.
2005-03-29 16:18:12 +00:00
|
|
|
timestamp = GST_BUFFER_TIMESTAMP (buf);
|
2005-03-21 17:34:02 +00:00
|
|
|
|
2004-06-26 13:08:03 +00:00
|
|
|
/* see if we need to do perfect stream checking */
|
|
|
|
/* invalid timestamp drops us out of check. FIXME: maybe warn ? */
|
gst/: Simplify pad activation.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/README:
* gst/base/gstbasesink.c: (gst_basesink_get_type),
(gst_basesink_base_init), (gst_basesink_class_init),
(gst_basesink_pad_getcaps), (gst_basesink_init),
(gst_basesink_activate), (gst_basesink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_base_init), (gst_base_transform_finalize),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_proxy_getcaps), (gst_base_transform_setcaps),
(gst_base_transform_event), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_handle_buffer),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_finalize),
(gst_identity_class_init), (gst_identity_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_set_property),
(gst_identity_get_property), (gst_identity_change_state):
* gst/elements/gstidentity.h:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_lost_state), (gst_element_pads_activate):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_check_pull_range), (gst_pad_pull_range):
* gst/gstpad.h:
Simplify pad activation.
Added function to check if pull_range can be performed.
Error out when pulling inactive or flushing pads.
Removed const from refcounted types as it does not make sense.
Simplify pad templates in basesink
Added base class for simple 1-to-1 transforms.
Make identity subclass the base transform.
2005-03-29 16:18:12 +00:00
|
|
|
if (timestamp != GST_CLOCK_TIME_NONE) {
|
2004-06-26 13:08:03 +00:00
|
|
|
/* check if we had a previous buffer to compare to */
|
2006-12-16 19:33:26 +00:00
|
|
|
if (identity->prev_timestamp != GST_CLOCK_TIME_NONE &&
|
|
|
|
identity->prev_duration != GST_CLOCK_TIME_NONE) {
|
|
|
|
guint64 offset, t_expected;
|
|
|
|
gint64 dt;
|
|
|
|
|
|
|
|
t_expected = identity->prev_timestamp + identity->prev_duration;
|
|
|
|
dt = timestamp - t_expected;
|
|
|
|
if (dt != 0) {
|
2004-06-26 13:08:03 +00:00
|
|
|
GST_WARNING_OBJECT (identity,
|
|
|
|
"Buffer not time-contiguous with previous one: " "prev ts %"
|
|
|
|
GST_TIME_FORMAT ", prev dur %" GST_TIME_FORMAT ", new ts %"
|
2006-12-16 19:33:26 +00:00
|
|
|
GST_TIME_FORMAT " (expected ts %" GST_TIME_FORMAT ", delta=%c%"
|
|
|
|
GST_TIME_FORMAT ")", GST_TIME_ARGS (identity->prev_timestamp),
|
|
|
|
GST_TIME_ARGS (identity->prev_duration), GST_TIME_ARGS (timestamp),
|
|
|
|
GST_TIME_ARGS (t_expected), (dt < 0) ? '-' : '+',
|
|
|
|
GST_TIME_ARGS ((dt < 0) ? (GstClockTime) (-dt) : dt));
|
2007-03-09 14:20:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
offset = GST_BUFFER_OFFSET (buf);
|
|
|
|
if (identity->prev_offset_end != offset) {
|
|
|
|
GST_WARNING_OBJECT (identity,
|
|
|
|
"Buffer not data-contiguous with previous one: "
|
|
|
|
"prev offset_end %" G_GINT64_FORMAT ", new offset %"
|
|
|
|
G_GINT64_FORMAT, identity->prev_offset_end, offset);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
GST_DEBUG_OBJECT (identity, "can't check time-contiguity, no timestamp "
|
|
|
|
"and/or duration were set on previous buffer");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gst_identity_check_imperfect_timestamp (GstIdentity * identity, GstBuffer * buf)
|
|
|
|
{
|
|
|
|
GstClockTime timestamp = GST_BUFFER_TIMESTAMP (buf);
|
|
|
|
|
|
|
|
/* invalid timestamp drops us out of check. FIXME: maybe warn ? */
|
|
|
|
if (timestamp != GST_CLOCK_TIME_NONE) {
|
|
|
|
/* check if we had a previous buffer to compare to */
|
|
|
|
if (identity->prev_timestamp != GST_CLOCK_TIME_NONE &&
|
|
|
|
identity->prev_duration != GST_CLOCK_TIME_NONE) {
|
|
|
|
guint64 offset;
|
|
|
|
GstClockTime t_expected;
|
|
|
|
GstClockTimeDiff dt;
|
|
|
|
|
|
|
|
offset = GST_BUFFER_OFFSET (buf);
|
|
|
|
t_expected = identity->prev_timestamp + identity->prev_duration;
|
|
|
|
dt = GST_CLOCK_DIFF (t_expected, timestamp);
|
|
|
|
if (dt != 0) {
|
2007-03-07 16:58:42 +00:00
|
|
|
/*
|
2007-03-09 14:20:25 +00:00
|
|
|
* "imperfect-timestamp" bus message:
|
|
|
|
* @identity: the identity instance
|
|
|
|
* @prev-timestamp: the previous buffer timestamp
|
|
|
|
* @prev-duration: the previous buffer duration
|
|
|
|
* @prev-offset: the previous buffer offset
|
2007-03-07 16:58:42 +00:00
|
|
|
* @prev-offset-end: the previous buffer offset end
|
docs/: Correct fixxrefs options.
Original commit message from CVS:
* docs/gst/Makefile.am:
* docs/libs/Makefile.am:
Correct fixxrefs options.
* docs/plugins/Makefile.am:
* docs/plugins/gstreamer-plugins-docs.sgml:
* docs/plugins/gstreamer-plugins-sections.txt:
* plugins/elements/Makefile.am:
* plugins/elements/gstcapsfilter.c (gst_capsfilter_details):
* plugins/elements/gstcapsfilter.h (__GST_CAPSFILTER_H__,
GST_TYPE_CAPSFILTER, GST_CAPSFILTER, GST_CAPSFILTER_CLASS,
GST_IS_CAPSFILTER, GST_IS_CAPSFILTER_CLASS, GstCapsFilter,
GstCapsFilterClass, _GstCapsFilter, trans, filter_caps,
_GstCapsFilterClass, trans_class):
* plugins/elements/gstelements.c (name, rank, type, _elements):
* plugins/elements/gstidentity.c
(gst_identity_check_imperfect_timestamp,
gst_identity_check_imperfect_offset):
Document capsfilter and add doc-blurb to identity.
2007-05-06 18:27:25 +00:00
|
|
|
* @cur-timestamp: the current buffer timestamp
|
2007-03-09 14:20:25 +00:00
|
|
|
* @cur-duration: the current buffer duration
|
|
|
|
* @cur-offset: the current buffer offset
|
|
|
|
* @cur-offset-end: the current buffer offset end
|
2007-03-07 16:58:42 +00:00
|
|
|
*
|
2007-03-09 14:20:25 +00:00
|
|
|
* This bus message gets emitted if the check-imperfect-timestamp
|
|
|
|
* property is set and there is a gap in time between the
|
|
|
|
* last buffer and the newly received buffer.
|
2007-03-07 16:58:42 +00:00
|
|
|
*/
|
|
|
|
gst_element_post_message (GST_ELEMENT (identity),
|
|
|
|
gst_message_new_element (GST_OBJECT (identity),
|
2007-03-09 14:20:25 +00:00
|
|
|
gst_structure_new ("imperfect-timestamp",
|
|
|
|
"prev-timestamp", G_TYPE_UINT64,
|
2007-03-07 17:02:51 +00:00
|
|
|
identity->prev_timestamp, "prev-duration", G_TYPE_UINT64,
|
|
|
|
identity->prev_duration, "prev-offset", G_TYPE_UINT64,
|
|
|
|
identity->prev_offset, "prev-offset-end", G_TYPE_UINT64,
|
|
|
|
identity->prev_offset_end, "cur-timestamp", G_TYPE_UINT64,
|
|
|
|
timestamp, "cur-duration", G_TYPE_UINT64,
|
2007-03-07 16:58:42 +00:00
|
|
|
GST_BUFFER_DURATION (buf), "cur-offset", G_TYPE_UINT64,
|
|
|
|
GST_BUFFER_OFFSET (buf), "cur-offset-end", G_TYPE_UINT64,
|
|
|
|
GST_BUFFER_OFFSET_END (buf), NULL)));
|
2004-06-26 13:08:03 +00:00
|
|
|
}
|
2006-12-16 19:33:26 +00:00
|
|
|
} else {
|
2007-03-09 14:20:25 +00:00
|
|
|
GST_DEBUG_OBJECT (identity, "can't check data-contiguity, no "
|
|
|
|
"offset_end was set on previous buffer");
|
2004-06-26 13:08:03 +00:00
|
|
|
}
|
2007-03-09 14:20:25 +00:00
|
|
|
}
|
|
|
|
}
|
2006-12-16 19:33:26 +00:00
|
|
|
|
2007-03-09 14:20:25 +00:00
|
|
|
static void
|
|
|
|
gst_identity_check_imperfect_offset (GstIdentity * identity, GstBuffer * buf)
|
|
|
|
{
|
|
|
|
guint64 offset;
|
|
|
|
|
|
|
|
offset = GST_BUFFER_OFFSET (buf);
|
|
|
|
|
|
|
|
if (identity->prev_offset_end != offset &&
|
2007-03-20 14:25:15 +00:00
|
|
|
identity->prev_offset_end != GST_BUFFER_OFFSET_NONE &&
|
|
|
|
offset != GST_BUFFER_OFFSET_NONE) {
|
2007-03-09 14:20:25 +00:00
|
|
|
/*
|
|
|
|
* "imperfect-offset" bus message:
|
|
|
|
* @identity: the identity instance
|
|
|
|
* @prev-timestamp: the previous buffer timestamp
|
|
|
|
* @prev-duration: the previous buffer duration
|
|
|
|
* @prev-offset: the previous buffer offset
|
|
|
|
* @prev-offset-end: the previous buffer offset end
|
docs/: Correct fixxrefs options.
Original commit message from CVS:
* docs/gst/Makefile.am:
* docs/libs/Makefile.am:
Correct fixxrefs options.
* docs/plugins/Makefile.am:
* docs/plugins/gstreamer-plugins-docs.sgml:
* docs/plugins/gstreamer-plugins-sections.txt:
* plugins/elements/Makefile.am:
* plugins/elements/gstcapsfilter.c (gst_capsfilter_details):
* plugins/elements/gstcapsfilter.h (__GST_CAPSFILTER_H__,
GST_TYPE_CAPSFILTER, GST_CAPSFILTER, GST_CAPSFILTER_CLASS,
GST_IS_CAPSFILTER, GST_IS_CAPSFILTER_CLASS, GstCapsFilter,
GstCapsFilterClass, _GstCapsFilter, trans, filter_caps,
_GstCapsFilterClass, trans_class):
* plugins/elements/gstelements.c (name, rank, type, _elements):
* plugins/elements/gstidentity.c
(gst_identity_check_imperfect_timestamp,
gst_identity_check_imperfect_offset):
Document capsfilter and add doc-blurb to identity.
2007-05-06 18:27:25 +00:00
|
|
|
* @cur-timestamp: the current buffer timestamp
|
2007-03-09 14:20:25 +00:00
|
|
|
* @cur-duration: the current buffer duration
|
|
|
|
* @cur-offset: the current buffer offset
|
|
|
|
* @cur-offset-end: the current buffer offset end
|
|
|
|
*
|
|
|
|
* This bus message gets emitted if the check-imperfect-offset
|
|
|
|
* property is set and there is a gap in offsets between the
|
|
|
|
* last buffer and the newly received buffer.
|
|
|
|
*/
|
|
|
|
gst_element_post_message (GST_ELEMENT (identity),
|
|
|
|
gst_message_new_element (GST_OBJECT (identity),
|
|
|
|
gst_structure_new ("imperfect-offset", "prev-timestamp",
|
|
|
|
G_TYPE_UINT64, identity->prev_timestamp, "prev-duration",
|
|
|
|
G_TYPE_UINT64, identity->prev_duration, "prev-offset",
|
|
|
|
G_TYPE_UINT64, identity->prev_offset, "prev-offset-end",
|
|
|
|
G_TYPE_UINT64, identity->prev_offset_end, "cur-timestamp",
|
|
|
|
G_TYPE_UINT64, GST_BUFFER_TIMESTAMP (buf), "cur-duration",
|
|
|
|
G_TYPE_UINT64, GST_BUFFER_DURATION (buf), "cur-offset",
|
|
|
|
G_TYPE_UINT64, GST_BUFFER_OFFSET (buf), "cur-offset-end",
|
|
|
|
G_TYPE_UINT64, GST_BUFFER_OFFSET_END (buf), NULL)));
|
|
|
|
} else {
|
|
|
|
GST_DEBUG_OBJECT (identity, "can't check offset contiguity, no offset "
|
|
|
|
"and/or offset_end were set on previous buffer");
|
2004-06-26 13:08:03 +00:00
|
|
|
}
|
gst/: Simplify pad activation.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/README:
* gst/base/gstbasesink.c: (gst_basesink_get_type),
(gst_basesink_base_init), (gst_basesink_class_init),
(gst_basesink_pad_getcaps), (gst_basesink_init),
(gst_basesink_activate), (gst_basesink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_base_init), (gst_base_transform_finalize),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_proxy_getcaps), (gst_base_transform_setcaps),
(gst_base_transform_event), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_handle_buffer),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_finalize),
(gst_identity_class_init), (gst_identity_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_set_property),
(gst_identity_get_property), (gst_identity_change_state):
* gst/elements/gstidentity.h:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_lost_state), (gst_element_pads_activate):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_check_pull_range), (gst_pad_pull_range):
* gst/gstpad.h:
Simplify pad activation.
Added function to check if pull_range can be performed.
Error out when pulling inactive or flushing pads.
Removed const from refcounted types as it does not make sense.
Simplify pad templates in basesink
Added base class for simple 1-to-1 transforms.
Make identity subclass the base transform.
2005-03-29 16:18:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static GstFlowReturn
|
docs/design/part-events.txt: Small update.
Original commit message from CVS:
* docs/design/part-events.txt:
Small update.
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_do_sync), (gst_base_sink_activate_push),
(gst_base_sink_activate_pull):
Some more comments.
* gst/elements/gstfakesrc.c: (gst_fake_src_class_init),
(gst_fake_src_create):
Fix handoff marshall.
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_transform_ip):
We're a real inplace element.
* gst/gstbus.c: (gst_bus_post):
Added some comments.
* tests/lat.c: (fakesrc), (fakesink), (simple), (queue), (main):
* tests/muxing/case1.c: (main):
* tests/sched/dynamic-pipeline.c: (main):
* tests/sched/interrupt1.c: (main):
* tests/sched/interrupt2.c: (main):
* tests/sched/interrupt3.c: (main):
* tests/sched/runxml.c: (main):
* tests/sched/sched-stress.c: (main):
* tests/seeking/seeking1.c: (event_received), (main):
* tests/threadstate/threadstate2.c: (bus_handler), (timeout_func),
(main):
* tests/threadstate/threadstate3.c: (main):
* tests/threadstate/threadstate4.c: (main):
* tests/threadstate/threadstate5.c: (main):
Fix the tests.
2005-07-22 11:47:10 +00:00
|
|
|
gst_identity_transform_ip (GstBaseTransform * trans, GstBuffer * buf)
|
gst/: Simplify pad activation.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/README:
* gst/base/gstbasesink.c: (gst_basesink_get_type),
(gst_basesink_base_init), (gst_basesink_class_init),
(gst_basesink_pad_getcaps), (gst_basesink_init),
(gst_basesink_activate), (gst_basesink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_base_init), (gst_base_transform_finalize),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_proxy_getcaps), (gst_base_transform_setcaps),
(gst_base_transform_event), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_handle_buffer),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_finalize),
(gst_identity_class_init), (gst_identity_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_set_property),
(gst_identity_get_property), (gst_identity_change_state):
* gst/elements/gstidentity.h:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_lost_state), (gst_element_pads_activate):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_check_pull_range), (gst_pad_pull_range):
* gst/gstpad.h:
Simplify pad activation.
Added function to check if pull_range can be performed.
Error out when pulling inactive or flushing pads.
Removed const from refcounted types as it does not make sense.
Simplify pad templates in basesink
Added base class for simple 1-to-1 transforms.
Make identity subclass the base transform.
2005-03-29 16:18:12 +00:00
|
|
|
{
|
|
|
|
GstFlowReturn ret = GST_FLOW_OK;
|
|
|
|
GstIdentity *identity = GST_IDENTITY (trans);
|
2005-11-30 09:38:42 +00:00
|
|
|
GstClockTime runtimestamp = G_GINT64_CONSTANT (0);
|
gst/: Simplify pad activation.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/README:
* gst/base/gstbasesink.c: (gst_basesink_get_type),
(gst_basesink_base_init), (gst_basesink_class_init),
(gst_basesink_pad_getcaps), (gst_basesink_init),
(gst_basesink_activate), (gst_basesink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_base_init), (gst_base_transform_finalize),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_proxy_getcaps), (gst_base_transform_setcaps),
(gst_base_transform_event), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_handle_buffer),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_finalize),
(gst_identity_class_init), (gst_identity_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_set_property),
(gst_identity_get_property), (gst_identity_change_state):
* gst/elements/gstidentity.h:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_lost_state), (gst_element_pads_activate):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_check_pull_range), (gst_pad_pull_range):
* gst/gstpad.h:
Simplify pad activation.
Added function to check if pull_range can be performed.
Error out when pulling inactive or flushing pads.
Removed const from refcounted types as it does not make sense.
Simplify pad templates in basesink
Added base class for simple 1-to-1 transforms.
Make identity subclass the base transform.
2005-03-29 16:18:12 +00:00
|
|
|
|
|
|
|
if (identity->check_perfect)
|
docs/design/part-events.txt: Small update.
Original commit message from CVS:
* docs/design/part-events.txt:
Small update.
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_do_sync), (gst_base_sink_activate_push),
(gst_base_sink_activate_pull):
Some more comments.
* gst/elements/gstfakesrc.c: (gst_fake_src_class_init),
(gst_fake_src_create):
Fix handoff marshall.
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_transform_ip):
We're a real inplace element.
* gst/gstbus.c: (gst_bus_post):
Added some comments.
* tests/lat.c: (fakesrc), (fakesink), (simple), (queue), (main):
* tests/muxing/case1.c: (main):
* tests/sched/dynamic-pipeline.c: (main):
* tests/sched/interrupt1.c: (main):
* tests/sched/interrupt2.c: (main):
* tests/sched/interrupt3.c: (main):
* tests/sched/runxml.c: (main):
* tests/sched/sched-stress.c: (main):
* tests/seeking/seeking1.c: (event_received), (main):
* tests/threadstate/threadstate2.c: (bus_handler), (timeout_func),
(main):
* tests/threadstate/threadstate3.c: (main):
* tests/threadstate/threadstate4.c: (main):
* tests/threadstate/threadstate5.c: (main):
Fix the tests.
2005-07-22 11:47:10 +00:00
|
|
|
gst_identity_check_perfect (identity, buf);
|
2007-03-09 14:20:25 +00:00
|
|
|
if (identity->check_imperfect_timestamp)
|
|
|
|
gst_identity_check_imperfect_timestamp (identity, buf);
|
|
|
|
if (identity->check_imperfect_offset)
|
|
|
|
gst_identity_check_imperfect_offset (identity, buf);
|
|
|
|
|
|
|
|
/* update prev values */
|
|
|
|
identity->prev_timestamp = GST_BUFFER_TIMESTAMP (buf);
|
|
|
|
identity->prev_duration = GST_BUFFER_DURATION (buf);
|
|
|
|
identity->prev_offset_end = GST_BUFFER_OFFSET_END (buf);
|
|
|
|
identity->prev_offset = GST_BUFFER_OFFSET (buf);
|
2004-06-26 13:08:03 +00:00
|
|
|
|
2001-12-27 00:40:50 +00:00
|
|
|
if (identity->error_after >= 0) {
|
|
|
|
identity->error_after--;
|
|
|
|
if (identity->error_after == 0) {
|
2004-01-29 23:17:58 +00:00
|
|
|
GST_ELEMENT_ERROR (identity, CORE, FAILED,
|
2004-03-15 19:27:17 +00:00
|
|
|
(_("Failed after iterations as requested.")), (NULL));
|
2005-03-21 17:34:02 +00:00
|
|
|
return GST_FLOW_ERROR;
|
2001-12-27 00:40:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-01-01 13:46:04 +00:00
|
|
|
if (identity->drop_probability > 0.0) {
|
2004-03-13 15:27:01 +00:00
|
|
|
if ((gfloat) (1.0 * rand () / (RAND_MAX)) < identity->drop_probability) {
|
2006-08-28 15:48:24 +00:00
|
|
|
if (!identity->silent) {
|
|
|
|
GST_OBJECT_LOCK (identity);
|
|
|
|
g_free (identity->last_message);
|
|
|
|
identity->last_message =
|
|
|
|
g_strdup_printf
|
|
|
|
("dropping ******* (%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 (trans->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);
|
|
|
|
GST_OBJECT_UNLOCK (identity);
|
|
|
|
g_object_notify (G_OBJECT (identity), "last-message");
|
|
|
|
}
|
2007-03-08 11:40:18 +00:00
|
|
|
/* return DROPPED to basetransform. */
|
|
|
|
return GST_BASE_TRANSFORM_FLOW_DROPPED;
|
2002-01-01 13:46:04 +00:00
|
|
|
}
|
|
|
|
}
|
2005-03-21 17:34:02 +00:00
|
|
|
|
2002-03-31 14:04:50 +00:00
|
|
|
if (identity->dump) {
|
docs/design/part-events.txt: Small update.
Original commit message from CVS:
* docs/design/part-events.txt:
Small update.
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_do_sync), (gst_base_sink_activate_push),
(gst_base_sink_activate_pull):
Some more comments.
* gst/elements/gstfakesrc.c: (gst_fake_src_class_init),
(gst_fake_src_create):
Fix handoff marshall.
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_transform_ip):
We're a real inplace element.
* gst/gstbus.c: (gst_bus_post):
Added some comments.
* tests/lat.c: (fakesrc), (fakesink), (simple), (queue), (main):
* tests/muxing/case1.c: (main):
* tests/sched/dynamic-pipeline.c: (main):
* tests/sched/interrupt1.c: (main):
* tests/sched/interrupt2.c: (main):
* tests/sched/interrupt3.c: (main):
* tests/sched/runxml.c: (main):
* tests/sched/sched-stress.c: (main):
* tests/seeking/seeking1.c: (event_received), (main):
* tests/threadstate/threadstate2.c: (bus_handler), (timeout_func),
(main):
* tests/threadstate/threadstate3.c: (main):
* tests/threadstate/threadstate4.c: (main):
* tests/threadstate/threadstate5.c: (main):
Fix the tests.
2005-07-22 11:47:10 +00:00
|
|
|
gst_util_dump_mem (GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf));
|
2002-03-31 14:04:50 +00:00
|
|
|
}
|
2002-01-01 13:46:04 +00:00
|
|
|
|
tests/network-clock.scm: Commentary update.
Original commit message from CVS:
2005-07-01 Andy Wingo <wingo@pobox.com>
* tests/network-clock.scm: Commentary update.
* gst/elements/gstidentity.c (PROP_DUPLICATE): Gone daddy gone.
Didn't really make sense, not implementable with basetransform,
etc.
(gst_identity_transform): Unref inbuf via make_writable. Feeble
attempt at implementing the sync property, needs an unlock method.
* gst/base/gstbasetransform.c (gst_base_transform_transform_caps):
New func, by default returns the same caps (the identity
transformation).
(gst_base_transform_getcaps): Uses transform_caps to return
something sensible.
(gst_base_transform_setcaps): Complicated logic to get caps on
both pads, even if they are different, and to call set_caps once
for every time both pads get their caps set.
(gst_base_transform_handle_buffer): Give the ref to the transform
function. Allows in-place modification of the buffer.
* gst/base/gstbasetransform.h (transform_caps): New class method.
Given caps on one side, what can I do on the other.
(set_caps): Take two caps, one for each side of the element.
* gst/gstpad.h:
* gst/gstpad.c (gst_pad_fixate_caps): Change prototype to modify
caps in place. This is safe because we can check the mutability of
the caps, and a good idea because fixate functions are just called
as a matter of last resort. (Not actually implemented.)
(gst_pad_set_caps): If the caps we're setting is actually the same
as the existing pad caps, just update the pointer without calling
setcaps. Assert that caps is either NULL or fixed, as per the
docs.
* gst/gstghostpad.c: Update for fixate changes.
2005-07-01 16:46:59 +00:00
|
|
|
if (!identity->silent) {
|
2005-11-21 16:34:26 +00:00
|
|
|
GST_OBJECT_LOCK (identity);
|
tests/network-clock.scm: Commentary update.
Original commit message from CVS:
2005-07-01 Andy Wingo <wingo@pobox.com>
* tests/network-clock.scm: Commentary update.
* gst/elements/gstidentity.c (PROP_DUPLICATE): Gone daddy gone.
Didn't really make sense, not implementable with basetransform,
etc.
(gst_identity_transform): Unref inbuf via make_writable. Feeble
attempt at implementing the sync property, needs an unlock method.
* gst/base/gstbasetransform.c (gst_base_transform_transform_caps):
New func, by default returns the same caps (the identity
transformation).
(gst_base_transform_getcaps): Uses transform_caps to return
something sensible.
(gst_base_transform_setcaps): Complicated logic to get caps on
both pads, even if they are different, and to call set_caps once
for every time both pads get their caps set.
(gst_base_transform_handle_buffer): Give the ref to the transform
function. Allows in-place modification of the buffer.
* gst/base/gstbasetransform.h (transform_caps): New class method.
Given caps on one side, what can I do on the other.
(set_caps): Take two caps, one for each side of the element.
* gst/gstpad.h:
* gst/gstpad.c (gst_pad_fixate_caps): Change prototype to modify
caps in place. This is safe because we can check the mutability of
the caps, and a good idea because fixate functions are just called
as a matter of last resort. (Not actually implemented.)
(gst_pad_set_caps): If the caps we're setting is actually the same
as the existing pad caps, just update the pointer without calling
setcaps. Assert that caps is either NULL or fixed, as per the
docs.
* gst/gstghostpad.c: Update for fixate changes.
2005-07-01 16:46:59 +00:00
|
|
|
g_free (identity->last_message);
|
|
|
|
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",
|
docs/design/part-events.txt: Small update.
Original commit message from CVS:
* docs/design/part-events.txt:
Small update.
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_do_sync), (gst_base_sink_activate_push),
(gst_base_sink_activate_pull):
Some more comments.
* gst/elements/gstfakesrc.c: (gst_fake_src_class_init),
(gst_fake_src_create):
Fix handoff marshall.
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_transform_ip):
We're a real inplace element.
* gst/gstbus.c: (gst_bus_post):
Added some comments.
* tests/lat.c: (fakesrc), (fakesink), (simple), (queue), (main):
* tests/muxing/case1.c: (main):
* tests/sched/dynamic-pipeline.c: (main):
* tests/sched/interrupt1.c: (main):
* tests/sched/interrupt2.c: (main):
* tests/sched/interrupt3.c: (main):
* tests/sched/runxml.c: (main):
* tests/sched/sched-stress.c: (main):
* tests/seeking/seeking1.c: (event_received), (main):
* tests/threadstate/threadstate2.c: (bus_handler), (timeout_func),
(main):
* tests/threadstate/threadstate3.c: (main):
* tests/threadstate/threadstate4.c: (main):
* tests/threadstate/threadstate5.c: (main):
Fix the tests.
2005-07-22 11:47:10 +00:00
|
|
|
GST_DEBUG_PAD_NAME (trans->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);
|
2005-11-21 16:34:26 +00:00
|
|
|
GST_OBJECT_UNLOCK (identity);
|
tests/network-clock.scm: Commentary update.
Original commit message from CVS:
2005-07-01 Andy Wingo <wingo@pobox.com>
* tests/network-clock.scm: Commentary update.
* gst/elements/gstidentity.c (PROP_DUPLICATE): Gone daddy gone.
Didn't really make sense, not implementable with basetransform,
etc.
(gst_identity_transform): Unref inbuf via make_writable. Feeble
attempt at implementing the sync property, needs an unlock method.
* gst/base/gstbasetransform.c (gst_base_transform_transform_caps):
New func, by default returns the same caps (the identity
transformation).
(gst_base_transform_getcaps): Uses transform_caps to return
something sensible.
(gst_base_transform_setcaps): Complicated logic to get caps on
both pads, even if they are different, and to call set_caps once
for every time both pads get their caps set.
(gst_base_transform_handle_buffer): Give the ref to the transform
function. Allows in-place modification of the buffer.
* gst/base/gstbasetransform.h (transform_caps): New class method.
Given caps on one side, what can I do on the other.
(set_caps): Take two caps, one for each side of the element.
* gst/gstpad.h:
* gst/gstpad.c (gst_pad_fixate_caps): Change prototype to modify
caps in place. This is safe because we can check the mutability of
the caps, and a good idea because fixate functions are just called
as a matter of last resort. (Not actually implemented.)
(gst_pad_set_caps): If the caps we're setting is actually the same
as the existing pad caps, just update the pointer without calling
setcaps. Assert that caps is either NULL or fixed, as per the
docs.
* gst/gstghostpad.c: Update for fixate changes.
2005-07-01 16:46:59 +00:00
|
|
|
g_object_notify (G_OBJECT (identity), "last-message");
|
|
|
|
}
|
2004-10-05 08:52:37 +00:00
|
|
|
|
tests/network-clock.scm: Commentary update.
Original commit message from CVS:
2005-07-01 Andy Wingo <wingo@pobox.com>
* tests/network-clock.scm: Commentary update.
* gst/elements/gstidentity.c (PROP_DUPLICATE): Gone daddy gone.
Didn't really make sense, not implementable with basetransform,
etc.
(gst_identity_transform): Unref inbuf via make_writable. Feeble
attempt at implementing the sync property, needs an unlock method.
* gst/base/gstbasetransform.c (gst_base_transform_transform_caps):
New func, by default returns the same caps (the identity
transformation).
(gst_base_transform_getcaps): Uses transform_caps to return
something sensible.
(gst_base_transform_setcaps): Complicated logic to get caps on
both pads, even if they are different, and to call set_caps once
for every time both pads get their caps set.
(gst_base_transform_handle_buffer): Give the ref to the transform
function. Allows in-place modification of the buffer.
* gst/base/gstbasetransform.h (transform_caps): New class method.
Given caps on one side, what can I do on the other.
(set_caps): Take two caps, one for each side of the element.
* gst/gstpad.h:
* gst/gstpad.c (gst_pad_fixate_caps): Change prototype to modify
caps in place. This is safe because we can check the mutability of
the caps, and a good idea because fixate functions are just called
as a matter of last resort. (Not actually implemented.)
(gst_pad_set_caps): If the caps we're setting is actually the same
as the existing pad caps, just update the pointer without calling
setcaps. Assert that caps is either NULL or fixed, as per the
docs.
* gst/gstghostpad.c: Update for fixate changes.
2005-07-01 16:46:59 +00:00
|
|
|
if (identity->datarate > 0) {
|
2007-06-08 11:00:59 +00:00
|
|
|
GstClockTime time = gst_util_uint64_scale_int (identity->offset,
|
|
|
|
GST_SECOND, identity->datarate);
|
gst/elements/: Added datarate properties to limit the datarate.
Original commit message from CVS:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_init), (gst_fakesrc_set_clock),
(gst_fakesrc_set_property), (gst_fakesrc_get_property),
(gst_fakesrc_get), (gst_fakesrc_change_state):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_chain),
(gst_identity_set_property), (gst_identity_get_property),
(gst_identity_change_state):
* gst/elements/gstidentity.h:
Added datarate properties to limit the datarate.
2004-09-03 11:40:35 +00:00
|
|
|
|
docs/design/part-events.txt: Small update.
Original commit message from CVS:
* docs/design/part-events.txt:
Small update.
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_do_sync), (gst_base_sink_activate_push),
(gst_base_sink_activate_pull):
Some more comments.
* gst/elements/gstfakesrc.c: (gst_fake_src_class_init),
(gst_fake_src_create):
Fix handoff marshall.
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_transform_ip):
We're a real inplace element.
* gst/gstbus.c: (gst_bus_post):
Added some comments.
* tests/lat.c: (fakesrc), (fakesink), (simple), (queue), (main):
* tests/muxing/case1.c: (main):
* tests/sched/dynamic-pipeline.c: (main):
* tests/sched/interrupt1.c: (main):
* tests/sched/interrupt2.c: (main):
* tests/sched/interrupt3.c: (main):
* tests/sched/runxml.c: (main):
* tests/sched/sched-stress.c: (main):
* tests/seeking/seeking1.c: (event_received), (main):
* tests/threadstate/threadstate2.c: (bus_handler), (timeout_func),
(main):
* tests/threadstate/threadstate3.c: (main):
* tests/threadstate/threadstate4.c: (main):
* tests/threadstate/threadstate5.c: (main):
Fix the tests.
2005-07-22 11:47:10 +00:00
|
|
|
GST_BUFFER_TIMESTAMP (buf) = time;
|
|
|
|
GST_BUFFER_DURATION (buf) =
|
|
|
|
GST_BUFFER_SIZE (buf) * GST_SECOND / identity->datarate;
|
tests/network-clock.scm: Commentary update.
Original commit message from CVS:
2005-07-01 Andy Wingo <wingo@pobox.com>
* tests/network-clock.scm: Commentary update.
* gst/elements/gstidentity.c (PROP_DUPLICATE): Gone daddy gone.
Didn't really make sense, not implementable with basetransform,
etc.
(gst_identity_transform): Unref inbuf via make_writable. Feeble
attempt at implementing the sync property, needs an unlock method.
* gst/base/gstbasetransform.c (gst_base_transform_transform_caps):
New func, by default returns the same caps (the identity
transformation).
(gst_base_transform_getcaps): Uses transform_caps to return
something sensible.
(gst_base_transform_setcaps): Complicated logic to get caps on
both pads, even if they are different, and to call set_caps once
for every time both pads get their caps set.
(gst_base_transform_handle_buffer): Give the ref to the transform
function. Allows in-place modification of the buffer.
* gst/base/gstbasetransform.h (transform_caps): New class method.
Given caps on one side, what can I do on the other.
(set_caps): Take two caps, one for each side of the element.
* gst/gstpad.h:
* gst/gstpad.c (gst_pad_fixate_caps): Change prototype to modify
caps in place. This is safe because we can check the mutability of
the caps, and a good idea because fixate functions are just called
as a matter of last resort. (Not actually implemented.)
(gst_pad_set_caps): If the caps we're setting is actually the same
as the existing pad caps, just update the pointer without calling
setcaps. Assert that caps is either NULL or fixed, as per the
docs.
* gst/gstghostpad.c: Update for fixate changes.
2005-07-01 16:46:59 +00:00
|
|
|
}
|
gst/elements/: Added datarate properties to limit the datarate.
Original commit message from CVS:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_init), (gst_fakesrc_set_clock),
(gst_fakesrc_set_property), (gst_fakesrc_get_property),
(gst_fakesrc_get), (gst_fakesrc_change_state):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_chain),
(gst_identity_set_property), (gst_identity_get_property),
(gst_identity_change_state):
* gst/elements/gstidentity.h:
Added datarate properties to limit the datarate.
2004-09-03 11:40:35 +00:00
|
|
|
|
2007-11-21 13:27:50 +00:00
|
|
|
if (identity->signal_handoffs)
|
|
|
|
g_signal_emit (G_OBJECT (identity), gst_identity_signals[SIGNAL_HANDOFF], 0,
|
|
|
|
buf);
|
gst/elements/: Added datarate properties to limit the datarate.
Original commit message from CVS:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_init), (gst_fakesrc_set_clock),
(gst_fakesrc_set_property), (gst_fakesrc_get_property),
(gst_fakesrc_get), (gst_fakesrc_change_state):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_chain),
(gst_identity_set_property), (gst_identity_get_property),
(gst_identity_change_state):
* gst/elements/gstidentity.h:
Added datarate properties to limit the datarate.
2004-09-03 11:40:35 +00:00
|
|
|
|
2005-11-29 17:13:44 +00:00
|
|
|
if (trans->segment.format == GST_FORMAT_TIME)
|
|
|
|
runtimestamp = gst_segment_to_running_time (&trans->segment,
|
|
|
|
GST_FORMAT_TIME, GST_BUFFER_TIMESTAMP (buf));
|
gst/base/gstbasetransform.c: The event virtual method is now properly implemented, with a default handler
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_class_init),
(gst_base_transform_event), (gst_base_transform_eventfunc):
The event virtual method is now properly implemented, with a default
handler
Sub classes should call the parent_class event method. They should
return FALSE if they had a problem handling the given event, or don't
want GstBaseTransform to send that even downstream
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_event),
(gst_identity_transform_ip), (gst_identity_set_property),
(gst_identity_get_property):
* gst/elements/gstidentity.h:
Added the single-segment boolean property.
If set to TRUE, it will output a single segment of data, starting from
0, will eat up all incoming newsegment, and modify the timestamp of the
buffers accordingly
2005-11-29 14:47:07 +00:00
|
|
|
|
2005-11-29 17:13:44 +00:00
|
|
|
if ((identity->sync) && (trans->segment.format == GST_FORMAT_TIME)) {
|
tests/network-clock.scm: Commentary update.
Original commit message from CVS:
2005-07-01 Andy Wingo <wingo@pobox.com>
* tests/network-clock.scm: Commentary update.
* gst/elements/gstidentity.c (PROP_DUPLICATE): Gone daddy gone.
Didn't really make sense, not implementable with basetransform,
etc.
(gst_identity_transform): Unref inbuf via make_writable. Feeble
attempt at implementing the sync property, needs an unlock method.
* gst/base/gstbasetransform.c (gst_base_transform_transform_caps):
New func, by default returns the same caps (the identity
transformation).
(gst_base_transform_getcaps): Uses transform_caps to return
something sensible.
(gst_base_transform_setcaps): Complicated logic to get caps on
both pads, even if they are different, and to call set_caps once
for every time both pads get their caps set.
(gst_base_transform_handle_buffer): Give the ref to the transform
function. Allows in-place modification of the buffer.
* gst/base/gstbasetransform.h (transform_caps): New class method.
Given caps on one side, what can I do on the other.
(set_caps): Take two caps, one for each side of the element.
* gst/gstpad.h:
* gst/gstpad.c (gst_pad_fixate_caps): Change prototype to modify
caps in place. This is safe because we can check the mutability of
the caps, and a good idea because fixate functions are just called
as a matter of last resort. (Not actually implemented.)
(gst_pad_set_caps): If the caps we're setting is actually the same
as the existing pad caps, just update the pointer without calling
setcaps. Assert that caps is either NULL or fixed, as per the
docs.
* gst/gstghostpad.c: Update for fixate changes.
2005-07-01 16:46:59 +00:00
|
|
|
GstClock *clock;
|
2001-07-11 15:51:40 +00:00
|
|
|
|
2005-11-21 16:34:26 +00:00
|
|
|
GST_OBJECT_LOCK (identity);
|
gst/base/gstbasesink.*: Store and use discont values when syncing buffers as described in design docs.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_get_times),
(gst_base_sink_do_sync), (gst_base_sink_change_state):
* gst/base/gstbasesink.h:
Store and use discont values when syncing buffers as described
in design docs.
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_loop), (gst_base_src_start),
(gst_base_src_activate_push):
Push discont event when starting.
* gst/elements/gstidentity.c: (gst_identity_transform):
Small cleanups.
* gst/gstbin.c: (gst_bin_change_state):
Small cleanups in base_time distribution.
* gst/gstelement.c: (gst_element_set_base_time),
(gst_element_get_base_time), (gst_element_change_state):
* gst/gstelement.h:
Added methods for the base_time of the element.
Some MT fixes.
* gst/gstpipeline.c: (gst_pipeline_send_event),
(gst_pipeline_change_state), (gst_pipeline_set_new_stream_time),
(gst_pipeline_get_last_stream_time):
* gst/gstpipeline.h:
MT fixes.
Handle seeking as described in design doc, remove stream_time
hack.
Cleanups clock and stream_time selection code. Added accessors
for the stream_time.
2005-07-16 14:41:25 +00:00
|
|
|
if ((clock = GST_ELEMENT (identity)->clock)) {
|
|
|
|
GstClockReturn cret;
|
2005-11-15 16:47:07 +00:00
|
|
|
GstClockTime timestamp;
|
|
|
|
|
gst/base/gstbasetransform.c: The event virtual method is now properly implemented, with a default handler
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_class_init),
(gst_base_transform_event), (gst_base_transform_eventfunc):
The event virtual method is now properly implemented, with a default
handler
Sub classes should call the parent_class event method. They should
return FALSE if they had a problem handling the given event, or don't
want GstBaseTransform to send that even downstream
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_event),
(gst_identity_transform_ip), (gst_identity_set_property),
(gst_identity_get_property):
* gst/elements/gstidentity.h:
Added the single-segment boolean property.
If set to TRUE, it will output a single segment of data, starting from
0, will eat up all incoming newsegment, and modify the timestamp of the
buffers accordingly
2005-11-29 14:47:07 +00:00
|
|
|
timestamp = runtimestamp + GST_ELEMENT (identity)->base_time;
|
2001-07-11 19:22:20 +00:00
|
|
|
|
tests/network-clock.scm: Commentary update.
Original commit message from CVS:
2005-07-01 Andy Wingo <wingo@pobox.com>
* tests/network-clock.scm: Commentary update.
* gst/elements/gstidentity.c (PROP_DUPLICATE): Gone daddy gone.
Didn't really make sense, not implementable with basetransform,
etc.
(gst_identity_transform): Unref inbuf via make_writable. Feeble
attempt at implementing the sync property, needs an unlock method.
* gst/base/gstbasetransform.c (gst_base_transform_transform_caps):
New func, by default returns the same caps (the identity
transformation).
(gst_base_transform_getcaps): Uses transform_caps to return
something sensible.
(gst_base_transform_setcaps): Complicated logic to get caps on
both pads, even if they are different, and to call set_caps once
for every time both pads get their caps set.
(gst_base_transform_handle_buffer): Give the ref to the transform
function. Allows in-place modification of the buffer.
* gst/base/gstbasetransform.h (transform_caps): New class method.
Given caps on one side, what can I do on the other.
(set_caps): Take two caps, one for each side of the element.
* gst/gstpad.h:
* gst/gstpad.c (gst_pad_fixate_caps): Change prototype to modify
caps in place. This is safe because we can check the mutability of
the caps, and a good idea because fixate functions are just called
as a matter of last resort. (Not actually implemented.)
(gst_pad_set_caps): If the caps we're setting is actually the same
as the existing pad caps, just update the pointer without calling
setcaps. Assert that caps is either NULL or fixed, as per the
docs.
* gst/gstghostpad.c: Update for fixate changes.
2005-07-01 16:46:59 +00:00
|
|
|
/* save id if we need to unlock */
|
gst/base/gstbasesink.*: Store and use discont values when syncing buffers as described in design docs.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_get_times),
(gst_base_sink_do_sync), (gst_base_sink_change_state):
* gst/base/gstbasesink.h:
Store and use discont values when syncing buffers as described
in design docs.
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_loop), (gst_base_src_start),
(gst_base_src_activate_push):
Push discont event when starting.
* gst/elements/gstidentity.c: (gst_identity_transform):
Small cleanups.
* gst/gstbin.c: (gst_bin_change_state):
Small cleanups in base_time distribution.
* gst/gstelement.c: (gst_element_set_base_time),
(gst_element_get_base_time), (gst_element_change_state):
* gst/gstelement.h:
Added methods for the base_time of the element.
Some MT fixes.
* gst/gstpipeline.c: (gst_pipeline_send_event),
(gst_pipeline_change_state), (gst_pipeline_set_new_stream_time),
(gst_pipeline_get_last_stream_time):
* gst/gstpipeline.h:
MT fixes.
Handle seeking as described in design doc, remove stream_time
hack.
Cleanups clock and stream_time selection code. Added accessors
for the stream_time.
2005-07-16 14:41:25 +00:00
|
|
|
/* FIXME: actually unlock this somewhere in the state changes */
|
2005-11-15 16:47:07 +00:00
|
|
|
identity->clock_id = gst_clock_new_single_shot_id (clock, timestamp);
|
2005-11-21 16:34:26 +00:00
|
|
|
GST_OBJECT_UNLOCK (identity);
|
gst/base/gstbasesink.*: Store and use discont values when syncing buffers as described in design docs.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_get_times),
(gst_base_sink_do_sync), (gst_base_sink_change_state):
* gst/base/gstbasesink.h:
Store and use discont values when syncing buffers as described
in design docs.
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_loop), (gst_base_src_start),
(gst_base_src_activate_push):
Push discont event when starting.
* gst/elements/gstidentity.c: (gst_identity_transform):
Small cleanups.
* gst/gstbin.c: (gst_bin_change_state):
Small cleanups in base_time distribution.
* gst/gstelement.c: (gst_element_set_base_time),
(gst_element_get_base_time), (gst_element_change_state):
* gst/gstelement.h:
Added methods for the base_time of the element.
Some MT fixes.
* gst/gstpipeline.c: (gst_pipeline_send_event),
(gst_pipeline_change_state), (gst_pipeline_set_new_stream_time),
(gst_pipeline_get_last_stream_time):
* gst/gstpipeline.h:
MT fixes.
Handle seeking as described in design doc, remove stream_time
hack.
Cleanups clock and stream_time selection code. Added accessors
for the stream_time.
2005-07-16 14:41:25 +00:00
|
|
|
|
tests/network-clock.scm: Commentary update.
Original commit message from CVS:
2005-07-01 Andy Wingo <wingo@pobox.com>
* tests/network-clock.scm: Commentary update.
* gst/elements/gstidentity.c (PROP_DUPLICATE): Gone daddy gone.
Didn't really make sense, not implementable with basetransform,
etc.
(gst_identity_transform): Unref inbuf via make_writable. Feeble
attempt at implementing the sync property, needs an unlock method.
* gst/base/gstbasetransform.c (gst_base_transform_transform_caps):
New func, by default returns the same caps (the identity
transformation).
(gst_base_transform_getcaps): Uses transform_caps to return
something sensible.
(gst_base_transform_setcaps): Complicated logic to get caps on
both pads, even if they are different, and to call set_caps once
for every time both pads get their caps set.
(gst_base_transform_handle_buffer): Give the ref to the transform
function. Allows in-place modification of the buffer.
* gst/base/gstbasetransform.h (transform_caps): New class method.
Given caps on one side, what can I do on the other.
(set_caps): Take two caps, one for each side of the element.
* gst/gstpad.h:
* gst/gstpad.c (gst_pad_fixate_caps): Change prototype to modify
caps in place. This is safe because we can check the mutability of
the caps, and a good idea because fixate functions are just called
as a matter of last resort. (Not actually implemented.)
(gst_pad_set_caps): If the caps we're setting is actually the same
as the existing pad caps, just update the pointer without calling
setcaps. Assert that caps is either NULL or fixed, as per the
docs.
* gst/gstghostpad.c: Update for fixate changes.
2005-07-01 16:46:59 +00:00
|
|
|
cret = gst_clock_id_wait (identity->clock_id, NULL);
|
gst/base/gstbasesink.*: Store and use discont values when syncing buffers as described in design docs.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_get_times),
(gst_base_sink_do_sync), (gst_base_sink_change_state):
* gst/base/gstbasesink.h:
Store and use discont values when syncing buffers as described
in design docs.
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_loop), (gst_base_src_start),
(gst_base_src_activate_push):
Push discont event when starting.
* gst/elements/gstidentity.c: (gst_identity_transform):
Small cleanups.
* gst/gstbin.c: (gst_bin_change_state):
Small cleanups in base_time distribution.
* gst/gstelement.c: (gst_element_set_base_time),
(gst_element_get_base_time), (gst_element_change_state):
* gst/gstelement.h:
Added methods for the base_time of the element.
Some MT fixes.
* gst/gstpipeline.c: (gst_pipeline_send_event),
(gst_pipeline_change_state), (gst_pipeline_set_new_stream_time),
(gst_pipeline_get_last_stream_time):
* gst/gstpipeline.h:
MT fixes.
Handle seeking as described in design doc, remove stream_time
hack.
Cleanups clock and stream_time selection code. Added accessors
for the stream_time.
2005-07-16 14:41:25 +00:00
|
|
|
|
2005-11-21 16:34:26 +00:00
|
|
|
GST_OBJECT_LOCK (identity);
|
tests/network-clock.scm: Commentary update.
Original commit message from CVS:
2005-07-01 Andy Wingo <wingo@pobox.com>
* tests/network-clock.scm: Commentary update.
* gst/elements/gstidentity.c (PROP_DUPLICATE): Gone daddy gone.
Didn't really make sense, not implementable with basetransform,
etc.
(gst_identity_transform): Unref inbuf via make_writable. Feeble
attempt at implementing the sync property, needs an unlock method.
* gst/base/gstbasetransform.c (gst_base_transform_transform_caps):
New func, by default returns the same caps (the identity
transformation).
(gst_base_transform_getcaps): Uses transform_caps to return
something sensible.
(gst_base_transform_setcaps): Complicated logic to get caps on
both pads, even if they are different, and to call set_caps once
for every time both pads get their caps set.
(gst_base_transform_handle_buffer): Give the ref to the transform
function. Allows in-place modification of the buffer.
* gst/base/gstbasetransform.h (transform_caps): New class method.
Given caps on one side, what can I do on the other.
(set_caps): Take two caps, one for each side of the element.
* gst/gstpad.h:
* gst/gstpad.c (gst_pad_fixate_caps): Change prototype to modify
caps in place. This is safe because we can check the mutability of
the caps, and a good idea because fixate functions are just called
as a matter of last resort. (Not actually implemented.)
(gst_pad_set_caps): If the caps we're setting is actually the same
as the existing pad caps, just update the pointer without calling
setcaps. Assert that caps is either NULL or fixed, as per the
docs.
* gst/gstghostpad.c: Update for fixate changes.
2005-07-01 16:46:59 +00:00
|
|
|
if (identity->clock_id) {
|
|
|
|
gst_clock_id_unref (identity->clock_id);
|
|
|
|
identity->clock_id = NULL;
|
2004-06-18 14:05:55 +00:00
|
|
|
}
|
tests/network-clock.scm: Commentary update.
Original commit message from CVS:
2005-07-01 Andy Wingo <wingo@pobox.com>
* tests/network-clock.scm: Commentary update.
* gst/elements/gstidentity.c (PROP_DUPLICATE): Gone daddy gone.
Didn't really make sense, not implementable with basetransform,
etc.
(gst_identity_transform): Unref inbuf via make_writable. Feeble
attempt at implementing the sync property, needs an unlock method.
* gst/base/gstbasetransform.c (gst_base_transform_transform_caps):
New func, by default returns the same caps (the identity
transformation).
(gst_base_transform_getcaps): Uses transform_caps to return
something sensible.
(gst_base_transform_setcaps): Complicated logic to get caps on
both pads, even if they are different, and to call set_caps once
for every time both pads get their caps set.
(gst_base_transform_handle_buffer): Give the ref to the transform
function. Allows in-place modification of the buffer.
* gst/base/gstbasetransform.h (transform_caps): New class method.
Given caps on one side, what can I do on the other.
(set_caps): Take two caps, one for each side of the element.
* gst/gstpad.h:
* gst/gstpad.c (gst_pad_fixate_caps): Change prototype to modify
caps in place. This is safe because we can check the mutability of
the caps, and a good idea because fixate functions are just called
as a matter of last resort. (Not actually implemented.)
(gst_pad_set_caps): If the caps we're setting is actually the same
as the existing pad caps, just update the pointer without calling
setcaps. Assert that caps is either NULL or fixed, as per the
docs.
* gst/gstghostpad.c: Update for fixate changes.
2005-07-01 16:46:59 +00:00
|
|
|
if (cret == GST_CLOCK_UNSCHEDULED)
|
|
|
|
ret = GST_FLOW_UNEXPECTED;
|
2004-06-18 14:05:55 +00:00
|
|
|
}
|
2005-11-21 16:34:26 +00:00
|
|
|
GST_OBJECT_UNLOCK (identity);
|
tests/network-clock.scm: Commentary update.
Original commit message from CVS:
2005-07-01 Andy Wingo <wingo@pobox.com>
* tests/network-clock.scm: Commentary update.
* gst/elements/gstidentity.c (PROP_DUPLICATE): Gone daddy gone.
Didn't really make sense, not implementable with basetransform,
etc.
(gst_identity_transform): Unref inbuf via make_writable. Feeble
attempt at implementing the sync property, needs an unlock method.
* gst/base/gstbasetransform.c (gst_base_transform_transform_caps):
New func, by default returns the same caps (the identity
transformation).
(gst_base_transform_getcaps): Uses transform_caps to return
something sensible.
(gst_base_transform_setcaps): Complicated logic to get caps on
both pads, even if they are different, and to call set_caps once
for every time both pads get their caps set.
(gst_base_transform_handle_buffer): Give the ref to the transform
function. Allows in-place modification of the buffer.
* gst/base/gstbasetransform.h (transform_caps): New class method.
Given caps on one side, what can I do on the other.
(set_caps): Take two caps, one for each side of the element.
* gst/gstpad.h:
* gst/gstpad.c (gst_pad_fixate_caps): Change prototype to modify
caps in place. This is safe because we can check the mutability of
the caps, and a good idea because fixate functions are just called
as a matter of last resort. (Not actually implemented.)
(gst_pad_set_caps): If the caps we're setting is actually the same
as the existing pad caps, just update the pointer without calling
setcaps. Assert that caps is either NULL or fixed, as per the
docs.
* gst/gstghostpad.c: Update for fixate changes.
2005-07-01 16:46:59 +00:00
|
|
|
}
|
gst/elements/: Added datarate properties to limit the datarate.
Original commit message from CVS:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_init), (gst_fakesrc_set_clock),
(gst_fakesrc_set_property), (gst_fakesrc_get_property),
(gst_fakesrc_get), (gst_fakesrc_change_state):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_chain),
(gst_identity_set_property), (gst_identity_get_property),
(gst_identity_change_state):
* gst/elements/gstidentity.h:
Added datarate properties to limit the datarate.
2004-09-03 11:40:35 +00:00
|
|
|
|
docs/design/part-events.txt: Small update.
Original commit message from CVS:
* docs/design/part-events.txt:
Small update.
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_do_sync), (gst_base_sink_activate_push),
(gst_base_sink_activate_pull):
Some more comments.
* gst/elements/gstfakesrc.c: (gst_fake_src_class_init),
(gst_fake_src_create):
Fix handoff marshall.
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_transform_ip):
We're a real inplace element.
* gst/gstbus.c: (gst_bus_post):
Added some comments.
* tests/lat.c: (fakesrc), (fakesink), (simple), (queue), (main):
* tests/muxing/case1.c: (main):
* tests/sched/dynamic-pipeline.c: (main):
* tests/sched/interrupt1.c: (main):
* tests/sched/interrupt2.c: (main):
* tests/sched/interrupt3.c: (main):
* tests/sched/runxml.c: (main):
* tests/sched/sched-stress.c: (main):
* tests/seeking/seeking1.c: (event_received), (main):
* tests/threadstate/threadstate2.c: (bus_handler), (timeout_func),
(main):
* tests/threadstate/threadstate3.c: (main):
* tests/threadstate/threadstate4.c: (main):
* tests/threadstate/threadstate5.c: (main):
Fix the tests.
2005-07-22 11:47:10 +00:00
|
|
|
identity->offset += GST_BUFFER_SIZE (buf);
|
2001-01-07 03:42:27 +00:00
|
|
|
|
tests/network-clock.scm: Commentary update.
Original commit message from CVS:
2005-07-01 Andy Wingo <wingo@pobox.com>
* tests/network-clock.scm: Commentary update.
* gst/elements/gstidentity.c (PROP_DUPLICATE): Gone daddy gone.
Didn't really make sense, not implementable with basetransform,
etc.
(gst_identity_transform): Unref inbuf via make_writable. Feeble
attempt at implementing the sync property, needs an unlock method.
* gst/base/gstbasetransform.c (gst_base_transform_transform_caps):
New func, by default returns the same caps (the identity
transformation).
(gst_base_transform_getcaps): Uses transform_caps to return
something sensible.
(gst_base_transform_setcaps): Complicated logic to get caps on
both pads, even if they are different, and to call set_caps once
for every time both pads get their caps set.
(gst_base_transform_handle_buffer): Give the ref to the transform
function. Allows in-place modification of the buffer.
* gst/base/gstbasetransform.h (transform_caps): New class method.
Given caps on one side, what can I do on the other.
(set_caps): Take two caps, one for each side of the element.
* gst/gstpad.h:
* gst/gstpad.c (gst_pad_fixate_caps): Change prototype to modify
caps in place. This is safe because we can check the mutability of
the caps, and a good idea because fixate functions are just called
as a matter of last resort. (Not actually implemented.)
(gst_pad_set_caps): If the caps we're setting is actually the same
as the existing pad caps, just update the pointer without calling
setcaps. Assert that caps is either NULL or fixed, as per the
docs.
* gst/gstghostpad.c: Update for fixate changes.
2005-07-01 16:46:59 +00:00
|
|
|
if (identity->sleep_time && ret == GST_FLOW_OK)
|
|
|
|
g_usleep (identity->sleep_time);
|
2005-03-21 17:34:02 +00:00
|
|
|
|
2005-11-29 17:13:44 +00:00
|
|
|
if (identity->single_segment && (trans->segment.format == GST_FORMAT_TIME)
|
2006-01-10 15:42:29 +00:00
|
|
|
&& (ret == GST_FLOW_OK)) {
|
gst/base/gstbasetransform.c: The event virtual method is now properly implemented, with a default handler
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_class_init),
(gst_base_transform_event), (gst_base_transform_eventfunc):
The event virtual method is now properly implemented, with a default
handler
Sub classes should call the parent_class event method. They should
return FALSE if they had a problem handling the given event, or don't
want GstBaseTransform to send that even downstream
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_event),
(gst_identity_transform_ip), (gst_identity_set_property),
(gst_identity_get_property):
* gst/elements/gstidentity.h:
Added the single-segment boolean property.
If set to TRUE, it will output a single segment of data, starting from
0, will eat up all incoming newsegment, and modify the timestamp of the
buffers accordingly
2005-11-29 14:47:07 +00:00
|
|
|
GST_BUFFER_TIMESTAMP (buf) = runtimestamp;
|
2006-01-10 15:42:29 +00:00
|
|
|
GST_BUFFER_OFFSET (buf) = GST_CLOCK_TIME_NONE;
|
|
|
|
GST_BUFFER_OFFSET_END (buf) = GST_CLOCK_TIME_NONE;
|
|
|
|
}
|
gst/base/gstbasetransform.c: The event virtual method is now properly implemented, with a default handler
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_class_init),
(gst_base_transform_event), (gst_base_transform_eventfunc):
The event virtual method is now properly implemented, with a default
handler
Sub classes should call the parent_class event method. They should
return FALSE if they had a problem handling the given event, or don't
want GstBaseTransform to send that even downstream
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_event),
(gst_identity_transform_ip), (gst_identity_set_property),
(gst_identity_get_property):
* gst/elements/gstidentity.h:
Added the single-segment boolean property.
If set to TRUE, it will output a single segment of data, starting from
0, will eat up all incoming newsegment, and modify the timestamp of the
buffers accordingly
2005-11-29 14:47:07 +00:00
|
|
|
|
2005-03-21 17:34:02 +00:00
|
|
|
return ret;
|
2000-01-30 09:03:00 +00:00
|
|
|
}
|
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
static void
|
|
|
|
gst_identity_set_property (GObject * object, guint prop_id,
|
|
|
|
const GValue * value, GParamSpec * pspec)
|
2000-11-25 14:18:47 +00:00
|
|
|
{
|
2000-01-30 09:03:00 +00:00
|
|
|
GstIdentity *identity;
|
|
|
|
|
2000-11-25 14:18:47 +00:00
|
|
|
identity = GST_IDENTITY (object);
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2001-06-25 01:20:11 +00:00
|
|
|
switch (prop_id) {
|
2005-03-21 17:34:02 +00:00
|
|
|
case PROP_SLEEP_TIME:
|
2001-06-25 01:20:11 +00:00
|
|
|
identity->sleep_time = g_value_get_uint (value);
|
2001-01-07 03:42:27 +00:00
|
|
|
break;
|
2005-03-21 17:34:02 +00:00
|
|
|
case PROP_SILENT:
|
2001-06-25 01:20:11 +00:00
|
|
|
identity->silent = g_value_get_boolean (value);
|
2001-04-20 19:21:51 +00:00
|
|
|
break;
|
gst/base/gstbasetransform.c: The event virtual method is now properly implemented, with a default handler
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_class_init),
(gst_base_transform_event), (gst_base_transform_eventfunc):
The event virtual method is now properly implemented, with a default
handler
Sub classes should call the parent_class event method. They should
return FALSE if they had a problem handling the given event, or don't
want GstBaseTransform to send that even downstream
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_event),
(gst_identity_transform_ip), (gst_identity_set_property),
(gst_identity_get_property):
* gst/elements/gstidentity.h:
Added the single-segment boolean property.
If set to TRUE, it will output a single segment of data, starting from
0, will eat up all incoming newsegment, and modify the timestamp of the
buffers accordingly
2005-11-29 14:47:07 +00:00
|
|
|
case PROP_SINGLE_SEGMENT:
|
|
|
|
identity->single_segment = g_value_get_boolean (value);
|
|
|
|
break;
|
2005-03-21 17:34:02 +00:00
|
|
|
case PROP_DUMP:
|
2002-03-31 14:04:50 +00:00
|
|
|
identity->dump = g_value_get_boolean (value);
|
|
|
|
break;
|
2005-03-21 17:34:02 +00:00
|
|
|
case PROP_ERROR_AFTER:
|
2002-04-14 09:59:13 +00:00
|
|
|
identity->error_after = g_value_get_int (value);
|
2001-12-27 00:40:50 +00:00
|
|
|
break;
|
2005-03-21 17:34:02 +00:00
|
|
|
case PROP_DROP_PROBABILITY:
|
2002-01-01 13:46:04 +00:00
|
|
|
identity->drop_probability = g_value_get_float (value);
|
|
|
|
break;
|
2005-03-21 17:34:02 +00:00
|
|
|
case PROP_DATARATE:
|
gst/elements/: Added datarate properties to limit the datarate.
Original commit message from CVS:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_init), (gst_fakesrc_set_clock),
(gst_fakesrc_set_property), (gst_fakesrc_get_property),
(gst_fakesrc_get), (gst_fakesrc_change_state):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_chain),
(gst_identity_set_property), (gst_identity_get_property),
(gst_identity_change_state):
* gst/elements/gstidentity.h:
Added datarate properties to limit the datarate.
2004-09-03 11:40:35 +00:00
|
|
|
identity->datarate = g_value_get_int (value);
|
|
|
|
break;
|
2005-03-21 17:34:02 +00:00
|
|
|
case PROP_SYNC:
|
2004-06-18 14:05:55 +00:00
|
|
|
identity->sync = g_value_get_boolean (value);
|
|
|
|
break;
|
2005-03-21 17:34:02 +00:00
|
|
|
case PROP_CHECK_PERFECT:
|
2004-06-26 13:08:03 +00:00
|
|
|
identity->check_perfect = g_value_get_boolean (value);
|
|
|
|
break;
|
2007-03-09 14:20:25 +00:00
|
|
|
case PROP_CHECK_IMPERFECT_TIMESTAMP:
|
|
|
|
identity->check_imperfect_timestamp = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_CHECK_IMPERFECT_OFFSET:
|
|
|
|
identity->check_imperfect_offset = g_value_get_boolean (value);
|
|
|
|
break;
|
2007-11-21 13:27:50 +00:00
|
|
|
case PROP_SIGNAL_HANDOFFS:
|
|
|
|
identity->signal_handoffs = g_value_get_boolean (value);
|
|
|
|
break;
|
2000-01-30 09:03:00 +00:00
|
|
|
default:
|
2004-04-20 16:25:41 +00:00
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
2000-01-30 09:03:00 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
static void
|
|
|
|
gst_identity_get_property (GObject * object, guint prop_id, GValue * value,
|
|
|
|
GParamSpec * pspec)
|
|
|
|
{
|
2000-01-30 09:03:00 +00:00
|
|
|
GstIdentity *identity;
|
|
|
|
|
2000-11-25 14:18:47 +00:00
|
|
|
identity = GST_IDENTITY (object);
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2001-06-25 01:20:11 +00:00
|
|
|
switch (prop_id) {
|
2005-03-21 17:34:02 +00:00
|
|
|
case PROP_SLEEP_TIME:
|
2001-06-25 01:20:11 +00:00
|
|
|
g_value_set_uint (value, identity->sleep_time);
|
2001-01-07 03:42:27 +00:00
|
|
|
break;
|
2005-03-21 17:34:02 +00:00
|
|
|
case PROP_ERROR_AFTER:
|
2002-04-14 09:59:13 +00:00
|
|
|
g_value_set_int (value, identity->error_after);
|
2001-12-27 00:40:50 +00:00
|
|
|
break;
|
2005-03-21 17:34:02 +00:00
|
|
|
case PROP_DROP_PROBABILITY:
|
2002-01-01 13:46:04 +00:00
|
|
|
g_value_set_float (value, identity->drop_probability);
|
|
|
|
break;
|
2005-03-21 17:34:02 +00:00
|
|
|
case PROP_DATARATE:
|
gst/elements/: Added datarate properties to limit the datarate.
Original commit message from CVS:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_init), (gst_fakesrc_set_clock),
(gst_fakesrc_set_property), (gst_fakesrc_get_property),
(gst_fakesrc_get), (gst_fakesrc_change_state):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_chain),
(gst_identity_set_property), (gst_identity_get_property),
(gst_identity_change_state):
* gst/elements/gstidentity.h:
Added datarate properties to limit the datarate.
2004-09-03 11:40:35 +00:00
|
|
|
g_value_set_int (value, identity->datarate);
|
|
|
|
break;
|
2005-03-21 17:34:02 +00:00
|
|
|
case PROP_SILENT:
|
2001-06-25 01:20:11 +00:00
|
|
|
g_value_set_boolean (value, identity->silent);
|
2001-04-20 19:21:51 +00:00
|
|
|
break;
|
gst/base/gstbasetransform.c: The event virtual method is now properly implemented, with a default handler
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_class_init),
(gst_base_transform_event), (gst_base_transform_eventfunc):
The event virtual method is now properly implemented, with a default
handler
Sub classes should call the parent_class event method. They should
return FALSE if they had a problem handling the given event, or don't
want GstBaseTransform to send that even downstream
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_event),
(gst_identity_transform_ip), (gst_identity_set_property),
(gst_identity_get_property):
* gst/elements/gstidentity.h:
Added the single-segment boolean property.
If set to TRUE, it will output a single segment of data, starting from
0, will eat up all incoming newsegment, and modify the timestamp of the
buffers accordingly
2005-11-29 14:47:07 +00:00
|
|
|
case PROP_SINGLE_SEGMENT:
|
|
|
|
g_value_set_boolean (value, identity->single_segment);
|
|
|
|
break;
|
2005-03-21 17:34:02 +00:00
|
|
|
case PROP_DUMP:
|
2002-03-31 14:04:50 +00:00
|
|
|
g_value_set_boolean (value, identity->dump);
|
|
|
|
break;
|
2005-03-21 17:34:02 +00:00
|
|
|
case PROP_LAST_MESSAGE:
|
2005-11-21 16:34:26 +00:00
|
|
|
GST_OBJECT_LOCK (identity);
|
2002-02-17 06:00:20 +00:00
|
|
|
g_value_set_string (value, identity->last_message);
|
2005-11-21 16:34:26 +00:00
|
|
|
GST_OBJECT_UNLOCK (identity);
|
2002-02-17 06:00:20 +00:00
|
|
|
break;
|
2005-03-21 17:34:02 +00:00
|
|
|
case PROP_SYNC:
|
2004-06-18 14:05:55 +00:00
|
|
|
g_value_set_boolean (value, identity->sync);
|
|
|
|
break;
|
2005-03-21 17:34:02 +00:00
|
|
|
case PROP_CHECK_PERFECT:
|
2004-06-26 13:08:03 +00:00
|
|
|
g_value_set_boolean (value, identity->check_perfect);
|
|
|
|
break;
|
2007-03-09 14:20:25 +00:00
|
|
|
case PROP_CHECK_IMPERFECT_TIMESTAMP:
|
|
|
|
g_value_set_boolean (value, identity->check_imperfect_timestamp);
|
|
|
|
break;
|
|
|
|
case PROP_CHECK_IMPERFECT_OFFSET:
|
|
|
|
g_value_set_boolean (value, identity->check_imperfect_offset);
|
|
|
|
break;
|
2007-11-21 13:27:50 +00:00
|
|
|
case PROP_SIGNAL_HANDOFFS:
|
|
|
|
g_value_set_boolean (value, identity->signal_handoffs);
|
|
|
|
break;
|
2000-01-30 09:03:00 +00:00
|
|
|
default:
|
2001-06-25 01:20:11 +00:00
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
2000-01-30 09:03:00 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
gst/elements/: Added datarate properties to limit the datarate.
Original commit message from CVS:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_init), (gst_fakesrc_set_clock),
(gst_fakesrc_set_property), (gst_fakesrc_get_property),
(gst_fakesrc_get), (gst_fakesrc_change_state):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_chain),
(gst_identity_set_property), (gst_identity_get_property),
(gst_identity_change_state):
* gst/elements/gstidentity.h:
Added datarate properties to limit the datarate.
2004-09-03 11:40:35 +00:00
|
|
|
|
gst/: Added start/stop methods to transform base class so subclasses don't need to deal with state changes even.
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_base_init),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_setcaps), (gst_base_transform_handle_buffer),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_start),
(gst_identity_stop):
Added start/stop methods to transform base class so subclasses
don't need to deal with state changes even.
2005-03-31 10:10:55 +00:00
|
|
|
static gboolean
|
|
|
|
gst_identity_start (GstBaseTransform * trans)
|
gst/elements/: Added datarate properties to limit the datarate.
Original commit message from CVS:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_init), (gst_fakesrc_set_clock),
(gst_fakesrc_set_property), (gst_fakesrc_get_property),
(gst_fakesrc_get), (gst_fakesrc_change_state):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_chain),
(gst_identity_set_property), (gst_identity_get_property),
(gst_identity_change_state):
* gst/elements/gstidentity.h:
Added datarate properties to limit the datarate.
2004-09-03 11:40:35 +00:00
|
|
|
{
|
|
|
|
GstIdentity *identity;
|
|
|
|
|
gst/: Added start/stop methods to transform base class so subclasses don't need to deal with state changes even.
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_base_init),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_setcaps), (gst_base_transform_handle_buffer),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_start),
(gst_identity_stop):
Added start/stop methods to transform base class so subclasses
don't need to deal with state changes even.
2005-03-31 10:10:55 +00:00
|
|
|
identity = GST_IDENTITY (trans);
|
gst/elements/: Added datarate properties to limit the datarate.
Original commit message from CVS:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_init), (gst_fakesrc_set_clock),
(gst_fakesrc_set_property), (gst_fakesrc_get_property),
(gst_fakesrc_get), (gst_fakesrc_change_state):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_chain),
(gst_identity_set_property), (gst_identity_get_property),
(gst_identity_change_state):
* gst/elements/gstidentity.h:
Added datarate properties to limit the datarate.
2004-09-03 11:40:35 +00:00
|
|
|
|
gst/: Added start/stop methods to transform base class so subclasses don't need to deal with state changes even.
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_base_init),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_setcaps), (gst_base_transform_handle_buffer),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_start),
(gst_identity_stop):
Added start/stop methods to transform base class so subclasses
don't need to deal with state changes even.
2005-03-31 10:10:55 +00:00
|
|
|
identity->offset = 0;
|
|
|
|
identity->prev_timestamp = GST_CLOCK_TIME_NONE;
|
|
|
|
identity->prev_duration = GST_CLOCK_TIME_NONE;
|
2008-04-09 08:19:36 +00:00
|
|
|
identity->prev_offset_end = GST_BUFFER_OFFSET_NONE;
|
|
|
|
identity->prev_offset = GST_BUFFER_OFFSET_NONE;
|
gst/elements/: Added datarate properties to limit the datarate.
Original commit message from CVS:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_init), (gst_fakesrc_set_clock),
(gst_fakesrc_set_property), (gst_fakesrc_get_property),
(gst_fakesrc_get), (gst_fakesrc_change_state):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_chain),
(gst_identity_set_property), (gst_identity_get_property),
(gst_identity_change_state):
* gst/elements/gstidentity.h:
Added datarate properties to limit the datarate.
2004-09-03 11:40:35 +00:00
|
|
|
|
gst/: Added start/stop methods to transform base class so subclasses don't need to deal with state changes even.
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_base_init),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_setcaps), (gst_base_transform_handle_buffer),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_start),
(gst_identity_stop):
Added start/stop methods to transform base class so subclasses
don't need to deal with state changes even.
2005-03-31 10:10:55 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
gst_identity_stop (GstBaseTransform * trans)
|
|
|
|
{
|
|
|
|
GstIdentity *identity;
|
gst/: Simplify pad activation.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/README:
* gst/base/gstbasesink.c: (gst_basesink_get_type),
(gst_basesink_base_init), (gst_basesink_class_init),
(gst_basesink_pad_getcaps), (gst_basesink_init),
(gst_basesink_activate), (gst_basesink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_base_init), (gst_base_transform_finalize),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_proxy_getcaps), (gst_base_transform_setcaps),
(gst_base_transform_event), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_handle_buffer),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_finalize),
(gst_identity_class_init), (gst_identity_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_set_property),
(gst_identity_get_property), (gst_identity_change_state):
* gst/elements/gstidentity.h:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_lost_state), (gst_element_pads_activate):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_check_pull_range), (gst_pad_pull_range):
* gst/gstpad.h:
Simplify pad activation.
Added function to check if pull_range can be performed.
Error out when pulling inactive or flushing pads.
Removed const from refcounted types as it does not make sense.
Simplify pad templates in basesink
Added base class for simple 1-to-1 transforms.
Make identity subclass the base transform.
2005-03-29 16:18:12 +00:00
|
|
|
|
gst/: Added start/stop methods to transform base class so subclasses don't need to deal with state changes even.
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_base_init),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_setcaps), (gst_base_transform_handle_buffer),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_start),
(gst_identity_stop):
Added start/stop methods to transform base class so subclasses
don't need to deal with state changes even.
2005-03-31 10:10:55 +00:00
|
|
|
identity = GST_IDENTITY (trans);
|
gst/: Simplify pad activation.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/README:
* gst/base/gstbasesink.c: (gst_basesink_get_type),
(gst_basesink_base_init), (gst_basesink_class_init),
(gst_basesink_pad_getcaps), (gst_basesink_init),
(gst_basesink_activate), (gst_basesink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasetransform.c: (gst_base_transform_get_type),
(gst_base_transform_base_init), (gst_base_transform_finalize),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_proxy_getcaps), (gst_base_transform_setcaps),
(gst_base_transform_event), (gst_base_transform_getrange),
(gst_base_transform_chain), (gst_base_transform_handle_buffer),
(gst_base_transform_set_property),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_finalize),
(gst_identity_class_init), (gst_identity_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_set_property),
(gst_identity_get_property), (gst_identity_change_state):
* gst/elements/gstidentity.h:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_lost_state), (gst_element_pads_activate):
* gst/gstpad.c: (gst_pad_set_active), (gst_pad_peer_set_active),
(gst_pad_check_pull_range), (gst_pad_pull_range):
* gst/gstpad.h:
Simplify pad activation.
Added function to check if pull_range can be performed.
Error out when pulling inactive or flushing pads.
Removed const from refcounted types as it does not make sense.
Simplify pad templates in basesink
Added base class for simple 1-to-1 transforms.
Make identity subclass the base transform.
2005-03-29 16:18:12 +00:00
|
|
|
|
2005-11-21 16:34:26 +00:00
|
|
|
GST_OBJECT_LOCK (identity);
|
gst/: Added start/stop methods to transform base class so subclasses don't need to deal with state changes even.
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_base_init),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_setcaps), (gst_base_transform_handle_buffer),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_start),
(gst_identity_stop):
Added start/stop methods to transform base class so subclasses
don't need to deal with state changes even.
2005-03-31 10:10:55 +00:00
|
|
|
g_free (identity->last_message);
|
|
|
|
identity->last_message = NULL;
|
2005-11-21 16:34:26 +00:00
|
|
|
GST_OBJECT_UNLOCK (identity);
|
gst/elements/: Added datarate properties to limit the datarate.
Original commit message from CVS:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_init), (gst_fakesrc_set_clock),
(gst_fakesrc_set_property), (gst_fakesrc_get_property),
(gst_fakesrc_get), (gst_fakesrc_change_state):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_chain),
(gst_identity_set_property), (gst_identity_get_property),
(gst_identity_change_state):
* gst/elements/gstidentity.h:
Added datarate properties to limit the datarate.
2004-09-03 11:40:35 +00:00
|
|
|
|
gst/: Added start/stop methods to transform base class so subclasses don't need to deal with state changes even.
Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_base_init),
(gst_base_transform_class_init), (gst_base_transform_init),
(gst_base_transform_setcaps), (gst_base_transform_handle_buffer),
(gst_base_transform_get_property),
(gst_base_transform_sink_activate),
(gst_base_transform_src_activate),
(gst_base_transform_change_state):
* gst/base/gstbasetransform.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_event), (gst_identity_check_perfect),
(gst_identity_transform), (gst_identity_start),
(gst_identity_stop):
Added start/stop methods to transform base class so subclasses
don't need to deal with state changes even.
2005-03-31 10:10:55 +00:00
|
|
|
return TRUE;
|
gst/elements/: Added datarate properties to limit the datarate.
Original commit message from CVS:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_init), (gst_fakesrc_set_clock),
(gst_fakesrc_set_property), (gst_fakesrc_get_property),
(gst_fakesrc_get), (gst_fakesrc_change_state):
* gst/elements/gstfakesrc.h:
* gst/elements/gstidentity.c: (gst_identity_class_init),
(gst_identity_init), (gst_identity_chain),
(gst_identity_set_property), (gst_identity_get_property),
(gst_identity_change_state):
* gst/elements/gstidentity.h:
Added datarate properties to limit the datarate.
2004-09-03 11:40:35 +00:00
|
|
|
}
|