Commit graph

2732 commits

Author SHA1 Message Date
Sebastian Dröge fefd4622a3 adapter: Also copy POOL metas and make sure to copy over metas when creating subbuffers
POOL meta just means that this specific instance of the meta is related to a
pool, a copy should be made when reasonable and the flag should just not be
set in the copy.
2015-07-01 10:45:01 +02:00
Sebastian Dröge c3bcbadd54 baseparse: Use new gst_adapter_get_buffer() API instead of gst_adapter_map()
This preserves GstMeta properly unless the subclass does special things. It's
enough to make h264parse's stream-format/alignment conversion pass through
metas as needed.

https://bugzilla.gnome.org/show_bug.cgi?id=742385
2015-06-30 18:40:28 +02:00
Sebastian Dröge 866f9ace5c adapter: Add get variants of the buffer based take functions
Main difference to gst_adapter_map() for all practical purposes is that
GstMeta of the buffers will be preserved.

https://bugzilla.gnome.org/show_bug.cgi?id=742385
2015-06-30 18:40:28 +02:00
Sebastian Dröge e6757269db adapter: Copy over GstMeta from the input buffers to the output
All functions that return a GstBuffer or a list of them will now copy
all GstMeta from the input buffers except for meta with GST_META_FLAG_POOLED
flag or "memory" tag.

This is similar to the existing behaviour that the caller can't assume
anything about the buffer flags, timestamps or other metadata. And it's
also the same that gst_adapter_take_buffer_fast() did before, and what
gst_adapter_take_buffer() did if part of the first buffer or the complete
first buffer was requested.

https://bugzilla.gnome.org/show_bug.cgi?id=742385
2015-06-30 18:40:28 +02:00
Olivier Crête 3ed95158cc ptp: Init function can take a NULL interfaces array 2015-06-29 20:27:19 -04:00
Sebastian Dröge c659446371 basetransform: Fix up documentation of transform_meta vfunc
By default we copy all metas that have no tags.
2015-06-29 13:58:04 +02:00
Tim-Philipp Müller 86abdbfb55 directcontrolbinding: fix ABI break
Structure size was increased without adjustment of the padding.

https://bugzilla.gnome.org/show_bug.cgi?id=751622
https://bugzilla.gnome.org/show_bug.cgi?id=740502
2015-06-29 10:41:27 +01:00
Hyunjun Ko 85aad81647 basesink: need to deep-copy last buffer list in drain
https://bugzilla.gnome.org/show_bug.cgi?id=751420
2015-06-24 10:52:56 +02:00
Jonas Holmberg fabe966b0a gstcheck: Print newline in message handler
The message handler is supposed to print a newline after the message
just like the default message handler.
2015-06-23 16:17:56 +01:00
Sebastian Dröge 37a6e8d6df basesink: Unset the last buffer list if we only got a buffer
Also remember any preroll buffer list.
2015-06-22 14:04:45 +02:00
Hyunjun 7c34b4ed0f basesink: enable to get last sample including buffer list if needed
In case of a buffer list rendering, last-sample is not updated.
It needs to be updated and enable to get buffer list from last-sample.

