Commit graph

1882 commits

Author SHA1 Message Date
Vincent Penquerc'h
780f71c4d5 baseparse: reset skip on segments and discontinuities
Large scale skip is an optimization, and thus it is safer to
stop skipping than to continue. Clear skip on segments and
discontinuities, as these are points where it is possible that
the original idea of "bytes to skip" changes.
2015-03-16 12:53:50 +00:00
Tim-Philipp Müller
01e44969df basesink: handle empty buffer list more gracefully
Don't abort, just ignore it. It's like a buffer
without memories.
2015-03-14 21:09:50 +00:00
Tim-Philipp Müller
2b4d066355 adapter: minor optimisation for gst_adapter_take_buffer_list()
Try to allocate buffer list with a suitable size from the
beginning to avoid having to re-alloc the buffer list array.
2015-03-14 21:09:45 +00:00
Tim-Philipp Müller
e6a0f52e3c adapter: add gst_adapter_take_buffer_list()
API: gst_adapter_take_buffer_list()
2015-03-14 17:22:22 +00:00
Tim-Philipp Müller
68012b4d23 collectpads: avoid multiple calls to gst_buffer_get_size() in macro 2015-03-14 16:02:03 +00:00
Tim-Philipp Müller
4a1cee3c44 adapter: avoid multiple calls to gst_buffer_get_size() in macro 2015-03-14 16:02:03 +00:00
Thiago Santos
5e15d4aa60 basesink: drain on allocation query
Allows buffers to be reclaimed when caps is to be renegotiated so
that bufferpools can be stopped. As the allocation query is
serialized all buffers have been already drained from the pipeline,
except this last_sample one.

https://bugzilla.gnome.org/show_bug.cgi?id=682770
2015-03-13 19:03:01 +00:00
Thiago Santos
901fea5985 basesink: when draining, deep copy the last buffer to unref old memory
Use gst_buffer_copy_deep() to force the copy of the underlying
memory instead of possibly doing a shallow copy of the buffer
and just referencing the memory

https://bugzilla.gnome.org/show_bug.cgi?id=745287
2015-03-13 18:37:04 +00:00
Wim Taymans
4b174b14f5 basesink: clean up the need_preroll variable
Based on patch from Song Bing <b06498@freescale.com>

Don't just set the need_preroll flag to TRUE in all cases. When we
are already prerolled it needs to be set to FALSE and when we go to
READY we should not touch it. We should only set it to TRUE in other
cases, like what the code above does.

See https://bugzilla.gnome.org/show_bug.cgi?id=736655
2015-03-11 16:40:17 +01:00
Mark Nauwelaerts
b9411dab75 flowcombiner: add a gst_flow_combiner_update_pad_flow() method
https://bugzilla.gnome.org/show_bug.cgi?id=744572

API: gst_flow_combiner_update_pad_flow()
2015-03-07 20:18:43 +01:00
Mark Nauwelaerts
8ec7272d99 flowcombiner: add a gst_flow_combiner_reset() method
https://bugzilla.gnome.org/show_bug.cgi?id=744572

API: gst_flow_combiner_reset()
2015-03-07 20:18:43 +01:00
Sebastian Dröge
bfaa7d1b9f basesrc: Fix typo in debug message 2015-03-06 11:00:20 +01:00
Edward Hervey
c1d2254b23 baseparse: Don't emit errors on EOS if we saw GAP events
If we saw GAP events (meaning the streams is advancing) before we get
EOS, we should not post an ERROR, since it is not fatal.

https://bugzilla.gnome.org/show_bug.cgi?id=745143
2015-02-26 07:52:05 +01:00
Mark Nauwelaerts
70603c1d27 flowcombiner: fix documentation comment typo 2015-02-23 20:08:20 +01:00
Mark Nauwelaerts
aca7faf520 baseparse: drain segment upon SEGMENT_DONE to ensure proper event order 2015-02-23 20:08:20 +01:00
Mark Nauwelaerts
84f0410186 baseparse: clean up some bogus commented code 2015-02-23 20:08:20 +01:00
Thiago Santos
d718a2befd basesrc: fix documentation and debug message after latency updates
Changes docs and message according to latency handling fix
2015-02-12 14:12:08 -03:00
Sebastian Dröge
4a5ce862a2 Improve and fix LATENCY query handling
This now follows the design docs everywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=744106
2015-02-11 17:53:04 +02:00
Sebastian Dröge
f4bd5f119a basetransform: Short-circuit CAPS query handling if transform_caps returns EMPTY caps
Both for the peer filter caps and the converted caps based on the peer caps.

If the peer filter caps are EMPTY, the peer caps query will also return
EMPTY. There's no ned to both downstream/upstream with this query.
2014-12-22 13:08:37 +01:00
Vincent Penquerc'h
dd40d99710 baseparse: jump over large skips in pull mode
This bypasses the dumping of buffers we still have to do in push mode.

https://bugzilla.gnome.org/show_bug.cgi?id=730053
2014-12-18 13:11:46 +00:00
Edward Hervey
05092eda8e basesink: clamp reported position based on direction
When using a negative rate (rate being segment.rate * segment.applied_rate),
we will end up reporting decreasing positions, therefore adjust the clamping
against last reported value accordingly.

Fixes positions getting properly reported with applied_rate < 0.0

https://bugzilla.gnome.org/show_bug.cgi?id=738092
2014-12-01 10:46:42 +01:00
Sebastian Dröge
154eefecc9 Don't compare booleans for equality to TRUE and FALSE
TRUE is 1, but every other non-zero value is also considered true. Comparing
for equality with TRUE would only consider 1 but not the others.

Also normalize booleans in a few places.
2014-12-01 09:51:37 +01:00
Thiago Santos
8f4ef80fc4 baseparse: update the duration variable before emitting the bus
Otherwise the application might still get the old value if it asks
between the message and the real update.
2014-11-28 17:00:17 -03:00
Sebastian Dröge
21321ce674 basetransform: Compare correct caps variable against NULL before comparing caps 2014-11-27 18:00:57 +01:00
Sebastian Dröge
a7f3571d02 basetransform: Fix caps equality check
Instead of checking if our outcaps are equivalent to the previous incaps, and
if that is the case not setting any caps on the pad... compare against our
previous outcaps because that's what we care about.

