2002-12-30 17:42:11 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
* 2000 Wim Taymans <wim.taymans@chello.be>
|
2005-03-07 18:27:42 +00:00
|
|
|
* 2005 Wim Taymans <wim@fluendo.com>
|
2011-05-10 13:33:53 +00:00
|
|
|
* 2011 Wim Taymans <wim.taymans@gmail.com>
|
2002-12-30 17:42:11 +00:00
|
|
|
*
|
2003-07-16 15:49:40 +00:00
|
|
|
* gstquery.h: GstQuery API declaration
|
2002-12-30 17:42:11 +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
|
2012-11-03 20:44:48 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2002-12-30 17:42:11 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GST_QUERY_H__
|
|
|
|
#define __GST_QUERY_H__
|
|
|
|
|
2003-01-01 03:09:39 +00:00
|
|
|
#include <glib.h>
|
2002-12-30 17:42:11 +00:00
|
|
|
|
2005-03-07 18:27:42 +00:00
|
|
|
#include <gst/gstiterator.h>
|
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
|
|
|
#include <gst/gstminiobject.h>
|
gst/gstquery.h
Original commit message from CVS:
2005-05-06 Andy Wingo <wingo@pobox.com>
* gst/gstquery.h
* gst/gstquery.c (_gst_query_initialize): Extend GstQuery from
GstData, init a memchunk.
(standard_definitions): Add a few query types, deprecate a few.
(gst_query_get_type): New proc.
(_gst_query_copy, _gst_query_free, gst_query_new): GstData
implementation.
(gst_query_new_application, gst_query_get_structure): New public
procs.
* docs/design/draft-query.txt: Removed LINKS from the query types,
because all the rest can be dispatched to other pads -- seemed
ugly to have a query that couldn't be dispatched. internal_links
is fine as a pad method.
* gst/gstpad.h: Add query2 as a pad method, add the new functions
in gstpad.c, but maintain binary compatibility for the moment.
Will fix before 0.9 is out.
* gst/gstqueryutils.c:
* gst/gstqueryutils.h: New files, implement 3 methods for each
query type: parse_query, parse_response, and set. Probably need an
allocator as well.
* gst/gst.h: Add gstquery.h and gstqueryutils.h to the list.
* gst/elements/gstfilesink.c (gst_filesink_query2):
* gst/base/gstbasesrc.c (gst_basesrc_query2): Replace old query,
query_types, and formats methods.
* gst/gstpad.c (gst_pad_query2, gst_pad_query2_default)
(gst_pad_set_query2_function): New functions.
(gst_real_pad_init): Set query2_default as the default query2
function. Basically just dispatches to internally linked pads.
Needs review!
* gst/gstdata_private.h (_GST_DATA_INIT): Set data->refcount to 1
without using the atomic operations. Only one thread can possibly
be accessing the data at this point. Changed so as to avoid
gst_atomic operations.
2005-05-06 21:41:22 +00:00
|
|
|
#include <gst/gststructure.h>
|
2005-05-09 10:53:13 +00:00
|
|
|
#include <gst/gstformat.h>
|
2011-04-28 13:31:48 +00:00
|
|
|
#include <gst/gstpad.h>
|
2012-07-09 14:02:50 +00:00
|
|
|
#include <gst/gstallocator.h>
|
2012-04-02 19:15:09 +00:00
|
|
|
#include <gst/gsttoc.h>
|
2013-03-28 14:35:13 +00:00
|
|
|
#include <gst/gstcontext.h>
|
2005-03-07 18:27:42 +00:00
|
|
|
|
2004-03-15 14:43:35 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2012-03-14 13:51:16 +00:00
|
|
|
typedef struct _GstQuery GstQuery;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GstQueryTypeFlags:
|
|
|
|
* @GST_QUERY_TYPE_UPSTREAM: Set if the query can travel upstream.
|
|
|
|
* @GST_QUERY_TYPE_DOWNSTREAM: Set if the query can travel downstream.
|
|
|
|
* @GST_QUERY_TYPE_SERIALIZED: Set if the query should be serialized with data
|
|
|
|
* flow.
|
|
|
|
*
|
|
|
|
* #GstQueryTypeFlags indicate the aspects of the different #GstQueryType
|
|
|
|
* values. You can get the type flags of a #GstQueryType with the
|
|
|
|
* gst_query_type_get_flags() function.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GST_QUERY_TYPE_UPSTREAM = 1 << 0,
|
|
|
|
GST_QUERY_TYPE_DOWNSTREAM = 1 << 1,
|
|
|
|
GST_QUERY_TYPE_SERIALIZED = 1 << 2
|
|
|
|
} GstQueryTypeFlags;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_QUERY_TYPE_BOTH:
|
|
|
|
*
|
|
|
|
* The same thing as #GST_QUERY_TYPE_UPSTREAM | #GST_QUERY_TYPE_DOWNSTREAM.
|
|
|
|
*/
|
|
|
|
#define GST_QUERY_TYPE_BOTH \
|
|
|
|
(GST_QUERY_TYPE_UPSTREAM | GST_QUERY_TYPE_DOWNSTREAM)
|
|
|
|
|
|
|
|
#define GST_QUERY_NUM_SHIFT (8)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_QUERY_MAKE_TYPE:
|
|
|
|
* @num: the query number to create
|
|
|
|
* @flags: the query flags
|
|
|
|
*
|
|
|
|
* when making custom query types, use this macro with the num and
|
|
|
|
* the given flags
|
|
|
|
*/
|
|
|
|
#define GST_QUERY_MAKE_TYPE(num,flags) \
|
|
|
|
(((num) << GST_QUERY_NUM_SHIFT) | (flags))
|
|
|
|
|
|
|
|
#define FLAG(name) GST_QUERY_TYPE_##name
|
|
|
|
|
|
|
|
|
2005-08-29 21:41:02 +00:00
|
|
|
/**
|
|
|
|
* GstQueryType:
|
2012-03-14 13:51:16 +00:00
|
|
|
* @GST_QUERY_UNKNOWN: unknown query type
|
gst/: API change fix.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_handle_object), (gst_base_sink_query), (do_playing):
* gst/base/gstbasesrc.c: (gst_base_src_query):
* gst/elements/gstfilesink.c: (gst_file_sink_query):
* gst/elements/gsttypefindelement.c:
(gst_type_find_handle_src_query), (find_element_get_length),
(gst_type_find_element_activate):
API change fix.
* gst/gstquery.c: (gst_query_new_position),
(gst_query_set_position), (gst_query_parse_position),
(gst_query_new_duration), (gst_query_set_duration),
(gst_query_parse_duration), (gst_query_set_segment),
(gst_query_parse_segment):
* gst/gstquery.h:
Bundling query position/duration is not a good idea since duration
does not change much and we don't want to recalculate it for every
position query, so they are separated again..
Base value in segment query is not needed.
* gst/gstqueue.c: (gst_queue_handle_src_query):
* gst/gstutils.c: (gst_element_query_position),
(gst_element_query_duration), (gst_pad_query_position),
(gst_pad_query_duration):
* gst/gstutils.h:
Updates for query API change.
Added some docs here and there.
2005-10-19 15:50:10 +00:00
|
|
|
* @GST_QUERY_POSITION: current position in stream
|
|
|
|
* @GST_QUERY_DURATION: total duration of the stream
|
2005-08-29 21:41:02 +00:00
|
|
|
* @GST_QUERY_LATENCY: latency of stream
|
|
|
|
* @GST_QUERY_JITTER: current jitter of stream
|
|
|
|
* @GST_QUERY_RATE: current rate of the stream
|
2005-09-22 16:51:27 +00:00
|
|
|
* @GST_QUERY_SEEKING: seeking capabilities
|
|
|
|
* @GST_QUERY_SEGMENT: segment start/stop positions
|
2005-11-10 10:17:01 +00:00
|
|
|
* @GST_QUERY_CONVERT: convert values between formats
|
2005-08-29 21:41:02 +00:00
|
|
|
* @GST_QUERY_FORMATS: query supported formats for convert
|
2012-07-10 09:46:41 +00:00
|
|
|
* @GST_QUERY_BUFFERING: query available media for efficient seeking.
|
|
|
|
* @GST_QUERY_CUSTOM: a custom application or element defined query.
|
|
|
|
* @GST_QUERY_URI: query the URI of the source or sink.
|
2011-04-28 14:20:22 +00:00
|
|
|
* @GST_QUERY_ALLOCATION: the buffer allocation properties
|
2011-05-24 10:52:09 +00:00
|
|
|
* @GST_QUERY_SCHEDULING: the scheduling properties
|
2011-11-09 16:36:00 +00:00
|
|
|
* @GST_QUERY_ACCEPT_CAPS: the accept caps query
|
2011-11-14 10:26:17 +00:00
|
|
|
* @GST_QUERY_CAPS: the caps query
|
2012-03-14 15:14:12 +00:00
|
|
|
* @GST_QUERY_DRAIN: wait till all serialized data is consumed downstream
|
2013-03-28 14:35:13 +00:00
|
|
|
* @GST_QUERY_CONTEXT: query the pipeline-local context from downstream
|
2005-08-29 21:41:02 +00:00
|
|
|
*
|
|
|
|
* Standard predefined Query types
|
|
|
|
*/
|
2005-11-19 18:57:00 +00:00
|
|
|
/* NOTE: don't forget to update the table in gstquery.c when changing
|
|
|
|
* this enum */
|
2004-03-15 14:43:35 +00:00
|
|
|
typedef enum {
|
2012-03-14 13:51:16 +00:00
|
|
|
GST_QUERY_UNKNOWN = GST_QUERY_MAKE_TYPE (0, 0),
|
|
|
|
GST_QUERY_POSITION = GST_QUERY_MAKE_TYPE (10, FLAG(BOTH)),
|
|
|
|
GST_QUERY_DURATION = GST_QUERY_MAKE_TYPE (20, FLAG(BOTH)),
|
|
|
|
GST_QUERY_LATENCY = GST_QUERY_MAKE_TYPE (30, FLAG(BOTH)),
|
|
|
|
GST_QUERY_JITTER = GST_QUERY_MAKE_TYPE (40, FLAG(BOTH)),
|
|
|
|
GST_QUERY_RATE = GST_QUERY_MAKE_TYPE (50, FLAG(BOTH)),
|
|
|
|
GST_QUERY_SEEKING = GST_QUERY_MAKE_TYPE (60, FLAG(BOTH)),
|
|
|
|
GST_QUERY_SEGMENT = GST_QUERY_MAKE_TYPE (70, FLAG(BOTH)),
|
|
|
|
GST_QUERY_CONVERT = GST_QUERY_MAKE_TYPE (80, FLAG(BOTH)),
|
|
|
|
GST_QUERY_FORMATS = GST_QUERY_MAKE_TYPE (90, FLAG(BOTH)),
|
|
|
|
GST_QUERY_BUFFERING = GST_QUERY_MAKE_TYPE (110, FLAG(BOTH)),
|
|
|
|
GST_QUERY_CUSTOM = GST_QUERY_MAKE_TYPE (120, FLAG(BOTH)),
|
|
|
|
GST_QUERY_URI = GST_QUERY_MAKE_TYPE (130, FLAG(BOTH)),
|
|
|
|
GST_QUERY_ALLOCATION = GST_QUERY_MAKE_TYPE (140, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)),
|
|
|
|
GST_QUERY_SCHEDULING = GST_QUERY_MAKE_TYPE (150, FLAG(UPSTREAM)),
|
|
|
|
GST_QUERY_ACCEPT_CAPS = GST_QUERY_MAKE_TYPE (160, FLAG(BOTH)),
|
2012-03-14 15:14:12 +00:00
|
|
|
GST_QUERY_CAPS = GST_QUERY_MAKE_TYPE (170, FLAG(BOTH)),
|
2013-03-28 14:35:13 +00:00
|
|
|
GST_QUERY_DRAIN = GST_QUERY_MAKE_TYPE (180, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)),
|
|
|
|
GST_QUERY_CONTEXT = GST_QUERY_MAKE_TYPE (190, FLAG(DOWNSTREAM))
|
2004-03-15 14:43:35 +00:00
|
|
|
} GstQueryType;
|
2012-03-14 13:51:16 +00:00
|
|
|
#undef FLAG
|
2003-01-01 03:09:39 +00:00
|
|
|
|
2009-11-28 23:21:24 +00:00
|
|
|
#define GST_TYPE_QUERY (gst_query_get_type())
|
2009-12-07 19:32:12 +00:00
|
|
|
#define GST_IS_QUERY(obj) (GST_IS_MINI_OBJECT_TYPE (obj, GST_TYPE_QUERY))
|
2009-11-28 23:21:24 +00:00
|
|
|
#define GST_QUERY_CAST(obj) ((GstQuery*)(obj))
|
|
|
|
#define GST_QUERY(obj) (GST_QUERY_CAST(obj))
|
gst/gstquery.h
Original commit message from CVS:
2005-05-06 Andy Wingo <wingo@pobox.com>
* gst/gstquery.h
* gst/gstquery.c (_gst_query_initialize): Extend GstQuery from
GstData, init a memchunk.
(standard_definitions): Add a few query types, deprecate a few.
(gst_query_get_type): New proc.
(_gst_query_copy, _gst_query_free, gst_query_new): GstData
implementation.
(gst_query_new_application, gst_query_get_structure): New public
procs.
* docs/design/draft-query.txt: Removed LINKS from the query types,
because all the rest can be dispatched to other pads -- seemed
ugly to have a query that couldn't be dispatched. internal_links
is fine as a pad method.
* gst/gstpad.h: Add query2 as a pad method, add the new functions
in gstpad.c, but maintain binary compatibility for the moment.
Will fix before 0.9 is out.
* gst/gstqueryutils.c:
* gst/gstqueryutils.h: New files, implement 3 methods for each
query type: parse_query, parse_response, and set. Probably need an
allocator as well.
* gst/gst.h: Add gstquery.h and gstqueryutils.h to the list.
* gst/elements/gstfilesink.c (gst_filesink_query2):
* gst/base/gstbasesrc.c (gst_basesrc_query2): Replace old query,
query_types, and formats methods.
* gst/gstpad.c (gst_pad_query2, gst_pad_query2_default)
(gst_pad_set_query2_function): New functions.
(gst_real_pad_init): Set query2_default as the default query2
function. Basically just dispatches to internally linked pads.
Needs review!
* gst/gstdata_private.h (_GST_DATA_INIT): Set data->refcount to 1
without using the atomic operations. Only one thread can possibly
be accessing the data at this point. Changed so as to avoid
gst_atomic operations.
2005-05-06 21:41:22 +00:00
|
|
|
|
2006-02-13 11:19:32 +00:00
|
|
|
/**
|
|
|
|
* GST_QUERY_TYPE:
|
|
|
|
* @query: the query to query
|
|
|
|
*
|
|
|
|
* Get the #GstQueryType of the query.
|
|
|
|
*/
|
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
|
|
|
#define GST_QUERY_TYPE(query) (((GstQuery*)(query))->type)
|
gst/gstquery.h
Original commit message from CVS:
2005-05-06 Andy Wingo <wingo@pobox.com>
* gst/gstquery.h
* gst/gstquery.c (_gst_query_initialize): Extend GstQuery from
GstData, init a memchunk.
(standard_definitions): Add a few query types, deprecate a few.
(gst_query_get_type): New proc.
(_gst_query_copy, _gst_query_free, gst_query_new): GstData
implementation.
(gst_query_new_application, gst_query_get_structure): New public
procs.
* docs/design/draft-query.txt: Removed LINKS from the query types,
because all the rest can be dispatched to other pads -- seemed
ugly to have a query that couldn't be dispatched. internal_links
is fine as a pad method.
* gst/gstpad.h: Add query2 as a pad method, add the new functions
in gstpad.c, but maintain binary compatibility for the moment.
Will fix before 0.9 is out.
* gst/gstqueryutils.c:
* gst/gstqueryutils.h: New files, implement 3 methods for each
query type: parse_query, parse_response, and set. Probably need an
allocator as well.
* gst/gst.h: Add gstquery.h and gstqueryutils.h to the list.
* gst/elements/gstfilesink.c (gst_filesink_query2):
* gst/base/gstbasesrc.c (gst_basesrc_query2): Replace old query,
query_types, and formats methods.
* gst/gstpad.c (gst_pad_query2, gst_pad_query2_default)
(gst_pad_set_query2_function): New functions.
(gst_real_pad_init): Set query2_default as the default query2
function. Basically just dispatches to internally linked pads.
Needs review!
* gst/gstdata_private.h (_GST_DATA_INIT): Set data->refcount to 1
without using the atomic operations. Only one thread can possibly
be accessing the data at this point. Changed so as to avoid
gst_atomic operations.
2005-05-06 21:41:22 +00:00
|
|
|
|
2006-02-13 11:19:32 +00:00
|
|
|
/**
|
|
|
|
* GST_QUERY_TYPE_NAME:
|
|
|
|
* @query: the query to query
|
|
|
|
*
|
|
|
|
* Get a constant string representation of the #GstQueryType of the query.
|
|
|
|
*/
|
|
|
|
#define GST_QUERY_TYPE_NAME(query) (gst_query_type_get_name(GST_QUERY_TYPE(query)))
|
|
|
|
|
2012-03-14 13:51:16 +00:00
|
|
|
/**
|
|
|
|
* GST_QUERY_IS_UPSTREAM:
|
|
|
|
* @ev: the query to query
|
|
|
|
*
|
|
|
|
* Check if an query can travel upstream.
|
|
|
|
*/
|
|
|
|
#define GST_QUERY_IS_UPSTREAM(ev) !!(GST_QUERY_TYPE (ev) & GST_QUERY_TYPE_UPSTREAM)
|
|
|
|
/**
|
|
|
|
* GST_QUERY_IS_DOWNSTREAM:
|
|
|
|
* @ev: the query to query
|
|
|
|
*
|
|
|
|
* Check if an query can travel downstream.
|
|
|
|
*/
|
|
|
|
#define GST_QUERY_IS_DOWNSTREAM(ev) !!(GST_QUERY_TYPE (ev) & GST_QUERY_TYPE_DOWNSTREAM)
|
|
|
|
/**
|
|
|
|
* GST_QUERY_IS_SERIALIZED:
|
|
|
|
* @ev: the query to query
|
|
|
|
*
|
|
|
|
* Check if an query is serialized with the data stream.
|
|
|
|
*/
|
|
|
|
#define GST_QUERY_IS_SERIALIZED(ev) !!(GST_QUERY_TYPE (ev) & GST_QUERY_TYPE_SERIALIZED)
|
|
|
|
|
2006-02-13 11:19:32 +00:00
|
|
|
|
2005-11-24 09:44:07 +00:00
|
|
|
/**
|
|
|
|
* GstQuery:
|
|
|
|
* @mini_object: The parent #GstMiniObject type
|
|
|
|
* @type: the #GstQueryType
|
|
|
|
*
|
|
|
|
* The #GstQuery structure.
|
|
|
|
*/
|
gst/gstquery.h
Original commit message from CVS:
2005-05-06 Andy Wingo <wingo@pobox.com>
* gst/gstquery.h
* gst/gstquery.c (_gst_query_initialize): Extend GstQuery from
GstData, init a memchunk.
(standard_definitions): Add a few query types, deprecate a few.
(gst_query_get_type): New proc.
(_gst_query_copy, _gst_query_free, gst_query_new): GstData
implementation.
(gst_query_new_application, gst_query_get_structure): New public
procs.
* docs/design/draft-query.txt: Removed LINKS from the query types,
because all the rest can be dispatched to other pads -- seemed
ugly to have a query that couldn't be dispatched. internal_links
is fine as a pad method.
* gst/gstpad.h: Add query2 as a pad method, add the new functions
in gstpad.c, but maintain binary compatibility for the moment.
Will fix before 0.9 is out.
* gst/gstqueryutils.c:
* gst/gstqueryutils.h: New files, implement 3 methods for each
query type: parse_query, parse_response, and set. Probably need an
allocator as well.
* gst/gst.h: Add gstquery.h and gstqueryutils.h to the list.
* gst/elements/gstfilesink.c (gst_filesink_query2):
* gst/base/gstbasesrc.c (gst_basesrc_query2): Replace old query,
query_types, and formats methods.
* gst/gstpad.c (gst_pad_query2, gst_pad_query2_default)
(gst_pad_set_query2_function): New functions.
(gst_real_pad_init): Set query2_default as the default query2
function. Basically just dispatches to internally linked pads.
Needs review!
* gst/gstdata_private.h (_GST_DATA_INIT): Set data->refcount to 1
without using the atomic operations. Only one thread can possibly
be accessing the data at this point. Changed so as to avoid
gst_atomic operations.
2005-05-06 21:41:22 +00:00
|
|
|
struct _GstQuery
|
|
|
|
{
|
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
|
|
|
GstMiniObject mini_object;
|
gst/gstquery.h
Original commit message from CVS:
2005-05-06 Andy Wingo <wingo@pobox.com>
* gst/gstquery.h
* gst/gstquery.c (_gst_query_initialize): Extend GstQuery from
GstData, init a memchunk.
(standard_definitions): Add a few query types, deprecate a few.
(gst_query_get_type): New proc.
(_gst_query_copy, _gst_query_free, gst_query_new): GstData
implementation.
(gst_query_new_application, gst_query_get_structure): New public
procs.
* docs/design/draft-query.txt: Removed LINKS from the query types,
because all the rest can be dispatched to other pads -- seemed
ugly to have a query that couldn't be dispatched. internal_links
is fine as a pad method.
* gst/gstpad.h: Add query2 as a pad method, add the new functions
in gstpad.c, but maintain binary compatibility for the moment.
Will fix before 0.9 is out.
* gst/gstqueryutils.c:
* gst/gstqueryutils.h: New files, implement 3 methods for each
query type: parse_query, parse_response, and set. Probably need an
allocator as well.
* gst/gst.h: Add gstquery.h and gstqueryutils.h to the list.
* gst/elements/gstfilesink.c (gst_filesink_query2):
* gst/base/gstbasesrc.c (gst_basesrc_query2): Replace old query,
query_types, and formats methods.
* gst/gstpad.c (gst_pad_query2, gst_pad_query2_default)
(gst_pad_set_query2_function): New functions.
(gst_real_pad_init): Set query2_default as the default query2
function. Basically just dispatches to internally linked pads.
Needs review!
* gst/gstdata_private.h (_GST_DATA_INIT): Set data->refcount to 1
without using the atomic operations. Only one thread can possibly
be accessing the data at this point. Changed so as to avoid
gst_atomic operations.
2005-05-06 21:41:22 +00:00
|
|
|
|
2005-11-24 09:44:07 +00:00
|
|
|
/*< public > *//* with COW */
|
gst/gstquery.h
Original commit message from CVS:
2005-05-06 Andy Wingo <wingo@pobox.com>
* gst/gstquery.h
* gst/gstquery.c (_gst_query_initialize): Extend GstQuery from
GstData, init a memchunk.
(standard_definitions): Add a few query types, deprecate a few.
(gst_query_get_type): New proc.
(_gst_query_copy, _gst_query_free, gst_query_new): GstData
implementation.
(gst_query_new_application, gst_query_get_structure): New public
procs.
* docs/design/draft-query.txt: Removed LINKS from the query types,
because all the rest can be dispatched to other pads -- seemed
ugly to have a query that couldn't be dispatched. internal_links
is fine as a pad method.
* gst/gstpad.h: Add query2 as a pad method, add the new functions
in gstpad.c, but maintain binary compatibility for the moment.
Will fix before 0.9 is out.
* gst/gstqueryutils.c:
* gst/gstqueryutils.h: New files, implement 3 methods for each
query type: parse_query, parse_response, and set. Probably need an
allocator as well.
* gst/gst.h: Add gstquery.h and gstqueryutils.h to the list.
* gst/elements/gstfilesink.c (gst_filesink_query2):
* gst/base/gstbasesrc.c (gst_basesrc_query2): Replace old query,
query_types, and formats methods.
* gst/gstpad.c (gst_pad_query2, gst_pad_query2_default)
(gst_pad_set_query2_function): New functions.
(gst_real_pad_init): Set query2_default as the default query2
function. Basically just dispatches to internally linked pads.
Needs review!
* gst/gstdata_private.h (_GST_DATA_INIT): Set data->refcount to 1
without using the atomic operations. Only one thread can possibly
be accessing the data at this point. Changed so as to avoid
gst_atomic operations.
2005-05-06 21:41:22 +00:00
|
|
|
GstQueryType type;
|
|
|
|
};
|
|
|
|
|
2012-03-14 13:51:16 +00:00
|
|
|
const gchar* gst_query_type_get_name (GstQueryType type);
|
|
|
|
GQuark gst_query_type_to_quark (GstQueryType type);
|
|
|
|
GstQueryTypeFlags
|
|
|
|
gst_query_type_get_flags (GstQueryType type);
|
2005-11-19 18:57:00 +00:00
|
|
|
|
2003-01-01 03:09:39 +00:00
|
|
|
|
2012-03-14 13:51:16 +00:00
|
|
|
GType gst_query_get_type (void);
|
gst/gstquery.h
Original commit message from CVS:
2005-05-06 Andy Wingo <wingo@pobox.com>
* gst/gstquery.h
* gst/gstquery.c (_gst_query_initialize): Extend GstQuery from
GstData, init a memchunk.
(standard_definitions): Add a few query types, deprecate a few.
(gst_query_get_type): New proc.
(_gst_query_copy, _gst_query_free, gst_query_new): GstData
implementation.
(gst_query_new_application, gst_query_get_structure): New public
procs.
* docs/design/draft-query.txt: Removed LINKS from the query types,
because all the rest can be dispatched to other pads -- seemed
ugly to have a query that couldn't be dispatched. internal_links
is fine as a pad method.
* gst/gstpad.h: Add query2 as a pad method, add the new functions
in gstpad.c, but maintain binary compatibility for the moment.
Will fix before 0.9 is out.
* gst/gstqueryutils.c:
* gst/gstqueryutils.h: New files, implement 3 methods for each
query type: parse_query, parse_response, and set. Probably need an
allocator as well.
* gst/gst.h: Add gstquery.h and gstqueryutils.h to the list.
* gst/elements/gstfilesink.c (gst_filesink_query2):
* gst/base/gstbasesrc.c (gst_basesrc_query2): Replace old query,
query_types, and formats methods.
* gst/gstpad.c (gst_pad_query2, gst_pad_query2_default)
(gst_pad_set_query2_function): New functions.
(gst_real_pad_init): Set query2_default as the default query2
function. Basically just dispatches to internally linked pads.
Needs review!
* gst/gstdata_private.h (_GST_DATA_INIT): Set data->refcount to 1
without using the atomic operations. Only one thread can possibly
be accessing the data at this point. Changed so as to avoid
gst_atomic operations.
2005-05-06 21:41:22 +00:00
|
|
|
|
|
|
|
/* refcounting */
|
2005-10-20 21:08:47 +00:00
|
|
|
/**
|
|
|
|
* gst_query_ref:
|
|
|
|
* @q: a #GstQuery to increase the refcount of.
|
|
|
|
*
|
|
|
|
* Increases the refcount of the given query by one.
|
2009-03-12 09:48:21 +00:00
|
|
|
*
|
|
|
|
* Returns: @q
|
2005-10-20 21:08:47 +00:00
|
|
|
*/
|
2009-02-22 17:51:08 +00:00
|
|
|
#ifdef _FOOL_GTK_DOC_
|
|
|
|
G_INLINE_FUNC GstQuery * gst_query_ref (GstQuery * q);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static inline GstQuery *
|
|
|
|
gst_query_ref (GstQuery * q)
|
|
|
|
{
|
2009-12-07 19:52:22 +00:00
|
|
|
return GST_QUERY_CAST (gst_mini_object_ref (GST_MINI_OBJECT_CAST (q)));
|
2009-02-22 17:51:08 +00:00
|
|
|
}
|
|
|
|
|
2005-10-20 21:08:47 +00:00
|
|
|
/**
|
|
|
|
* gst_query_unref:
|
|
|
|
* @q: a #GstQuery to decrease the refcount of.
|
|
|
|
*
|
|
|
|
* Decreases the refcount of the query. If the refcount reaches 0, the query
|
|
|
|
* will be freed.
|
|
|
|
*/
|
2009-02-22 17:51:08 +00:00
|
|
|
#ifdef _FOOL_GTK_DOC_
|
|
|
|
G_INLINE_FUNC void gst_query_unref (GstQuery * q);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
gst_query_unref (GstQuery * q)
|
|
|
|
{
|
|
|
|
gst_mini_object_unref (GST_MINI_OBJECT_CAST (q));
|
|
|
|
}
|
2005-10-20 21:08:47 +00:00
|
|
|
|
gst/gstquery.h
Original commit message from CVS:
2005-05-06 Andy Wingo <wingo@pobox.com>
* gst/gstquery.h
* gst/gstquery.c (_gst_query_initialize): Extend GstQuery from
GstData, init a memchunk.
(standard_definitions): Add a few query types, deprecate a few.
(gst_query_get_type): New proc.
(_gst_query_copy, _gst_query_free, gst_query_new): GstData
implementation.
(gst_query_new_application, gst_query_get_structure): New public
procs.
* docs/design/draft-query.txt: Removed LINKS from the query types,
because all the rest can be dispatched to other pads -- seemed
ugly to have a query that couldn't be dispatched. internal_links
is fine as a pad method.
* gst/gstpad.h: Add query2 as a pad method, add the new functions
in gstpad.c, but maintain binary compatibility for the moment.
Will fix before 0.9 is out.
* gst/gstqueryutils.c:
* gst/gstqueryutils.h: New files, implement 3 methods for each
query type: parse_query, parse_response, and set. Probably need an
allocator as well.
* gst/gst.h: Add gstquery.h and gstqueryutils.h to the list.
* gst/elements/gstfilesink.c (gst_filesink_query2):
* gst/base/gstbasesrc.c (gst_basesrc_query2): Replace old query,
query_types, and formats methods.
* gst/gstpad.c (gst_pad_query2, gst_pad_query2_default)
(gst_pad_set_query2_function): New functions.
(gst_real_pad_init): Set query2_default as the default query2
function. Basically just dispatches to internally linked pads.
Needs review!
* gst/gstdata_private.h (_GST_DATA_INIT): Set data->refcount to 1
without using the atomic operations. Only one thread can possibly
be accessing the data at this point. Changed so as to avoid
gst_atomic operations.
2005-05-06 21:41:22 +00:00
|
|
|
/* copy query */
|
2005-10-20 21:08:47 +00:00
|
|
|
/**
|
|
|
|
* gst_query_copy:
|
|
|
|
* @q: a #GstQuery to copy.
|
|
|
|
*
|
2009-11-25 14:44:05 +00:00
|
|
|
* Copies the given query using the copy function of the parent #GstStructure.
|
2009-03-12 09:48:21 +00:00
|
|
|
*
|
2010-12-07 18:35:04 +00:00
|
|
|
* Free-function: gst_query_unref
|
|
|
|
*
|
|
|
|
* Returns: (transfer full): a new copy of @q.
|
2005-10-20 21:08:47 +00:00
|
|
|
*/
|
2009-02-22 17:51:08 +00:00
|
|
|
#ifdef _FOOL_GTK_DOC_
|
|
|
|
G_INLINE_FUNC GstQuery * gst_query_copy (const GstQuery * q);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static inline GstQuery *
|
|
|
|
gst_query_copy (const GstQuery * q)
|
|
|
|
{
|
2010-09-01 23:01:25 +00:00
|
|
|
return GST_QUERY_CAST (gst_mini_object_copy (GST_MINI_OBJECT_CONST_CAST (q)));
|
2009-02-22 17:51:08 +00:00
|
|
|
}
|
|
|
|
|
2011-05-10 13:33:53 +00:00
|
|
|
/**
|
|
|
|
* gst_query_is_writable:
|
|
|
|
* @q: a #GstQuery
|
|
|
|
*
|
|
|
|
* Tests if you can safely write data into a query's structure.
|
|
|
|
*/
|
|
|
|
#define gst_query_is_writable(q) gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (q))
|
2005-10-20 21:08:47 +00:00
|
|
|
/**
|
|
|
|
* gst_query_make_writable:
|
2010-12-07 18:35:04 +00:00
|
|
|
* @q: (transfer full): a #GstQuery to make writable
|
2005-10-20 21:08:47 +00:00
|
|
|
*
|
|
|
|
* Makes a writable query from the given query.
|
2010-12-07 18:35:04 +00:00
|
|
|
*
|
|
|
|
* Returns: (transfer full): a new writable query (possibly same as @q)
|
2005-10-20 21:08:47 +00:00
|
|
|
*/
|
2009-12-07 19:52:22 +00:00
|
|
|
#define gst_query_make_writable(q) GST_QUERY_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (q)))
|
2011-05-10 13:33:53 +00:00
|
|
|
/**
|
|
|
|
* gst_query_replace:
|
|
|
|
* @old_query: (inout) (transfer full): pointer to a pointer to a #GstQuery
|
|
|
|
* to be replaced.
|
|
|
|
* @new_query: (allow-none) (transfer none): pointer to a #GstQuery that will
|
|
|
|
* replace the query pointed to by @old_query.
|
|
|
|
*
|
|
|
|
* Modifies a pointer to a #GstQuery to point to a different #GstQuery. The
|
|
|
|
* modification is done atomically (so this is useful for ensuring thread safety
|
|
|
|
* in some cases), and the reference counts are updated appropriately (the old
|
|
|
|
* query is unreffed, the new one is reffed).
|
|
|
|
*
|
|
|
|
* Either @new_query or the #GstQuery pointed to by @old_query may be NULL.
|
2011-12-05 10:07:24 +00:00
|
|
|
*
|
|
|
|
* Returns: TRUE if @new_query was different from @old_query
|
2011-05-10 13:33:53 +00:00
|
|
|
*/
|
2011-12-05 10:07:24 +00:00
|
|
|
#ifdef _FOOL_GTK_DOC_
|
|
|
|
G_INLINE_FUNC gboolean gst_query_replace (GstQuery **old_query, GstQuery *new_query);
|
|
|
|
#endif
|
2011-05-10 13:33:53 +00:00
|
|
|
|
2011-12-05 10:07:24 +00:00
|
|
|
static inline gboolean
|
|
|
|
gst_query_replace (GstQuery **old_query, GstQuery *new_query)
|
|
|
|
{
|
|
|
|
return gst_mini_object_replace ((GstMiniObject **) old_query, (GstMiniObject *) new_query);
|
|
|
|
}
|
2011-05-10 13:33:53 +00:00
|
|
|
|
|
|
|
/* application specific query */
|
2011-11-26 19:44:23 +00:00
|
|
|
GstQuery * gst_query_new_custom (GstQueryType type, GstStructure *structure) G_GNUC_MALLOC;
|
2011-05-10 13:33:53 +00:00
|
|
|
const GstStructure *
|
|
|
|
gst_query_get_structure (GstQuery *query);
|
|
|
|
GstStructure * gst_query_writable_structure (GstQuery *query);
|
gst/gstquery.h
Original commit message from CVS:
2005-05-06 Andy Wingo <wingo@pobox.com>
* gst/gstquery.h
* gst/gstquery.c (_gst_query_initialize): Extend GstQuery from
GstData, init a memchunk.
(standard_definitions): Add a few query types, deprecate a few.
(gst_query_get_type): New proc.
(_gst_query_copy, _gst_query_free, gst_query_new): GstData
implementation.
(gst_query_new_application, gst_query_get_structure): New public
procs.
* docs/design/draft-query.txt: Removed LINKS from the query types,
because all the rest can be dispatched to other pads -- seemed
ugly to have a query that couldn't be dispatched. internal_links
is fine as a pad method.
* gst/gstpad.h: Add query2 as a pad method, add the new functions
in gstpad.c, but maintain binary compatibility for the moment.
Will fix before 0.9 is out.
* gst/gstqueryutils.c:
* gst/gstqueryutils.h: New files, implement 3 methods for each
query type: parse_query, parse_response, and set. Probably need an
allocator as well.
* gst/gst.h: Add gstquery.h and gstqueryutils.h to the list.
* gst/elements/gstfilesink.c (gst_filesink_query2):
* gst/base/gstbasesrc.c (gst_basesrc_query2): Replace old query,
query_types, and formats methods.
* gst/gstpad.c (gst_pad_query2, gst_pad_query2_default)
(gst_pad_set_query2_function): New functions.
(gst_real_pad_init): Set query2_default as the default query2
function. Basically just dispatches to internally linked pads.
Needs review!
* gst/gstdata_private.h (_GST_DATA_INIT): Set data->refcount to 1
without using the atomic operations. Only one thread can possibly
be accessing the data at this point. Changed so as to avoid
gst_atomic operations.
2005-05-06 21:41:22 +00:00
|
|
|
|
2005-05-09 10:53:13 +00:00
|
|
|
/* position query */
|
2011-11-26 18:57:44 +00:00
|
|
|
GstQuery* gst_query_new_position (GstFormat format) G_GNUC_MALLOC;
|
2009-11-05 14:13:04 +00:00
|
|
|
void gst_query_set_position (GstQuery *query, GstFormat format, gint64 cur);
|
|
|
|
void gst_query_parse_position (GstQuery *query, GstFormat *format, gint64 *cur);
|
gst/: API change fix.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_handle_object), (gst_base_sink_query), (do_playing):
* gst/base/gstbasesrc.c: (gst_base_src_query):
* gst/elements/gstfilesink.c: (gst_file_sink_query):
* gst/elements/gsttypefindelement.c:
(gst_type_find_handle_src_query), (find_element_get_length),
(gst_type_find_element_activate):
API change fix.
* gst/gstquery.c: (gst_query_new_position),
(gst_query_set_position), (gst_query_parse_position),
(gst_query_new_duration), (gst_query_set_duration),
(gst_query_parse_duration), (gst_query_set_segment),
(gst_query_parse_segment):
* gst/gstquery.h:
Bundling query position/duration is not a good idea since duration
does not change much and we don't want to recalculate it for every
position query, so they are separated again..
Base value in segment query is not needed.
* gst/gstqueue.c: (gst_queue_handle_src_query):
* gst/gstutils.c: (gst_element_query_position),
(gst_element_query_duration), (gst_pad_query_position),
(gst_pad_query_duration):
* gst/gstutils.h:
Updates for query API change.
Added some docs here and there.
2005-10-19 15:50:10 +00:00
|
|
|
|
|
|
|
/* duration query */
|
2011-11-26 18:57:44 +00:00
|
|
|
GstQuery* gst_query_new_duration (GstFormat format) G_GNUC_MALLOC;
|
2009-11-05 14:13:04 +00:00
|
|
|
void gst_query_set_duration (GstQuery *query, GstFormat format, gint64 duration);
|
|
|
|
void gst_query_parse_duration (GstQuery *query, GstFormat *format, gint64 *duration);
|
gst/: API change fix.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_handle_object), (gst_base_sink_query), (do_playing):
* gst/base/gstbasesrc.c: (gst_base_src_query):
* gst/elements/gstfilesink.c: (gst_file_sink_query):
* gst/elements/gsttypefindelement.c:
(gst_type_find_handle_src_query), (find_element_get_length),
(gst_type_find_element_activate):
API change fix.
* gst/gstquery.c: (gst_query_new_position),
(gst_query_set_position), (gst_query_parse_position),
(gst_query_new_duration), (gst_query_set_duration),
(gst_query_parse_duration), (gst_query_set_segment),
(gst_query_parse_segment):
* gst/gstquery.h:
Bundling query position/duration is not a good idea since duration
does not change much and we don't want to recalculate it for every
position query, so they are separated again..
Base value in segment query is not needed.
* gst/gstqueue.c: (gst_queue_handle_src_query):
* gst/gstutils.c: (gst_element_query_position),
(gst_element_query_duration), (gst_pad_query_position),
(gst_pad_query_duration):
* gst/gstutils.h:
Updates for query API change.
Added some docs here and there.
2005-10-19 15:50:10 +00:00
|
|
|
|
2007-02-02 11:48:48 +00:00
|
|
|
/* latency query */
|
2011-11-26 18:57:44 +00:00
|
|
|
GstQuery* gst_query_new_latency (void) G_GNUC_MALLOC;
|
2009-11-05 14:13:04 +00:00
|
|
|
void gst_query_set_latency (GstQuery *query, gboolean live, GstClockTime min_latency,
|
|
|
|
GstClockTime max_latency);
|
|
|
|
void gst_query_parse_latency (GstQuery *query, gboolean *live, GstClockTime *min_latency,
|
|
|
|
GstClockTime *max_latency);
|
2007-02-02 11:48:48 +00:00
|
|
|
|
2005-05-09 10:53:13 +00:00
|
|
|
/* convert query */
|
2011-11-26 18:57:44 +00:00
|
|
|
GstQuery* gst_query_new_convert (GstFormat src_format, gint64 value, GstFormat dest_format) G_GNUC_MALLOC;
|
2009-11-05 14:13:04 +00:00
|
|
|
void gst_query_set_convert (GstQuery *query, GstFormat src_format, gint64 src_value,
|
|
|
|
GstFormat dest_format, gint64 dest_value);
|
|
|
|
void gst_query_parse_convert (GstQuery *query, GstFormat *src_format, gint64 *src_value,
|
|
|
|
GstFormat *dest_format, gint64 *dest_value);
|
2005-09-22 17:40:42 +00:00
|
|
|
/* segment query */
|
2011-11-26 18:57:44 +00:00
|
|
|
GstQuery* gst_query_new_segment (GstFormat format) G_GNUC_MALLOC;
|
2005-09-22 17:40:42 +00:00
|
|
|
void gst_query_set_segment (GstQuery *query, gdouble rate, GstFormat format,
|
gst/: API change fix.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_handle_object), (gst_base_sink_query), (do_playing):
* gst/base/gstbasesrc.c: (gst_base_src_query):
* gst/elements/gstfilesink.c: (gst_file_sink_query):
* gst/elements/gsttypefindelement.c:
(gst_type_find_handle_src_query), (find_element_get_length),
(gst_type_find_element_activate):
API change fix.
* gst/gstquery.c: (gst_query_new_position),
(gst_query_set_position), (gst_query_parse_position),
(gst_query_new_duration), (gst_query_set_duration),
(gst_query_parse_duration), (gst_query_set_segment),
(gst_query_parse_segment):
* gst/gstquery.h:
Bundling query position/duration is not a good idea since duration
does not change much and we don't want to recalculate it for every
position query, so they are separated again..
Base value in segment query is not needed.
* gst/gstqueue.c: (gst_queue_handle_src_query):
* gst/gstutils.c: (gst_element_query_position),
(gst_element_query_duration), (gst_pad_query_position),
(gst_pad_query_duration):
* gst/gstutils.h:
Updates for query API change.
Added some docs here and there.
2005-10-19 15:50:10 +00:00
|
|
|
gint64 start_value, gint64 stop_value);
|
2005-09-22 17:40:42 +00:00
|
|
|
void gst_query_parse_segment (GstQuery *query, gdouble *rate, GstFormat *format,
|
gst/: API change fix.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_commit_state),
(gst_base_sink_handle_object), (gst_base_sink_query), (do_playing):
* gst/base/gstbasesrc.c: (gst_base_src_query):
* gst/elements/gstfilesink.c: (gst_file_sink_query):
* gst/elements/gsttypefindelement.c:
(gst_type_find_handle_src_query), (find_element_get_length),
(gst_type_find_element_activate):
API change fix.
* gst/gstquery.c: (gst_query_new_position),
(gst_query_set_position), (gst_query_parse_position),
(gst_query_new_duration), (gst_query_set_duration),
(gst_query_parse_duration), (gst_query_set_segment),
(gst_query_parse_segment):
* gst/gstquery.h:
Bundling query position/duration is not a good idea since duration
does not change much and we don't want to recalculate it for every
position query, so they are separated again..
Base value in segment query is not needed.
* gst/gstqueue.c: (gst_queue_handle_src_query):
* gst/gstutils.c: (gst_element_query_position),
(gst_element_query_duration), (gst_pad_query_position),
(gst_pad_query_duration):
* gst/gstutils.h:
Updates for query API change.
Added some docs here and there.
2005-10-19 15:50:10 +00:00
|
|
|
gint64 *start_value, gint64 *stop_value);
|
2005-09-22 17:40:42 +00:00
|
|
|
|
2007-02-02 11:48:48 +00:00
|
|
|
/* seeking query */
|
2011-11-26 18:57:44 +00:00
|
|
|
GstQuery* gst_query_new_seeking (GstFormat format) G_GNUC_MALLOC;
|
gst/base/gstbasesink.*: No need to store the clock, the parent element class already has it.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_class_init),
(gst_base_sink_wait), (gst_base_sink_do_sync),
(gst_base_sink_handle_event):
* gst/base/gstbasesink.h:
No need to store the clock, the parent element class already
has it.
* gst/gstbin.c: (gst_bin_set_clock_func), (gst_bin_add_func):
Updates for clock_set returning a gboolean
* gst/gstclock.c: (gst_clock_entry_new), (gst_clock_id_wait),
(gst_clock_id_wait_async), (gst_clock_class_init),
(gst_clock_init), (gst_clock_finalize),
(gst_clock_get_internal_time), (gst_clock_get_time),
(gst_clock_slave_callback), (gst_clock_set_master),
(gst_clock_get_master), (do_linear_regression),
(gst_clock_add_observation), (gst_clock_set_property),
(gst_clock_get_property):
* gst/gstclock.h:
Implement master/slave. When setting a clock as a slave, a
periodic timeout is scheduled to sample master and slave times.
Then the slave clock is recalibrated to match offset and rate
of the master clock.
Update logging a bit.
Add flag so that a clock can state that is cannot be slaved to
another clock.
* gst/gstelement.c: (gst_element_set_clock):
* gst/gstelement.h:
The set_clock returns a gboolean for when an element cannot
deal with the selected clock in the pipeline.
* gst/gstpipeline.c: (gst_pipeline_change_state),
(gst_pipeline_set_clock):
* gst/gstpipeline.h:
Handle the case where the selected clock cannot be set on
the pipeline.
* gst/net/gstnetclientclock.c: (gst_net_client_clock_class_init),
(gst_net_client_clock_init), (gst_net_client_clock_finalize),
(gst_net_client_clock_set_property),
(gst_net_client_clock_get_property),
(gst_net_client_clock_observe_times):
* gst/net/gstnetclientclock.h:
Use regression code in GstClock parent, remove duplicated
functionality.
2005-11-22 18:28:44 +00:00
|
|
|
void gst_query_set_seeking (GstQuery *query, GstFormat format,
|
|
|
|
gboolean seekable,
|
|
|
|
gint64 segment_start,
|
|
|
|
gint64 segment_end);
|
check/: Add tests for fdsrc seekability
Original commit message from CVS:
* check/Makefile.am:
* check/elements/fdsrc.c: (event_func), (setup_fdsrc),
(cleanup_fdsrc), (GST_START_TEST), (fdsrc_suite), (main):
Add tests for fdsrc seekability
* gst/elements/gstfdsrc.c: (gst_fdsrc_class_init),
(gst_fdsrc_init), (gst_fdsrc_update_fd), (gst_fdsrc_start),
(gst_fdsrc_set_property), (gst_fdsrc_is_seekable),
(gst_fdsrc_get_size), (gst_fdsrc_uri_set_uri):
* gst/elements/gstfdsrc.h:
fdsrc should not be a 'live' source.
Implement seeking on seekable fd's.
* gst/gstquery.c: (gst_query_new_seeking),
(gst_query_parse_seeking):
* gst/gstquery.h:
Implement SEEKING query functions:
*_new_seeking and *_parse_seeking
2005-11-27 22:50:09 +00:00
|
|
|
void gst_query_parse_seeking (GstQuery *query, GstFormat *format,
|
|
|
|
gboolean *seekable,
|
|
|
|
gint64 *segment_start,
|
|
|
|
gint64 *segment_end);
|
2007-02-02 11:48:48 +00:00
|
|
|
/* formats query */
|
2011-11-26 18:57:44 +00:00
|
|
|
GstQuery* gst_query_new_formats (void) G_GNUC_MALLOC;
|
gst/base/gstbasesink.*: No need to store the clock, the parent element class already has it.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_class_init),
(gst_base_sink_wait), (gst_base_sink_do_sync),
(gst_base_sink_handle_event):
* gst/base/gstbasesink.h:
No need to store the clock, the parent element class already
has it.
* gst/gstbin.c: (gst_bin_set_clock_func), (gst_bin_add_func):
Updates for clock_set returning a gboolean
* gst/gstclock.c: (gst_clock_entry_new), (gst_clock_id_wait),
(gst_clock_id_wait_async), (gst_clock_class_init),
(gst_clock_init), (gst_clock_finalize),
(gst_clock_get_internal_time), (gst_clock_get_time),
(gst_clock_slave_callback), (gst_clock_set_master),
(gst_clock_get_master), (do_linear_regression),
(gst_clock_add_observation), (gst_clock_set_property),
(gst_clock_get_property):
* gst/gstclock.h:
Implement master/slave. When setting a clock as a slave, a
periodic timeout is scheduled to sample master and slave times.
Then the slave clock is recalibrated to match offset and rate
of the master clock.
Update logging a bit.
Add flag so that a clock can state that is cannot be slaved to
another clock.
* gst/gstelement.c: (gst_element_set_clock):
* gst/gstelement.h:
The set_clock returns a gboolean for when an element cannot
deal with the selected clock in the pipeline.
* gst/gstpipeline.c: (gst_pipeline_change_state),
(gst_pipeline_set_clock):
* gst/gstpipeline.h:
Handle the case where the selected clock cannot be set on
the pipeline.
* gst/net/gstnetclientclock.c: (gst_net_client_clock_class_init),
(gst_net_client_clock_init), (gst_net_client_clock_finalize),
(gst_net_client_clock_set_property),
(gst_net_client_clock_get_property),
(gst_net_client_clock_observe_times):
* gst/net/gstnetclientclock.h:
Use regression code in GstClock parent, remove duplicated
functionality.
2005-11-22 18:28:44 +00:00
|
|
|
void gst_query_set_formats (GstQuery *query, gint n_formats, ...);
|
2011-04-19 10:48:05 +00:00
|
|
|
void gst_query_set_formatsv (GstQuery *query, gint n_formats, const GstFormat *formats);
|
2011-05-10 13:33:53 +00:00
|
|
|
void gst_query_parse_n_formats (GstQuery *query, guint *n_formats);
|
|
|
|
void gst_query_parse_nth_format (GstQuery *query, guint nth, GstFormat *format);
|
2005-09-26 15:03:43 +00:00
|
|
|
|
Reorder the message docs and headers for clarity.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstmessage.c: (gst_message_set_buffering_stats),
(gst_message_parse_buffering_stats):
* gst/gstmessage.h:
* gst/gstquery.c: (gst_query_new_latency), (gst_query_set_latency),
(gst_query_parse_latency), (gst_query_new_buffering),
(gst_query_set_buffering_percent),
(gst_query_parse_buffering_percent),
(gst_query_set_buffering_stats), (gst_query_parse_buffering_stats),
(gst_query_set_buffering_avail), (gst_query_parse_buffering_avail):
* gst/gstquery.h:
Reorder the message docs and headers for clarity.
Add aditional buffering stats API for messages.
Add buffering query.
Convert some leftover queries to use GstQuark.
API: gst_message_set_buffering_stats
API: gst_message_parse_buffering_stats
API: GST_QUERY_BUFFERING
API: GstBufferingMode
API: gst_query_new_buffering
API: gst_query_set_buffering_percent
API: gst_query_parse_buffering_percent
API: gst_query_set_buffering_stats
API: gst_query_parse_buffering_stats
API: gst_query_set_buffering_avail
API: gst_query_parse_buffering_avail
2008-04-08 19:59:06 +00:00
|
|
|
/* buffering query */
|
2011-11-18 13:08:45 +00:00
|
|
|
/**
|
|
|
|
* GstBufferingMode:
|
|
|
|
* @GST_BUFFERING_STREAM: a small amount of data is buffered
|
|
|
|
* @GST_BUFFERING_DOWNLOAD: the stream is being downloaded
|
|
|
|
* @GST_BUFFERING_TIMESHIFT: the stream is being downloaded in a ringbuffer
|
|
|
|
* @GST_BUFFERING_LIVE: the stream is a live stream
|
|
|
|
*
|
|
|
|
* The different types of buffering methods.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GST_BUFFERING_STREAM,
|
|
|
|
GST_BUFFERING_DOWNLOAD,
|
|
|
|
GST_BUFFERING_TIMESHIFT,
|
|
|
|
GST_BUFFERING_LIVE
|
|
|
|
} GstBufferingMode;
|
|
|
|
|
2011-11-26 18:57:44 +00:00
|
|
|
GstQuery* gst_query_new_buffering (GstFormat format) G_GNUC_MALLOC;
|
2008-04-08 20:17:49 +00:00
|
|
|
void gst_query_set_buffering_percent (GstQuery *query, gboolean busy, gint percent);
|
|
|
|
void gst_query_parse_buffering_percent (GstQuery *query, gboolean *busy, gint *percent);
|
Reorder the message docs and headers for clarity.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstmessage.c: (gst_message_set_buffering_stats),
(gst_message_parse_buffering_stats):
* gst/gstmessage.h:
* gst/gstquery.c: (gst_query_new_latency), (gst_query_set_latency),
(gst_query_parse_latency), (gst_query_new_buffering),
(gst_query_set_buffering_percent),
(gst_query_parse_buffering_percent),
(gst_query_set_buffering_stats), (gst_query_parse_buffering_stats),
(gst_query_set_buffering_avail), (gst_query_parse_buffering_avail):
* gst/gstquery.h:
Reorder the message docs and headers for clarity.
Add aditional buffering stats API for messages.
Add buffering query.
Convert some leftover queries to use GstQuark.
API: gst_message_set_buffering_stats
API: gst_message_parse_buffering_stats
API: GST_QUERY_BUFFERING
API: GstBufferingMode
API: gst_query_new_buffering
API: gst_query_set_buffering_percent
API: gst_query_parse_buffering_percent
API: gst_query_set_buffering_stats
API: gst_query_parse_buffering_stats
API: gst_query_set_buffering_avail
API: gst_query_parse_buffering_avail
2008-04-08 19:59:06 +00:00
|
|
|
|
|
|
|
void gst_query_set_buffering_stats (GstQuery *query, GstBufferingMode mode,
|
2009-11-05 14:13:04 +00:00
|
|
|
gint avg_in, gint avg_out,
|
|
|
|
gint64 buffering_left);
|
Reorder the message docs and headers for clarity.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstmessage.c: (gst_message_set_buffering_stats),
(gst_message_parse_buffering_stats):
* gst/gstmessage.h:
* gst/gstquery.c: (gst_query_new_latency), (gst_query_set_latency),
(gst_query_parse_latency), (gst_query_new_buffering),
(gst_query_set_buffering_percent),
(gst_query_parse_buffering_percent),
(gst_query_set_buffering_stats), (gst_query_parse_buffering_stats),
(gst_query_set_buffering_avail), (gst_query_parse_buffering_avail):
* gst/gstquery.h:
Reorder the message docs and headers for clarity.
Add aditional buffering stats API for messages.
Add buffering query.
Convert some leftover queries to use GstQuark.
API: gst_message_set_buffering_stats
API: gst_message_parse_buffering_stats
API: GST_QUERY_BUFFERING
API: GstBufferingMode
API: gst_query_new_buffering
API: gst_query_set_buffering_percent
API: gst_query_parse_buffering_percent
API: gst_query_set_buffering_stats
API: gst_query_parse_buffering_stats
API: gst_query_set_buffering_avail
API: gst_query_parse_buffering_avail
2008-04-08 19:59:06 +00:00
|
|
|
void gst_query_parse_buffering_stats (GstQuery *query, GstBufferingMode *mode,
|
2009-11-05 14:13:04 +00:00
|
|
|
gint *avg_in, gint *avg_out,
|
|
|
|
gint64 *buffering_left);
|
Reorder the message docs and headers for clarity.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstmessage.c: (gst_message_set_buffering_stats),
(gst_message_parse_buffering_stats):
* gst/gstmessage.h:
* gst/gstquery.c: (gst_query_new_latency), (gst_query_set_latency),
(gst_query_parse_latency), (gst_query_new_buffering),
(gst_query_set_buffering_percent),
(gst_query_parse_buffering_percent),
(gst_query_set_buffering_stats), (gst_query_parse_buffering_stats),
(gst_query_set_buffering_avail), (gst_query_parse_buffering_avail):
* gst/gstquery.h:
Reorder the message docs and headers for clarity.
Add aditional buffering stats API for messages.
Add buffering query.
Convert some leftover queries to use GstQuark.
API: gst_message_set_buffering_stats
API: gst_message_parse_buffering_stats
API: GST_QUERY_BUFFERING
API: GstBufferingMode
API: gst_query_new_buffering
API: gst_query_set_buffering_percent
API: gst_query_parse_buffering_percent
API: gst_query_set_buffering_stats
API: gst_query_parse_buffering_stats
API: gst_query_set_buffering_avail
API: gst_query_parse_buffering_avail
2008-04-08 19:59:06 +00:00
|
|
|
|
2008-04-08 20:28:21 +00:00
|
|
|
void gst_query_set_buffering_range (GstQuery *query, GstFormat format,
|
Reorder the message docs and headers for clarity.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstmessage.c: (gst_message_set_buffering_stats),
(gst_message_parse_buffering_stats):
* gst/gstmessage.h:
* gst/gstquery.c: (gst_query_new_latency), (gst_query_set_latency),
(gst_query_parse_latency), (gst_query_new_buffering),
(gst_query_set_buffering_percent),
(gst_query_parse_buffering_percent),
(gst_query_set_buffering_stats), (gst_query_parse_buffering_stats),
(gst_query_set_buffering_avail), (gst_query_parse_buffering_avail):
* gst/gstquery.h:
Reorder the message docs and headers for clarity.
Add aditional buffering stats API for messages.
Add buffering query.
Convert some leftover queries to use GstQuark.
API: gst_message_set_buffering_stats
API: gst_message_parse_buffering_stats
API: GST_QUERY_BUFFERING
API: GstBufferingMode
API: gst_query_new_buffering
API: gst_query_set_buffering_percent
API: gst_query_parse_buffering_percent
API: gst_query_set_buffering_stats
API: gst_query_parse_buffering_stats
API: gst_query_set_buffering_avail
API: gst_query_parse_buffering_avail
2008-04-08 19:59:06 +00:00
|
|
|
gint64 start, gint64 stop,
|
2009-11-05 14:13:04 +00:00
|
|
|
gint64 estimated_total);
|
2008-04-08 20:28:21 +00:00
|
|
|
void gst_query_parse_buffering_range (GstQuery *query, GstFormat *format,
|
Reorder the message docs and headers for clarity.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstmessage.c: (gst_message_set_buffering_stats),
(gst_message_parse_buffering_stats):
* gst/gstmessage.h:
* gst/gstquery.c: (gst_query_new_latency), (gst_query_set_latency),
(gst_query_parse_latency), (gst_query_new_buffering),
(gst_query_set_buffering_percent),
(gst_query_parse_buffering_percent),
(gst_query_set_buffering_stats), (gst_query_parse_buffering_stats),
(gst_query_set_buffering_avail), (gst_query_parse_buffering_avail):
* gst/gstquery.h:
Reorder the message docs and headers for clarity.
Add aditional buffering stats API for messages.
Add buffering query.
Convert some leftover queries to use GstQuark.
API: gst_message_set_buffering_stats
API: gst_message_parse_buffering_stats
API: GST_QUERY_BUFFERING
API: GstBufferingMode
API: gst_query_new_buffering
API: gst_query_set_buffering_percent
API: gst_query_parse_buffering_percent
API: gst_query_set_buffering_stats
API: gst_query_parse_buffering_stats
API: gst_query_set_buffering_avail
API: gst_query_parse_buffering_avail
2008-04-08 19:59:06 +00:00
|
|
|
gint64 *start, gint64 *stop,
|
2009-11-05 14:13:04 +00:00
|
|
|
gint64 *estimated_total);
|
2010-08-31 09:35:12 +00:00
|
|
|
|
2011-05-10 13:33:53 +00:00
|
|
|
gboolean gst_query_add_buffering_range (GstQuery *query,
|
|
|
|
gint64 start, gint64 stop);
|
|
|
|
guint gst_query_get_n_buffering_ranges (GstQuery *query);
|
2010-08-31 09:35:12 +00:00
|
|
|
gboolean gst_query_parse_nth_buffering_range (GstQuery *query,
|
|
|
|
guint index, gint64 *start,
|
|
|
|
gint64 *stop);
|
|
|
|
|
2008-12-20 17:33:44 +00:00
|
|
|
/* URI query */
|
2012-03-15 19:23:59 +00:00
|
|
|
GstQuery * gst_query_new_uri (void) G_GNUC_MALLOC;
|
|
|
|
void gst_query_parse_uri (GstQuery *query, gchar **uri);
|
|
|
|
void gst_query_set_uri (GstQuery *query, const gchar *uri);
|
Reorder the message docs and headers for clarity.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstmessage.c: (gst_message_set_buffering_stats),
(gst_message_parse_buffering_stats):
* gst/gstmessage.h:
* gst/gstquery.c: (gst_query_new_latency), (gst_query_set_latency),
(gst_query_parse_latency), (gst_query_new_buffering),
(gst_query_set_buffering_percent),
(gst_query_parse_buffering_percent),
(gst_query_set_buffering_stats), (gst_query_parse_buffering_stats),
(gst_query_set_buffering_avail), (gst_query_parse_buffering_avail):
* gst/gstquery.h:
Reorder the message docs and headers for clarity.
Add aditional buffering stats API for messages.
Add buffering query.
Convert some leftover queries to use GstQuark.
API: gst_message_set_buffering_stats
API: gst_message_parse_buffering_stats
API: GST_QUERY_BUFFERING
API: GstBufferingMode
API: gst_query_new_buffering
API: gst_query_set_buffering_percent
API: gst_query_parse_buffering_percent
API: gst_query_set_buffering_stats
API: gst_query_parse_buffering_stats
API: gst_query_set_buffering_avail
API: gst_query_parse_buffering_avail
2008-04-08 19:59:06 +00:00
|
|
|
|
2011-04-28 13:31:48 +00:00
|
|
|
/* allocation query */
|
2012-03-15 19:23:59 +00:00
|
|
|
GstQuery * gst_query_new_allocation (GstCaps *caps, gboolean need_pool) G_GNUC_MALLOC;
|
|
|
|
void gst_query_parse_allocation (GstQuery *query, GstCaps **caps, gboolean *need_pool);
|
|
|
|
|
|
|
|
/* pools */
|
|
|
|
void gst_query_add_allocation_pool (GstQuery *query, GstBufferPool *pool,
|
|
|
|
guint size, guint min_buffers,
|
|
|
|
guint max_buffers);
|
|
|
|
guint gst_query_get_n_allocation_pools (GstQuery *query);
|
|
|
|
void gst_query_parse_nth_allocation_pool (GstQuery *query, guint index,
|
|
|
|
GstBufferPool **pool,
|
|
|
|
guint *size, guint *min_buffers,
|
|
|
|
guint *max_buffers);
|
|
|
|
void gst_query_set_nth_allocation_pool (GstQuery *query, guint index,
|
|
|
|
GstBufferPool *pool,
|
|
|
|
guint size, guint min_buffers,
|
|
|
|
guint max_buffers);
|
2013-02-25 12:57:43 +00:00
|
|
|
void gst_query_remove_nth_allocation_pool (GstQuery *query, guint index);
|
2012-03-15 19:23:59 +00:00
|
|
|
|
|
|
|
/* allocators */
|
|
|
|
void gst_query_add_allocation_param (GstQuery *query, GstAllocator *allocator,
|
|
|
|
const GstAllocationParams *params);
|
|
|
|
guint gst_query_get_n_allocation_params (GstQuery *query);
|
|
|
|
void gst_query_parse_nth_allocation_param (GstQuery *query, guint index,
|
|
|
|
GstAllocator **allocator,
|
|
|
|
GstAllocationParams *params);
|
|
|
|
void gst_query_set_nth_allocation_param (GstQuery *query, guint index,
|
|
|
|
GstAllocator *allocator,
|
|
|
|
const GstAllocationParams *params);
|
2013-02-25 12:57:43 +00:00
|
|
|
void gst_query_remove_nth_allocation_param (GstQuery *query, guint index);
|
2012-03-15 19:23:59 +00:00
|
|
|
|
|
|
|
/* metadata */
|
2012-07-10 08:31:00 +00:00
|
|
|
void gst_query_add_allocation_meta (GstQuery *query, GType api, const GstStructure *params);
|
2012-03-01 13:49:38 +00:00
|
|
|
guint gst_query_get_n_allocation_metas (GstQuery *query);
|
2012-07-06 09:49:47 +00:00
|
|
|
GType gst_query_parse_nth_allocation_meta (GstQuery *query, guint index,
|
|
|
|
const GstStructure **params);
|
2012-03-01 13:49:38 +00:00
|
|
|
void gst_query_remove_nth_allocation_meta (GstQuery *query, guint index);
|
2012-07-06 09:22:43 +00:00
|
|
|
gboolean gst_query_find_allocation_meta (GstQuery *query, GType api, guint *index);
|
2011-04-28 13:31:48 +00:00
|
|
|
|
2011-06-07 14:35:07 +00:00
|
|
|
|
2011-05-24 10:52:09 +00:00
|
|
|
/* scheduling query */
|
2011-11-18 16:27:16 +00:00
|
|
|
/**
|
|
|
|
* GstSchedulingFlags:
|
|
|
|
* @GST_SCHEDULING_FLAG_SEEKABLE: if seeking is possible
|
|
|
|
* @GST_SCHEDULING_FLAG_SEQUENTIAL: if sequential access is recommended
|
2013-03-29 13:56:57 +00:00
|
|
|
* @GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED: if bandwidth is limited and buffering possible
|
2011-11-18 16:27:16 +00:00
|
|
|
*
|
|
|
|
* The different scheduling flags.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
2013-03-29 13:56:57 +00:00
|
|
|
GST_SCHEDULING_FLAG_SEEKABLE = (1 << 0),
|
|
|
|
GST_SCHEDULING_FLAG_SEQUENTIAL = (1 << 1),
|
|
|
|
GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED = (1 << 2)
|
2011-11-18 16:27:16 +00:00
|
|
|
} GstSchedulingFlags;
|
|
|
|
|
2011-11-26 19:44:23 +00:00
|
|
|
GstQuery * gst_query_new_scheduling (void) G_GNUC_MALLOC;
|
2011-05-24 10:52:09 +00:00
|
|
|
|
2011-11-18 16:27:16 +00:00
|
|
|
void gst_query_set_scheduling (GstQuery *query, GstSchedulingFlags flags,
|
2011-05-24 10:52:09 +00:00
|
|
|
gint minsize, gint maxsize, gint align);
|
2011-11-18 16:27:16 +00:00
|
|
|
void gst_query_parse_scheduling (GstQuery *query, GstSchedulingFlags *flags,
|
2011-05-24 10:52:09 +00:00
|
|
|
gint *minsize, gint *maxsize, gint *align);
|
2011-11-18 16:27:16 +00:00
|
|
|
|
|
|
|
void gst_query_add_scheduling_mode (GstQuery *query, GstPadMode mode);
|
|
|
|
guint gst_query_get_n_scheduling_modes (GstQuery *query);
|
|
|
|
GstPadMode gst_query_parse_nth_scheduling_mode (GstQuery *query, guint index);
|
|
|
|
gboolean gst_query_has_scheduling_mode (GstQuery *query, GstPadMode mode);
|
2012-09-11 14:39:34 +00:00
|
|
|
gboolean gst_query_has_scheduling_mode_with_flags (GstQuery * query, GstPadMode mode,
|
|
|
|
GstSchedulingFlags flags);
|
2011-11-18 16:27:16 +00:00
|
|
|
|
2011-11-09 16:36:00 +00:00
|
|
|
/* accept-caps query */
|
2011-11-26 19:44:23 +00:00
|
|
|
GstQuery * gst_query_new_accept_caps (GstCaps *caps) G_GNUC_MALLOC;
|
2011-11-09 16:36:00 +00:00
|
|
|
void gst_query_parse_accept_caps (GstQuery *query, GstCaps **caps);
|
|
|
|
void gst_query_set_accept_caps_result (GstQuery *query, gboolean result);
|
|
|
|
void gst_query_parse_accept_caps_result (GstQuery *query, gboolean *result);
|
2011-04-28 13:31:48 +00:00
|
|
|
|
2011-11-14 10:26:17 +00:00
|
|
|
/* caps query */
|
2011-11-26 19:44:23 +00:00
|
|
|
GstQuery * gst_query_new_caps (GstCaps *filter) G_GNUC_MALLOC;
|
2011-11-15 10:20:48 +00:00
|
|
|
void gst_query_parse_caps (GstQuery *query, GstCaps **filter);
|
|
|
|
|
|
|
|
void gst_query_set_caps_result (GstQuery *query, GstCaps *caps);
|
|
|
|
void gst_query_parse_caps_result (GstQuery *query, GstCaps **caps);
|
|
|
|
|
2012-03-14 15:14:12 +00:00
|
|
|
/* drain query */
|
|
|
|
GstQuery * gst_query_new_drain (void) G_GNUC_MALLOC;
|
2011-11-14 10:26:17 +00:00
|
|
|
|
2013-03-28 14:35:13 +00:00
|
|
|
/* context query */
|
|
|
|
GstQuery * gst_query_new_context (void) G_GNUC_MALLOC;
|
|
|
|
void gst_query_add_context_type (GstQuery * query, const gchar * context_type);
|
|
|
|
guint gst_query_get_n_context_types (GstQuery * query);
|
|
|
|
gboolean gst_query_parse_nth_context_type (GstQuery * query, guint i, const gchar ** context_type);
|
2013-07-16 13:16:16 +00:00
|
|
|
gboolean gst_query_has_context_type (GstQuery * query, const gchar * context_type);
|
2013-03-28 14:35:13 +00:00
|
|
|
void gst_query_set_context (GstQuery *query, GstContext *context);
|
|
|
|
void gst_query_parse_context (GstQuery *query, GstContext **context);
|
|
|
|
|
2002-12-30 17:42:11 +00:00
|
|
|
G_END_DECLS
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2002-12-30 17:42:11 +00:00
|
|
|
#endif /* __GST_QUERY_H__ */
|
2004-03-15 14:43:35 +00:00
|
|
|
|