https://bugzilla.gnome.org/show_bug.cgi?id=751026
2015-06-22 13:28:54 +02:00
Nicolas Dufresne ddedc412f5 doc: Unify Since mark for attribute and enum
As this show up as prose in the doc, simply make it consistent
and "arguable" nicer to read.
2015-06-18 11:51:48 -04:00
Nicolas Dufresne 632431aecb gi: Use INTROSPECTION_INIT for --add-init-section
This new define was added to common. The new init section fixed
compilation warning found in the init line that was spread across
all files.
2015-06-16 18:08:24 -04:00
Nicolas Dufresne d0321cd054 doc: Fix reference to unknown type GstNetAddress 2015-06-14 11:22:54 -04:00
Nicolas Dufresne 80279df2a1 doc: Include and fix GstControlPoint 2015-06-14 11:22:36 -04:00
Nicolas Dufresne 66574a6238 doc: Document GstPushSrcClass 2015-06-14 10:59:51 -04:00
Nicolas Dufresne e6ec142084 doc: Better document new GstCollectData.ABI.abi.dts
The doc generator get confused with the inline structure. So
workaround by wrapping the inner of the structure with
public/private mark, and document that GST_COLLECT_PADS_DTS macro
shall be used to access this.
2015-06-14 10:58:18 -04:00
Nicolas Dufresne 0e0a0c1b11 doc: Various doc fixes for libgstreamer-base
* Fix function name in sections.txt
* Add few missing or fix miss-named
* Workaround gtk-doc being confused with non typedef
  types (loose track of public/private
2015-06-14 10:56:28 -04:00
Nicolas Dufresne bd9ea8d18f doc: Fix Since: marks
There was few Since: mark missing their column. Also unify the way
we set the Since mark on enum value and structure members. These
sadly don't show up in the index.
2015-06-13 20:19:59 -04:00
Nicolas Dufresne 41dab4e204 gi: Skip gst_consitency_checker_new
This non boxed type cannot be allocated safely.
2015-06-13 19:47:45 -04:00
Nicolas Dufresne a26e3c1088 doc: Make ..._source_find_control_point_iter transfer none 2015-06-13 15:10:53 -04:00
Nicolas Dufresne ed5ac1c101 doc: Silence warning about unused gstntppacket section
This API is internal.
2015-06-13 14:40:43 -04:00
Nicolas Dufresne d7b22481ae Revert "doc: Add GstNtpPacket to the doc"
This reverts commit c4eb876961.

Oops, this is not a public API
2015-06-13 14:37:48 -04:00
Nicolas Dufresne c4eb876961 doc: Add GstNtpPacket to the doc 2015-06-13 14:21:41 -04:00
Nicolas Dufresne 4320337af6 doc: Remove gstindex from doc comment
Moving that to normal comment to silence the generator. GstIndex
is not in GStreamer library at the moment (removed from 0.10).
2015-06-13 13:55:27 -04:00
Nicolas Dufresne 32900408c1 gi: Set collectpads function param scope 2015-06-13 13:48:03 -04:00
Nicolas Dufresne 2f1c87094e gi: Skip allocator of non-boxed structure
These are not usable as they are, and can easily lead to crash
or leaks. This also silence warning from the scanner. If we manage to
make this usable, we can then remove that mark, it will require
to make this type boxed.
2015-06-13 13:42:58 -04:00
Tim-Philipp Müller 1164f91f1f libs: more doc scanner fixes
gstbasetransform.h:196: Warning: GstBase: "@submit_input_buffer" parameter unexpected at this location:
 * @submit_input_buffer: Function which accepts a new input buffer and pre-processes it.

gstnetcontrolmessagemeta.c:103: Warning: GstNet: gst_buffer_add_net_control_message_meta: unknown parameter 'message' in documentation comment, should be 'addr'
2015-06-13 15:06:11 +01:00
Nicolas Dufresne 51549bf6ba collectpads: Don't initially send an invalid DTS
Sending a possibly invalid DTS may confuse the muxers, which will
then think the DTS is going backward.

https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-06-12 17:20:16 -04:00
Nicolas Dufresne b5e4f7bd9d collectpads: Add negative DTS support
Make gst_collect_pads_clip_running_time() function also store the
signed DTS in the CollectData. This signed DTS value can be used by
muxers to properly handle streams where DTS can be negative initially.

https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-06-12 17:20:16 -04:00
Lazar Claudiu cb2c141eac controller: Added absolute direct control binding, example and test
Fixes: 740502
API: gst_direct_control_binding_new_absolute
2015-06-12 10:07:24 +02:00
Sebastian Dröge 1ae38f7ba7 ptp: Check for the actual API we use instead of just looking for __APPLE__
Should fix the build on FreeBSD, DragonFly and other BSDs.

https://bugzilla.gnome.org/show_bug.cgi?id=750530
2015-06-09 11:01:29 +02:00
Sebastian Dröge 59d916a071 netclientclock: Use the new GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC flag
https://bugzilla.gnome.org/show_bug.cgi?id=750574
2015-06-09 10:03:49 +02:00
Sebastian Dröge 558c0b97fc netclientclock: Make the clock a wrapper clock around an internal clock
The internal clock is only used for slaving against the remote clock, while
the user-facing GstClock can be additionally slaved to another clock if
desired. By default, if no master clock is set, this has exactly the same
behaviour as before. If a master clock is set (which was not allowed before),
the user-facing clock is reporting the remote clock as internal time and
slaves this to the master clock.

This also removes the weirdness that the internal time of the netclientclock
was always the system clock time, and not the remote clock time.

https://bugzilla.gnome.org/show_bug.cgi?id=750574
2015-06-09 10:03:49 +02:00
Sebastian Dröge 5ba9e9d9a8 ptp: Make sure to always initialize the variables we put into the statistics structure later
CID 1304676, 1304677, 1304678, 1304679.
2015-06-08 12:22:56 +02:00
Sebastian Dröge c8d777feaa ptp: Ensure that not too much is read from or written to struct ifreq.ifr_name 2015-06-08 12:03:30 +02:00
Jan Schmidt 0d96487879 basetransform: Add Since markers for new vfuncs
Add Since: 1.6 markers for the new submit_input_buffer() and
generate_output() vfuncs
2015-06-08 19:33:23 +10:00
Jan Schmidt a198803bd6 basetransform: Split input buffer processing from output generation
Allow for sub-classes which want to collate incoming buffers or
split them into multiple output buffers by separating the input
buffer submission from output buffer generation and allowing
for looping of one of the phases depending on pull or push mode
operation.

https://bugzilla.gnome.org/show_bug.cgi?id=750033
2015-06-08 19:17:57 +10:00
Руслан Ижбулатов 499b8d841e ptp: Fix build on Windows, and in general the GI build when PTP support was not available
It's not going to work on Windows still, the helper process needs to be
ported.
2015-06-08 10:46:24 +02:00
Sebastian Dröge 41f8e03b85 netclientclock: The NTP poll interval is a signed int8, not unsigned 2015-06-07 10:52:33 +02:00
Sebastian Dröge 39a3d0d87d netclientclock: Add Since marker to the docs for gst_ntp_clock_new() 2015-06-07 09:32:39 +02:00
Sebastian Dröge 64773fee9c ptpclock: Use the current path delay for calculation the local/remote clock times
The mean might currently be changing, and the current path delay is the
closest we can get to the actual delay around the current SYNC message.
2015-06-07 08:59:23 +02:00
Sebastian Dröge 9e0f051990 netclientclock: Add some copyright stuff 2015-06-06 23:05:32 +02:00
Sebastian Dröge 202f463170 netclientclock: Add NTPv4 support
This uses all of the netclientclock code, except for the generation and
parsing of packets. Unfortunately some code duplication was necessary
because GstNetTimePacket is public API and couldn't be extended easily
to support NTPv4 packets without breaking API/ABI.
2015-06-06 23:00:44 +02:00
Sebastian Dröge cc15f68b6a netclientclock: Preparation for NTPv4 support
We extend our calculations to work with local send time, remote receive time,
remote send time and local receive time. For the netclientclock protocol,
remote receive and send time are assumed to be the same value.

For the results, this modified calculation makes absolutely no difference
unless the two remote times are different.
2015-06-06 20:39:47 +02:00
Sebastian Dröge 8d6837edf5 netclientclock. Fix last commit
Apparently I failed at git add -i.
2015-06-06 19:01:06 +02:00
Sebastian Dröge 4c62d791aa netclientclock: Make gst_net_client_clock_new() a thing wrapper around g_object_new()
Bindings will like this, and also it fixes a FIXME comment.
2015-06-06 18:42:18 +02:00
Sebastian Dröge 179eebdf44 ptpclock: Use #define everywhere instead of G_N_ELEMENTS() 2015-06-06 14:34:39 +02:00
Sebastian Dröge f7a7a569cd netclientclock: Filter RTTs based on the median of the last RTTs before considering them at all
This improves accuracy on wifi or similar networks, where the RTT can go very
high up for a single observation every now and then. Without filtering them
away completely, they would still still modify the average RTT, and thus all
clock estimations.
2015-06-06 14:31:16 +02:00
Sebastian Dröge 42b16c9e3c ptpclock: Use a system clock for the time observations instead of gst_util_get_timestamp()
They don't necessarily use the same underlying clocks (e.g. on Windows), or
might be configured to a different clock type (monotonic vs. real time clock).

We need the values a clean system clock returns, as those are the values used
by the internal clocks.
2015-06-06 14:19:21 +02:00
Sebastian Dröge bf62a96549 ptpclock: Fix documentation a bit 2015-06-06 12:36:34 +02:00
Sebastian Dröge f02de0e9a1 ptp-helper: Make sure to use g_poll() for the main context
The modified main context from https://bugzilla.gnome.org/show_bug.cgi?id=741054
somehow calls setugid(), which abort()s setuid root applications on OSX.
2015-06-04 19:05:44 +02:00
Sebastian Dröge c7c1dcd346 ptp-helper: Make sure that we are running setuid root if configured that way 2015-06-04 18:32:14 +02:00
Sebastian Dröge d33784ccd0 ptp-helper: Fix interface listing and MAC retrieval on OSX 2015-06-04 18:00:50 +02:00
Luis de Bethencourt c508ee27a1 gitignore: add libs/gst/helpers/gst-ptp-helper 2015-06-03 16:42:57 +01:00
Luis de Bethencourt b76a7b4d5c ptp: ignore permission errors in Makefile
To satisfy the buildslaves ignore permission errors in chown, chmod and setcap
2015-06-03 16:34:58 +01:00
Sebastian Dröge 3af74817c1 ptp: Don't use SIOCGIFHWADDR on Apple
Just #ifdef the code for now, this should be implemented around
IOKit later instead of using ioctls.
2015-06-03 17:08:40 +02:00
Philippe Normand 55f79dd195 build: make install-exec-hooks depend on install-helpersPROGRAMS
To avoid race conditions where make would try to change ownership and
permissions of the not-yet-installed ptp helper.
2015-06-03 15:35:11 +01:00
Sebastian Dröge d2da80e4e7 ptp: Fix debug output to print the difference instead of absolute values 2015-06-03 16:09:17 +02:00
Wim Taymans e11568c5b8 ptpclock: fix compilation
Don't put code between declarations.
Fix use of uninitialized variables
2015-06-03 15:22:31 +02:00
Sebastian Dröge ac2eb6e23e ptp: Add median based pre-filtering of delays
If the delay measurement is too far away from the median of the window of last
delay measurements, we discard it. This increases accuracy on wifi a lot.

https://bugzilla.gnome.org/show_bug.cgi?id=749391
2015-06-03 13:55:39 +02:00
Sebastian Dröge 02ba5b20c7 ptp: Add #define to only use SYNC messages for which we can send DELAY_REQ
https://bugzilla.gnome.org/show_bug.cgi?id=749391
2015-06-03 13:55:36 +02:00
Sebastian Dröge 5e1974fc08 ptp: Add #defines to enable/disable improvements for unreliable networks
We should do some more measurements with all these and check how much sense
they make for PTP. Also enabling them means not following IEEE1588-2008 by the
letter anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=749391
2015-06-03 13:55:32 +02:00
Sebastian Dröge 8d77759834 ptp: Initial implementation of a PTP clock
GstPtpClock implements a PTP (IEEE1588:2008) ordinary clock in
slave-only mode, that allows a GStreamer pipeline to synchronize
to a PTP network clock in some specific domain.

The PTP subsystem can be initialized with gst_ptp_init(), which then
starts a helper process to do the actual communication via the PTP
ports. This is required as PTP listens on ports < 1024 and thus
requires special privileges. Once this helper process is started, the
main process will synchronize to all PTP domains that are detected on
the selected interfaces.

gst_ptp_clock_new() then allows to create a GstClock that provides the
PTP time from a master clock inside a specific PTP domain. This clock
will only return valid timestamps once the timestamps in the PTP domain
are known. To check this, the GstPtpClock::internal-clock property and
the related notify::clock signal can be used. Once the internal clock
is not NULL, the PTP domain's time is known. Alternatively you can wait
for this with gst_ptp_clock_wait_ready().

To gather statistics about the PTP clock synchronization,
gst_ptp_statistics_callback_add() can be used. This gives the
application the possibility to collect all kinds of statistics
from the clock synchronization.

https://bugzilla.gnome.org/show_bug.cgi?id=749391
2015-06-03 13:55:28 +02:00
Tim-Philipp Müller 828ceacc68 queuearray: remove duplicate assignment
We've already done this earlier in the function,
and nothing has changed since we first read it.
2015-05-30 12:40:44 +01:00
Matthew Waters 8bc0a6c562 basesink: use the slightly more correct take_sample for last-sample
gst_value_take_buffer() and gst_value_take_sample() both resolve to
g_value_take_boxed().  Use the method with the correct name if we
ever change that.
2015-05-25 21:05:56 +10:00
Tim-Philipp Müller d71f5c7d73 net: keep GCancellable fd around instead of re-creating it constantly
Just create the cancellable fd once and keep it around instead
of creating/closing it for every single packet. Since we spend
most time waiting for packets, an fd is alloced and in use pretty
much all the time anyway.
2015-05-19 14:34:04 +01:00
Thibault Saunier 33924a7f04 timedvaluecontrolsource: Check that the only iter is the end iter in the GSequence
Previous patch was assuming that if the returned iter was the last iter
the GSequence was empty, which is obviously wrong.
2015-05-16 13:08:06 +02:00
Thibault Saunier 78bbaeb6e7 timedvaluecontrolsource: Fix removing all keyframes, and adding one back
We were segfaulting because g_sequence_search was returning the iter_end,
and that iterator does not contain anything and thus should not be used
directly
2015-05-16 11:20:26 +02:00
Jian 4f79c5e8da basesink: Fix QoS/lateness checking if subclass implements prepare/prepare_list vfuncs
In basesink functions gst_base_sink_chain_unlocked(), below code is used to
checking if buffer is late before doing prepare call to save some effort:
    if (syncable && do_sync)
      late =
          gst_base_sink_is_too_late (basesink, obj, rstart, rstop,
          GST_CLOCK_EARLY, 0, FALSE);

    if (G_UNLIKELY (late))
      goto dropped;

But this code has problem, it should calculate jitter based on current media
clock, rather than just passing 0. I found it will drop all the frames when
rewind in slow speed, such as -2X.

https://bugzilla.gnome.org/show_bug.cgi?id=749258
2015-05-14 11:18:12 +03:00
Ilya Konstantinov b58245ac0a baseparse: fix GST_BASE_PARSE_FLAG_LOST_SYNC
Since frame->priv->discont was cleared earlier,
GST_BASE_PARSE_FLAG_LOST_SYNC was never being set.

Take the chance to refactor the frame creation a bit to
organize the flags setting and reset.

https://bugzilla.gnome.org/show_bug.cgi?id=738237
2015-04-28 12:57:35 -03:00
Thiago Santos 8641997630 baseparse: respect DISCONT flag on buffers
Drain the parser when a DISCONT buffer is received and then mark
the next buffer to be pushed as a DISCONT one

https://bugzilla.gnome.org/show_bug.cgi?id=745927
2015-04-28 12:54:08 -03:00
Tim-Philipp Müller 8e6561be91 Remove obsolete Android build cruft
This is not needed any longer.
2015-04-26 17:49:44 +01:00
Tim-Philipp Müller ac8d5cac4e check: optionally check env var for us to make sure test env is set up
If GST_CHECK_TEST_ENVIRONMENT_BEACON is defined, check if the
environment variable it is defined to is set up at the start
of each test.

https://bugzilla.gnome.org//show_bug.cgi?id=747624
2015-04-23 15:54:08 +01:00
Changbok Chea 60706692b3 basesrc: Remove unused assignment in perform_seek()
https://bugzilla.gnome.org/show_bug.cgi?id=748345
2015-04-23 14:03:23 +01:00
Mathieu Duponchelle 41946aa3f6 helpers: on OSX, MKDIR_P is install-sh -c -d
So we need to call it before cding to the bin directory.
2015-04-17 15:19:07 +02:00
Mathieu Duponchelle 6ce8398bc6 helpers: install -D isn't portable, use $(MKDIR_P) instead. 2015-04-17 13:02:51 +02:00
Mathieu Duponchelle 5dea4b82dc helpers: use $(INSTALL) to ... install the helper.
As it will create the folders and set permissions appropriately,
better than doing it manually.
2015-04-15 14:45:21 +02:00
Mathieu Duponchelle d4dcce78b0 helpers: Fix Makefile.am to install the completion-helper correctly.
+ The program is installed at install-exec time, we thus need
  to move it in install-exec-hook, not install-data-hook.
2015-04-15 13:05:46 +02:00
Vincent Penquerc'h 6240b03085 Revert "basesrc: fix pool leak on allocation query error path"
This reverts commit 84fdf50b2f.

It seems the bug was fixed independently, and the merge was
automagic, yielding two extra free calls.
2015-04-15 11:40:51 +01:00
Sebastian Dröge 7d3d4503a1 basesrc: Only set DTS to segment.start on the first buffer if subclass did not provide PTS
Otherwise we're going to set a rather arbitrary DTS of segment.start (usually
0) for live sources, which confuses synchronization if the source started
capturing at a later time. And it's especially wrong for raw media, for which
we should not set any DTS at all.