Fixes some cases where the outcaps became equivalent to the previous incaps,
but the previous outcaps were different and we were then sending buffers
downstream that were corresponding to the caps we forgot to set on the pad.
Resulting in crashes or image corruption.
2014-11-20 21:37:24 +01:00
Vincent Penquerc'h
7c4fbc9fb1 baseparse: allow skipping more data than we currently have
This can be useful for skipping large unwanted data, such as
large album art, when we know the size of it from a metadata
header.
2014-11-12 13:43:33 +00:00
Sebastian Dröge
a52184ed55 basetransform: Don't bother the subclass with setting the same caps multiple times 2014-11-09 10:42:55 +01:00
Sebastian Dröge
acc295c93b basesink: Don't bother the subclass with setting the same caps multiple times 2014-11-09 10:42:55 +01:00
Sebastian Dröge
674b555bec basesrc: Don't bother the subclass with setting the same caps multiple times 2014-11-09 10:42:54 +01:00
Jan Schmidt
f470d57edd dataqueue: Fix gst_data_queue_new() description.
Reword the function docs, which haven't made any sense since
gst_data_queue_new_full() was removed a few years ago.
2014-11-06 21:09:09 +11:00
Thibault Saunier
56606c5264 basesink: Answer the query position when receiving it from upstream
Currently we are just returning FALSE, but we do have the information
we should just answer the query the same way as when answering through
the GstElement.query vmethod default implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=739580
2014-11-04 11:53:23 +01:00
Luis de Bethencourt
c42b525848 doc: Do not use deprecated gtk-doc 'Rename to' tag
GObject introspection GTK-Doc tag "Rename to" has been deprecated, changing to
rename-to annotation.

https://bugzilla.gnome.org/show_bug.cgi?id=739514
2014-11-02 15:17:57 +00:00
Tim-Philipp Müller
989e97d1dd basesink: don't unlock mutex that is not locked
Fixes 'Attempt to unlock mutex that was not locked'
warning with newer GLibs when sink is shut down in
certain situations. Triggered by the decodebin
test_reuse_without_decoders unit test in -base
sometimes, esp. on slower machines.
2014-10-24 12:51:07 +01:00
Jan Schmidt
33e65d9358 collectpads: Use GST_PTR_FORMAT in debug to output buffer details
Use %GST_PTR_FORMAT instead of %p in debug output so all the buffer
details are output
2014-10-08 01:33:51 +11:00
Matej Knopp
d8aac32c78 baseparse: don't leak caps in gst_base_parse_process_streamheader
https://bugzilla.gnome.org/show_bug.cgi?id=737762
2014-10-03 12:36:27 +01:00
Tim-Philipp Müller
c78a1b111c Revert "baseparse: don't leak caps in gst_base_parse_process_streamheader"
This reverts commit 5e8b4bf085.

This causes refcounting criticals in the baseparse unit test.
2014-10-03 09:01:39 +01:00
Matej Knopp
5e8b4bf085 baseparse: don't leak caps in gst_base_parse_process_streamheader
https://bugzilla.gnome.org/show_bug.cgi?id=737762
2014-10-02 10:39:54 +03:00
Stefan Sauer
d5518edf12 fixme: bump leftover 0.11 fixme comments 2014-09-25 21:27:03 +02:00
Stefan Sauer
e8c5627802 basesrc: move the quick return up
Don't assign local vars if we skip anyway. Add logging for failure conditio
2014-09-25 20:33:17 +02:00
Jonas Holmberg
4a304a7774 flowcombiner: add a gst_flow_combiner_clear() method
https://bugzilla.gnome.org/show_bug.cgi?id=737359

API: gst_flow_combiner_clear()
2014-09-25 15:40:42 +01:00
Stefan Sauer
feeb2902da docs: fix a small contradition in the docs
The vmethod get_size() shall return the size in 'format' as configured by
_set_format().
2014-09-23 12:53:18 +02:00
Aurélien Zanelli
fefd6d06a1 basesrc: handle reference in set_allocation rather than in prepare_allocation
Otherwise we can forget to unref objects in error cases.

https://bugzilla.gnome.org/show_bug.cgi?id=736680
2014-09-16 10:17:28 +03:00
Tim-Philipp Müller
d4a4a96f82 baseparse: minor docs fix 2014-09-09 20:43:02 +01:00
Thiago Santos
59c34a8ff7 baseparse: handle streamheaders by prepending them to the stream
Add a first_buffer boolean state flag to have baseparse do actions
before pushing data. This is used to check the caps for streamheader
buffers that are prepended to the stream, but only if the first buffer
isn't already marked with the _HEADER flag. In this case, it is assumed
that the _HEADER marked buffer is the same as the streamheader.

https://bugzilla.gnome.org/show_bug.cgi?id=735070
2014-08-27 10:30:09 -03:00
Tim-Philipp Müller
86d7a597f0 bytereader: add gst_byte_reader_peek_sub_reader() and _get_sub_reader()
Adds API to get or peek a sub-reader of a certain size from
a given byte reader. This is useful when parsing nested chunks,
one can easily get a byte reader for a sub-chunk and make
sure one never reads beyond the sub-chunk boundary.

API: gst_byte_reader_peek_sub_reader()
API: gst_byte_reader_get_sub_reader()
2014-08-15 10:03:26 +01:00
Aurélien Zanelli
b9fa37f074 docs: make explicit that the caps passed to gst_base_src_set_caps() are 'tranfer none'
https://bugzilla.gnome.org/show_bug.cgi?id=733741
2014-08-15 09:53:09 +01:00
Tim-Philipp Müller
f88a981997 base: and fix build with new g-i again 2014-08-14 14:38:57 +01:00
Tim-Philipp Müller
55498523e4 base: remove g-i annotation that makes older g-ir-scanner crash
Just remove one skip annotation that causes this:

  ** (g-ir-compiler:12458): ERROR **: Caught NULL node, parent=empty

with older g-i versions such as 1.32.1.
2014-08-14 14:27:13 +01:00
Tim-Philipp Müller
d9516d3c58 bytereader: use unchecked inline variant for get_remaining in more places
We've already done the g_return_*_if_fail (reader != NULL)
dance in those places, so no need to do it again.
2014-08-06 14:23:47 +01:00
Thiago Santos
f8323b17fb bytereader: add gst_byte_reader_masked_scan_uint32_peek
Adds gst_byte_reader_masked_scan_uint32_peek just like
GstAdapter has a _peek and non _peek version

Upgraded tests to check that the returned value is correct in the
_peek version

API: gst_byte_reader_masked_scan_uint32_peek

https://bugzilla.gnome.org/show_bug.cgi?id=728356
2014-07-24 17:00:09 -03:00
Thibault Saunier
4c38895f4b baseparse: Return FLOW_FLUSHING when pushing a frame on a pad that has been flushed
When going to READY, it is possible that we are still pusing a frame but that
our srcpad has already been set to flushing. In that case we should not
post any error on the bus but instead cleanly return FLOW_FLUSHING.

