Commit graph

81 commits

Author SHA1 Message Date
Evan Nemerson e10266e3f3 docs: convert NULL, TRUE, and FALSE to %NULL, %TRUE, and %FALSE
This should help improve documentation generated for
languages other than C.

https://bugzilla.gnome.org/show_bug.cgi?id=730961
2014-05-30 00:20:27 +01:00
Tim-Philipp Müller 6eb6d9ec38 docs: remove outdated and pointless 'Last reviewed' lines from docs
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-26 21:21:51 +01:00
Sebastian Dröge 1d6136b930 segment: gst_segment_offset_running_time() will be available in 1.2.3 2014-01-15 11:13:00 +01:00
Wim Taymans f664fbd198 segment: take offset into account in _to_position()
Take the offset into account when converting between running-time and
segment positions.
2014-01-08 15:23:00 +01:00
Wim Taymans dc0176e4a0 segment: add method to offset the segment running-time
Add a method that can apply an offset to the calculated running-time of
a segment.
2014-01-08 15:04:00 +01:00
Sebastian Rasmussen 53ae1b2c9c docs: Fix typos in function/object descriptions
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=720029
2013-12-07 17:11:12 +00:00
Mark Nauwelaerts ebca6aa84f segment: resurrect sanitizing start and stop for seeking 2013-11-02 16:13:27 +01:00
Wim Taymans 95c6cd37a8 segment: don't WARN, just DEBUG
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=696911
2013-04-04 10:17:30 +02:00
Nicolas Dufresne ab44e14c52 segment: Fix seeking when position is slightly outside the segment
Very often, when the end of a segment is detected by demuxer, the position
is slightly outside the segment boundaries. Currently, if that is the case
the base will be set to NONE instead of normal accumulation. This would
break non-flushing seeks in oggdemux and most likely other demuxers.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=696899
2013-04-04 10:10:24 +02:00
Stefan Sauer 82f7bdd7bb seeking: add more logging for seeking
Especially add logging to error code paths.
2013-02-27 22:17:17 +01:00
Tim-Philipp Müller 666c8c11c6 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 20:44:48 +00:00
Jan Schmidt 1f1e4fc30c GstSegment: Fix doc description string last_stop->position 2012-08-31 06:25:37 -07:00
Wim Taymans c8840b8270 segment: add offset field
Add an offset field that is used to track at what position the segment was
updated. This is used to set the running time to 0 when we do a flushing
seek that doesn't update the position.

See https://bugzilla.gnome.org/show_bug.cgi?id=680306
2012-07-27 17:09:45 +02:00
Wim Taymans f05b0e222f Update for new seeking variable name
When seeking, the start value and type are now called start and start_type.
2012-07-27 15:24:52 +02:00
Wim Taymans 104ef4e7e0 segment: small cleanup
Move the code to update the segment at the end of the function.
2012-07-27 15:24:51 +02:00
Wim Taymans 90e32338c8 segment: remove redundant checks
We don't need to check the segment format anymore because we asserted on them
being equal before.
2012-07-27 13:02:52 +02:00
Wim Taymans 5360ba56f7 basesink: handle -1 step amounts
Define a 0 and -1 step amount. They used to almost do the same thing but now, 0
cancels/stops the current step and -1 keeps on stepping until the end of the
segment.