https://bugzilla.gnome.org/show_bug.cgi?id=747731
2015-04-13 09:23:02 +02:00
Vincent Penquerc'h 84fdf50b2f basesrc: fix pool leak on allocation query error path
It could be triggered by:

gst-launch-1.0 videotestsrc num-buffers=20 ! videcrop bottom=214748364 ! videoconvert ! autovideosink

Spotted while testing:

https://bugzilla.gnome.org/show_bug.cgi?id=743910
2015-04-07 11:41:40 +01:00
Sebastian Dröge 370076edd5 baseparse: Forward SEGMENT_DONE events immediately
There might be no more data coming afterwards, and we just drained everything
that was left to be pushed anyway.
2015-04-06 18:46:06 -07:00
Ilya Konstantinov f35ec14d33 basesrc: do not leak buffer pool in error case
https://bugzilla.gnome.org/show_bug.cgi?id=747321
2015-04-04 11:14:12 +01:00
Sebastian Dröge 7742f0a0d3 basesrc: Fix documentation, buffer pools are unreffed and not freed 2015-04-03 13:19:33 -07:00
Nicolas Dufresne 43f2f925a9 basetransform: Add Since mark for new method
https://bugzilla.gnome.org/show_bug.cgi?id=734424
2015-04-02 17:32:42 -04:00
Thibault Saunier 506afa54df basetransform: Add a method to let subclasses cleanly update srcpad caps
API:
    gst_base_transform_update_src