https://bugzilla.gnome.org/show_bug.cgi?id=733320
2014-07-17 17:46:16 +02:00
Vincent Penquerc'h
2dc8839234 basesink: reset QoS on segment event
This avoids spurious warnings about slow machine when upstream
sends new segments without flushing.
2014-07-01 16:30:23 +01:00
Evan Nemerson
5abc82e9f3 introspection: Assorted minor introspection and documentation fixes
https://bugzilla.gnome.org/show_bug.cgi?id=732534
2014-07-01 09:03:41 +02:00
Sebastian Dröge
4720e6d0e0 dataqueue: Hide from bindings
Other languages have their own data structures that are more convenient to
use.

https://bugzilla.gnome.org/show_bug.cgi?id=731303
2014-06-26 19:32:28 +02:00
Sebastian Dröge
0d5177b5fe queuearray: Hide from bindings
Other languages have their own data structures that are more convenient to use.

https://bugzilla.gnome.org/show_bug.cgi?id=731350
2014-06-26 19:32:18 +02:00
Evan Nemerson
eebff7b048 base: assorted introspection fixes and additions
https://bugzilla.gnome.org/show_bug.cgi?id=731542
2014-06-26 18:55:26 +02:00
Evan Nemerson
c38f3254f8 base: add (nullable) annotations to return values
https://bugzilla.gnome.org/show_bug.cgi?id=731542
2014-06-26 18:55:25 +02:00
Thiago Santos
b7516dbf7c baseparse: avoid returning _OK for _NOT_LINKED
When the parser receives non-aligned packets it can push a buffer
and get a not-linked return while still leaving some data still to
be parsed. This remaining data will not form a complete frame and
the subclass likely returns _OK and baseparse would take that
as the return, while it the element is actually not-linked.

This patch fixes this by storing the last flow-return from a push
and using that if a parsing operation doesn't result in data being
flushed or skipped.

https://bugzilla.gnome.org/show_bug.cgi?id=731474
2014-06-25 12:13:07 -03:00
Tim-Philipp Müller
f6e2dee6f9 flowcombiner: fix g-i transfer annotations 2014-06-16 09:18:45 +01:00
Edward Hervey
ecd8fd3511 flowcombiner: Fixed GBoxedCopyFunc
I'll just quote the most interesting man in the world:

"I don't usually push commits, but when I do I don't compile it
first"
2014-06-16 08:43:57 +02:00
Tim-Philipp Müller
b05eeb9df4 flowcombiner: keep a ref to the pads we're using
Needed for use via the boxed type.

https://bugzilla.gnome.org/show_bug.cgi?id=731355
2014-06-14 11:32:42 +01:00
Tim-Philipp Müller
49fedb521f flowcombiner: add boxed type for bindings
https://bugzilla.gnome.org/show_bug.cgi?id=731355
2014-06-14 10:54:41 +01:00
Nicolas Dufresne
d99e621533 bytereader: Use concistant derefence method
This is minor style fix to not mix *var and var[N].
2014-06-10 10:23:13 -04:00
Sungho Bae
d3b2f6e4b8 bytereader: Use pointer instead of index access
Currently the scan uses Boyer-moore method and its performance is good.
but, it can be optimized from an implementation of view.

The original scan code is implemented by byte array and index-based access.
In _scan_for_start_code(), the index is increasing from start to end and the
base address of the byte array is referred to as return value.

In the case, index-based access can be replaced by pointer access, which
improve the performance by removing index-related operations.

Its performace is enhanced by approximately 8% on arm-based embedded devices.
Although it seems trivial, it can affect the overall performance because the
_scan_for_start_code() function is very often called when H.264/H.265 video is
played.

In addition, the technique can apply for all architectures and it is good in
view of readability and maintainability.

https://bugzilla.gnome.org/show_bug.cgi?id=731442
2014-06-10 09:35:38 -04:00
Evan Nemerson
1cd4bd64b0 queuearray: fix expanding size of queue from 1
Without we would not actually expand and access
memory beyond the allocated region for the array.

https://bugzilla.gnome.org/show_bug.cgi?id=731349
2014-06-07 09:45:39 +01:00
Evan Nemerson
75e0a3c676 dataqueue: clear up documentation of gst_data_queue_new
The gpointer argument is passed to all three callbacks, not just one.

https://bugzilla.gnome.org/show_bug.cgi?id=731302
2014-06-07 09:30:14 +01:00
Evan Nemerson
1fe6d3ad08 introspection: fix some minor annotation bugs
https://bugzilla.gnome.org/show_bug.cgi?id=730982
2014-06-06 15:15:12 -04:00
Evan Nemerson
25af4ad652 base: use correct syntax in documentation more consistently
Previously, many constants were prefixed with # or unprefixed,
some functions and macros were prefixed with # instead of suffixed
with (), etc.

https://bugzilla.gnome.org/show_bug.cgi?id=731293
2014-06-06 15:09:21 -04:00
zhouming
2793f808ee baseparse: Pass rate of input segment to output segment
https://bugzilla.gnome.org/show_bug.cgi?id=729701
2014-06-06 13:53:35 +03:00
Tim-Philipp Müller
2f265b7571 flowcombiner: beautify headers a little 2014-05-27 10:09:02 +01:00
Tim-Philipp Müller
a6d9c1a3c3 docs: add GstFlowCombiner 2014-05-27 10:05:51 +01:00
Tim-Philipp Müller
0b194cf664 base: include flowcombiner header from base.h 2014-05-27 09:55:27 +01:00
Thiago Santos
9e8bd15c12 flowcombiner: add GstFlowCombiner
Adds a utility struct that is capable of storing and aggregating flow returns
associated with pads.

This way all demuxers will have a standard function to use and have the
same expected results.

Includes tests.

https://bugzilla.gnome.org/show_bug.cgi?id=709224
2014-05-26 15:29:53 -03:00
Sebastian Dröge
70b38dd937 basetransform: Passthrough ALLOCATION queries in passthrough mode even if we had no caps yet
Or if the element does not care about caps at all.

Also remove an assigned but unused local variable.

https://bugzilla.gnome.org/show_bug.cgi?id=710268
2014-05-26 14:24:15 +02:00
Tim-Philipp Müller
fa94322349 sparsefile: keep it private as helper API for downloadbuffer
There's no expectation that any other element or applications
might want to use this helper API any time soon, so keep it
private for the time being. There were open questions regarding
portability and binding-friendliness too.

This also removes the gio dependency of -base again.