See https://bugzilla.gnome.org/show_bug.cgi?id=679378
2012-07-18 17:49:32 +02:00
Stefan Sauer 30c30ed171 segment: remove removed api from the docs. 2012-07-11 12:51:30 +02:00
Edward Hervey d3ffa82639 Remove 0.10-related documentation and "Since" markers 2012-07-10 12:03:27 +02:00
Stefan Sauer f165a77fdc segment: also copy the segment flag
Fixes segmented seeks (as tested e.g. in the adder tests in base).
2012-07-09 22:16:46 +02:00
Tim-Philipp Müller 49ea16e041 segment: make sure we don't have unmapped seek flags littering out segment flags
Make GstSeekFlag to GstSegmentFlag conversion explicit, and
set only those seek flags in the segment flags which are
mapped. This makes sure we don't have extraneous flags
littering our segment flag field, which also fixes the
debug printing/serialisation of segment events in the
debug log.
2012-07-04 16:16:04 +01:00
Wim Taymans ce67b0e539 docs: update more documentation 2012-03-29 13:34:50 +02:00
Wim Taymans afba547722 segment: don't use duration in clipping
Don't use the duration in the segment for calculating clipping values.
The duration is expressed in stream time and clipping is done on unrelated
timestamp values.
This used to be interesting for elements that used the segment structure to
implement seeking because then they would use stream-time for the segment
start/stop values and the duration could be used as a fallback when the stop
position was not set. Now that the complete segment event is passed between
elements we cannot do this anymore because some elements might store the
duration and start/stop values with different time bases in the segment.
2012-02-20 14:39:26 +01:00
Olivier Crête e234a10c63 Use macros to register boxed types thread safely 2012-01-28 16:42:38 +00:00
Edward Hervey bf19148acb gstsegment: Initialize with proper type 2011-12-04 11:32:57 +01:00
Wim Taymans a70934e4ef segment: remove GST_SEEK_TYPE_CUR 2011-10-28 16:23:49 +02:00
Wim Taymans 5cf8e68944 Merge branch 'master' into 0.11
Conflicts:
	gst/gstmessage.c
	gst/gstquery.c
	gst/gstregistrychunks.c
	gst/gstsegment.c
	libs/gst/base/gstbasetransform.c
	libs/gst/base/gstbasetransform.h
	libs/gst/base/gsttypefindhelper.c
	plugins/elements/gsttypefindelement.c
2011-08-26 14:37:54 +02:00
Josep Torra c0b0b977d7 segment: use GST_SEEK_FLAG_NONE instead of 0
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:14 +02:00
Koop Mast 4fe5dd2b9d segment: cast to right type
See #653137
2011-06-22 16:58:53 +02:00
Edward Hervey c72321b260 gstsegment: Remove dead assignment
base is unconditionally written a couple of lines below
2011-05-31 18:30:50 +02:00
Wim Taymans 82cc487776 segment: handle wraparound better
Now that we use unsigned values for the segment, handle wraparound when seeking
better.
2011-05-17 17:51:58 +02:00
Wim Taymans bdbc069348 Rework GstSegment handling
Improve GstSegment, rename some fields. The idea is to have the GstSegment
structure represent the timing structure of the buffers as they are generated by
the source or demuxer element.
gst_segment_set_seek() -> gst_segment_do_seek()
Rename the NEWSEGMENT event to SEGMENT.
Make parsing of the SEGMENT event into a GstSegment structure.
Pass a GstSegment structure when making a new SEGMENT event. This allows us to
pass the timing info directly to the next element. No accumulation is needed in
the receiving element, all the info is inside the element.
Remove gst_segment_set_newsegment(): This function as used to accumulate
segments received from upstream, which is now not needed anymore because the
segment event contains the complete timing information.
2011-05-16 11:37:52 +02:00
Wim Taymans c07b57fc05 segment: remove _full version
Rename the _full versions of the functions to the normal function names.
2011-05-09 17:51:07 +02:00
Wim Taymans d63829fc9a segment: remove abs_rate from segment structure
Remove the abs_rate field from the segment structure, we can trivially compute
it when needed.
2011-05-09 16:39:13 +02:00
Tim-Philipp Müller 3256c708be docs: gst: more gobject introspection annotations
Many of these are superfluous, added for clarity.
2010-12-07 18:37:04 +00:00
Wim Taymans 8412c2a656 segment: move g_return_if_fail to where it is needed 2010-12-02 19:03:35 +01:00
Sebastian Dröge 276a55fd24 gstsegment: Actually start==stop==segment_start is inside the segment
Still the old code was wrong as it claimed that start==stop<segment_start
would be inside the segment and returned insane clipping differences.
2009-08-11 13:21:35 +02:00
Sebastian Dröge ca8a0376c5 gstsegment: Clipping should detect start=stop<segment_start as outside the segment
Before it returned that [start,stop] is inside the segment and that the
difference between segment_start and start needs to be clipped. If the
clipping is done on a buffer (like in baseaudiosink) this will result
in the data pointer being at a invalid memory position.