https://bugzilla.gnome.org/show_bug.cgi?id=734424
2015-04-02 17:16:23 -04:00
Edward Hervey e4d07e161d introspection: Don't use g-ir-scanner cache at compile time
It pollutes user directories and we don't need to cache it

https://bugzilla.gnome.org/show_bug.cgi?id=747095
2015-03-31 11:16:09 +02:00
Nicolas Dufresne 208696a774 basesrc: Flush-stop starts live task in paused
The flush-stop event should not restart the task for live sources unless
the element is playing. This was breaking seeks in pause with the rtpsrc.

https://bugzilla.gnome.org/show_bug.cgi?id=635701
2015-03-27 19:03:30 -04:00
Thiago Santos a041d8862d baseparse: only post 'no valid frames' error if buffers were received
Otherwise baseparse will consider empty streams to be an error while
an empty stream is a valid scenario. With this patch, errors would
only be emitted if the parser received data but wasn't able to
produce any output from it.

This change is only for push-mode operation as in pull mode an
empty file can be considered an error for the one driving the
pipeline

Includes a unit test for it

https://bugzilla.gnome.org/show_bug.cgi?id=733171
2015-03-26 12:25:57 -03:00
Mathieu Duponchelle 87130f3287 helpers: remove completion-helper on uninstall
+ And add it to CLEANFILES
2015-03-24 19:34:44 +01:00
Mathieu Duponchelle c6e3c859a4 completions: remove last unnamespaced symbols.
https://bugzilla.gnome.org/show_bug.cgi?id=744877
2015-03-24 19:11:31 +01:00
Sebastian Dröge 805684585e check: Fix uninitialized variable compiler warning with gcc
check_run.c: In function 'sig_handler':
check_run.c:127:13: warning: 'child_sig' may be used uninitialized in this function [-Wmaybe-uninitialized]
             killpg(group_pid, child_sig);
             ^