https://bugzilla.gnome.org/show_bug.cgi?id=729951
https://bugzilla.gnome.org/show_bug.cgi?id=729949
2014-05-13 20:05:55 +01:00
Nicolas Dufresne
e73907200c basetransform: Correctly reset configuration
When pool can't we use, and we fall back to default pool, we need to
correctly reset that pool configuration.
2014-05-09 14:30:03 -04:00
Nicolas Dufresne
157befa04c pool-nego: Correctly reset the configuration
When pool cannot be used, correctly reset the configuration before
configuration a default pool.
2014-05-08 14:12:16 -04:00
Nicolas Dufresne
23e69d98d8 pool-nego: Retry setting configuration with modified config
Buffer pool set_config() may return FALSE if requested configuration needed
small changes. Reget the config and try setting it again (validating the
changes first). This ensure we have a configured pool if possible.

https://bugzilla.gnome.org/show_bug.cgi?id=727916
2014-05-08 13:11:14 -04:00
Tim-Philipp Müller
250f89a7e9 sparsefile: add some Since markers to docs 2014-05-08 16:30:55 +01:00
Tim-Philipp Müller
4a6ab37591 sparsefile: sprinkle G_BEGIN_DECLS / G_END_DECLS
for c++, and remove outdated comment, and add
new unit test to .gitignore.
2014-05-08 16:27:21 +01:00
Wim Taymans
45855e2795 Add new downloadbuffer element
See https://bugzilla.gnome.org/show_bug.cgi?id=680183
2014-05-08 15:53:45 +02:00
Nicolas Dufresne
3895e431bd basesink: Always render prepared buffer
Currently, if prepare() takes too much time, we skip the call to render().
The side effect of this, is that we endup starving the render(). The solution
in this patch is to always render frames that are on time before prepare() is
executed. This will maximize the number of frames we display and smoothly
degrade the rendering performance.

https://bugzilla.gnome.org/show_bug.cgi?id=729335
2014-05-02 18:52:44 -04: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
63c1728040 basesrc: Make sure to always hold the LIVE_LOCK when going to the flushing label
https://bugzilla.gnome.org/show_bug.cgi?id=728596
2014-04-20 12:01:01 +02:00
Antoine Jacoutot
3e24bbefba libs: g-ir-scanner: do not hardcode libtool path
https://bugzilla.gnome.org/show_bug.cgi?id=726571
2014-04-17 09:26:20 +01:00
Jose Antonio Santos Cadenas
f880742638 baseparse: Fix memory leak
Queued frames were not released after being pushed, this
caused a leak of the GstBaseParseFrame structure.

https://bugzilla.gnome.org/show_bug.cgi?id=727883
2014-04-09 10:47:39 +02:00
Edward Hervey
6c2c49a590 baseparse: Remove always-true-checks
a gsize is guaranteed to be positive on all systems since it's an
unsigned value.

CID #1037147
2014-04-05 11:52:03 +02:00
Edward Hervey
456f28cc61 adapter: Remove always-true-checks
a gsize is guaranteed to be positive on all systems since it's an
unsigned value.

CID #1037145
CID #1037146
2014-04-05 11:44:01 +02:00
Sebastian Dröge
37670af79c baseparse: Make sure to set the DISCONT flag on the first buffer of each GOP in reverse playback mode 2014-04-03 20:32:02 +02:00
Thiago Santos
03a2388b60 basesrc: removing duplicated inner if
The inner if replicates the same code of the outer and is useless
as flag_segment will always be true.

Found by coverity.
2014-04-03 13:54:19 -03:00
Sebastian Dröge
a76db74496 baseparse: Fix splitting and reversing of GOPs in reverse playback mode
We iterate the current discont group backwards and push each GOP forwards,
starting from the last one. However if the first buffer in the current
discont group is a keyframe, we will keep it around until next time,
which is far from ideal. Just push it.
2014-03-29 10:32:25 +01:00
Wim Taymans
093574053f basesink: copy last_sample on DRAIN
Make sure we don't hold a ref to a buffer from before the DRAIN query by
making a copy of the last_buffer.
2014-03-24 16:34:27 +01:00
Sebastian Dröge
ba943a82c0 basesink: Update start time when we lose our state
Otherwise we report not the correct position while the state is lost.
2014-03-18 18:11:15 +01:00
Sebastian Dröge
f7b71d3007 basesink: Don't clip the reported position in PAUSED to after the last buffer end timestamp
Otherwise we jump forward when pausing, and go backwards a bit again
when resuming playback.
2014-03-18 16:48:52 +01:00
Mathieu Duponchelle
d784d59262 collectpads: When seek flushed, immediately set eospads to 0
This prevents situations where a first branch would get seeked and
receive a buffer before all branches got seeked, and thus collected
would get called based on EOS from the previous segment.

As a consequence, during the process of seeking, don't decrease
the eospads number when a FLUSH_STOP is received.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=724571
2014-03-16 18:15:17 +01:00
Sebastian Dröge
595481c759 collectpads: Unref peer pad 2014-03-16 17:47:38 +01:00
Mathieu Duponchelle
c86e53ab77 collectpads: Forward seek events to the peer directly
Taken from the adder seek handling code.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=726461
2014-03-16 17:47:38 +01:00
Sebastian Rasmussen
3de939cb5b adapter: Adapt gst_adapter_copy() for bindings
This is done by introducing a new gst_adapter_copy_bytes() call that
returns a GBytes structure.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725476
2014-03-15 13:16:16 +01:00
Sebastian Rasmussen
034a3ab86f docs: Fix typos and remove unknown annotations
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725517
2014-03-02 21:47:52 +01:00
Thiago Santos
2c2e55789d basesrc: Do not send eos when seeking after last buffer
If pushing the last buffer triggers a seek from downstream, do not
go into EOS if a new segment was requested.

Contains unit test

https://bugzilla.gnome.org/show_bug.cgi?id=724757
2014-02-24 10:37:57 -03:00
Wim Taymans
04a6c661c8 basesrc: in automatic_eos mode, don't modify the size
Don't set the size to -1 in automatic_eos mode (which also updates the
duration to -1). We only want automatic_eos mode influence the maxsize
calculations without any side effects.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=724564
2014-02-18 11:57:49 +01:00
Sebastian Dröge
f47c704b99 basesrc: Add gst_base_src_set_automatic_eos() API
This defaults to TRUE and if it is set to FALSE it is the subclasses
responsibility to return GST_FLOW_EOS from the create() vmethod once
the stream is done.
2014-02-13 12:09:06 +01:00
Brendan Long
f85c1c4648 gst: clear floating references for GstTask, GstTaskPool and GstCollectPads
https://bugzilla.gnome.org/show_bug.cgi?id=710342
2014-02-06 22:50:53 +01:00
Stefan Sauer
f6d638153c docs: fix more gtk-doc warnings 2014-02-01 16:18:13 +01:00
Thiago Santos
78d13b6642 basesrc: do not forget to clear the forced_eos flag
otherwise it will always use the seqnum of the event
sent by the application
2014-01-24 13:36:33 -03:00
Thiago Santos
fdfc6dc983 basesrc: preserve seqnum of eos events sent by the user
Store the eos event seqnum and use it when creating the
new eos event to be pushed downstream. To know if the eos
was caused by the eos events received on send_event, a
'forced_eos' flag is used to use the correct seqnum on
the event pushed downstream.

