2001-10-17 10:21:27 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
* 2000 Wim Taymans <wim.taymans@chello.be>
|
|
|
|
*
|
2004-03-12 17:59:00 +00:00
|
|
|
* gstevent.c: GstEvent subsystem
|
2001-10-17 10:21:27 +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.
|
|
|
|
*/
|
|
|
|
|
2004-03-15 19:27:17 +00:00
|
|
|
#include <string.h> /* memcpy */
|
2001-10-17 10:21:27 +00:00
|
|
|
|
2003-06-29 14:05:49 +00:00
|
|
|
#include "gst_private.h"
|
|
|
|
|
|
|
|
#include "gstinfo.h"
|
2003-05-10 12:15:58 +00:00
|
|
|
#include "gstmemchunk.h"
|
2002-07-08 19:22:02 +00:00
|
|
|
#include "gstevent.h"
|
2003-11-24 02:09:23 +00:00
|
|
|
#include "gsttag.h"
|
2005-04-24 22:49:45 +00:00
|
|
|
#include "gstutils.h"
|
2003-11-24 02:09:23 +00:00
|
|
|
|
2003-02-02 19:40:10 +00:00
|
|
|
|
check/Makefile.am: remove GstData checks
Original commit message from CVS:
* check/Makefile.am: remove GstData checks
* check/gst-libs/gdp.c: (START_TEST): fix for API changes
* gst/Makefile.am: add miniobject, remove data
* gst/gst.h: add miniobject, remove data
* gst/gstdata.c: remove
* gst/gstdata.h: remove
* gst/gstdata_private.h: remove
* gst/gsttypes.h: remove GstEvent and GstMessage
* gst/gstelement.c: (gst_element_post_message): fix for API changes
* gst/gstmarshal.list: change BOXED -> OBJECT
Implement GstMiniObject.
* gst/gstminiobject.c:
* gst/gstminiobject.h:
Modify to be subclasses of GstMiniObject.
* gst/gstbuffer.c: (_gst_buffer_initialize), (gst_buffer_get_type),
(gst_buffer_class_init), (gst_buffer_finalize), (_gst_buffer_copy),
(gst_buffer_init), (gst_buffer_new), (gst_buffer_new_and_alloc),
(gst_subbuffer_get_type), (gst_subbuffer_init),
(gst_buffer_create_sub), (gst_buffer_is_span_fast),
(gst_buffer_span):
* gst/gstbuffer.h:
* gst/gstevent.c: (_gst_event_initialize), (gst_event_get_type),
(gst_event_class_init), (gst_event_init), (gst_event_finalize),
(_gst_event_copy), (gst_event_new):
* gst/gstevent.h:
* gst/gstmessage.c: (_gst_message_initialize),
(gst_message_get_type), (gst_message_class_init),
(gst_message_init), (gst_message_finalize), (_gst_message_copy),
(gst_message_new), (gst_message_new_error),
(gst_message_new_warning), (gst_message_new_tag),
(gst_message_new_state_changed), (gst_message_new_application):
* gst/gstmessage.h:
* gst/gstprobe.c: (gst_probe_perform),
(gst_probe_dispatcher_dispatch):
* gst/gstprobe.h:
* gst/gstquery.c: (_gst_query_initialize), (gst_query_get_type),
(gst_query_class_init), (gst_query_finalize), (gst_query_init),
(_gst_query_copy), (gst_query_new):
Update elements for GstData -> GstMiniObject changes
* gst/gstquery.h:
* gst/gstqueue.c: (gst_queue_finalize), (gst_queue_locked_flush),
(gst_queue_chain), (gst_queue_loop):
* gst/elements/gstbufferstore.c:
(gst_buffer_store_add_buffer_func),
(gst_buffer_store_cleared_func), (gst_buffer_store_get_buffer):
* gst/elements/gstfakesink.c: (gst_fakesink_class_init),
(gst_fakesink_render):
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init):
* gst/elements/gstfilesrc.c: (gst_mmap_buffer_get_type),
(gst_mmap_buffer_class_init), (gst_mmap_buffer_init),
(gst_mmap_buffer_finalize), (gst_filesrc_map_region),
(gst_filesrc_create_read):
* gst/elements/gstidentity.c: (gst_identity_class_init):
* gst/elements/gsttypefindelement.c:
(gst_type_find_element_src_event), (free_entry_buffers),
(gst_type_find_element_handle_event):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_header_from_buffer):
* libs/gst/dataprotocol/dataprotocol.h:
* libs/gst/dataprotocol/dp-private.h:
2005-05-16 20:21:55 +00:00
|
|
|
static void gst_event_init (GTypeInstance * instance, gpointer g_class);
|
|
|
|
static void gst_event_class_init (gpointer g_class, gpointer class_data);
|
|
|
|
static void gst_event_finalize (GstEvent * event);
|
|
|
|
static GstEvent *_gst_event_copy (GstEvent * event);
|
2001-10-17 10:21:27 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
_gst_event_initialize (void)
|
|
|
|
{
|
check/Makefile.am: remove GstData checks
Original commit message from CVS:
* check/Makefile.am: remove GstData checks
* check/gst-libs/gdp.c: (START_TEST): fix for API changes
* gst/Makefile.am: add miniobject, remove data
* gst/gst.h: add miniobject, remove data
* gst/gstdata.c: remove
* gst/gstdata.h: remove
* gst/gstdata_private.h: remove
* gst/gsttypes.h: remove GstEvent and GstMessage
* gst/gstelement.c: (gst_element_post_message): fix for API changes
* gst/gstmarshal.list: change BOXED -> OBJECT
Implement GstMiniObject.
* gst/gstminiobject.c:
* gst/gstminiobject.h:
Modify to be subclasses of GstMiniObject.
* gst/gstbuffer.c: (_gst_buffer_initialize), (gst_buffer_get_type),
(gst_buffer_class_init), (gst_buffer_finalize), (_gst_buffer_copy),
(gst_buffer_init), (gst_buffer_new), (gst_buffer_new_and_alloc),
(gst_subbuffer_get_type), (gst_subbuffer_init),
(gst_buffer_create_sub), (gst_buffer_is_span_fast),
(gst_buffer_span):
* gst/gstbuffer.h:
* gst/gstevent.c: (_gst_event_initialize), (gst_event_get_type),
(gst_event_class_init), (gst_event_init), (gst_event_finalize),
(_gst_event_copy), (gst_event_new):
* gst/gstevent.h:
* gst/gstmessage.c: (_gst_message_initialize),
(gst_message_get_type), (gst_message_class_init),
(gst_message_init), (gst_message_finalize), (_gst_message_copy),
(gst_message_new), (gst_message_new_error),
(gst_message_new_warning), (gst_message_new_tag),
(gst_message_new_state_changed), (gst_message_new_application):
* gst/gstmessage.h:
* gst/gstprobe.c: (gst_probe_perform),
(gst_probe_dispatcher_dispatch):
* gst/gstprobe.h:
* gst/gstquery.c: (_gst_query_initialize), (gst_query_get_type),
(gst_query_class_init), (gst_query_finalize), (gst_query_init),
(_gst_query_copy), (gst_query_new):
Update elements for GstData -> GstMiniObject changes
* gst/gstquery.h:
* gst/gstqueue.c: (gst_queue_finalize), (gst_queue_locked_flush),
(gst_queue_chain), (gst_queue_loop):
* gst/elements/gstbufferstore.c:
(gst_buffer_store_add_buffer_func),
(gst_buffer_store_cleared_func), (gst_buffer_store_get_buffer):
* gst/elements/gstfakesink.c: (gst_fakesink_class_init),
(gst_fakesink_render):
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init):
* gst/elements/gstfilesrc.c: (gst_mmap_buffer_get_type),
(gst_mmap_buffer_class_init), (gst_mmap_buffer_init),
(gst_mmap_buffer_finalize), (gst_filesrc_map_region),
(gst_filesrc_create_read):
* gst/elements/gstidentity.c: (gst_identity_class_init):
* gst/elements/gsttypefindelement.c:
(gst_type_find_element_src_event), (free_entry_buffers),
(gst_type_find_element_handle_event):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_header_from_buffer):
* libs/gst/dataprotocol/dataprotocol.h:
* libs/gst/dataprotocol/dp-private.h:
2005-05-16 20:21:55 +00:00
|
|
|
gst_event_get_type ();
|
|
|
|
}
|
|
|
|
|
|
|
|
GType
|
|
|
|
gst_event_get_type (void)
|
|
|
|
{
|
|
|
|
static GType _gst_event_type;
|
|
|
|
|
|
|
|
if (G_UNLIKELY (_gst_event_type == 0)) {
|
|
|
|
static const GTypeInfo event_info = {
|
|
|
|
sizeof (GstEventClass),
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
gst_event_class_init,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
sizeof (GstEvent),
|
|
|
|
0,
|
|
|
|
gst_event_init,
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
|
|
|
_gst_event_type = g_type_register_static (GST_TYPE_MINI_OBJECT,
|
|
|
|
"GstEvent", &event_info, 0);
|
|
|
|
}
|
2003-05-10 12:15:58 +00:00
|
|
|
|
check/Makefile.am: remove GstData checks
Original commit message from CVS:
* check/Makefile.am: remove GstData checks
* check/gst-libs/gdp.c: (START_TEST): fix for API changes
* gst/Makefile.am: add miniobject, remove data
* gst/gst.h: add miniobject, remove data
* gst/gstdata.c: remove
* gst/gstdata.h: remove
* gst/gstdata_private.h: remove
* gst/gsttypes.h: remove GstEvent and GstMessage
* gst/gstelement.c: (gst_element_post_message): fix for API changes
* gst/gstmarshal.list: change BOXED -> OBJECT
Implement GstMiniObject.
* gst/gstminiobject.c:
* gst/gstminiobject.h:
Modify to be subclasses of GstMiniObject.
* gst/gstbuffer.c: (_gst_buffer_initialize), (gst_buffer_get_type),
(gst_buffer_class_init), (gst_buffer_finalize), (_gst_buffer_copy),
(gst_buffer_init), (gst_buffer_new), (gst_buffer_new_and_alloc),
(gst_subbuffer_get_type), (gst_subbuffer_init),
(gst_buffer_create_sub), (gst_buffer_is_span_fast),
(gst_buffer_span):
* gst/gstbuffer.h:
* gst/gstevent.c: (_gst_event_initialize), (gst_event_get_type),
(gst_event_class_init), (gst_event_init), (gst_event_finalize),
(_gst_event_copy), (gst_event_new):
* gst/gstevent.h:
* gst/gstmessage.c: (_gst_message_initialize),
(gst_message_get_type), (gst_message_class_init),
(gst_message_init), (gst_message_finalize), (_gst_message_copy),
(gst_message_new), (gst_message_new_error),
(gst_message_new_warning), (gst_message_new_tag),
(gst_message_new_state_changed), (gst_message_new_application):
* gst/gstmessage.h:
* gst/gstprobe.c: (gst_probe_perform),
(gst_probe_dispatcher_dispatch):
* gst/gstprobe.h:
* gst/gstquery.c: (_gst_query_initialize), (gst_query_get_type),
(gst_query_class_init), (gst_query_finalize), (gst_query_init),
(_gst_query_copy), (gst_query_new):
Update elements for GstData -> GstMiniObject changes
* gst/gstquery.h:
* gst/gstqueue.c: (gst_queue_finalize), (gst_queue_locked_flush),
(gst_queue_chain), (gst_queue_loop):
* gst/elements/gstbufferstore.c:
(gst_buffer_store_add_buffer_func),
(gst_buffer_store_cleared_func), (gst_buffer_store_get_buffer):
* gst/elements/gstfakesink.c: (gst_fakesink_class_init),
(gst_fakesink_render):
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init):
* gst/elements/gstfilesrc.c: (gst_mmap_buffer_get_type),
(gst_mmap_buffer_class_init), (gst_mmap_buffer_init),
(gst_mmap_buffer_finalize), (gst_filesrc_map_region),
(gst_filesrc_create_read):
* gst/elements/gstidentity.c: (gst_identity_class_init):
* gst/elements/gsttypefindelement.c:
(gst_type_find_element_src_event), (free_entry_buffers),
(gst_type_find_element_handle_event):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_header_from_buffer):
* libs/gst/dataprotocol/dataprotocol.h:
* libs/gst/dataprotocol/dp-private.h:
2005-05-16 20:21:55 +00:00
|
|
|
return _gst_event_type;
|
2001-10-17 10:21:27 +00:00
|
|
|
}
|
|
|
|
|
check/Makefile.am: remove GstData checks
Original commit message from CVS:
* check/Makefile.am: remove GstData checks
* check/gst-libs/gdp.c: (START_TEST): fix for API changes
* gst/Makefile.am: add miniobject, remove data
* gst/gst.h: add miniobject, remove data
* gst/gstdata.c: remove
* gst/gstdata.h: remove
* gst/gstdata_private.h: remove
* gst/gsttypes.h: remove GstEvent and GstMessage
* gst/gstelement.c: (gst_element_post_message): fix for API changes
* gst/gstmarshal.list: change BOXED -> OBJECT
Implement GstMiniObject.
* gst/gstminiobject.c:
* gst/gstminiobject.h:
Modify to be subclasses of GstMiniObject.
* gst/gstbuffer.c: (_gst_buffer_initialize), (gst_buffer_get_type),
(gst_buffer_class_init), (gst_buffer_finalize), (_gst_buffer_copy),
(gst_buffer_init), (gst_buffer_new), (gst_buffer_new_and_alloc),
(gst_subbuffer_get_type), (gst_subbuffer_init),
(gst_buffer_create_sub), (gst_buffer_is_span_fast),
(gst_buffer_span):
* gst/gstbuffer.h:
* gst/gstevent.c: (_gst_event_initialize), (gst_event_get_type),
(gst_event_class_init), (gst_event_init), (gst_event_finalize),
(_gst_event_copy), (gst_event_new):
* gst/gstevent.h:
* gst/gstmessage.c: (_gst_message_initialize),
(gst_message_get_type), (gst_message_class_init),
(gst_message_init), (gst_message_finalize), (_gst_message_copy),
(gst_message_new), (gst_message_new_error),
(gst_message_new_warning), (gst_message_new_tag),
(gst_message_new_state_changed), (gst_message_new_application):
* gst/gstmessage.h:
* gst/gstprobe.c: (gst_probe_perform),
(gst_probe_dispatcher_dispatch):
* gst/gstprobe.h:
* gst/gstquery.c: (_gst_query_initialize), (gst_query_get_type),
(gst_query_class_init), (gst_query_finalize), (gst_query_init),
(_gst_query_copy), (gst_query_new):
Update elements for GstData -> GstMiniObject changes
* gst/gstquery.h:
* gst/gstqueue.c: (gst_queue_finalize), (gst_queue_locked_flush),
(gst_queue_chain), (gst_queue_loop):
* gst/elements/gstbufferstore.c:
(gst_buffer_store_add_buffer_func),
(gst_buffer_store_cleared_func), (gst_buffer_store_get_buffer):
* gst/elements/gstfakesink.c: (gst_fakesink_class_init),
(gst_fakesink_render):
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init):
* gst/elements/gstfilesrc.c: (gst_mmap_buffer_get_type),
(gst_mmap_buffer_class_init), (gst_mmap_buffer_init),
(gst_mmap_buffer_finalize), (gst_filesrc_map_region),
(gst_filesrc_create_read):
* gst/elements/gstidentity.c: (gst_identity_class_init):
* gst/elements/gsttypefindelement.c:
(gst_type_find_element_src_event), (free_entry_buffers),
(gst_type_find_element_handle_event):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_header_from_buffer):
* libs/gst/dataprotocol/dataprotocol.h:
* libs/gst/dataprotocol/dp-private.h:
2005-05-16 20:21:55 +00:00
|
|
|
static void
|
|
|
|
gst_event_class_init (gpointer g_class, gpointer class_data)
|
2002-02-23 13:57:09 +00:00
|
|
|
{
|
check/Makefile.am: remove GstData checks
Original commit message from CVS:
* check/Makefile.am: remove GstData checks
* check/gst-libs/gdp.c: (START_TEST): fix for API changes
* gst/Makefile.am: add miniobject, remove data
* gst/gst.h: add miniobject, remove data
* gst/gstdata.c: remove
* gst/gstdata.h: remove
* gst/gstdata_private.h: remove
* gst/gsttypes.h: remove GstEvent and GstMessage
* gst/gstelement.c: (gst_element_post_message): fix for API changes
* gst/gstmarshal.list: change BOXED -> OBJECT
Implement GstMiniObject.
* gst/gstminiobject.c:
* gst/gstminiobject.h:
Modify to be subclasses of GstMiniObject.
* gst/gstbuffer.c: (_gst_buffer_initialize), (gst_buffer_get_type),
(gst_buffer_class_init), (gst_buffer_finalize), (_gst_buffer_copy),
(gst_buffer_init), (gst_buffer_new), (gst_buffer_new_and_alloc),
(gst_subbuffer_get_type), (gst_subbuffer_init),
(gst_buffer_create_sub), (gst_buffer_is_span_fast),
(gst_buffer_span):
* gst/gstbuffer.h:
* gst/gstevent.c: (_gst_event_initialize), (gst_event_get_type),
(gst_event_class_init), (gst_event_init), (gst_event_finalize),
(_gst_event_copy), (gst_event_new):
* gst/gstevent.h:
* gst/gstmessage.c: (_gst_message_initialize),
(gst_message_get_type), (gst_message_class_init),
(gst_message_init), (gst_message_finalize), (_gst_message_copy),
(gst_message_new), (gst_message_new_error),
(gst_message_new_warning), (gst_message_new_tag),
(gst_message_new_state_changed), (gst_message_new_application):
* gst/gstmessage.h:
* gst/gstprobe.c: (gst_probe_perform),
(gst_probe_dispatcher_dispatch):
* gst/gstprobe.h:
* gst/gstquery.c: (_gst_query_initialize), (gst_query_get_type),
(gst_query_class_init), (gst_query_finalize), (gst_query_init),
(_gst_query_copy), (gst_query_new):
Update elements for GstData -> GstMiniObject changes
* gst/gstquery.h:
* gst/gstqueue.c: (gst_queue_finalize), (gst_queue_locked_flush),
(gst_queue_chain), (gst_queue_loop):
* gst/elements/gstbufferstore.c:
(gst_buffer_store_add_buffer_func),
(gst_buffer_store_cleared_func), (gst_buffer_store_get_buffer):
* gst/elements/gstfakesink.c: (gst_fakesink_class_init),
(gst_fakesink_render):
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init):
* gst/elements/gstfilesrc.c: (gst_mmap_buffer_get_type),
(gst_mmap_buffer_class_init), (gst_mmap_buffer_init),
(gst_mmap_buffer_finalize), (gst_filesrc_map_region),
(gst_filesrc_create_read):
* gst/elements/gstidentity.c: (gst_identity_class_init):
* gst/elements/gsttypefindelement.c:
(gst_type_find_element_src_event), (free_entry_buffers),
(gst_type_find_element_handle_event):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_header_from_buffer):
* libs/gst/dataprotocol/dataprotocol.h:
* libs/gst/dataprotocol/dp-private.h:
2005-05-16 20:21:55 +00:00
|
|
|
GstEventClass *event_class = GST_EVENT_CLASS (g_class);
|
2002-02-23 13:57:09 +00:00
|
|
|
|
check/Makefile.am: remove GstData checks
Original commit message from CVS:
* check/Makefile.am: remove GstData checks
* check/gst-libs/gdp.c: (START_TEST): fix for API changes
* gst/Makefile.am: add miniobject, remove data
* gst/gst.h: add miniobject, remove data
* gst/gstdata.c: remove
* gst/gstdata.h: remove
* gst/gstdata_private.h: remove
* gst/gsttypes.h: remove GstEvent and GstMessage
* gst/gstelement.c: (gst_element_post_message): fix for API changes
* gst/gstmarshal.list: change BOXED -> OBJECT
Implement GstMiniObject.
* gst/gstminiobject.c:
* gst/gstminiobject.h:
Modify to be subclasses of GstMiniObject.
* gst/gstbuffer.c: (_gst_buffer_initialize), (gst_buffer_get_type),
(gst_buffer_class_init), (gst_buffer_finalize), (_gst_buffer_copy),
(gst_buffer_init), (gst_buffer_new), (gst_buffer_new_and_alloc),
(gst_subbuffer_get_type), (gst_subbuffer_init),
(gst_buffer_create_sub), (gst_buffer_is_span_fast),
(gst_buffer_span):
* gst/gstbuffer.h:
* gst/gstevent.c: (_gst_event_initialize), (gst_event_get_type),
(gst_event_class_init), (gst_event_init), (gst_event_finalize),
(_gst_event_copy), (gst_event_new):
* gst/gstevent.h:
* gst/gstmessage.c: (_gst_message_initialize),
(gst_message_get_type), (gst_message_class_init),
(gst_message_init), (gst_message_finalize), (_gst_message_copy),
(gst_message_new), (gst_message_new_error),
(gst_message_new_warning), (gst_message_new_tag),
(gst_message_new_state_changed), (gst_message_new_application):
* gst/gstmessage.h:
* gst/gstprobe.c: (gst_probe_perform),
(gst_probe_dispatcher_dispatch):
* gst/gstprobe.h:
* gst/gstquery.c: (_gst_query_initialize), (gst_query_get_type),
(gst_query_class_init), (gst_query_finalize), (gst_query_init),
(_gst_query_copy), (gst_query_new):
Update elements for GstData -> GstMiniObject changes
* gst/gstquery.h:
* gst/gstqueue.c: (gst_queue_finalize), (gst_queue_locked_flush),
(gst_queue_chain), (gst_queue_loop):
* gst/elements/gstbufferstore.c:
(gst_buffer_store_add_buffer_func),
(gst_buffer_store_cleared_func), (gst_buffer_store_get_buffer):
* gst/elements/gstfakesink.c: (gst_fakesink_class_init),
(gst_fakesink_render):
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init):
* gst/elements/gstfilesrc.c: (gst_mmap_buffer_get_type),
(gst_mmap_buffer_class_init), (gst_mmap_buffer_init),
(gst_mmap_buffer_finalize), (gst_filesrc_map_region),
(gst_filesrc_create_read):
* gst/elements/gstidentity.c: (gst_identity_class_init):
* gst/elements/gsttypefindelement.c:
(gst_type_find_element_src_event), (free_entry_buffers),
(gst_type_find_element_handle_event):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_header_from_buffer):
* libs/gst/dataprotocol/dataprotocol.h:
* libs/gst/dataprotocol/dp-private.h:
2005-05-16 20:21:55 +00:00
|
|
|
event_class->mini_object_class.copy =
|
|
|
|
(GstMiniObjectCopyFunction) _gst_event_copy;
|
|
|
|
event_class->mini_object_class.finalize =
|
|
|
|
(GstMiniObjectFinalizeFunction) gst_event_finalize;
|
|
|
|
}
|
2002-02-23 13:57:09 +00:00
|
|
|
|
check/Makefile.am: remove GstData checks
Original commit message from CVS:
* check/Makefile.am: remove GstData checks
* check/gst-libs/gdp.c: (START_TEST): fix for API changes
* gst/Makefile.am: add miniobject, remove data
* gst/gst.h: add miniobject, remove data
* gst/gstdata.c: remove
* gst/gstdata.h: remove
* gst/gstdata_private.h: remove
* gst/gsttypes.h: remove GstEvent and GstMessage
* gst/gstelement.c: (gst_element_post_message): fix for API changes
* gst/gstmarshal.list: change BOXED -> OBJECT
Implement GstMiniObject.
* gst/gstminiobject.c:
* gst/gstminiobject.h:
Modify to be subclasses of GstMiniObject.
* gst/gstbuffer.c: (_gst_buffer_initialize), (gst_buffer_get_type),
(gst_buffer_class_init), (gst_buffer_finalize), (_gst_buffer_copy),
(gst_buffer_init), (gst_buffer_new), (gst_buffer_new_and_alloc),
(gst_subbuffer_get_type), (gst_subbuffer_init),
(gst_buffer_create_sub), (gst_buffer_is_span_fast),
(gst_buffer_span):
* gst/gstbuffer.h:
* gst/gstevent.c: (_gst_event_initialize), (gst_event_get_type),
(gst_event_class_init), (gst_event_init), (gst_event_finalize),
(_gst_event_copy), (gst_event_new):
* gst/gstevent.h:
* gst/gstmessage.c: (_gst_message_initialize),
(gst_message_get_type), (gst_message_class_init),
(gst_message_init), (gst_message_finalize), (_gst_message_copy),
(gst_message_new), (gst_message_new_error),
(gst_message_new_warning), (gst_message_new_tag),
(gst_message_new_state_changed), (gst_message_new_application):
* gst/gstmessage.h:
* gst/gstprobe.c: (gst_probe_perform),
(gst_probe_dispatcher_dispatch):
* gst/gstprobe.h:
* gst/gstquery.c: (_gst_query_initialize), (gst_query_get_type),
(gst_query_class_init), (gst_query_finalize), (gst_query_init),
(_gst_query_copy), (gst_query_new):
Update elements for GstData -> GstMiniObject changes
* gst/gstquery.h:
* gst/gstqueue.c: (gst_queue_finalize), (gst_queue_locked_flush),
(gst_queue_chain), (gst_queue_loop):
* gst/elements/gstbufferstore.c:
(gst_buffer_store_add_buffer_func),
(gst_buffer_store_cleared_func), (gst_buffer_store_get_buffer):
* gst/elements/gstfakesink.c: (gst_fakesink_class_init),
(gst_fakesink_render):
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init):
* gst/elements/gstfilesrc.c: (gst_mmap_buffer_get_type),
(gst_mmap_buffer_class_init), (gst_mmap_buffer_init),
(gst_mmap_buffer_finalize), (gst_filesrc_map_region),
(gst_filesrc_create_read):
* gst/elements/gstidentity.c: (gst_identity_class_init):
* gst/elements/gsttypefindelement.c:
(gst_type_find_element_src_event), (free_entry_buffers),
(gst_type_find_element_handle_event):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_header_from_buffer):
* libs/gst/dataprotocol/dataprotocol.h:
* libs/gst/dataprotocol/dp-private.h:
2005-05-16 20:21:55 +00:00
|
|
|
static void
|
|
|
|
gst_event_init (GTypeInstance * instance, gpointer g_class)
|
|
|
|
{
|
|
|
|
GstEvent *event;
|
2004-03-13 15:27:01 +00:00
|
|
|
|
check/Makefile.am: remove GstData checks
Original commit message from CVS:
* check/Makefile.am: remove GstData checks
* check/gst-libs/gdp.c: (START_TEST): fix for API changes
* gst/Makefile.am: add miniobject, remove data
* gst/gst.h: add miniobject, remove data
* gst/gstdata.c: remove
* gst/gstdata.h: remove
* gst/gstdata_private.h: remove
* gst/gsttypes.h: remove GstEvent and GstMessage
* gst/gstelement.c: (gst_element_post_message): fix for API changes
* gst/gstmarshal.list: change BOXED -> OBJECT
Implement GstMiniObject.
* gst/gstminiobject.c:
* gst/gstminiobject.h:
Modify to be subclasses of GstMiniObject.
* gst/gstbuffer.c: (_gst_buffer_initialize), (gst_buffer_get_type),
(gst_buffer_class_init), (gst_buffer_finalize), (_gst_buffer_copy),
(gst_buffer_init), (gst_buffer_new), (gst_buffer_new_and_alloc),
(gst_subbuffer_get_type), (gst_subbuffer_init),
(gst_buffer_create_sub), (gst_buffer_is_span_fast),
(gst_buffer_span):
* gst/gstbuffer.h:
* gst/gstevent.c: (_gst_event_initialize), (gst_event_get_type),
(gst_event_class_init), (gst_event_init), (gst_event_finalize),
(_gst_event_copy), (gst_event_new):
* gst/gstevent.h:
* gst/gstmessage.c: (_gst_message_initialize),
(gst_message_get_type), (gst_message_class_init),
(gst_message_init), (gst_message_finalize), (_gst_message_copy),
(gst_message_new), (gst_message_new_error),
(gst_message_new_warning), (gst_message_new_tag),
(gst_message_new_state_changed), (gst_message_new_application):
* gst/gstmessage.h:
* gst/gstprobe.c: (gst_probe_perform),
(gst_probe_dispatcher_dispatch):
* gst/gstprobe.h:
* gst/gstquery.c: (_gst_query_initialize), (gst_query_get_type),
(gst_query_class_init), (gst_query_finalize), (gst_query_init),
(_gst_query_copy), (gst_query_new):
Update elements for GstData -> GstMiniObject changes
* gst/gstquery.h:
* gst/gstqueue.c: (gst_queue_finalize), (gst_queue_locked_flush),
(gst_queue_chain), (gst_queue_loop):
* gst/elements/gstbufferstore.c:
(gst_buffer_store_add_buffer_func),
(gst_buffer_store_cleared_func), (gst_buffer_store_get_buffer):
* gst/elements/gstfakesink.c: (gst_fakesink_class_init),
(gst_fakesink_render):
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init):
* gst/elements/gstfilesrc.c: (gst_mmap_buffer_get_type),
(gst_mmap_buffer_class_init), (gst_mmap_buffer_init),
(gst_mmap_buffer_finalize), (gst_filesrc_map_region),
(gst_filesrc_create_read):
* gst/elements/gstidentity.c: (gst_identity_class_init):
* gst/elements/gsttypefindelement.c:
(gst_type_find_element_src_event), (free_entry_buffers),
(gst_type_find_element_handle_event):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_header_from_buffer):
* libs/gst/dataprotocol/dataprotocol.h:
* libs/gst/dataprotocol/dp-private.h:
2005-05-16 20:21:55 +00:00
|
|
|
event = GST_EVENT (instance);
|
2002-02-23 13:57:09 +00:00
|
|
|
|
check/Makefile.am: remove GstData checks
Original commit message from CVS:
* check/Makefile.am: remove GstData checks
* check/gst-libs/gdp.c: (START_TEST): fix for API changes
* gst/Makefile.am: add miniobject, remove data
* gst/gst.h: add miniobject, remove data
* gst/gstdata.c: remove
* gst/gstdata.h: remove
* gst/gstdata_private.h: remove
* gst/gsttypes.h: remove GstEvent and GstMessage
* gst/gstelement.c: (gst_element_post_message): fix for API changes
* gst/gstmarshal.list: change BOXED -> OBJECT
Implement GstMiniObject.
* gst/gstminiobject.c:
* gst/gstminiobject.h:
Modify to be subclasses of GstMiniObject.
* gst/gstbuffer.c: (_gst_buffer_initialize), (gst_buffer_get_type),
(gst_buffer_class_init), (gst_buffer_finalize), (_gst_buffer_copy),
(gst_buffer_init), (gst_buffer_new), (gst_buffer_new_and_alloc),
(gst_subbuffer_get_type), (gst_subbuffer_init),
(gst_buffer_create_sub), (gst_buffer_is_span_fast),
(gst_buffer_span):
* gst/gstbuffer.h:
* gst/gstevent.c: (_gst_event_initialize), (gst_event_get_type),
(gst_event_class_init), (gst_event_init), (gst_event_finalize),
(_gst_event_copy), (gst_event_new):
* gst/gstevent.h:
* gst/gstmessage.c: (_gst_message_initialize),
(gst_message_get_type), (gst_message_class_init),
(gst_message_init), (gst_message_finalize), (_gst_message_copy),
(gst_message_new), (gst_message_new_error),
(gst_message_new_warning), (gst_message_new_tag),
(gst_message_new_state_changed), (gst_message_new_application):
* gst/gstmessage.h:
* gst/gstprobe.c: (gst_probe_perform),
(gst_probe_dispatcher_dispatch):
* gst/gstprobe.h:
* gst/gstquery.c: (_gst_query_initialize), (gst_query_get_type),
(gst_query_class_init), (gst_query_finalize), (gst_query_init),
(_gst_query_copy), (gst_query_new):
Update elements for GstData -> GstMiniObject changes
* gst/gstquery.h:
* gst/gstqueue.c: (gst_queue_finalize), (gst_queue_locked_flush),
(gst_queue_chain), (gst_queue_loop):
* gst/elements/gstbufferstore.c:
(gst_buffer_store_add_buffer_func),
(gst_buffer_store_cleared_func), (gst_buffer_store_get_buffer):
* gst/elements/gstfakesink.c: (gst_fakesink_class_init),
(gst_fakesink_render):
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init):
* gst/elements/gstfilesrc.c: (gst_mmap_buffer_get_type),
(gst_mmap_buffer_class_init), (gst_mmap_buffer_init),
(gst_mmap_buffer_finalize), (gst_filesrc_map_region),
(gst_filesrc_create_read):
* gst/elements/gstidentity.c: (gst_identity_class_init):
* gst/elements/gsttypefindelement.c:
(gst_type_find_element_src_event), (free_entry_buffers),
(gst_type_find_element_handle_event):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_header_from_buffer):
* libs/gst/dataprotocol/dataprotocol.h:
* libs/gst/dataprotocol/dp-private.h:
2005-05-16 20:21:55 +00:00
|
|
|
GST_EVENT_TIMESTAMP (event) = GST_CLOCK_TIME_NONE;
|
2002-02-23 13:57:09 +00:00
|
|
|
}
|
|
|
|
|
2002-07-08 19:22:02 +00:00
|
|
|
static void
|
check/Makefile.am: remove GstData checks
Original commit message from CVS:
* check/Makefile.am: remove GstData checks
* check/gst-libs/gdp.c: (START_TEST): fix for API changes
* gst/Makefile.am: add miniobject, remove data
* gst/gst.h: add miniobject, remove data
* gst/gstdata.c: remove
* gst/gstdata.h: remove
* gst/gstdata_private.h: remove
* gst/gsttypes.h: remove GstEvent and GstMessage
* gst/gstelement.c: (gst_element_post_message): fix for API changes
* gst/gstmarshal.list: change BOXED -> OBJECT
Implement GstMiniObject.
* gst/gstminiobject.c:
* gst/gstminiobject.h:
Modify to be subclasses of GstMiniObject.
* gst/gstbuffer.c: (_gst_buffer_initialize), (gst_buffer_get_type),
(gst_buffer_class_init), (gst_buffer_finalize), (_gst_buffer_copy),
(gst_buffer_init), (gst_buffer_new), (gst_buffer_new_and_alloc),
(gst_subbuffer_get_type), (gst_subbuffer_init),
(gst_buffer_create_sub), (gst_buffer_is_span_fast),
(gst_buffer_span):
* gst/gstbuffer.h:
* gst/gstevent.c: (_gst_event_initialize), (gst_event_get_type),
(gst_event_class_init), (gst_event_init), (gst_event_finalize),
(_gst_event_copy), (gst_event_new):
* gst/gstevent.h:
* gst/gstmessage.c: (_gst_message_initialize),
(gst_message_get_type), (gst_message_class_init),
(gst_message_init), (gst_message_finalize), (_gst_message_copy),
(gst_message_new), (gst_message_new_error),
(gst_message_new_warning), (gst_message_new_tag),
(gst_message_new_state_changed), (gst_message_new_application):
* gst/gstmessage.h:
* gst/gstprobe.c: (gst_probe_perform),
(gst_probe_dispatcher_dispatch):
* gst/gstprobe.h:
* gst/gstquery.c: (_gst_query_initialize), (gst_query_get_type),
(gst_query_class_init), (gst_query_finalize), (gst_query_init),
(_gst_query_copy), (gst_query_new):
Update elements for GstData -> GstMiniObject changes
* gst/gstquery.h:
* gst/gstqueue.c: (gst_queue_finalize), (gst_queue_locked_flush),
(gst_queue_chain), (gst_queue_loop):
* gst/elements/gstbufferstore.c:
(gst_buffer_store_add_buffer_func),
(gst_buffer_store_cleared_func), (gst_buffer_store_get_buffer):
* gst/elements/gstfakesink.c: (gst_fakesink_class_init),
(gst_fakesink_render):
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init):
* gst/elements/gstfilesrc.c: (gst_mmap_buffer_get_type),
(gst_mmap_buffer_class_init), (gst_mmap_buffer_init),
(gst_mmap_buffer_finalize), (gst_filesrc_map_region),
(gst_filesrc_create_read):
* gst/elements/gstidentity.c: (gst_identity_class_init):
* gst/elements/gsttypefindelement.c:
(gst_type_find_element_src_event), (free_entry_buffers),
(gst_type_find_element_handle_event):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_header_from_buffer):
* libs/gst/dataprotocol/dataprotocol.h:
* libs/gst/dataprotocol/dp-private.h:
2005-05-16 20:21:55 +00:00
|
|
|
gst_event_finalize (GstEvent * event)
|
2001-10-17 10:21:27 +00:00
|
|
|
{
|
check/Makefile.am: remove GstData checks
Original commit message from CVS:
* check/Makefile.am: remove GstData checks
* check/gst-libs/gdp.c: (START_TEST): fix for API changes
* gst/Makefile.am: add miniobject, remove data
* gst/gst.h: add miniobject, remove data
* gst/gstdata.c: remove
* gst/gstdata.h: remove
* gst/gstdata_private.h: remove
* gst/gsttypes.h: remove GstEvent and GstMessage
* gst/gstelement.c: (gst_element_post_message): fix for API changes
* gst/gstmarshal.list: change BOXED -> OBJECT
Implement GstMiniObject.
* gst/gstminiobject.c:
* gst/gstminiobject.h:
Modify to be subclasses of GstMiniObject.
* gst/gstbuffer.c: (_gst_buffer_initialize), (gst_buffer_get_type),
(gst_buffer_class_init), (gst_buffer_finalize), (_gst_buffer_copy),
(gst_buffer_init), (gst_buffer_new), (gst_buffer_new_and_alloc),
(gst_subbuffer_get_type), (gst_subbuffer_init),
(gst_buffer_create_sub), (gst_buffer_is_span_fast),
(gst_buffer_span):
* gst/gstbuffer.h:
* gst/gstevent.c: (_gst_event_initialize), (gst_event_get_type),
(gst_event_class_init), (gst_event_init), (gst_event_finalize),
(_gst_event_copy), (gst_event_new):
* gst/gstevent.h:
* gst/gstmessage.c: (_gst_message_initialize),
(gst_message_get_type), (gst_message_class_init),
(gst_message_init), (gst_message_finalize), (_gst_message_copy),
(gst_message_new), (gst_message_new_error),
(gst_message_new_warning), (gst_message_new_tag),
(gst_message_new_state_changed), (gst_message_new_application):
* gst/gstmessage.h:
* gst/gstprobe.c: (gst_probe_perform),
(gst_probe_dispatcher_dispatch):
* gst/gstprobe.h:
* gst/gstquery.c: (_gst_query_initialize), (gst_query_get_type),
(gst_query_class_init), (gst_query_finalize), (gst_query_init),
(_gst_query_copy), (gst_query_new):
Update elements for GstData -> GstMiniObject changes
* gst/gstquery.h:
* gst/gstqueue.c: (gst_queue_finalize), (gst_queue_locked_flush),
(gst_queue_chain), (gst_queue_loop):
* gst/elements/gstbufferstore.c:
(gst_buffer_store_add_buffer_func),
(gst_buffer_store_cleared_func), (gst_buffer_store_get_buffer):
* gst/elements/gstfakesink.c: (gst_fakesink_class_init),
(gst_fakesink_render):
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init):
* gst/elements/gstfilesrc.c: (gst_mmap_buffer_get_type),
(gst_mmap_buffer_class_init), (gst_mmap_buffer_init),
(gst_mmap_buffer_finalize), (gst_filesrc_map_region),
(gst_filesrc_create_read):
* gst/elements/gstidentity.c: (gst_identity_class_init):
* gst/elements/gsttypefindelement.c:
(gst_type_find_element_src_event), (free_entry_buffers),
(gst_type_find_element_handle_event):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_header_from_buffer):
* libs/gst/dataprotocol/dataprotocol.h:
* libs/gst/dataprotocol/dp-private.h:
2005-05-16 20:21:55 +00:00
|
|
|
g_return_if_fail (event != NULL);
|
|
|
|
g_return_if_fail (GST_IS_EVENT (event));
|
|
|
|
|
2003-06-29 14:05:49 +00:00
|
|
|
GST_CAT_INFO (GST_CAT_EVENT, "freeing event %p", event);
|
2001-12-23 14:50:44 +00:00
|
|
|
|
2001-12-18 19:03:07 +00:00
|
|
|
if (GST_EVENT_SRC (event)) {
|
|
|
|
gst_object_unref (GST_EVENT_SRC (event));
|
|
|
|
}
|
|
|
|
switch (GST_EVENT_TYPE (event)) {
|
2003-11-24 02:09:23 +00:00
|
|
|
case GST_EVENT_TAG:
|
2004-02-20 00:38:24 +00:00
|
|
|
if (GST_IS_TAG_LIST (event->event_data.structure.structure)) {
|
2004-03-15 19:27:17 +00:00
|
|
|
gst_tag_list_free (event->event_data.structure.structure);
|
2004-02-20 00:38:24 +00:00
|
|
|
} else {
|
2004-03-15 19:27:17 +00:00
|
|
|
g_warning ("tag event %p didn't contain a valid tag list!", event);
|
|
|
|
GST_ERROR ("tag event %p didn't contain a valid tag list!", event);
|
2004-02-20 00:38:24 +00:00
|
|
|
}
|
2004-02-04 17:24:23 +00:00
|
|
|
break;
|
2004-01-05 16:25:31 +00:00
|
|
|
case GST_EVENT_NAVIGATION:
|
|
|
|
gst_structure_free (event->event_data.structure.structure);
|
2004-02-04 17:24:23 +00:00
|
|
|
break;
|
2001-12-18 19:03:07 +00:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
check/Makefile.am: remove GstData checks
Original commit message from CVS:
* check/Makefile.am: remove GstData checks
* check/gst-libs/gdp.c: (START_TEST): fix for API changes
* gst/Makefile.am: add miniobject, remove data
* gst/gst.h: add miniobject, remove data
* gst/gstdata.c: remove
* gst/gstdata.h: remove
* gst/gstdata_private.h: remove
* gst/gsttypes.h: remove GstEvent and GstMessage
* gst/gstelement.c: (gst_element_post_message): fix for API changes
* gst/gstmarshal.list: change BOXED -> OBJECT
Implement GstMiniObject.
* gst/gstminiobject.c:
* gst/gstminiobject.h:
Modify to be subclasses of GstMiniObject.
* gst/gstbuffer.c: (_gst_buffer_initialize), (gst_buffer_get_type),
(gst_buffer_class_init), (gst_buffer_finalize), (_gst_buffer_copy),
(gst_buffer_init), (gst_buffer_new), (gst_buffer_new_and_alloc),
(gst_subbuffer_get_type), (gst_subbuffer_init),
(gst_buffer_create_sub), (gst_buffer_is_span_fast),
(gst_buffer_span):
* gst/gstbuffer.h:
* gst/gstevent.c: (_gst_event_initialize), (gst_event_get_type),
(gst_event_class_init), (gst_event_init), (gst_event_finalize),
(_gst_event_copy), (gst_event_new):
* gst/gstevent.h:
* gst/gstmessage.c: (_gst_message_initialize),
(gst_message_get_type), (gst_message_class_init),
(gst_message_init), (gst_message_finalize), (_gst_message_copy),
(gst_message_new), (gst_message_new_error),
(gst_message_new_warning), (gst_message_new_tag),
(gst_message_new_state_changed), (gst_message_new_application):
* gst/gstmessage.h:
* gst/gstprobe.c: (gst_probe_perform),
(gst_probe_dispatcher_dispatch):
* gst/gstprobe.h:
* gst/gstquery.c: (_gst_query_initialize), (gst_query_get_type),
(gst_query_class_init), (gst_query_finalize), (gst_query_init),
(_gst_query_copy), (gst_query_new):
Update elements for GstData -> GstMiniObject changes
* gst/gstquery.h:
* gst/gstqueue.c: (gst_queue_finalize), (gst_queue_locked_flush),
(gst_queue_chain), (gst_queue_loop):
* gst/elements/gstbufferstore.c:
(gst_buffer_store_add_buffer_func),
(gst_buffer_store_cleared_func), (gst_buffer_store_get_buffer):
* gst/elements/gstfakesink.c: (gst_fakesink_class_init),
(gst_fakesink_render):
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init):
* gst/elements/gstfilesrc.c: (gst_mmap_buffer_get_type),
(gst_mmap_buffer_class_init), (gst_mmap_buffer_init),
(gst_mmap_buffer_finalize), (gst_filesrc_map_region),
(gst_filesrc_create_read):
* gst/elements/gstidentity.c: (gst_identity_class_init):
* gst/elements/gsttypefindelement.c:
(gst_type_find_element_src_event), (free_entry_buffers),
(gst_type_find_element_handle_event):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_header_from_buffer):
* libs/gst/dataprotocol/dataprotocol.h:
* libs/gst/dataprotocol/dp-private.h:
2005-05-16 20:21:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static GstEvent *
|
|
|
|
_gst_event_copy (GstEvent * event)
|
|
|
|
{
|
|
|
|
GstEvent *copy;
|
|
|
|
|
|
|
|
copy = gst_event_new (event->type);
|
|
|
|
|
|
|
|
copy->timestamp = event->timestamp;
|
|
|
|
if (event->src) {
|
|
|
|
copy->src = gst_object_ref (event->src);
|
|
|
|
}
|
|
|
|
|
|
|
|
memcpy (©->event_data, &event->event_data, sizeof (event->event_data));
|
|
|
|
|
|
|
|
/* FIXME copy/ref additional fields */
|
|
|
|
switch (GST_EVENT_TYPE (event)) {
|
|
|
|
case GST_EVENT_TAG:
|
|
|
|
copy->event_data.structure.structure =
|
|
|
|
gst_tag_list_copy ((GstTagList *) event->event_data.structure.
|
|
|
|
structure);
|
|
|
|
break;
|
|
|
|
case GST_EVENT_NAVIGATION:
|
|
|
|
copy->event_data.structure.structure =
|
|
|
|
gst_structure_copy (event->event_data.structure.structure);
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return copy;
|
2002-07-08 19:22:02 +00:00
|
|
|
}
|
|
|
|
|
2002-12-30 17:42:11 +00:00
|
|
|
/**
|
|
|
|
* gst_event_masks_contains:
|
|
|
|
* @masks: The eventmask array to search
|
|
|
|
* @mask: the event mask to find
|
|
|
|
*
|
|
|
|
* See if the given eventmask is inside the eventmask array.
|
|
|
|
*
|
|
|
|
* Returns: TRUE if the eventmask is found inside the array
|
|
|
|
*/
|
|
|
|
gboolean
|
2004-03-13 15:27:01 +00:00
|
|
|
gst_event_masks_contains (const GstEventMask * masks, GstEventMask * mask)
|
2002-12-30 17:42:11 +00:00
|
|
|
{
|
|
|
|
g_return_val_if_fail (mask != NULL, FALSE);
|
|
|
|
|
|
|
|
if (!masks)
|
|
|
|
return FALSE;
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2002-12-30 17:42:11 +00:00
|
|
|
while (masks->type) {
|
|
|
|
if (masks->type == mask->type &&
|
2004-03-15 19:27:17 +00:00
|
|
|
(masks->flags & mask->flags) == mask->flags)
|
2002-12-30 17:42:11 +00:00
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
masks++;
|
|
|
|
}
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2002-07-08 19:22:02 +00:00
|
|
|
/**
|
|
|
|
* gst_event_new:
|
|
|
|
* @type: The type of the new event
|
|
|
|
*
|
|
|
|
* Allocate a new event of the given type.
|
|
|
|
*
|
|
|
|
* Returns: A new event.
|
|
|
|
*/
|
2004-03-13 15:27:01 +00:00
|
|
|
GstEvent *
|
2002-07-08 19:22:02 +00:00
|
|
|
gst_event_new (GstEventType type)
|
|
|
|
{
|
|
|
|
GstEvent *event;
|
|
|
|
|
check/Makefile.am: remove GstData checks
Original commit message from CVS:
* check/Makefile.am: remove GstData checks
* check/gst-libs/gdp.c: (START_TEST): fix for API changes
* gst/Makefile.am: add miniobject, remove data
* gst/gst.h: add miniobject, remove data
* gst/gstdata.c: remove
* gst/gstdata.h: remove
* gst/gstdata_private.h: remove
* gst/gsttypes.h: remove GstEvent and GstMessage
* gst/gstelement.c: (gst_element_post_message): fix for API changes
* gst/gstmarshal.list: change BOXED -> OBJECT
Implement GstMiniObject.
* gst/gstminiobject.c:
* gst/gstminiobject.h:
Modify to be subclasses of GstMiniObject.
* gst/gstbuffer.c: (_gst_buffer_initialize), (gst_buffer_get_type),
(gst_buffer_class_init), (gst_buffer_finalize), (_gst_buffer_copy),
(gst_buffer_init), (gst_buffer_new), (gst_buffer_new_and_alloc),
(gst_subbuffer_get_type), (gst_subbuffer_init),
(gst_buffer_create_sub), (gst_buffer_is_span_fast),
(gst_buffer_span):
* gst/gstbuffer.h:
* gst/gstevent.c: (_gst_event_initialize), (gst_event_get_type),
(gst_event_class_init), (gst_event_init), (gst_event_finalize),
(_gst_event_copy), (gst_event_new):
* gst/gstevent.h:
* gst/gstmessage.c: (_gst_message_initialize),
(gst_message_get_type), (gst_message_class_init),
(gst_message_init), (gst_message_finalize), (_gst_message_copy),
(gst_message_new), (gst_message_new_error),
(gst_message_new_warning), (gst_message_new_tag),
(gst_message_new_state_changed), (gst_message_new_application):
* gst/gstmessage.h:
* gst/gstprobe.c: (gst_probe_perform),
(gst_probe_dispatcher_dispatch):
* gst/gstprobe.h:
* gst/gstquery.c: (_gst_query_initialize), (gst_query_get_type),
(gst_query_class_init), (gst_query_finalize), (gst_query_init),
(_gst_query_copy), (gst_query_new):
Update elements for GstData -> GstMiniObject changes
* gst/gstquery.h:
* gst/gstqueue.c: (gst_queue_finalize), (gst_queue_locked_flush),
(gst_queue_chain), (gst_queue_loop):
* gst/elements/gstbufferstore.c:
(gst_buffer_store_add_buffer_func),
(gst_buffer_store_cleared_func), (gst_buffer_store_get_buffer):
* gst/elements/gstfakesink.c: (gst_fakesink_class_init),
(gst_fakesink_render):
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init):
* gst/elements/gstfilesrc.c: (gst_mmap_buffer_get_type),
(gst_mmap_buffer_class_init), (gst_mmap_buffer_init),
(gst_mmap_buffer_finalize), (gst_filesrc_map_region),
(gst_filesrc_create_read):
* gst/elements/gstidentity.c: (gst_identity_class_init):
* gst/elements/gsttypefindelement.c:
(gst_type_find_element_src_event), (free_entry_buffers),
(gst_type_find_element_handle_event):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_header_from_buffer):
* libs/gst/dataprotocol/dataprotocol.h:
* libs/gst/dataprotocol/dp-private.h:
2005-05-16 20:21:55 +00:00
|
|
|
event = (GstEvent *) gst_mini_object_new (GST_TYPE_EVENT);
|
2003-02-02 19:40:10 +00:00
|
|
|
|
2004-07-07 16:50:30 +00:00
|
|
|
GST_CAT_INFO (GST_CAT_EVENT, "creating new event type %d: %p", type, event);
|
2002-07-08 19:22:02 +00:00
|
|
|
|
|
|
|
GST_EVENT_TYPE (event) = type;
|
|
|
|
|
|
|
|
return event;
|
2001-10-17 10:21:27 +00:00
|
|
|
}
|
|
|
|
|
2001-10-21 18:00:31 +00:00
|
|
|
/**
|
|
|
|
* gst_event_new_seek:
|
|
|
|
* @type: The type of the seek event
|
|
|
|
* @offset: The offset of the seek
|
|
|
|
*
|
|
|
|
* Allocate a new seek event with the given parameters.
|
|
|
|
*
|
|
|
|
* Returns: A new seek event.
|
|
|
|
*/
|
2004-03-13 15:27:01 +00:00
|
|
|
GstEvent *
|
2002-05-26 21:54:27 +00:00
|
|
|
gst_event_new_seek (GstSeekType type, gint64 offset)
|
2001-10-17 10:21:27 +00:00
|
|
|
{
|
|
|
|
GstEvent *event;
|
|
|
|
|
|
|
|
event = gst_event_new (GST_EVENT_SEEK);
|
2002-07-08 19:22:02 +00:00
|
|
|
|
2001-10-17 10:21:27 +00:00
|
|
|
GST_EVENT_SEEK_TYPE (event) = type;
|
|
|
|
GST_EVENT_SEEK_OFFSET (event) = offset;
|
2002-10-31 18:41:18 +00:00
|
|
|
GST_EVENT_SEEK_ENDOFFSET (event) = -1;
|
2001-10-17 10:21:27 +00:00
|
|
|
|
|
|
|
return event;
|
|
|
|
}
|
2001-12-18 19:03:07 +00:00
|
|
|
|
2002-06-12 22:26:36 +00:00
|
|
|
/**
|
2003-12-02 04:28:26 +00:00
|
|
|
* gst_event_new_discontinuous_valist:
|
2002-06-12 22:26:36 +00:00
|
|
|
* @new_media: A flag indicating a new media type starts
|
|
|
|
* @format1: The format of the discont value
|
2003-07-16 19:25:11 +00:00
|
|
|
* @var_args: more discont values and formats
|
2002-06-12 22:26:36 +00:00
|
|
|
*
|
2003-04-26 01:54:01 +00:00
|
|
|
* Allocate a new discontinuous event with the given format/value pairs. Note
|
|
|
|
* that the values are of type gint64 - you may not use simple integers such
|
|
|
|
* as "0" when calling this function, always cast them like "(gint64) 0".
|
|
|
|
* Terminate the list with #GST_FORMAT_UNDEFINED.
|
2002-06-12 22:26:36 +00:00
|
|
|
*
|
|
|
|
* Returns: A new discontinuous event.
|
|
|
|
*/
|
2004-03-13 15:27:01 +00:00
|
|
|
GstEvent *
|
2005-03-31 09:46:28 +00:00
|
|
|
gst_event_new_discontinuous_valist (gdouble rate, GstFormat format1,
|
2004-03-13 15:27:01 +00:00
|
|
|
va_list var_args)
|
2002-05-26 21:54:27 +00:00
|
|
|
{
|
|
|
|
GstEvent *event;
|
|
|
|
gint count = 0;
|
|
|
|
|
|
|
|
event = gst_event_new (GST_EVENT_DISCONTINUOUS);
|
2005-03-31 09:46:28 +00:00
|
|
|
GST_EVENT_DISCONT_RATE (event) = rate;
|
2002-05-26 21:54:27 +00:00
|
|
|
|
2003-06-05 22:01:13 +00:00
|
|
|
while (format1 != GST_FORMAT_UNDEFINED && count < 8) {
|
2002-05-26 21:54:27 +00:00
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
GST_EVENT_DISCONT_OFFSET (event, count).format =
|
2004-03-15 19:27:17 +00:00
|
|
|
format1 & GST_SEEK_FORMAT_MASK;
|
2005-03-31 09:46:28 +00:00
|
|
|
GST_EVENT_DISCONT_OFFSET (event, count).start_value =
|
|
|
|
va_arg (var_args, gint64);
|
|
|
|
GST_EVENT_DISCONT_OFFSET (event, count).end_value =
|
|
|
|
va_arg (var_args, gint64);
|
2002-05-26 21:54:27 +00:00
|
|
|
|
2003-04-26 01:54:01 +00:00
|
|
|
format1 = va_arg (var_args, GstFormat);
|
2002-05-26 21:54:27 +00:00
|
|
|
|
|
|
|
count++;
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_EVENT_DISCONT_OFFSET_LEN (event) = count;
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2002-05-26 21:54:27 +00:00
|
|
|
return event;
|
|
|
|
}
|
|
|
|
|
2003-07-16 19:25:11 +00:00
|
|
|
/**
|
|
|
|
* gst_event_new_discontinuous:
|
|
|
|
* @new_media: A flag indicating a new media type starts
|
|
|
|
* @format1: The format of the discont value
|
|
|
|
* @...: more discont values and formats
|
|
|
|
*
|
|
|
|
* Allocate a new discontinuous event with the given format/value pairs. Note
|
|
|
|
* that the values are of type gint64 - you may not use simple integers such
|
|
|
|
* as "0" when calling this function, always cast them like "(gint64) 0".
|
|
|
|
* Terminate the list with #GST_FORMAT_UNDEFINED.
|
|
|
|
*
|
|
|
|
* Returns: A new discontinuous event.
|
|
|
|
*/
|
2004-03-13 15:27:01 +00:00
|
|
|
GstEvent *
|
2005-03-31 09:46:28 +00:00
|
|
|
gst_event_new_discontinuous (gdouble rate, GstFormat format1, ...)
|
2003-07-16 19:25:11 +00:00
|
|
|
{
|
|
|
|
va_list var_args;
|
|
|
|
GstEvent *event;
|
|
|
|
|
|
|
|
va_start (var_args, format1);
|
|
|
|
|
2005-03-31 09:46:28 +00:00
|
|
|
event = gst_event_new_discontinuous_valist (rate, format1, var_args);
|
2003-07-16 19:25:11 +00:00
|
|
|
|
|
|
|
va_end (var_args);
|
|
|
|
|
|
|
|
return event;
|
|
|
|
}
|
|
|
|
|
2002-06-12 22:26:36 +00:00
|
|
|
/**
|
|
|
|
* gst_event_discont_get_value:
|
|
|
|
* @event: The event to query
|
2004-04-21 10:06:37 +00:00
|
|
|
* @format: The format of the discontinuous value
|
2002-06-12 22:26:36 +00:00
|
|
|
* @value: A pointer to the value
|
|
|
|
*
|
2004-04-21 10:06:37 +00:00
|
|
|
* Get the value for the given format in the discontinous event.
|
2002-06-12 22:26:36 +00:00
|
|
|
*
|
2004-04-21 10:06:37 +00:00
|
|
|
* Returns: TRUE if the discontinuous event carries the specified
|
|
|
|
* format/value pair.
|
2002-06-12 22:26:36 +00:00
|
|
|
*/
|
2002-05-26 21:54:27 +00:00
|
|
|
gboolean
|
2005-03-31 09:46:28 +00:00
|
|
|
gst_event_discont_get_value (GstEvent * event, GstFormat format,
|
|
|
|
gint64 * start_value, gint64 * end_value)
|
2002-05-26 21:54:27 +00:00
|
|
|
{
|
|
|
|
gint i, n;
|
|
|
|
|
2002-11-22 23:15:14 +00:00
|
|
|
g_return_val_if_fail (event != NULL, FALSE);
|
2002-05-26 21:54:27 +00:00
|
|
|
|
|
|
|
n = GST_EVENT_DISCONT_OFFSET_LEN (event);
|
|
|
|
|
|
|
|
for (i = 0; i < n; i++) {
|
2004-03-13 15:27:01 +00:00
|
|
|
if (GST_EVENT_DISCONT_OFFSET (event, i).format == format) {
|
2005-04-28 16:28:28 +00:00
|
|
|
if (start_value)
|
|
|
|
*start_value = GST_EVENT_DISCONT_OFFSET (event, i).start_value;
|
|
|
|
if (end_value)
|
|
|
|
*end_value = GST_EVENT_DISCONT_OFFSET (event, i).end_value;
|
2002-05-26 21:54:27 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
}
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2002-05-26 21:54:27 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-07-08 19:22:02 +00:00
|
|
|
/**
|
|
|
|
* gst_event_new_size:
|
|
|
|
* @format: The format of the size value
|
|
|
|
* @value: The value of the size event
|
|
|
|
*
|
|
|
|
* Create a new size event with the given values.
|
|
|
|
*
|
|
|
|
* Returns: The new size event.
|
|
|
|
*/
|
2004-03-13 15:27:01 +00:00
|
|
|
GstEvent *
|
2002-06-13 22:27:40 +00:00
|
|
|
gst_event_new_size (GstFormat format, gint64 value)
|
|
|
|
{
|
|
|
|
GstEvent *event;
|
|
|
|
|
|
|
|
event = gst_event_new (GST_EVENT_SIZE);
|
2002-07-08 19:22:02 +00:00
|
|
|
|
2002-06-13 22:27:40 +00:00
|
|
|
GST_EVENT_SIZE_FORMAT (event) = format;
|
|
|
|
GST_EVENT_SIZE_VALUE (event) = value;
|
2004-03-13 15:27:01 +00:00
|
|
|
|
2002-06-13 22:27:40 +00:00
|
|
|
return event;
|
|
|
|
}
|
|
|
|
|
2002-05-26 21:54:27 +00:00
|
|
|
|
2002-07-13 23:12:22 +00:00
|
|
|
/**
|
|
|
|
* gst_event_new_segment_seek:
|
|
|
|
* @type: The type of the seek event
|
|
|
|
* @start: The start offset of the seek
|
|
|
|
* @stop: The stop offset of the seek
|
|
|
|
*
|
|
|
|
* Allocate a new segment seek event with the given parameters.
|
|
|
|
*
|
|
|
|
* Returns: A new segment seek event.
|
|
|
|
*/
|
2004-03-13 15:27:01 +00:00
|
|
|
GstEvent *
|
2002-07-13 23:12:22 +00:00
|
|
|
gst_event_new_segment_seek (GstSeekType type, gint64 start, gint64 stop)
|
|
|
|
{
|
|
|
|
GstEvent *event;
|
|
|
|
|
2005-03-21 17:34:02 +00:00
|
|
|
g_return_val_if_fail (start < stop || stop == -1, NULL);
|
2002-10-31 18:41:18 +00:00
|
|
|
|
2005-03-21 17:34:02 +00:00
|
|
|
event = gst_event_new (GST_EVENT_SEEK);
|
2002-07-13 23:12:22 +00:00
|
|
|
|
|
|
|
GST_EVENT_SEEK_TYPE (event) = type;
|
|
|
|
GST_EVENT_SEEK_OFFSET (event) = start;
|
|
|
|
GST_EVENT_SEEK_ENDOFFSET (event) = stop;
|
|
|
|
|
|
|
|
return event;
|
|
|
|
}
|
2005-01-08 18:10:50 +00:00
|
|
|
|
|
|
|
/**
|
2005-03-21 17:34:02 +00:00
|
|
|
* gst_event_new_flush:
|
|
|
|
* @done: Indicates the end of the flush
|
2005-01-08 18:10:50 +00:00
|
|
|
*
|
2005-03-21 17:34:02 +00:00
|
|
|
* Allocate a new flush event.
|
2005-01-08 18:10:50 +00:00
|
|
|
*
|
2005-03-21 17:34:02 +00:00
|
|
|
* Returns: A new flush event.
|
2005-01-08 18:10:50 +00:00
|
|
|
*/
|
|
|
|
GstEvent *
|
2005-03-21 17:34:02 +00:00
|
|
|
gst_event_new_flush (gboolean done)
|
2005-01-08 18:10:50 +00:00
|
|
|
{
|
2005-03-21 17:34:02 +00:00
|
|
|
GstEvent *event;
|
2005-01-08 18:10:50 +00:00
|
|
|
|
2005-03-21 17:34:02 +00:00
|
|
|
event = gst_event_new (GST_EVENT_FLUSH);
|
|
|
|
GST_EVENT_FLUSH_DONE (event) = done;
|
2005-01-08 18:10:50 +00:00
|
|
|
|
2005-03-21 17:34:02 +00:00
|
|
|
return event;
|
2005-01-08 18:10:50 +00:00
|
|
|
}
|