check_run.c:130:31: warning: 'idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
             sigaction(sig_nr, &old_action[idx], NULL);
                               ^
2015-03-21 19:37:30 +01:00
Sebastian Dröge 7646cef644 check: Catch SIGTERM and SIGINT in the test runner and kill all currently running tests
Otherwise e.g. ctrl+c in the test runner exits the test runner, while the test
itself is still running in the background, uses CPU and memory and potentially
never exits (e.g. if the test ran into a deadlock or infinite loop).

The reason why we have to manually kill the actual tests is that after
forking they will be moved to their own process group, and as such are
not receiving any signals sent to the test runner anymore. This is supposed
to be done to make it easier to kill a test, which it only really does if
the test itself is forking off new processes.

This fix is not complete though. SIGKILL can't be caught at all, and error
signals like SIGSEGV, SIGFPE are currently not caught. The latter will only
happen if there is a bug in the test runner itself, and as such seem less
important.
2015-03-21 15:19:43 +01:00
Olivier Crête 187570aded baseparse: remove duplicate code
These are already freed by gst_base_parse_clear_queues()

https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-03-17 19:35:08 +00:00
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
William Manley fc765592a1 meta: Add GstNetControlMessageMeta
GstNetAddress can be used to store ancillary data which was received with
or is to be sent alongside the buffer data.  When used with socket sinks
and sources which understand this meta it allows sending and receiving
ancillary data such as unix credentials (See `GUnixCredentialsMessage`)
and Unix file descriptions (See `GUnixFDMessage`).