Useful if the application wants to check if the EOS message
was generated from its own pushed EOS or from another source
(stream really finished).

Also adds a test for this

https://bugzilla.gnome.org/show_bug.cgi?id=722791
2014-01-24 09:31:44 -03:00
Thiago Santos
a3ff2976cc baseparse: do not accumulate buffers on passthrough mode
If on passthrough during reverse playback, do not accumulate buffers as
baseparse will never check for DISCONT flag to push those buffers.
So just push buffers downstream as if it was forward playback.

https://bugzilla.gnome.org/show_bug.cgi?id=721941
2014-01-13 08:43:28 -03:00
Stefan Sauer
6a05291ca2 basesrc: don't confuse GST_PAD_MODE_NONE and PULL
Use a switch-case to explicitly handle all pad-modes. This way we don't log an error when the pad is not yet activated.
2014-01-09 08:49:40 +01:00
Thiago Santos
51fa54a281 baseparse: do not ignore TIME segments
TIME segments are being ignored and a standard initialized
segment is used instead. This causes issues as not properly detecting
reverse playback or not cliping output based on the segment.

This seems to be a regression from one of the GstSegment/GstEvent
redesigns on the 0.10 -> 1.0 transition
2014-01-08 16:40:23 -03:00
Wim Taymans
888ab23968 collectpads: take offset into account for expected segment position
The firt valid segment position is start + offset.
Also add some more debug and a FIXME
2014-01-08 15:04:00 +01:00
Stefan Sauer
74adc33982 basesrc: demote error to warning
This is not an error. A subclass returning FALSE for is_seekable() is one way of
saying that we can't operate in pull mode.
2014-01-06 21:10:33 +01:00
Thiago Santos
e02c00a58a baseparse: remove pending_segment as it was being misused
It wasn't required, instead baseparse was using it to check the media
caps to identify if it was handling audio or video.

The pending_segment was removed and a checked_media boolean
replaced it for a more accurate naming.

https://bugzilla.gnome.org/show_bug.cgi?id=721350
2014-01-02 16:48:23 -03:00
Thiago Santos
accaadf52a baseparse: push pending events before GAP event
A GAP event is handled as an empty buffer by sinks and they expect
to receive start up events before GAP events (like a segment).

This is important specially if there is a GAP at the beginning of
a stream (before any buffers) so that the segment event can be
pushed downstream before the GAP

https://bugzilla.gnome.org/show_bug.cgi?id=721350
2014-01-02 16:38:40 -03:00
Thiago Santos
d917eb7160 baseparse: refactor pending events pushing
Refactor code repeated 3 times to a common function

https://bugzilla.gnome.org/show_bug.cgi?id=721350
2014-01-02 16:38:40 -03:00
David Svensson Fors
892d36211f basesrc: use segment start if DTS for first buffer is unset
https://bugzilla.gnome.org/show_bug.cgi?id=720199
2013-12-17 10:47:55 +01:00
Tim-Philipp Müller
fcfe7085b9 bytereader: add inline variant of gst_byte_reader_init() 2013-12-14 18:38:41 +00:00
Tim-Philipp Müller
a6010a9155 docs: fix docs for gst_queue_array_peek_head() 2013-12-14 18:31:38 +00: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
Sebastian Rasmussen
e8ecf3c407 Fix some typos in code comments and debug messages
https://bugzilla.gnome.org/show_bug.cgi?id=720029
2013-12-07 17:09:39 +00:00
Olivier Crête
68697682ce basesrc: Set format to TIME if do-timestamp is TRUE
https://bugzilla.gnome.org/show_bug.cgi?id=702842
2013-12-05 13:29:05 -05:00
Sebastian Rasmussen
b40fa2b8c3 docs: cosmetic changes in references/decriptions
* fix typo GstBufferFlag -> GstBufferFlags
 * fix typo GstFeatures -> GstCapsFeatures
 * fix typo GstAllocatorParams -> GstAllocationParams
 * fix typo GstContrlSources -> GstControlSource
 * do not refer to gstcheck as an object
 * make references gtk_init() and tcase_set_timeout() not be references
 * gst_element_get_pad() renamed gst_element_get_static_pad()
 * gst_clock_id_wait_async_full() renamed gst_clock_id_wait_async()
 * _drop_element() is really gst_queue_array_drop_element()
 * gst_pad_accept_caps() was removed, do not refer to it
 * separate GST_META_TAG_MEMORY_STR declaration from description
 * do not describe removed gst_collect_pads_collect()
 * correctly link to GstElementClass' virtual set_context()

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=719614
2013-12-02 21:01:08 +00:00
Jan Schmidt
5db5fc4227 basesink: Add debug into gst_base_sink_default_query() for accept_caps 2013-11-26 02:20:14 +11:00
Tim-Philipp Müller
9f669e5ea5 docs: cosmetic since marker fixes 2013-11-16 16:09:40 +00:00
Mark Nauwelaerts
e24722c52c baseparse: ensure to preserve upstream timestamps
... rather than have subclass coming up with an internally parsed one.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=707230
2013-11-16 15:17:57 +01:00
Sebastian Dröge
959e87cf2a collectpads: Always send SEEK events to all pads, even if one fails 2013-11-11 16:50:42 +01:00
Sebastian Dröge
911af13b5c collectpads: Update documentation for flushing seek handling 2013-11-11 16:50:42 +01:00
Sebastian Dröge
6250120d76 collectpads: Don't leak seek events 2013-11-11 16:50:42 +01:00
Alessandro Decina
7aec5739eb collectpads: implement flushing seek support
Implement common flushing seek logic in GstCollectPads. Add new
API so that elements can opt-in to using the new logic
(gst_collect_pads_src_event_default) and can extend it
(gst_collect_pads_set_flush_function) to flush any internal
state.

See https://bugzilla.gnome.org/show_bug.cgi?id=706779 and
https://bugzilla.gnome.org/show_bug.cgi?id=706441 for the
background discussion.

API: gst_collect_pads_set_flush_function()
API: gst_collect_pads_src_event_default()

