Commit graph

2565 commits

Author SHA1 Message Date
Mathieu Duponchelle f3c9647518 completion-helper: Append $(EXEEXT) to the name of the moved file.
Fixes the build on Windows
(https://ci.gstreamer.net/job/cerbero-cross-mingw32/1742/console)
2015-02-23 19:11:32 +01:00
Mathieu Duponchelle 46e7baff74 bash-completion: Implement in a different way.
+ Gets installed
+ Uses a helper tool, gst-completion-helper, installed in
  bash-completions/helpers.
+ Adds a common script that other tools can source.

https://bugzilla.gnome.org/show_bug.cgi?id=744877
2015-02-23 17:57:57 +01:00
Mathieu Duponchelle 0ee2183aa5 check: cast element in ASSERT_SET_STATE.
https://bugzilla.gnome.org/show_bug.cgi?id=744777
2015-02-19 12:18:50 +01:00
Thibault Saunier 025c8343f2 timedvaluecontrolsource: Do not wrongly send value-removed
And avoid freeing something we do not own
2015-02-13 19:59:57 +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
Jan Schmidt f0e3b7f904 netclock: Don't update the clock when it desynch
Add a hold off when the clock calibration suddenly loses synch,
as it may be a glitch, but also make sure we update if it stays
desynched for more than a few seconds
2015-02-07 04:41:52 +11:00
Jan Schmidt 824b821caa netclock: Make the RTT average ignore large values more forcefully.
Smooth larger RTTs a little harder, so excessively large values
perturb the average a bit less, and therefore get filtered out
more strongly
2015-02-07 04:38:42 +11:00
Stefan Sauer 8695a202c8 check: fix another typo in the docs 2015-01-23 08:59:57 +01:00
Heinrich Fink 1b472377c8 check: Fix doc of GST_CHECKS and GST_CHECKS_IGNORE
https://bugzilla.gnome.org/show_bug.cgi?id=743335
2015-01-22 21:38:51 +11:00
Sebastian Dröge ee3db74ec4 check: Add _fail_unless() compatibility function around _ck_assert_failed()
We exported this in < 1.5 and it was automatically used by many macros
from the header. Keep it exported for now.
2015-01-21 18:09:38 +01:00
Jan Schmidt aeca7eb480 netclock: Fix docs typo. Clock bus messages are GST_MESSAGE_ELEMENT 2015-01-21 22:44:59 +11:00
Jan Schmidt 27997cb8a3 netclock: Implement rate limits for polling and fix up skew limits
Add the minimum-update-interval property to the clock, with a default
of 50ms and don't send polling requests faster than that. That helps to
ensure we spread the initial observations out a little - startup takes
a little longer, but tracking is more stable.

Move the discont skew limiting code inside an if statement, so that
it's only done when the linear regression succeeds and the clock
parameters might actually change.
2015-01-21 22:27:18 +11:00
Jan Schmidt 1c9c9847fd netclock: Implement sending statistic bus messages and discont limits
Allow setting a GstBus on the network clock client
via a new 'bus' object property. If a bus is set, the
clock will output an element message containing statistics
about new clock observations and the clock correlation.

When the local clock is synchronised with the remote, limit the
maximum jump in the clock at any point to be one average RTT to
the server. Also, publish in the bus message whether we are
synched with the remote or not.
2015-01-21 22:27:18 +11: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
Thiago Santos 896b3bfeed gstcheck: fix GI annotation
Add missing : to annotation
2014-12-18 12:04:22 -03: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
Sebastian Rasmussen 0b09573bbe check: Have autotools generate internal-check.h
Previously GStreamer got access to the libcheck interface by including
libs/gst/check/check.h which in turn included internal-check.h in the
same directory. internal-check.h was generated by copying
libs/gst/check/libcheck/check.h which in turn was generated from
check.h.in in the same directory. In this case generating
libs/gst/check/libcheck/check.h is unnecessary, in addition this file
was accidentally distributed in generated project tarballs.

Now libs/gst/check/internal-check.h is generated directly from
libs/gst/check/libcheck/check.h.in by configure. This means that the
libcheck source must include internal-check.h instead of the previously
generated libs/gst/check/libcheck/check.h. However the unnecessary
intermediate step is now skipped.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=741359
2014-12-16 16:32:39 +01:00
Sebastian Rasmussen 1cf733f282 check: Avoid requring (u)intmax_t in macros
Previously embedded libcheck versions did not depend on (u)intmax_t and
doing so would require projects using GStreamer's check framework to add
AX_CREATE_STDINT_H to their configure.ac. A workaround is to fallback to
glib types. This patch assumes that glib.h is always included before
internal-check.h which is ok since everything Gstreamer would include
gst/gstcheck.h instead of directly including internal-check.h.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=727826
2014-12-07 17:32:30 +01:00
Sebastian Rasmussen fb6ea425b0 check: Fix compilation error for iOS
libcheck includes CoreServices for its compat for clock_gettime(),
even though it never uses anything it declares. Let's remove it.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=727826
2014-12-06 19:46:29 +01:00
Sebastian Rasmussen 85c8b5d2c4 check: Apply GStreamer-specific patches
Reintroduced patches:

 * Make sure that fail_if(1) actually fails
   from commit 9f99d056a2

New patches due to updated libcheck (based on 0.9.14):

 * Checks in m4/check-checks.m4 to cater for new dependencies
 * Conditional compile-time compat POSIX fallbacks for libcheck
 * Avoid relative paths for libcheck header files
 * Make timer_create() usage depend on posix timers, not librt
 * Rely on default AX_PTHREAD behavior to allow HAVE_PTHREAD to be used
   when checking for types and functions (like clock_gettime())
 * Avoid double declaration of clock_gettime() when availabe outside of
   librt by making compat clock_gettime() declaration conditional
 * check 0.9.9 renamed _fail_unless() and 0.9.12 later renamed it again
   to _ck_assert_failed(), so ASSERT_{CRITICAL,WARNING}() now calls this
   function
 * Remove libcheck fallback infrastructure for malloc(), realloc(),
   gettimeofday() and snprintf() since either they appear to be
   available or they introduce even more dependencies.

The result is an embedded check in gstreamer that has been tested by
running check tests in core, -base, -good, -bad, -ugly and rtsp-server
on Linux, OSX and Windows.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=727826
2014-12-06 17:48:25 +01:00
Sebastian Rasmussen f1df7aba8f check: Import version 0.9.14
This lifts the files almost verbatim (the changes being running though
gst-indent and fixing the FSF address) from the upstream respository.
Therefore this commit reverts some GStreamer-specific patches to check
that will be reintroduced next.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=727826
2014-12-06 17:48:16 +01: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 92b69256e2 triggercontrolsource: Fix short description for the docs 2014-11-25 17:46:12 +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
Thibault Saunier 1a02a59e42 timedvaluecontrolsource: Add some signals about values changes
In order for user to be able to track changes in the value set in
GstTimedValueControlSource the following signals have been added:
 * value-added
 * value-removed
 * value-changed

To be able to use a GstControlPoint to be marshalled into the signals,
the GstControlPoint structure is now registerd as a GBoxed type.

New API:
~~~~~~~
  * GstTimedValueControlSource::value-added
  * GstTimedValueControlSource::value-removed
  * GstTimedValueControlSource::value-added

https://bugzilla.gnome.org/show_bug.cgi?id=737616
2014-10-22 18:08:30 +02: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
Sebastian Dröge 84c6e885f1 check: Use the name parameter of gst_check_setup_src_pad_by_name() and the sink variant
This was hardcoded to "sink" / "src" by accident in previous refactoring.
2014-09-15 13:08:09 +03:00
Thibault Saunier 87a79673b0 check: Add a function to check destruction of objects
Add a method letting people to ensure that unreffing one object
leads to its destruction, and possibly the destruction of more object
(think destruction of a GstBin etc...).

https://bugzilla.gnome.org/show_bug.cgi?id=736477
2014-09-12 17:18:21 +02:00
Tiago 076b83208a check: Adding documentation to the gst_check_setup_sink_pad_by_name function
https://bugzilla.gnome.org/show_bug.cgi?id=734190
2014-09-12 14:14:05 +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
Tiago Cesar Katcipis 91045ccd83 gstcheck: add docs for gst_check_setup_src_pad_by_name()
https://bugzilla.gnome.org/show_bug.cgi?id=734142
2014-08-03 00:27:14 +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
Sebastian Rasmussen 863ba1a598 docs: Fix documentation typos and inconsistencies
* GstGlobalDeviceMonitor was renamed to GstDeviceMonitor
 * Expand GST_MESSAGE_DEVICE to the full enum value names
 * Correct the incorrect references to the GstDeviceProvider interfaces
 * Describe caps arguments for gstcheck interface
 * Add missing docs for GstNetAddressMeta and its add function
 * Add docs for toc helper macros
 * Avoid refering to GstValueList type as done elsewhere

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732786
2014-07-09 09:22:11 +02:00
Tim-Philipp Müller ba31faf261 libs: gstcheck: check that mutex is locked before g_cond_wait*() is called
Sanity check to catch problems in unit test.
2014-07-06 12:13:04 +01:00
Tim-Philipp Müller b2bbd1edfa libs: gstcheck: init and clear global mutex and cond variables 2014-07-06 12:12:20 +01: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
Edward Hervey bf9018b77c nettimeprovider: Use non-freed variable
address is only used temporarily. Use the proper variable instead.

CID #1212189
2014-05-09 14:46:59 +02: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
Tim-Philipp Müller a10ca2ee13 check: use _exit() instead of exit() in fail_unless() so we exit immediately
exit() will call atexit handlers, which may try to
clean up things or wait for things to get cleaned up,
which we don't want or need. We just want to stop
and let the parent know about the failure as quickly
as possible in case fork() is used.

Fixes timeouts on assert failures in checks where
an exit handler waits for things to stop, but they
don't stop because they haven't been shut down,
and they haven't been shut down because there's no
simple way to do so on failures.

http://sourceforge.net/p/check/patches/50/
2014-05-07 10:44:34 +01: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
Edward Hervey 145517aa64 check: Fix exported symbol name
it's _template and not _templ
2014-04-16 07:59:27 +02:00
Sebastian Dröge 917a033d04 check: Add new API to set up pads from non-static pad templates 2014-04-15 12:58:59 +02:00
Tim-Philipp Müller ed9d0381b2 testclock: replace newly-added GstTestClockIDList structure with a simple GList
Keep it simple. Likely also makes things easier for bindings,
and efficiency clearly has not been a consideration given how
the existing code handled these lists.
2014-04-12 15:33:50 +01:00
Tim-Philipp Müller 2e4900ba94 docs: testclock: fix up Since markers 2014-04-12 15:33:46 +01:00
Tim-Philipp Müller 8d4f245942 testclock: add back gst_test_clock_wait_for_pending_id_count()
.. but deprecate it. ABI stability and all that.
It's a dangerous and racy function to use.
2014-04-12 15:33:43 +01:00
Tim-Philipp Müller f30ab21ba7 testclock: remove unused variable
Fixes compiler warning.
2014-04-12 15:33:36 +01:00
Havard Graff 3892cc4c2d testclock: add support for waiting and releasing multiple GstClockIDs
In order to be deterministic, multiple waiting GstClockIDs needs to be
released at the same time, or else one can get into the situation that
the one being released first can add itself back again before the next
one waiting is released.

Test added for new API and old tests rewritten to comply.
2014-04-12 15:33:31 +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
Tim-Philipp Müller 8924782dd4 Revert "check: only call setpgid on valid child PIDs"
This reverts commit b9313afc75.

This should be fixed in upstream libcheck instead. We want
to keep diff of our local copy to upstream libcheck
to a minimum.
2014-04-07 17:47:30 +01:00
Vincent Penquerc'h b9313afc75 check: only call setpgid on valid child PIDs
Coverity 206186
2014-04-07 15:40:45 +01: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
Stefan Sauer 6fc23cd016 check: also use the glob on GST_CHECKS when forcing to run broken tests
GST_CHECKS can be simply "test*" to run run all tests (including those that are
marked broken). Update the sparse comments a bit to tell how this works.
2014-02-19 11:04:17 +01: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
Tim-Philipp Müller 5e7a7aeaf1 check: add support for blacklisting checks via GST_CHECKS_IGNORE 2014-02-09 16:39:53 +00: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
Tim-Philipp Müller 2ddbe8df49 nettimeprovider: remove unnecessary NULL check
Error is never NULL when we break out of the loop.

COVERITY CID 1037151
2013-12-30 16:10:08 +00:00
Tim-Philipp Müller 0735c052e1 Revert "nettimeprovider: Remove dead code"
This reverts commit 9649cd4ca1.

This is not right, and it's also not what coverity
is complaining about.
2013-12-30 16:07:08 +00:00
Edward Hervey 9649cd4ca1 nettimeprovider: Remove dead code
err is always NULL by the point we reach this line

COVERITY CID 1037151
2013-12-30 16:51:01 +01: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
Edward Hervey b363ab17e7 controller: Fix out-of-bounds detection
We want to abort if we higher than the maximum *OR* lower than the minimum
accepted value.

Detected by Coverity.
2013-12-10 17:09:07 -05: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 73a58cb0a2 netclock: Fix docstring for round-trip-limit and uninit access warning.
Fix a typo in a doc string - the property is round-trip-limit, not
roundtrip-limit.

Remove a bogus GST_WARNING that can print an uninitialised variable
and is redundant anyway.
2013-11-27 18:32:22 +11:00