Fixes bug #589849.
2009-08-11 12:59:13 +02:00
Руслан Ижбулатов 18a34288cf segment: fix include order to get config.h before _mingw.h
config.h must always be included before any other includes, either
directly or indirectly via gst_private.h. Fixes #585733.
2009-06-14 20:00:49 +01:00
Wim Taymans afeec70eff segment: make conversion more precise
Make sure the conversion from and the conversion to give the same results.
2009-06-09 10:23:23 +02:00
Wim Taymans 0e74bfe248 segment: add gst_segment_set_running_time
Added new method for closing the segment to a specific running time.

API: GstSegment::gst_segment_set_running_time()
2009-06-04 12:53:20 +02:00
Wim Taymans 92984a116b segment: add method for converting to position
Add gst_segment_to_position() that converts a running_time to a position in the
segment. A faulty variant of this function is currently used in inputselector
but we'll need it for frame stepping too.

API: GstSegment::gst_segment_to_position()
2009-06-03 19:06:30 +02:00
Mark Nauwelaerts 66295d508b Use g_slice_copy instead of g_slice_dup.
A (buggy) glib g_slice_dup macro may cause compiler warnings on e.g. x86_64.
2009-04-03 13:47:35 +02:00
Sebastian Dröge 10bc5670a3 segment: Use g_slice_dup() now 2009-03-26 11:17:01 +01:00
Wim Taymans d2e5ffde24 gst/gstsegment.c: Set the last_stop to a more meaningful position when configuring the segment. ie. the start/stop of...
Original commit message from CVS:
* gst/gstsegment.c: (gst_segment_set_newsegment_full):
Set the last_stop to a more meaningful position when configuring the
segment. ie. the start/stop of the segment or clipped against the
updated segment boundaries.
* tests/check/gst/gstsegment.c: (GST_START_TEST):
Add some unit tests for the last_stop.
2008-10-23 09:49:07 +00:00
Stefan Kost f2da156af7 gst/gstevent.c: Use gst_format_get_name() to improve debug output.
Original commit message from CVS:
* gst/gstevent.c:
Use gst_format_get_name() to improve debug output.
* gst/gstpreset.c:
Remove #ifdef'ed code. Add TODO comment.
* gst/gstsegment.c:
Add debug output to ease spotting format != segment.format assertions.
2008-07-01 05:53:32 +00:00
Tim-Philipp Müller 077450a434 No, let's not use g_slice_{dup|copy} here, since they only exist since GLib 2.14 and we still depend only on >= 2.12....
Original commit message from CVS:
* gst/gstsegment.c:
* tests/check/gst/gstsegment.c:
No, let's not use g_slice_{dup|copy} here, since they only exist
since GLib 2.14 and we still depend only on >= 2.12. Also add
unit test for gst_segment_copy().
2008-05-09 20:48:24 +00:00
Stefan Kost 6e367f59e2 gst/gstsegment.c: The glib macro seems to be borked. Use g_slice_copy directly and cast in the hope that this fixes t...
Original commit message from CVS:
* gst/gstsegment.c:
The glib macro seems to be borked. Use g_slice_copy directly and cast
in the hope that this fixes the warning on 64bit.
2008-04-23 10:14:38 +00:00
Stefan Kost 7bb59c7efc gst/gstsegment.c: Document the new function. Use g_slice_dup() (no need for gst_segment_init()).
Original commit message from CVS:
* gst/gstsegment.c:
Document the new function. Use g_slice_dup() (no need for
gst_segment_init()).
2008-04-23 07:08:53 +00:00
José Alburquerque 9b3f546832 Expose gst_segment_copy() to make things easier for the c++ bindings.
Original commit message from CVS:
Patch by:  José Alburquerque <jaalburqu at svn dot gnome dot org>
* docs/gst/gstreamer-sections.txt:
* gst/gstsegment.c:
* gst/gstsegment.h:
* win32/common/libgstreamer.def:
Expose gst_segment_copy() to make things easier for the c++ bindings.
Fixes #518932.
API: gst_segment_copy()
2008-04-09 22:37:22 +00:00