https://bugzilla.gnome.org/show_bug.cgi?id=708416
2013-11-11 16:50:42 +01:00
Mark Nauwelaerts
e10af7c409 basesrc: mind boggling wrap when comparing offsets 2013-11-02 16:13:27 +01:00
Mark Nauwelaerts
8da78d1595 baseparse: try first frame pts and dts for a valid start timestamp 2013-11-02 16:13:27 +01:00
Mark Nauwelaerts
3aaa3fcf92 baseparse: print proper variable in debug statement 2013-11-02 16:13:27 +01:00
Thibault Saunier
0564c1c2b8 collectpads: Call the collected function while it returns FLOW_OK
This allows us to make sure the elements is EOS and does not have
remaining buffers to be drained.

https://bugzilla.gnome.org/show_bug.cgi?id=709637
2013-10-09 20:29:02 -03:00
Brendan Long
a89d53dd32 docs: fix spelling of "generic" in GstBaseSrc's documentation.
https://bugzilla.gnome.org/show_bug.cgi?id=708870
2013-09-26 21:15:27 +01:00
Sebastian Dröge
20f1c96c89 collectpads: Make sure that the object lock is always taken when accessing the private pad list
https://bugzilla.gnome.org/show_bug.cgi?id=708636
2013-09-24 10:44:34 +02:00
Mathieu Duponchelle
c79e5bbcad collectpads: Use private pad list in set_flushing_unlocked
pads->data is the public list. It is dynamically rebuilt at each call to
check_collected, in check_pads to be specific. When you add a pad and
collectpads have been started, it is not added to the public list.

Thus there exists a possible race where :

1) You would add a pad to collectpads while running.
2) You set collectpads to flushing before check_collected has been called again
-> the pad is not set to flushing
3) the pad starts pushing data as downstream might not be prepared, in the case
of adder it then returns FLOW_FLUSHING.
4) elements like demuxers, when they get a FLOW_FLUSHING, stop their tasks,
never to be seen again.

https://bugzilla.gnome.org/show_bug.cgi?id=708636
2013-09-24 10:44:34 +02:00
Mathieu Duponchelle
8d24c4e451 basetransform: implement a default transform_meta.
If a metadata has no dependency as shown by the tags, copy it.
2013-09-09 15:32:18 +02:00
Thiago Santos
3dc8ee97e5 basesrc: preserve seqnum on segments after seeks
The seqnum of the segment after a seek should be the same of
the seek event. Downstream elements might rely on seqnums to
identify events related to a seek.

This is particularly important when a demuxer maps a TIME seek
into a BYTES seek for upstream and it needs to identify the
corresponding segment event and map it back into TIME to push
downstream, possibly using the values from the original seek
event.

https://bugzilla.gnome.org/show_bug.cgi?id=707530
2013-09-05 15:40:04 -03:00
Zaheer Abbas Merali
d1d99af229 collectpads: Don't unref NULL GstCollectData
If a pad is removed while a collectpads element (say adder) is in a chain
function waiting to be collected, there is a possibility that an unref happens
on a NULL pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=707536
2013-09-05 14:15:30 +02:00
Tim-Philipp Müller
3057001622 basesink: demote log message, don't spam INFO level when handling buffer lists 2013-08-29 11:07:38 +01:00
Edward Hervey
307d67f8c0 basetransform: Don't push out identical caps
This avoids triggering plenty of extra code/methods/overhead downstream when
we can just quickly check whenever we want to set caps whether they are
identical or not

https://bugzilla.gnome.org/show_bug.cgi?id=706600
2013-08-22 19:06:47 +02:00
Wim Taymans
44811ab650 basesrc: improve flush-start handling
Use custom code to implement flush-stop, we can't reuse the set_flushing code
because we can't touch the live_playing flag and we need to signal the
streaming thread.
2013-08-14 17:44:48 +02:00
Wim Taymans
9006f203d0 basesrc: stop flushing in flush-stop 2013-08-14 17:14:15 +02:00
Wim Taymans
d95c227641 basesrc: handle flush better
Unlock the streaming thread when flushing so that we can
insert the flush-stop correctly.
2013-08-14 16:58:41 +02:00
Edward Hervey
3c49b5d23b baseparse: Add a property to disable passthrough
In some specific cases (like transmuxing) we want to force the element
to actually parse all incoming data even if the element deems it is not
necessary.

This property simply ignores requests from the element to enable passthrough
mode which results in processing always being enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=705621
2013-08-13 17:11:35 +02:00
Thiago Santos
581c4297d0 dataqueue: add gst_data_queue_push_force
Adds a variant of the _push function that doesn't check the queue limits
before adding the new item. It is useful when pushing an element to the
queue shouldn't lock the thread.

One particular scenario is when the queue is used to serialize buffers
and events that are going to be pushed from another thread. The
dataqueue should have a limit on the amount of buffers to be stored to
avoid large memory consumption, but events can be considered to have
negligible impact on memory compared to buffers. So it is useful to be
used to push items into the queue that contain events, even though the
queue is already full, it shouldn't matter inserting an item that has
no significative size.

This scenario happens on adaptive elements (dashdemux / mssdemux) as
there is a single download thread fetching buffers and putting into the
dataqueues for the streams. This same download thread can als generate
events in some situations as caps changes, eos or a internal control
events. There can be a deadlock at preroll if the first buffer fetched
is large enough to fill the dataqueue and the download thread and the
next iteration of the download thread decides to push an event to this
same dataqueue before fetching buffers to other streams, if this push
locks, the pipeline will be stuck in preroll as no more buffers will be
downloaded.
There is a somewhat common practice in dash streams to have a single
very large buffer for audio and one for video, so this will always
happen as the download thread will have to push an EOS right after
fetching the first buffer for any stream.

API: gst_data_queue_push_force

https://bugzilla.gnome.org/show_bug.cgi?id=705694
2013-08-13 12:00:48 -03:00
Nicolas Dufresne
de75bca9b3 bytereader: Accelerate MPEG/H264 start code scanning
Accelerate MPEG/H264 start code scanning using Boyer-Moor bad character
heuristic.

https://bugzilla.gnome.org/show_bug.cgi?id=702357
2013-08-10 18:54:34 -04:00
Edward Hervey
991d6462a8 typefindhelper: Avoid using buffer_get_size in tight loops
Calling gst_buffer_get_size represented 2/3 of the cost of helper_find_peek
which was called whenever a typefindfunction wanted to peek at data.

We already know the size (from the GstMapInfo), so just use that.
2013-07-30 06:59:44 +02:00
Sebastian Dröge
ef8455d395 base: Fix handling of SEGMENT query
The values should be in stream-time, and start/stop should not
be swapped for negative rates.
2013-07-29 12:10:45 +02:00
Sebastian Dröge
eb67ca7625 baseparse: Implement SEGMENT query 2013-07-29 10:49:18 +02:00
Thiago Santos
aa5ea6d80e baseparse: fix seqnum handling for seeks
Use the same seqnum as the seek for flushes/segments that are
caused by the seek. Also do the same for segment events