This will be useful for implementing protocols which use file-descriptor
passing in payloaders/depayloaders without having to re-implement all the
socket handling code already present in elements such as multisocketsink,
etc.  This, in turn, will be useful for implementing zero-copy video IPC.

This meta uses the platform independent `GSocketControlMessage` API
provided by GLib as a part of GIO.  As a result this new meta does not
require any new dependencies or any conditional compliation for
portablility, although it is unlikely to do anything useful on non-UNIX
platforms.
2015-03-14 13:54:51 +01: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
Michał Dębski a7797d30a8 check: Use mkstemp instead of tempnam if possible
Using tempnam() is deprecated, this gives warning and fails the build
with -Werror.

https://bugzilla.gnome.org/show_bug.cgi?id=745858
2015-03-11 16:14:24 +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
Luis de Bethencourt 58f9c1dd71 check: duplicate code branches
CID #1226446
2015-03-10 16:42:48 +00: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
Mathieu Duponchelle dc10b11391 helpers: Fix install of completion-helper.
By applying the supplied transformation to the program name,
for example --program-prefix.
2015-02-24 14:11:45 +01:00
Nicolas Dufresne 8786655b5e completion-helper: Add missing DESTDIR
Otherwise doing "make install DESTDIR" will try to write to
/usr/share/...
2015-02-23 16:50:34 -05:00
Mathieu Duponchelle c2d483941d completion-helper: Add filtering by klass and sink caps. 2015-02-23 21:17:54 +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
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