From 6c3416a44d672156fc31405094060c79e9443f80 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Fri, 26 Aug 2005 11:56:11 +0000 Subject: [PATCH] gst/base/: fix up some debugging Original commit message from CVS: * gst/base/gstbasesink.c: (gst_base_sink_handle_object): * gst/base/gstbasetransform.c: (gst_base_transform_transform_size), fix up some debugging (gst_base_transform_get_unit_size), (gst_base_transform_buffer_alloc), (gst_base_transform_event), (gst_base_transform_handle_buffer): * gst/base/gstbasetransform.h: handle and store timed NEWSEGMENT events so that subclasses that calculate time by counting samples have a segment_start time they need to add to their timestamps - see audioresample --- ChangeLog | 21 +- docs/gst/tmpl/gstcaps.sgml | 71 +++++ docs/gst/tmpl/gstclock.sgml | 104 ++++++++ docs/gst/tmpl/gstelement.sgml | 531 ++++++++++++++++++++++++++++++++------ docs/gst/tmpl/gstformat.sgml | 8 + docs/gst/tmpl/gstghostpad.sgml | 19 ++ docs/gst/tmpl/gstinfo.sgml | 14 + docs/gst/tmpl/gstiterator.sgml | 4 +- docs/gst/tmpl/gstminiobject.sgml | 33 +++ docs/gst/tmpl/gstobject.sgml | 100 +++++++ docs/gst/tmpl/gstpad.sgml | 157 ++++++++++- docs/gst/tmpl/gstpadtemplate.sgml | 9 + docs/gst/tmpl/gstpipeline.sgml | 70 +++++ docs/gst/tmpl/gstquery.sgml | 168 ++++++++++++ docs/gst/tmpl/gststructure.sgml | 41 +++ docs/gst/tmpl/gsttaglist.sgml | 490 +++++++++++++++++------------------ docs/gst/tmpl/gsttrace.sgml | 7 + docs/gst/tmpl/gstutils.sgml | 138 ++++++---- docs/gst/tmpl/gstvalue.sgml | 42 +++ docs/gst/tmpl/gstxml.sgml | 88 +++++++ gst/base/gstbasesink.c | 21 +- gst/base/gstbasetransform.c | 24 ++ gst/base/gstbasetransform.h | 7 + libs/gst/base/gstbasesink.c | 21 +- libs/gst/base/gstbasetransform.c | 24 ++ libs/gst/base/gstbasetransform.h | 7 + 26 files changed, 1818 insertions(+), 401 deletions(-) diff --git a/ChangeLog b/ChangeLog index 445c360..eb708d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,20 @@ +2005-08-26 Thomas Vander Stichele + + * gst/base/gstbasesink.c: (gst_base_sink_handle_object): + * gst/base/gstbasetransform.c: (gst_base_transform_transform_size), + fix up some debugging + (gst_base_transform_get_unit_size), + (gst_base_transform_buffer_alloc), (gst_base_transform_event), + (gst_base_transform_handle_buffer): + * gst/base/gstbasetransform.h: + handle and store timed NEWSEGMENT events so that subclasses that + calculate time by counting samples have a segment_start time they + need to add to their timestamps - see audioresample + 2005-08-26 Stefan Kost * gst/gstbin.h: - removed ';' from the end of macro defs + removed ';' from the end of macro defs * docs/gst/gstreamer-docs.sgml: * docs/gst/gstreamer-sections.txt: * docs/gst/tmpl/.cvsignore: @@ -17,9 +30,9 @@ * gst/gstprobe.h: * gst/gstutils.c: (gst_pad_query_convert): * gst/gstutils.h: - fixed parameter name mismatches between source, header and docs - added some more docs, resolved the last batch of unused elements in - docs (now someone needs to doc them) + fixed parameter name mismatches between source, header and docs + added some more docs, resolved the last batch of unused elements in + docs (now someone needs to doc them) 2005-08-25 Thomas Vander Stichele diff --git a/docs/gst/tmpl/gstcaps.sgml b/docs/gst/tmpl/gstcaps.sgml index e2e3f7e..529cb15 100644 --- a/docs/gst/tmpl/gstcaps.sgml +++ b/docs/gst/tmpl/gstcaps.sgml @@ -58,6 +58,22 @@ undefined media type that can not be detected. + + + + + +@caps: + + + + + + + +@caps: + + Creates a static caps that matches anything. This can be used in pad @@ -277,6 +293,16 @@ templates. @Returns: + + + + + +@caps1: +@caps2: +@Returns: + + @@ -391,3 +417,48 @@ templates. @Returns: + + + + + +@caps: +@Returns: + + + + + + + +@caps: +@Returns: + + + + + + + +@structure: +@field_name: +@target: +@Returns: + + + + + + + +@caps: + + + + + + + +@caps: + + diff --git a/docs/gst/tmpl/gstclock.sgml b/docs/gst/tmpl/gstclock.sgml index 231085a..bb9e367 100644 --- a/docs/gst/tmpl/gstclock.sgml +++ b/docs/gst/tmpl/gstclock.sgml @@ -124,6 +124,23 @@ Convert a GstClockTime to a GTimeVal @tv: The target timeval + + + + + +@ts: + + + + + + + +@t: +@ts: + + The name used for tracing clock entry allocations. @@ -239,6 +256,47 @@ Get the clock flags @clock: the clock to query + + + + + +@clock: + + + + + + + +@clock: + + + + + + + +@clock: + + + + + + + +@clock: +@tv: + + + + + + + +@clock: + + @@ -288,6 +346,25 @@ Get the clock flags @Returns: + + + + + +@clock: +@internal: +@Returns: + + + + + + + +@clock: +@adjust: + + @@ -326,3 +403,30 @@ Get the clock flags @id: + + + + + +@id1: +@id2: +@Returns: + + + + + + + +@id: +@Returns: + + + + + + + +@id: + + diff --git a/docs/gst/tmpl/gstelement.sgml b/docs/gst/tmpl/gstelement.sgml index 703e7dd..48b672e 100644 --- a/docs/gst/tmpl/gstelement.sgml +++ b/docs/gst/tmpl/gstelement.sgml @@ -147,6 +147,16 @@ and gst_element_set_clock(). You can wait for the clock to reach a given @get_query_types: @query: + + +This enum defines the standard flags that an element may have. + + +@GST_ELEMENT_LOCKED_STATE: +@GST_ELEMENT_IS_SINK: +@GST_ELEMENT_UNPARENTING: +@GST_ELEMENT_FLAG_LAST: + The maximun number of states. @@ -220,14 +230,102 @@ The Element is going from the READY state to the NULL state. - + -This enum defines the standard flags that an element may have. + -@GST_ELEMENT_LOCKED_STATE: -@GST_ELEMENT_IS_SINK: -@GST_ELEMENT_FLAG_LAST: +@elem: + + + + + + + +@obj: + + + + + + + +@obj: + + + + + + + +@elem: + + + + + + + +@elem: + + + + + + + +@elem: + + + + + + + +@obj: + + + + + + + +@elem: + + + + + + + +@elem: +@timeval: + + + + + + + +@elem: + + + + + + + +@elem: + + + + + + + +@elem: + @@ -275,6 +373,61 @@ Get the pads of this elements. @message: + + + + + +@obj: + + + + + + + +@el: +@domain: +@code: +@text: +@debug: + + + + + + + +@obj: + + + + + + + +@element: +@Returns: + + + + + + + +@element: + + + + + + + +@element: +@pad: +@Returns: + + @@ -284,6 +437,25 @@ Get the pads of this elements. @templ: + + + + + +@element_class: +@name: +@Returns: + + + + + + + +@element_class: +@Returns: + + @@ -303,64 +475,81 @@ Get the pads of this elements. @details: - + -Gets the name of the element. + -@elem: -@Returns: the name of the element. +@element: - + + + - +@element: + + + -Sets the name of the element, getting rid of the old name if there was one. + -@elem: a #GstElement to set the name of. -@name: the new name of the element. +@factory: +@caps: +@Returns: - + -Gets the parent of an element. + -@elem: a #GstElement to get the parent of. -@Returns: the #GstObject parent of the element. +@factory: +@caps: +@Returns: - + -Sets the parent of an element. + -@elem: a #GstElement to set the parent of. -@parent: the new #GstObject parent of the object. +@factory: +@Returns: - + @element: +@pad: @Returns: - + @element: -@Returns: +@list: - + + + + + +@element: +@pad: +@list: + + + @@ -369,16 +558,16 @@ Sets the parent of an element. @Returns: - + @element: -@clock: +@Returns: - + @@ -387,44 +576,57 @@ Sets the parent of an element. @Returns: - + @element: -@index: +@pad: +@caps: +@Returns: - + @element: +@compattempl: @Returns: - + @element: -@pad: @Returns: - + @element: -@pad: @Returns: + + +Gets the name of the element. + + +@elem: +@Returns: the name of the element. + + + + + @@ -435,13 +637,21 @@ Sets the parent of an element. @Returns: GList of #GstPads - + + +Gets the parent of an element. + + +@elem: a #GstElement to get the parent of. +@Returns: the #GstObject parent of the element. + + + @element: -@name: @Returns: @@ -455,67 +665,84 @@ Sets the parent of an element. @Returns: - + @element: -@pad: +@state: +@pending: +@timeout: +@Returns: - + @element: -@pad: -@caps: +@name: @Returns: - + @element: -@compattempl: @Returns: - + -@src: -@dest: +@element: @Returns: - + -@element_1: -@element_2: -@Varargs: +@element: @Returns: - + + + + + +@element: +@Returns: + + + + + + + +@element: +@Returns: + + + @src: @dest: +@Returns: - + @@ -523,6 +750,7 @@ Sets the parent of an element. @element_1: @element_2: @Varargs: +@Returns: @@ -537,7 +765,7 @@ Sets the parent of an element. @Returns: - + @@ -546,18 +774,125 @@ Sets the parent of an element. @srcpadname: @dest: @destpadname: +@filter: +@Returns: - + + + - +@element: + + + + + + + +@element: +@type: +@domain: +@code: +@text: +@debug: +@file: +@function: +@line: + + + + + + + +@element: + + + + + + + +@element: +@message: +@Returns: + + + + + + + +@element: +@Returns: + + + + + + + +@element: +@query: +@Returns: + +@type: +@format: +@value: + + + + + + + +@element: +@src_format: +@src_val: +@dest_fmt: +@dest_val: +@Returns: + + + + + + + +@element: +@format: +@cur: +@end: +@Returns: + + + + + + + +@element: +@pad: + + + + + + + +@element: +@pad: +@Returns: + + + @element: -@event: @Returns: @@ -580,69 +915,80 @@ Sets the parent of an element. @offset: - + @element: +@event: @Returns: - + @element: -@query: -@Returns: - -@type: -@format: -@value: +@time: - + @element: -@Returns: +@bus: - + @element: -@locked_state: -@Returns: +@clock: - + @element: -@Returns: +@index: - + @element: -@state: -@pending: -@timeout: +@locked_state: @Returns: + + +Sets the name of the element, getting rid of the old name if there was one. + + +@elem: a #GstElement to set the name of. +@name: the new name of the element. + + + + +Sets the parent of an element. + + +@elem: a #GstElement to set the parent of. +@parent: the new #GstObject parent of the object. + + @@ -662,7 +1008,7 @@ Sets the parent of an element. @Returns: - + @@ -671,11 +1017,36 @@ Sets the parent of an element. @Returns: - + -@element: +@src: +@dest: + + + + + + + +@element_1: +@element_2: +@Varargs: + + + + + + + +@src: +@srcpadname: +@dest: +@destpadname: + + + diff --git a/docs/gst/tmpl/gstformat.sgml b/docs/gst/tmpl/gstformat.sgml index ae7b43d..8878345 100644 --- a/docs/gst/tmpl/gstformat.sgml +++ b/docs/gst/tmpl/gstformat.sgml @@ -92,3 +92,11 @@ A format definition @Returns: + + + + + +@Returns: + + diff --git a/docs/gst/tmpl/gstghostpad.sgml b/docs/gst/tmpl/gstghostpad.sgml index 46d8e03..0d8f2bf 100644 --- a/docs/gst/tmpl/gstghostpad.sgml +++ b/docs/gst/tmpl/gstghostpad.sgml @@ -45,3 +45,22 @@ Pseudo link pads @Returns: + + + + + +@gpad: +@Returns: + + + + + + + +@name: +@dir: +@Returns: + + diff --git a/docs/gst/tmpl/gstinfo.sgml b/docs/gst/tmpl/gstinfo.sgml index d2d2d58..a8b3a38 100644 --- a/docs/gst/tmpl/gstinfo.sgml +++ b/docs/gst/tmpl/gstinfo.sgml @@ -182,6 +182,13 @@ output with the function name of the message. + + + + + + + @@ -465,6 +472,13 @@ output with the function name of the message. @Returns: + + + + + + + GST_CAT_LEVEL_LOG: diff --git a/docs/gst/tmpl/gstiterator.sgml b/docs/gst/tmpl/gstiterator.sgml index 9bc68df..b8f532a 100644 --- a/docs/gst/tmpl/gstiterator.sgml +++ b/docs/gst/tmpl/gstiterator.sgml @@ -172,8 +172,10 @@ GstIterator @it: -@result: +@elem: @Returns: + +@result: diff --git a/docs/gst/tmpl/gstminiobject.sgml b/docs/gst/tmpl/gstminiobject.sgml index ff0a8f1..89d8903 100644 --- a/docs/gst/tmpl/gstminiobject.sgml +++ b/docs/gst/tmpl/gstminiobject.sgml @@ -36,6 +36,23 @@ GstMiniObject @GST_MINI_OBJECT_FLAG_STATIC: @GST_MINI_OBJECT_FLAG_LAST: + + + + + +@Param1: +@Returns: + + + + + + + +@Param1: + + @@ -71,6 +88,22 @@ GstMiniObject @flag: + + + + + +@obj: + + + + + + + +@obj: + + diff --git a/docs/gst/tmpl/gstobject.sgml b/docs/gst/tmpl/gstobject.sgml index 583afec..ca8c2fb 100644 --- a/docs/gst/tmpl/gstobject.sgml +++ b/docs/gst/tmpl/gstobject.sgml @@ -218,6 +218,78 @@ Acquire a reference to the mutex of this object. @obj: Object to get the mutex of. + + + + + +@obj: + + + + + + + +@obj: + + + + + + + +@obj: + + + + + + + +@obj: + + + + + + + +@obj: + + + + + + + +@obj: + + + + + + + +@obj: + + + + + + + +@obj: + + + + + + + +@obj: + + @@ -264,6 +336,24 @@ Acquire a reference to the mutex of this object. @object: + + + + + +@object: +@Returns: + + + + + + + +@object: +@name_prefix: + + @@ -275,6 +365,16 @@ Acquire a reference to the mutex of this object. @excluded_props: + + + + + +@source: +@error: +@debug: + + diff --git a/docs/gst/tmpl/gstpad.sgml b/docs/gst/tmpl/gstpad.sgml index 1427afa..67cb8c5 100644 --- a/docs/gst/tmpl/gstpad.sgml +++ b/docs/gst/tmpl/gstpad.sgml @@ -397,6 +397,159 @@ Indicates when this pad will become available. @GST_PAD_REQUEST: the pad is only available on request with gst_element_request_pad_by_name() or gst_element_request_compatible_pad(). + + + + + +@GST_FLOW_RESEND: +@GST_FLOW_OK: +@GST_FLOW_NOT_LINKED: +@GST_FLOW_WRONG_STATE: +@GST_FLOW_UNEXPECTED: +@GST_FLOW_NOT_NEGOTIATED: +@GST_FLOW_ERROR: +@GST_FLOW_NOT_SUPPORTED: + + + + + + +@GST_ACTIVATE_NONE: +@GST_ACTIVATE_PUSH: +@GST_ACTIVATE_PULL: + + + + + + +@pad: + + + + + + + +@pad: + + + + + + + +@pad: + + + + + + + +@pad: + + + + + + + +@pad: + + + + + + + +@pad: +@timeval: + + + + + + + +@pad: + + + + + + + +@pad: + + + + + + + +@pad: + + + + + + + +@pad: + + + + + + + +@pad: + + + + + + + +@pad: +@t: + + + + + + + +@pad: + + + + + + + +@pad: + + + + + + + +@pad: + + + + + + + +@ret: + + @@ -1062,9 +1215,11 @@ gst_element_request_pad_by_name() or gst_element_request_compatible_pad(). @pad: @src_format: @src_val: -@dest_fmt: +@dest_format: @dest_val: @Returns: + +@dest_fmt: diff --git a/docs/gst/tmpl/gstpadtemplate.sgml b/docs/gst/tmpl/gstpadtemplate.sgml index 060a3d1..117ebb6 100644 --- a/docs/gst/tmpl/gstpadtemplate.sgml +++ b/docs/gst/tmpl/gstpadtemplate.sgml @@ -182,6 +182,15 @@ Flags for the padtemplate @templ: + + + + + +@templ: +@Returns: + + diff --git a/docs/gst/tmpl/gstpipeline.sgml b/docs/gst/tmpl/gstpipeline.sgml index 74912fa..a5010b8 100644 --- a/docs/gst/tmpl/gstpipeline.sgml +++ b/docs/gst/tmpl/gstpipeline.sgml @@ -44,6 +44,14 @@ the pipeline, use gst_object_unref() to free its resources. + + + + + +@GST_PIPELINE_FLAG_FIXED_CLOCK: +@GST_PIPELINE_FLAG_LAST: + @@ -53,3 +61,65 @@ the pipeline, use gst_object_unref() to free its resources. @Returns: + + + + + +@pipeline: + + + + + + + +@pipeline: +@Returns: + + + + + + + +@pipeline: +@Returns: + + + + + + + +@pipeline: +@Returns: + + + + + + + +@pipeline: +@clock: + + + + + + + +@pipeline: +@time: + + + + + + + +@pipeline: +@clock: + + diff --git a/docs/gst/tmpl/gstquery.sgml b/docs/gst/tmpl/gstquery.sgml index 0eb813f..f0a3121 100644 --- a/docs/gst/tmpl/gstquery.sgml +++ b/docs/gst/tmpl/gstquery.sgml @@ -97,3 +97,171 @@ A Query Type definition @Param1: + + + + + +@msg: + + + + + + + +@query: +@Returns: + + + + + + + +@msg: + + + + + + + +@type: +@structure: +@Returns: + + + + + + + +@src_fmt: +@value: +@dest_fmt: +@Returns: + + + + + + + +@format: +@Returns: + + + + + + + +@query: +@src_format: +@src_value: +@dest_format: +@dest_value: + + + + + + + +@query: +@format: +@cur: +@end: + + + + + + + +@query: +@format: + + + + + + + +@query: +@format: +@seekable: +@segment_start: +@segment_end: + + + + + + + +@msg: + + + + + + + +@query: +@src_format: +@src_value: +@dest_format: +@dest_value: + + + + + + + +@query: +@n_formats: +@Varargs: + + + + + + + +@query: +@format: +@cur: +@end: + + + + + + + +@query: +@format: +@seekable: +@segment_start: +@segment_end: + + + + + + + +@Returns: + + + + + + + +@msg: + + diff --git a/docs/gst/tmpl/gststructure.sgml b/docs/gst/tmpl/gststructure.sgml index 14fd72e..77f3a17 100644 --- a/docs/gst/tmpl/gststructure.sgml +++ b/docs/gst/tmpl/gststructure.sgml @@ -35,6 +35,17 @@ Generic structure containing fields of names and values @Returns: + + + + + +@field_id: +@value: +@user_data: +@Returns: + + @@ -362,6 +373,36 @@ Generic structure containing fields of names and values @field: + + + + + +@structure: +@func: +@user_data: +@Returns: + + + + + + + +@structure: +@index: +@Returns: + + + + + + + +@structure: +@refcount: + + diff --git a/docs/gst/tmpl/gsttaglist.sgml b/docs/gst/tmpl/gsttaglist.sgml index e08539e..2f3c285 100644 --- a/docs/gst/tmpl/gsttaglist.sgml +++ b/docs/gst/tmpl/gsttaglist.sgml @@ -67,6 +67,251 @@ List of tags and values used to describe media metadata @src: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -610,248 +855,3 @@ List of tags and values used to describe media metadata @Returns: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/gst/tmpl/gsttrace.sgml b/docs/gst/tmpl/gsttrace.sgml index b08a807..168b2aa 100644 --- a/docs/gst/tmpl/gsttrace.sgml +++ b/docs/gst/tmpl/gsttrace.sgml @@ -186,6 +186,13 @@ The main tracing object @trace: + + + + + + + diff --git a/docs/gst/tmpl/gstutils.sgml b/docs/gst/tmpl/gstutils.sgml index fd30801..e507318 100644 --- a/docs/gst/tmpl/gstutils.sgml +++ b/docs/gst/tmpl/gstutils.sgml @@ -17,62 +17,6 @@ various utility functions - - - - - -@value: -@value_str: - - - - - - - -@object: -@name: -@value: - - - - - - - -@mem: -@size: - - - - - - - -@buf: -@indent: -@pad: - - - - - - - -@buf: -@indent: -@element: - - - - - - - -@bin: - - @@ -100,6 +44,10 @@ various utility functions @\ parent_type_as_macro: @\ + parent_type_as_macro: +@\ + parent_type_as_macro: +@\ parent_type_as_macro: @interface_type: @interface_type_as_macro: @@ -122,6 +70,10 @@ various utility functions @\ interface_as_function: @\ + interface_as_function: +@\ + interface_as_function: +@\ interface_as_function: @@ -336,3 +288,77 @@ various utility functions @num: + + + + + +@atomic_int: +@value: + + + + + + + +@bin: + + + + + + + +@ret: +@Returns: + + + + + + + +@buf: +@indent: +@element: + + + + + + + +@buf: +@indent: +@pad: + + + + + + + +@mem: +@size: + + + + + + + +@object: +@name: +@value: + + + + + + + +@value: +@value_str: + + diff --git a/docs/gst/tmpl/gstvalue.sgml b/docs/gst/tmpl/gstvalue.sgml index 72251a3..46b27b3 100644 --- a/docs/gst/tmpl/gstvalue.sgml +++ b/docs/gst/tmpl/gstvalue.sgml @@ -122,6 +122,22 @@ Checks if the give GValue contains a FRACTION value. @x: the #GValue to check + + + + + +@x: + + + + + + + +@value: + + Indicates that the first value provided to a comparison function @@ -441,6 +457,32 @@ GST_VALUE_GREATER_THAN or GST_VALUE_UNORDERED @denominator: + + + + + +@v: + + + + + + + +@v: +@b: + + + + + + + +@v: +@b: + + diff --git a/docs/gst/tmpl/gstxml.sgml b/docs/gst/tmpl/gstxml.sgml index 4ae6709..4e3f299 100644 --- a/docs/gst/tmpl/gstxml.sgml +++ b/docs/gst/tmpl/gstxml.sgml @@ -36,6 +36,94 @@ XML save/restore operations of pipelines @arg1: @arg2: + + + + + +@registry: +@Returns: + + + + + + + +@registry: + + + + + + + +@registry: +@dest: +@size: +@Returns: + + + + + + + +@GST_XML_REGISTRY_READ: +@GST_XML_REGISTRY_WRITE: + + + + + + +@registry: +@mode: +@Returns: + + + + + + + +@context: +@tag: +@text: +@text_len: +@registry: +@error: +@Returns: + + + + + + + +@registry: +@format: +@Varargs: +@Returns: + + + + + + + +@GST_XML_REGISTRY_NONE: +@GST_XML_REGISTRY_TOP: +@GST_XML_REGISTRY_PATHS: +@GST_XML_REGISTRY_PATH: +@GST_XML_REGISTRY_PATHS_DONE: +@GST_XML_REGISTRY_PLUGIN: +@GST_XML_REGISTRY_FEATURE: +@GST_XML_REGISTRY_PADTEMPLATE: +@GST_XML_REGISTRY_CAPS: +@GST_XML_REGISTRY_STRUCTURE: +@GST_XML_REGISTRY_PROPERTIES: + diff --git a/gst/base/gstbasesink.c b/gst/base/gstbasesink.c index 5dbe733..1dd5d6c 100644 --- a/gst/base/gstbasesink.c +++ b/gst/base/gstbasesink.c @@ -496,7 +496,8 @@ gst_base_sink_handle_object (GstBaseSink * basesink, GstPad * pad, &basesink->segment_base); if (format != GST_FORMAT_TIME) { - GST_DEBUG ("received non time %d DISCONT %" G_GINT64_FORMAT + GST_DEBUG_OBJECT (basesink, + "received non time %d NEW_SEGMENT %" G_GINT64_FORMAT " -- %" G_GINT64_FORMAT ", base %" G_GINT64_FORMAT, format, basesink->segment_start, basesink->segment_stop, basesink->segment_base); @@ -507,7 +508,8 @@ gst_base_sink_handle_object (GstBaseSink * basesink, GstPad * pad, basesink->segment_stop = -1; basesink->segment_base = -1; } else { - GST_DEBUG ("received DISCONT %" GST_TIME_FORMAT " -- %" + GST_DEBUG_OBJECT (basesink, + "received DISCONT %" GST_TIME_FORMAT " -- %" GST_TIME_FORMAT ", base %" GST_TIME_FORMAT, GST_TIME_ARGS (basesink->segment_start), GST_TIME_ARGS (basesink->segment_stop), @@ -551,13 +553,21 @@ gst_base_sink_handle_object (GstBaseSink * basesink, GstPad * pad, * range since the sink might be able to clip the sample. */ if (GST_CLOCK_TIME_IS_VALID (end) && GST_CLOCK_TIME_IS_VALID (basesink->segment_start)) { - if (end <= basesink->segment_start) + if (end <= basesink->segment_start) { + GST_DEBUG ("buffer end %" GST_TIME_FORMAT " <= segment start %" + GST_TIME_FORMAT ", dropping buffer", GST_TIME_ARGS (end), + GST_TIME_ARGS (basesink->segment_start)); goto dropping; + } } if (GST_CLOCK_TIME_IS_VALID (start) && GST_CLOCK_TIME_IS_VALID (basesink->segment_stop)) { - if (basesink->segment_stop <= start) + if (basesink->segment_stop <= start) { + GST_DEBUG ("buffer start %" GST_TIME_FORMAT " >= segment stop %" + GST_TIME_FORMAT ", dropping buffer", GST_TIME_ARGS (start), + GST_TIME_ARGS (basesink->segment_stop)); goto dropping; + } } } basesink->preroll_queued++; @@ -675,9 +685,6 @@ dropping: buf = GST_BUFFER (g_queue_pop_tail (basesink->preroll_queue)); - GST_DEBUG ("dropping sample outside of segment boundaries %" - GST_TIME_FORMAT, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf))); - gst_buffer_unref (buf); GST_PREROLL_UNLOCK (pad); diff --git a/gst/base/gstbasetransform.c b/gst/base/gstbasetransform.c index e962696..7f75448 100644 --- a/gst/base/gstbasetransform.c +++ b/gst/base/gstbasetransform.c @@ -759,6 +759,30 @@ gst_base_transform_event (GstPad * pad, GstEvent * event) GST_STREAM_LOCK (pad); unlock = TRUE; break; + case GST_EVENT_NEWSEGMENT: + { + GstFormat format; + gdouble rate; + gint64 start, stop, base; + + GST_STREAM_LOCK (pad); + gst_event_parse_newsegment (event, &rate, &format, &start, &stop, &base); + if (format == GST_FORMAT_TIME) { + GST_DEBUG_OBJECT (trans, "received NEW_SEGMENT %" GST_TIME_FORMAT + " -- %" GST_TIME_FORMAT ", base %" GST_TIME_FORMAT, + start, stop, base); + trans->have_newsegment = TRUE; + trans->segment_start = start; + trans->segment_stop = stop; + trans->segment_base = base; + trans->segment_rate = rate; + } else { + GST_DEBUG_OBJECT (trans, + "received NEW_SEGMENT in non-time format, ignoring"); + } + GST_STREAM_UNLOCK (pad); + break; + } default: break; } diff --git a/gst/base/gstbasetransform.h b/gst/base/gstbasetransform.h index bc9aec9..d342607 100644 --- a/gst/base/gstbasetransform.h +++ b/gst/base/gstbasetransform.h @@ -59,6 +59,13 @@ struct _GstBaseTransform { gboolean delay_configure; gboolean pending_configure; + gboolean have_newsegment; + + gdouble segment_rate; + gint64 segment_start; + gint64 segment_stop; + gint64 segment_base; + /*< private >*/ gpointer _gst_reserved[GST_PADDING]; }; diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index 5dbe733..1dd5d6c 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -496,7 +496,8 @@ gst_base_sink_handle_object (GstBaseSink * basesink, GstPad * pad, &basesink->segment_base); if (format != GST_FORMAT_TIME) { - GST_DEBUG ("received non time %d DISCONT %" G_GINT64_FORMAT + GST_DEBUG_OBJECT (basesink, + "received non time %d NEW_SEGMENT %" G_GINT64_FORMAT " -- %" G_GINT64_FORMAT ", base %" G_GINT64_FORMAT, format, basesink->segment_start, basesink->segment_stop, basesink->segment_base); @@ -507,7 +508,8 @@ gst_base_sink_handle_object (GstBaseSink * basesink, GstPad * pad, basesink->segment_stop = -1; basesink->segment_base = -1; } else { - GST_DEBUG ("received DISCONT %" GST_TIME_FORMAT " -- %" + GST_DEBUG_OBJECT (basesink, + "received DISCONT %" GST_TIME_FORMAT " -- %" GST_TIME_FORMAT ", base %" GST_TIME_FORMAT, GST_TIME_ARGS (basesink->segment_start), GST_TIME_ARGS (basesink->segment_stop), @@ -551,13 +553,21 @@ gst_base_sink_handle_object (GstBaseSink * basesink, GstPad * pad, * range since the sink might be able to clip the sample. */ if (GST_CLOCK_TIME_IS_VALID (end) && GST_CLOCK_TIME_IS_VALID (basesink->segment_start)) { - if (end <= basesink->segment_start) + if (end <= basesink->segment_start) { + GST_DEBUG ("buffer end %" GST_TIME_FORMAT " <= segment start %" + GST_TIME_FORMAT ", dropping buffer", GST_TIME_ARGS (end), + GST_TIME_ARGS (basesink->segment_start)); goto dropping; + } } if (GST_CLOCK_TIME_IS_VALID (start) && GST_CLOCK_TIME_IS_VALID (basesink->segment_stop)) { - if (basesink->segment_stop <= start) + if (basesink->segment_stop <= start) { + GST_DEBUG ("buffer start %" GST_TIME_FORMAT " >= segment stop %" + GST_TIME_FORMAT ", dropping buffer", GST_TIME_ARGS (start), + GST_TIME_ARGS (basesink->segment_stop)); goto dropping; + } } } basesink->preroll_queued++; @@ -675,9 +685,6 @@ dropping: buf = GST_BUFFER (g_queue_pop_tail (basesink->preroll_queue)); - GST_DEBUG ("dropping sample outside of segment boundaries %" - GST_TIME_FORMAT, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf))); - gst_buffer_unref (buf); GST_PREROLL_UNLOCK (pad); diff --git a/libs/gst/base/gstbasetransform.c b/libs/gst/base/gstbasetransform.c index e962696..7f75448 100644 --- a/libs/gst/base/gstbasetransform.c +++ b/libs/gst/base/gstbasetransform.c @@ -759,6 +759,30 @@ gst_base_transform_event (GstPad * pad, GstEvent * event) GST_STREAM_LOCK (pad); unlock = TRUE; break; + case GST_EVENT_NEWSEGMENT: + { + GstFormat format; + gdouble rate; + gint64 start, stop, base; + + GST_STREAM_LOCK (pad); + gst_event_parse_newsegment (event, &rate, &format, &start, &stop, &base); + if (format == GST_FORMAT_TIME) { + GST_DEBUG_OBJECT (trans, "received NEW_SEGMENT %" GST_TIME_FORMAT + " -- %" GST_TIME_FORMAT ", base %" GST_TIME_FORMAT, + start, stop, base); + trans->have_newsegment = TRUE; + trans->segment_start = start; + trans->segment_stop = stop; + trans->segment_base = base; + trans->segment_rate = rate; + } else { + GST_DEBUG_OBJECT (trans, + "received NEW_SEGMENT in non-time format, ignoring"); + } + GST_STREAM_UNLOCK (pad); + break; + } default: break; } diff --git a/libs/gst/base/gstbasetransform.h b/libs/gst/base/gstbasetransform.h index bc9aec9..d342607 100644 --- a/libs/gst/base/gstbasetransform.h +++ b/libs/gst/base/gstbasetransform.h @@ -59,6 +59,13 @@ struct _GstBaseTransform { gboolean delay_configure; gboolean pending_configure; + gboolean have_newsegment; + + gdouble segment_rate; + gint64 segment_start; + gint64 segment_stop; + gint64 segment_base; + /*< private >*/ gpointer _gst_reserved[GST_PADDING]; }; -- 2.7.4