Fixes #676242
2013-07-25 15:19:35 -03:00
Sebastian Dröge
bfb6844399 basesink: Don't shadow variables that are set inside our scope and then used outside our scope
Fixes uninitialized use of these variables.
2013-07-24 11:21:27 +02:00
Sebastian Dröge
0a41beaa56 basesink: Print some debug output if a stream-start event without group-id arrives
Ideally all elements would implement handling of that to get proper
stream-start message handling and other things.
2013-07-23 18:53:44 +02:00
Sebastian Dröge
6363216e43 base: Use new group-id field in stream-start event and message 2013-07-22 15:30:10 +02:00
Olivier Crête
915f418cc4 adapter: Take account of the skip in gst_adapter_take_buffer_fast()
Include regression test
2013-07-16 15:38:11 -04:00
Olivier Crête
5920491597 adapter: Add function to return buffer composed of multiple memories
API: gst_adapter_take_fast()
2013-07-16 14:07:48 -04:00
Sebastian Dröge
d60c2c2864 basesrc: Leave the loop function faster if we're flushing
Especially don't even try to send stream-start event or try
to negotiate.

https://bugzilla.gnome.org/show_bug.cgi?id=704100
2013-07-15 11:32:10 +02:00
Thibault Saunier
6cc39f42a9 basesrc: Do not lock a mutex that does not exist
The GST_LIVE_LOCK is on GstBaseSrc, not on its source pad.
2013-07-04 20:56:19 -04:00
Wim Taymans
97b1e17b09 baseparse: reset PTS after seek
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=702778
2013-07-03 21:26:18 +02:00
Nicolas Dufresne
4656d18fd5 Add few missing allow-none annotation 2013-07-03 14:25:07 -04:00
Sjoerd Simons
12a72d2b08 basetransform: optimize default acceptcaps implementation
Pass the fixed caps we're asked to accept as a filter for the caps
query, so we don't get a fully-expanded set of caps back (which we don't
need and can take a lot of time for intersection).

This reduces the time for camerabin to produce a second frame on a
logitech C910 camera from around 52 seconds to a bit less then 16
seconds on my system.

https://bugzilla.gnome.org/show_bug.cgi?id=702632
2013-06-19 15:11:57 +02:00
Wim Taymans
124b8e38af basesink: call state change in all cases
When we asynchronously go from READY to PLAYING, also call the
state change function so that subclasses can update their state for PLAYING.
Because the PREROLL lock is not recursive, we can't make this without
races and we must assume for now that the subclass can handle concurrent calls
to PAUSED->PLAYING and PLAYING->PAUSED. We can make this assumption because not
many elements actually do something in those state changes and the ones that
did would be broken even more without this change.

https://bugzilla.gnome.org/show_bug.cgi?id=702282
2013-06-17 10:36:34 +02:00
Sebastian Dröge
bab1122a93 basesrc: Only force-update the duration for dynamic sources when doing the DURATION query
Doing it after every single create() is not very efficient and not necessary.
Especially on network file systems fstat() is not cached and causes network
traffic, making the source possibly unusable slow.

https://bugzilla.gnome.org/show_bug.cgi?id=652037
2013-06-06 16:46:12 +02:00
Wim Taymans
cf4334fbfb basesink: improve position reporting without clock
When no base time or when sync is disabled, use the same logic as
in paused to report position. The logic in PLAYING assumes we use the
clock.
2013-05-30 06:51:24 +02:00
Tim-Philipp Müller
4d1cb14c68 basetransform: remove 0.10-ism from docs
gst_buffer_pad_alloc() never existed, and gst_pad_alloc_buffer()
doesn't exist any more either, so don't mention it in the docs.

https://bugzilla.gnome.org/show_bug.cgi?id=694714
2013-05-24 23:01:09 +01:00
Sebastian Dröge
3e515099ec basetransform: Return GST_FLOW_ERROR if the allocator did not allow to allocate a buffer 2013-05-24 14:37:37 +02:00
Sebastian Dröge
1319196349 basesrc: Add FIXME comment for unused assignment results 2013-05-08 08:52:25 +02:00
Sebastian Dröge
f27a3e12f6 baseparse: Only infer TS if PTS interpolation is enabled
Otherwise this is breaking timestamps of formats that
need reordering.

https://bugzilla.gnome.org/show_bug.cgi?id=597662
2013-04-23 11:49:15 +02:00
Sebastian Dröge
86b4e1841e basesink: Don't set last_render_time if we're checking for a late buffer before ::prepare()
This makes sure that at least one buffer per second is rendered if buffers
are dropped before ::prepare. Without this change, at least one buffer per
second wouldn't be too late before ::prepare anymore but would be dropped
before ::render because of last_render_time being set before ::prepare
already.
2013-04-19 10:57:01 +02:00
Thiago Santos
1681a1b1e0 dataqueue: add gst_data_queue_peek
This function works just like gst_data_queue_pop, but it doesn't
remove the object from the queue.

Useful when inspecting multiple GstDataQueues to decide from which
to pop the element from.

Add: gst_data_queue_peek
2013-04-18 14:45:47 -03:00
Douglas Bagnall
39716e555b GstCollectPads documentation: gst_collect_pads_read is gone. 2013-04-11 10:39:25 +02:00
Josep Torra
3c9dfaea38 basesink: fixes compiler warning
gstbasesink.c: In function 'gst_base_sink_chain_unlocked':
gstbasesink.c:3204: warning: 'ret' may be used uninitialized in this function
2013-03-30 10:24:27 +01:00
Mark Nauwelaerts
6ddbaaa95c baseparse: reset next_pts upon SEGMENT event
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=691481
2013-03-27 18:26:30 +01:00
Mark Nauwelaerts
76acdee908 baseparse: more inter-timestamp tracking
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=691481
2013-03-27 18:26:30 +01:00
Nicolas Dufresne
253035d395 basesrc: Don't send error if negotiate fails because we are flushing
Negotiation may be aborted by a flush from another thread that need to
stop the task (i.e. seek). Check that case and silently pause the task.

https://bugzilla.gnome.org/show_bug.cgi?id=696357
2013-03-25 08:57:06 +01:00
Tim-Philipp Müller
f40aa2c4ad basesink: fix use of uninitialized variable
Running suite(s): GstBaseSink
==22023== Conditional jump or move depends on uninitialised value(s)
==22023==    at 0x505FFCE: gst_base_sink_get_sync_times (gstbasesink.c:1936)
==22023==    by 0x5068C80: gst_base_sink_do_sync (gstbasesink.c:2379)
==22023==    by 0x506BCD2: gst_base_sink_default_wait_event (gstbasesink.c:2903)
==22023==    by 0x50633A4: gst_base_sink_default_event (gstbasesink.c:2918)
==22023==    by 0x6F5C216: gst_fake_sink_event (gstfakesink.c:383)
==22023==    by 0x505F164: gst_base_sink_event (gstbasesink.c:3108)
==22023==    by 0x52FA090: gst_pad_send_event_unchecked (gstpad.c:4822)
==22023==    by 0x5303756: gst_pad_send_event (gstpad.c:4984)
==22023==    by 0x40165B: basesink_test_gap (basesink.c:148)
2013-03-03 16:03:42 +00:00
David Schleef
f671bd2754 collectpads: take DTS into account
Importantly, this patch converts DTS to running time.  Less importantly,
and possibly a problem for some muxers, is that it orders buffers by
DTS (if it is valid, otherwise PTS).  This is generally correct, but
might be somewhat surprising to muxers.

Also note that once converted to running time, DTS can end up negative.
2013-03-02 10:42:01 -08: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
5a73d15c80 basetransform: don't pass NULL outcaps to transform_size on shutdown
gst_pad_get_current_caps() on the source pad might yield NULL caps
if we're being shut down and the source pad has already been
deactivated by the other thread that's changing state. Just bail
out in that case, instead of passing NULL caps to the transform_size
function, which it might not expect.

Fixes spurious warnings in audioresample shutdown unit test.

https://bugzilla.gnome.org/show_bug.cgi?id=693996
2013-02-21 11:28:12 +00:00
David Schleef
9ceb52d334 baseparse: Fix doc typo 2013-02-12 12:31:42 -08:00
David Schleef
2a8c95ff3b baseparse: add gst_base_parse_set_ts_at_offset()
Sets the buffer timestamps based on last seen timestamps at a
particular offset into the frame.

API: gst_base_parse_set_ts_at_offset()
2013-02-12 12:16:27 -08:00
David Schleef
da68b74b5d adapter: Add gst_adapter_prev_[pd]ts_at_offset()
Original patch written by Michael Smith <msmith@rdio.com>.

API: gst_adapter_prev_pts_at_offset()
API: gst_adapter_prev_dts_at_offset()
2013-02-12 12:16:27 -08:00
Stefan Sauer
d211a2a67c compat: kill more uses of gst_pad_set_caps() 2013-02-11 22:54:22 +01:00
Mark Nauwelaerts
314400d45a baseparse: improve PTS interpolating
... and tracking of DTS.  Fixes cases where PTS is locked on to the
DTS of an incoming buffer with no PTS with invalid data, leading to
no outgoing PTS (since it is not allowed smaller than DTS).

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=691481
2013-02-09 12:32:02 +01:00
Wim Taymans
2ea32f3ab5 basesink: handle sync of EOS after item without duration
After a buffer or GAP without duration, an EOS event should be rendered
immediately instead of waiting for the end of the segment.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=692868
2013-02-05 17:22:37 +01:00
Tim-Philipp Müller
3f8eff5c7e dataqueue: can't pass a GType through GINT_TO_POINTER
Use GSIZE_TO_POINTER instead. sizeof(GType) may be larger
than sizeof(gulong) and sizeof(int), so the casts may
chop off some bits from the GType value on some architectures.
2013-01-30 13:06:44 +00:00
Tim-Philipp Müller
ae8940e6f7 queuearray: make _find() find the value if no compare function is provided
Allow NULL as compare function for direct value lookup.

https://bugzilla.gnome.org/show_bug.cgi?id=692691
2013-01-30 12:07:52 +00:00
Alexander Schrab
5a7c1b56dc queuearray: fix gst_queue_array_find()
https://bugzilla.gnome.org/show_bug.cgi?id=692691
2013-01-30 11:24:55 +00:00
Alexander Schrab
af8ff1bed8 queuearray: fix gst_queue_array_drop_element()
https://bugzilla.gnome.org/show_bug.cgi?id=692691

Conflicts:
	libs/gst/base/gstqueuearray.c
2013-01-30 11:24:35 +00:00
Sreerenj Balachandran
0c643e2cf7 docs: align the comments correctly with the declaration in bitreader docs
https://bugzilla.gnome.org/show_bug.cgi?id=692809
2013-01-29 15:43:05 +00:00
Wim Taymans
e697254fc1 basesrc: handle renegotiation correctly
Don't retry to negotiate when we fail to negotiate but instead produce a
NOT_NEGOTIATED error. We only want to retry negotiation if the result from
gst_pad_push() returned NOT_NEGOTIATED.
2013-01-29 09:52:16 +01:00
Niv Sardi
4adee0dee2 basesrc: set NEED_RECONFIGURE flag if negotiate fails
When negotiation fails, mark the pad as needing a reconfigure again so
that it gets picked up again next time.

Signed-off-by: Niv Sardi <xaiki@evilgiggle.com>

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=691986
2013-01-24 09:21:01 +01:00
Tim-Philipp Müller
e90d2710b3 docs: add a note to the gst_adapter_take_buffer() docs about buffer flags
https://bugzilla.gnome.org/show_bug.cgi?id=682110
2013-01-16 17:24:42 +00:00
Tim-Philipp Müller
64eee27ebc Use GST_*_1_0 environment variables everywhere
The _1_0 suffixed environment variables override the
non-suffixed ones, so if we're in an environment that
sets the _1_0 suffixed ones, such as jhbuild, we need
to set those to make sure ours actually always get
used.
2013-01-15 13:47:32 +00:00
Tim-Philipp Müller
5ea8937f56 docs: minor GstBaseParse docs fixes
Expose docs for gst_base_parse_finish_frame().
2013-01-14 20:05:23 +00:00
Wim Taymans
30010356f2 typefind: handle map failure 2013-01-14 17:01:22 +01:00
Wim Taymans
27832606e5 basesrc: handle map failure 2013-01-14 17:00:46 +01:00
Wim Taymans
bac5ba632e adapter: handle map failure 2013-01-14 17:00:23 +01:00
Tim-Philipp Müller
1702623b20 baseparse: add vfuncs to intercept queries
Useful for video parses that want to attach matter or
find out if downstream supports certain metas.

API: GstBaseParseClass::src_query()
API: GstBaseParseClass::sink_query()

https://bugzilla.gnome.org/show_bug.cgi?id=691475
2013-01-13 14:45:31 +00:00
Tim-Philipp Müller
2b1facfe1d baseparse: fix up name of default event vfuncs 2013-01-12 20:54:26 +00:00
Sebastian Dröge
925bdaa836 basesink: Initialize uninitialized variable 2013-01-03 10:17:11 +01:00