Commit graph

2788 commits

Author SHA1 Message Date
Havard Graff cc4e4ae029 harness: enable empty harness creation and refactor around this
Also make the testclock a member of the harness, allowing some
more interactions with the clock prior to adding elements.

https://bugzilla.gnome.org/show_bug.cgi?id=761905
2016-02-12 16:42:43 +00:00
Stian Selnes 9d56c0e397 check: fix unused parameter compiler warning
https://bugzilla.gnome.org/show_bug.cgi?id=761919
2016-02-12 16:38:43 +00:00
Mikhail Fludkov 06ae41e0b2 harness: fix the race in blocking push mode
Depending on when gst_harness_pull was called - before the buffer reached
gst_harness_chain or after we can get different behaviors of the test
with enabled blocking push mode. The fix makes the behavior always the
same. In pull function we get the buffer first, thus making sure
gst_harness_chain waits for the signal, and emitting the signal after.

https://bugzilla.gnome.org/show_bug.cgi?id=761931
2016-02-12 12:32:22 +00:00
Stian Selnes 2450af1034 check: Add tcase_skip_broken_loop_test
https://bugzilla.gnome.org/show_bug.cgi?id=761917
2016-02-12 11:14:33 +00:00
Stian Selnes ff7e6a14b0 harness: Fix docs for stress test functions
notify is not called per buffer, but when the thread is freed.

Comment about serialized events and OOB does not make sense for upstream
events.

https://bugzilla.gnome.org/show_bug.cgi?id=761909
2016-02-12 10:22:45 +00:00
Stian Selnes dc4a3b71f0 harness: Unset sink_forward_pad before tearing down sink_harness
Set the sink_forward_pad to NULL before tearing down sink_harness to
avoid that the harness tries to forward events/queries to it while it's
tearing down.

https://bugzilla.gnome.org/show_bug.cgi?id=761904
2016-02-12 10:17:31 +00:00
Havard Graff ed583832a1 harness: fix up docs to reference functions properly
https://bugzilla.gnome.org/show_bug.cgi?id=761901
2016-02-12 10:14:29 +00:00
Tim-Philipp Müller 78a832ebd5 baseparse: fix stray discont flag set on outgoing buffers in push mode
We have no guarantees about what flags are set on buffers we take
out of the GstAdapter. If we push out multiple buffers from the
first input buffer (which will have discont set), only the first
buffer we push out should be flagged as discont, not all of the
buffers produced from that first initial input buffer.

Fixes issue where the first few mp3 frames/seconds of data in push
mode were skipped or garbled in some cases, and the discont flags
would also trip up decoders which were getting drained/flushed for
every buffer. This was a regression introduced in 1.6 apparently.
2016-02-04 19:04:41 +00:00
Thibault Saunier 438a83df58 controller: Do not unset uninitiallized GValue
In case the property was not interpollable we might never initialize
the GValue, we should thus never unset it.
2016-02-02 19:51:56 +01:00
HoonHee Lee f90fd86d5f baseparse: Try to generate caps on the srcpad before forwarding GAP event
To configure downstream elements and complete initial pre-rolling,
ensure we have default output caps before forwarding GAP event.

https://bugzilla.gnome.org/show_bug.cgi?id=753899
2016-01-29 10:49:24 +01:00
Sebastian Dröge 7b49459f1a netclientclock: Check return value of g_socket_close()
CID 1348452
2016-01-15 09:48:32 +01:00
Sebastian Dröge 3315f483bc netclientclock: Free data after removing it from the list
Does not matter here but makes Coverity more happy. It can't
know that g_list_remove() only looks at the pointer value but
does not dereference it.

CID 1348454
2016-01-15 09:02:42 +01:00
Florin Apostol f875bec51e netclientclock: Fix GError memory leak in handling NTP response
Error was not released if gst_ntp_packet_receive failed.

https://bugzilla.gnome.org/show_bug.cgi?id=760598
2016-01-13 23:01:18 +01:00
Carlos Rafael Giani 91496281eb basesrc: Only set duration/position query values in case of query success
Currently, the query values are being set even if the query itself was
determined to have failed. Fix this to ensure the values are only set in
case of a query success.

https://bugzilla.gnome.org/show_bug.cgi?id=760479
2016-01-11 21:42:10 +01:00
Stefan Sauer 2159aa56bc docs: remove parent docs for GstPtpClock
Instance docs don't need to docuemnt the parent (first member).
2016-01-06 18:17:27 +01:00
Sebastian Dröge 01ba6d40a8 clock: Fix typo
clocked -> clock
2016-01-05 16:44:53 +02:00
Sebastian Dröge 1c010fd230 netclientclock: Disconnect the "synced" signal handler from the internal clock
Not from the external one.
2016-01-05 15:00:14 +02:00
Stefan Sauer ab17881cf0 controller: rename new cubic interpolation mode
Don't abbreviate to 'mono' and use 'monotonic' instead.
2016-01-05 13:57:12 +01:00
Sebastian Dröge 58b4e075a6 ntp: The clock inherits from GstNetClientClock, not just GstSystemClock 2016-01-05 13:41:08 +02:00
Sebastian Dröge 29136a0186 netclientclock: Destroy a cached clock 60 seconds after its last use
There's not much lost by having the clock idle around a bit longer but it will
potentially allow anybody wanting to use the same clock server again to sync
much faster.
2016-01-04 17:18:07 +02:00
Sebastian Dröge 33dcec7b74 netclientclock: Only ever run one clock against a specific server
If multiple net/NTP clocks are created for the same server, reuse the same
internal clock for all of them. This makes sure that we don't flood the server
with too many requests and also possibly allows faster synchronization if
there already was an earlier synchronized clock when creating a new one.
2016-01-04 16:31:23 +02:00
Sebastian Dröge 23abc425d4 nettimeprovider: Use GInitable instead of having a new() function that can return NULL
Bindings don't like that much and as we're using GIO here anyway we can as
well use GInitable for possibly failing initialization.
2016-01-04 10:40:35 +02:00
Sebastian Dröge 5dc8cea6f4 nettimeprovider: Mark address, port and clock properties CONSTRUCT_ONLY
They can't sensibly be changed after construction.
2016-01-04 10:40:35 +02:00
Sebastian Dröge 9f36b4383b netclientclock: Implement resolval of hostnames
Just allowing IPs here is not ideal and implementing DNS resolval is easy.
2015-12-30 16:59:24 +02:00
Sebastian Dröge 2bfa204c30 ptpclock: Add read-only properties to get the master and grandmaster clock ids 2015-12-29 16:29:13 +02:00
Stefan Sauer a6e72aa28f check: don't memcmp twice
Simply call fail() in the condition after the first memcmp.
2015-12-27 19:42:37 +01:00
Xavier Claessens 46f83f5fcd core: Add g_autoptr() support to all types
https://bugzilla.gnome.org/show_bug.cgi?id=754464
2015-12-14 12:06:55 -05:00
Athanasios Oikonomou d10c488d63 baseparse: post tag list when avg bitrate changes at least 2%
Watching videos with variant bitrate is common to have delta
more than 10 kbps, resulting in tag list spam.

Instead of relying on fixed 10 kpbs delta, it is better to
calculale the difference in percentage and update tag list
only when bitrate changes more than 2%.

https://bugzilla.gnome.org/show_bug.cgi?id=759055
2015-12-08 11:34:13 +02:00
Ross Burton 865473bd2b helpers: really fix install race
My previous fix for #758029 wasn't quite right and simply made the race rarer.
Some of the files are installed by install-exec and others by install-exec, so
the hooks need to be split too.

https://bugzilla.gnome.org/show_bug.cgi?id=758029
2015-12-04 16:44:39 +02:00
Reynaldo H. Verdejo Pinochet 63a9130f56 Drop usage of deprecated g-ir-scanner --strip-prefix flag 2015-12-02 15:02:25 -08:00
Tim-Philipp Müller 8249c6db0e controller: fix annotation to make g-ir-scanner happy
gstinterpolationcontrolsource.h:59: Warning: GstController: missing ":" at column 51:
 * @GST_INTERPOLATION_MODE_CUBIC_MONO: (Since 1.8) monotonic cubic interpolation, will not
gstinterpolationcontrolsource.h:59: Warning: GstController: unknown annotation: since
2015-11-20 19:45:39 +00:00
Thiago Santos b93369c78a Revert "baseparse: do not overwrite header buffer timestamps"
This reverts commit 2c475a0355.

This causes issues with h264parse. It breaks timestamps as
there are headers in the middle of the stream and this patch
makes the timestamps for those differ from the ones that
are adjusted, creating a discontinuity and leading to sync
issues.
2015-11-19 00:57:17 -03:00
Thiago Santos 5feba38a4e Revert "baseparse: simplify code a bit"
This reverts commit 3984f7159a.
2015-11-19 00:57:08 -03:00
Sebastian Dröge 533d1c8eb7 ptp-helper: Disable multicast loopback
We're not really interested in our own packets and ignore them anyway.
2015-11-18 09:21:23 +02:00
Thiago Santos 3984f7159a baseparse: simplify code a bit
Avoid repeated checks for testing if a buffer is a header
2015-11-16 08:22:14 -03:00
Thiago Santos 42d45a0f40 collectpads: handle buffer with dts-only when mapping to running time
Otherwise the buffer was left with the original values and later would
be compared with other buffers that were converted to runninn time,
leading to bad interleaving of multiple streams.

https://bugzilla.gnome.org/show_bug.cgi?id=757961
2015-11-14 10:50:35 -03:00
Thiago Santos 971ac61c36 baseparse: do not overwrite header buffer timestamps
baseparse tries to preserve timestamps from upstream if
it is running on a time segment and write that to
output buffers. It assumes the first DTS is going to be
segment.start and sets that to the first buffers. In case
the buffer is a header buffer, it had no timestamps and
will have only the DTS set due to this mechanism.

This patch prevents this by skipping this behavior for
header buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=757961
2015-11-14 10:50:35 -03:00
Ross Burton 09aa20746a helpers: fix install race
The install hook needs to be a install-data-hook not an install-exec-hook as the
helpers are installed into helperdir which is considered data (only path
variables with "exec" in are considered executables).

The explicit dependency on install-helpersPROGRAMS was an attempt at solving
this, but this causes occasional races where install-helpersPROGRAMS can run
twice in parallel (once via install-all, once via the hook's dependency).

https://bugzilla.gnome.org/show_bug.cgi?id=758029
2015-11-13 09:40:44 +01:00
Tim-Philipp Müller 220dbfc13c docs: remove dummy function declarations with G_INLINE_FUNCTION for gtk-doc
gtk-doc can handle static inline functions just fine these days,
there's no need for this stuff any more.
2015-11-09 17:59:16 +00:00
Stian Selnes 85b93fa347 netaddressmeta: gst_buffer_get_net_address_meta() as function
Implement gst_buffer_get_net_address_meta() as a function instead
of a macro in order to get gobject-introspection to work.

https://bugzilla.gnome.org/show_bug.cgi?id=702921
2015-10-27 12:59:24 +00:00
Edward Hervey 16458daddb collectpads: Use GST_BUFFER_DTS_OR_PTS
Simplifies code a bit
2015-10-27 08:33:41 +01:00
Guillaume Desmottes 66b6d355e4 basesink: rename argument of PREROLL_{COND,LOCK} macros
They take a GstBaseSink instance as argument at not a GstPad. Rename the
argument to 'obj' which is not miss leading and in line with
GST_BASE_SINK_PAD(obj).

https://bugzilla.gnome.org/show_bug.cgi?id=756954
2015-10-22 13:49:06 +01:00
Sebastian Dröge 1efb451154 Use new GST_ENABLE_EXTRA_CHECKS #define
https://bugzilla.gnome.org/show_bug.cgi?id=756870
2015-10-21 14:31:56 +03:00
Edward Hervey 55f6582159 baseparse: Update internal position even if not linked
Our current position has nothing to do with being linked or not.

Avoids having stray segment updates fired every 2s
2015-10-12 17:30:38 +02:00
Sebastian Dröge 29d11c4566 gst-ptp-helper: #include <sys/socket.h> to fix net/if.h include on OSX 10.6
In file included from gst-ptp-helper.c:40:0:
   /usr/include/net/if.h:265:19: error: field 'ifru_addr' has incomplete type
      struct sockaddr ifru_addr;

https://bugzilla.gnome.org/show_bug.cgi?id=756136
2015-10-07 11:30:14 +01:00
Vineeth TM 215cfcf993 gstreamer: Fix memory leaks when context parse fails
When g_option_context_parse fails, context and error variables are not getting free'd
which results in memory leaks. Free'ing the same.

And replacing g_error_free with g_clear_error, which checks if the error being passed
is not NULL and sets the variable to NULL on free'ing.

https://bugzilla.gnome.org/show_bug.cgi?id=753851
2015-10-02 17:31:11 +03:00
Jan Alexander Steffens (heftig) d3e9f55302 timedvaluecontrolsource: Use g_sequence_lookup where possible
When looking for exact matches in the sequence, this results
in much simpler code than when using g_sequence_search.

https://bugzilla.gnome.org/show_bug.cgi?id=755498
2015-10-02 17:30:38 +03:00
Stefan Sauer 9a30399e4f interpolationcontrolsource: fix write over the array size
The '++' got incidentially added during the refactoring in
2fe3939ce7.
2015-10-01 22:12:50 +02:00
Stefan Sauer 8487133114 controlpoint: change the padding to be of arch-independent size
The default padding I introduced in d4f81fb4e6 is
actually only 4 pointers and on 32bit platforms already smaller than the union.
Replace it with a fixed 64byte padding. Don't add the normal padding for now.

Fixes #755822
2015-09-30 17:31:58 +02:00
Tim-Philipp Müller 5d3c58902f check: fix 'format string is not a string literal' warning with clang
Broke this when I removed the G_GNUC_PRINTF in a previous
commit to fix indentation, since it was not really needed.
Turns out unlike gcc clang warns though if a non-literal
format string is passed then. Fix indentation differently.

http://clang.llvm.org/docs/AttributeReference.html#format-gnu-format
2015-09-28 20:10:31 +01:00
Stefan Sauer 653f9148bd directcontrolbinding: fix formatting 2015-09-28 16:23:41 +02:00
Stefan Sauer 05dbad27c5 index: mark two structs that don't have abi padding 2015-09-28 16:23:41 +02:00
Stefan Sauer d4f81fb4e6 controller: add the missing abi padding
While this technically is an abi break, we decided to do this:
1) the struct is documented to be internal
2) the struct is alloced and freed inside the library
3) there are no public methods that receive or return instances
4) the only code known to use this struct are classes containd here
2015-09-28 16:23:41 +02:00
Stefan Sauer 56f12705ca interpolationcontrolsource: add cubic_mono interpolation
This new mode won't overshoot the min/max y values set by the control-points.
Fixes #754678
API: GST_INTERPOLATION_MODE_CUBIC_MONO
2015-09-27 12:46:01 +02:00
Stefan Sauer 2fe3939ce7 interpolationcontrolsource: refactor code
Extract common code that looks up the control-points around the timestamp. Add
some comments for future investigation.
2015-09-27 11:45:29 +02:00
Tim-Philipp Müller cc217289a7 harness: minor doc fixes 2015-09-26 11:03:24 +01:00
Vivia Nikolaidou 44ba1565d9 segment: Replaced gst_segment_to_position with gst_segment_position_from_running_time
gst_segment_to_position might cause confusion, especially with the addition of
gst_segment_position_from_stream_time . Deprecated gst_segment_to_position
now, and replaced it with gst_segment_position_from_running_time.

Also added unit tests.
2015-09-26 00:00:08 +02:00
Vineeth TM dc0ae9203a ptpclock: Fix error leak during failures
https://bugzilla.gnome.org/show_bug.cgi?id=755607
2015-09-25 10:14:45 +02:00
Havard Graff 64a152439c harness: don't crash when adding a sink-harness without h->sinkpad
https://bugzilla.gnome.org/show_bug.cgi?id=755511
2015-09-24 11:07:24 +01:00
Sebastian Dröge 73263271bb basetransform: Print buffer PTS when submitting an input buffer 2015-09-23 20:31:48 +02:00
Vineeth TM fcdfcbd618 downloadbuffer, benchmarks: fix error leaks in failure code paths
https://bugzilla.gnome.org/show_bug.cgi?id=755019
2015-09-15 18:21:58 +01:00
Vineeth TM f409dd48e0 check: Fix indentation
https://bugzilla.gnome.org/show_bug.cgi?id=755019
2015-09-15 18:21:27 +01:00
Stian Selnes ff9a78196c harness: Fix race for gst_harness_element_ref
In order for gst_harness_new_full to be MT-safe the increase and
decrease of HARNESS_REF must be MT-safe. This allows for creating
multiple harnesses from different threads wrapping the same element.

https://bugzilla.gnome.org/show_bug.cgi?id=754661
2015-09-07 11:31:33 +01:00
Stian Selnes 615e5b01c6 harness: Allow-none for custom stress init func
It should be allowed to not have a function to initialize the user data
since it's often not necessary; it may already be initialized.

https://bugzilla.gnome.org/show_bug.cgi?id=754661
2015-09-07 11:30:37 +01:00
Havard Graff b2ce23074e harness: misc bugfixes
1. Get a list of pad templates from the element class, not the
factory. This allows us to interact with test-elements that does
not have a factory.

2. Use the pad_template_caps in caps-queries when caps is not set
explicitly on the pad. Not doing so is simply wrong, and prohibits
interactions with special templates used for testing.

https://bugzilla.gnome.org/show_bug.cgi?id=754193
2015-08-31 12:03:09 +01:00
Nicolas Dufresne 2534e39e55 basetransform: Reconfigure before propose_allocation
There exist cases where a reconfigure event was propagated from
downstream, but caps didn't change. In this case, we would
reconfigure only when the next buffer arrives. The problem is that
due to the allocation query being cached, the return query parameters
endup outdated.

In this patch we refactor the reconfigurating code into a function, and
along with reconfiguring when a new buffer comes in, we also reconfigure
when a query allocation arrives.

https://bugzilla.gnome.org/show_bug.cgi?id=753850
2015-08-21 15:14:34 -07:00
Tim-Philipp Müller a887d81bfa baseparse: avoid tag list spam if upstream provides bitrate tags already
Explicitly keep track again whether upstream tags or parser tags
already contain bitrate information, and only force a tag update
for a bitrate if we are actually going to add the bitrate to the
taglist later. This fixes constant re-sending of the same taglist,
because upstream provided a bitrate already and we didn't add it,
so we didn't save the 'posted' bitrate, which would then in turn
again trigger the 'bitrate has changed too much, update tags'
code path. Fixes tag spam with m4a files for example.

https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-08-18 15:51:53 +01:00
Tim-Philipp Müller 4ec358773a baseparse: fix tag handling
In 0.10 there were no sticky events, and all tag events
sent would just be merged with the previously-received
tags. In 1.x we have sticky events, and the tags in the
tag event(s) should at all times carry the complete tags,
so we can't just push some tags and then just push tags
with just bitrates to update the bitrates, etc.

Instead we need to keep track of the upstream stream tags
received, of the tags set by the video decoder subclass,
and send an updated tag event with the combined tags
including our own bitrate tags (if applicable) whenever
the upstream tags, the subclass tags or any of our bitrates
change.

https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-08-16 14:32:24 +01:00
Tim-Philipp Müller 41b85d91eb baseparse: add API for subclass to set tags
This is needed so that we can do proper tag handling
all around, and combine the upstream tags with the
tags set by the subclass and any extra tags the
base class may want to add.

API: gst_base_parse_merge_tags()

https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-08-16 14:32:23 +01:00
Tim-Philipp Müller d60c249f51 baseparse: save upstream stream tags
We'll need those later.

https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-08-16 12:29:10 +01:00
Tim-Philipp Müller bc1fb2d8b0 baseparse: minor code simplification
Use gst_pad_peer_query_duration() and remove a few
unnecessary levels of indentation. Rest of code might
looks a bit questionable, but leave it as is for now.
2015-08-15 18:41:31 +01:00
Thiago Santos e0cc0e0888 basetransform: rework accept-caps
According to the design docs:
The ACCEPT_CAPS query is not required to work recursively, it can simply
return TRUE if a subsequent CAPS event with those caps would return
success.

So make it a shallow check instead of recursivelly check downstream.

https://bugzilla.gnome.org/show_bug.cgi?id=748635
2015-08-13 14:07:35 -03:00
Thiago Santos 42acf05b22 basetransform: remove some dead code
Doesn't seem like it is going to get back to life anytime soon

Also removes a {} block that was likely used to keep the dead
code around.
2015-08-13 12:45:35 -03:00
Thiago Santos 7ec54c2217 basetransform: respect accept-caps intersect flag
GstPad has a flag for suggesting if the accept-caps
query should use intersect instead of the default
subset caps operation to verify if the caps would be
acceptable.

basetransform currently always uses the subset check and
this patch makes it honor the flag for using intersect
if it is set.

https://bugzilla.gnome.org/show_bug.cgi?id=748635
2015-08-13 06:01:36 -03:00
Vineeth TM 039ac81ee3 basetransform: remove unreachable return statement
https://bugzilla.gnome.org/show_bug.cgi?id=753538
2015-08-12 10:34:59 +01:00
Havard Graff 28100e0b6a harness: add _set_forwarding function
To be able to disable the slightly "magic" forwarding of the
necessary events between the harnesses.

Also introduce a new test-suite for GstHarness, that documents the
feature, and should hopefully expand into documenting most of the
features the harness possesses.

https://bugzilla.gnome.org/show_bug.cgi?id=752746
2015-08-09 16:02:37 +01:00
Nicolas Dufresne e24e902d2f basesink: Only drop buffer if their PTS is out of segment
As of now, even for stream completly inside segment, there is no
guarantied that the DTS will be inside the segment. Specifically
for H.264 with B-Frames, the first few frames often have DTS that
are before the segment.

Instead of using the sync timestamp to clip out of segment buffer,
take the duration from the start/stop provided by the sub-class, and
check if the pts and pts_end is out of segment.

https://bugzilla.gnome.org/show_bug.cgi?id=752791
2015-08-05 15:51:27 -04:00
Luis de Bethencourt 60de1f26c7 harness: don't run code inside g_assert
Even though asserts can't be disabled in GstHarness, Coverity still
complains about running code inside them. Moving the code to outside the
g_asserts().

CID #1311326, #1311327, #1311328
2015-08-05 14:05:27 +01:00
Nicolas Dufresne d47b567f2f doc/gsthardness: Fix typo in GstAllocationParams
It's not GstAllocatorParams but GstAllocationParams.
2015-07-28 15:50:40 -04:00
Nicolas Dufresne 67e53e4adc doc/gstharness: Remove unknown parameter
sink_elenment_name is not a parameter of gst_harness_add_sink_harness()
function, but still it show up in documentation.
2015-07-28 15:46:09 -04:00
Olivier Crête 5e5a14028a basetransform: Return FLOW_FLUSHING if negotiation fails during shutdown
https://bugzilla.gnome.org/show_bug.cgi?id=752800
2015-07-27 13:53:26 -04:00
Olivier Crête 815b5f69e8 harness: Fix indendation 2015-07-22 18:55:29 -04:00
Nicolas Dufresne f9aa306747 basetransform: Avoid increasing query reference
gst_query_find_allocation_meta() requires the query to be
writable to work. This patch ensure avoids taking a reference
on the query, so we can now check if a certain allocation meta
is present.

https://bugzilla.gnome.org/show_bug.cgi?id=752661
2015-07-22 13:29:35 -04:00
Havard Graff c97f82e32b harness: add functions for adding sub-harnesses directly
By introducing gst_harness_add_src_harness and gst_harness_add_sink_harness
we collect all sub-harness setup in one function, making the previous
sub-harness creation functions now calls these directly, and making it
much easier (and less error-prone) to add your own src or sink-harness
using the more generic harness-creation functions.
2015-07-20 15:30:11 +01:00
Nicolas Dufresne 5b5cebf540 baseparse: Don't override gst_segment_do_seek()
This line has no purpose, clearly gst_segment_do_seek() is doing
the right job, also, having the start time (a timestamp) be that
same as time (the stream time) is quite odd.

https://bugzilla.gnome.org/show_bug.cgi?id=750783
2015-07-17 17:44:52 -04:00
Nicolas Dufresne 8b6e8701d5 baseparse: Fix extrapolation of seeksegment.stop
The stop shall be relative to start if extrapolated from the
duration.

https://bugzilla.gnome.org/show_bug.cgi?id=750783
2015-07-17 17:44:44 -04:00
Tim-Philipp Müller 997115e462 harness: fix indentation 2015-07-16 17:50:49 +01:00
Tim-Philipp Müller 36267ca0e2 harness: fix pad template leak 2015-07-16 17:50:06 +01:00
Havard Graff 0841b2a97e harness: don't re-establish the harness sink and src pads
Given that the element has the possibility to have one, they should
already be there.

https://bugzilla.gnome.org/show_bug.cgi?id=752498
2015-07-16 17:09:27 +01:00
Stian Selnes 8597284d0b harness: Improve detection of element type
The element flag does not indicate wether a bin should be tested as a
source or as a sink, eg. a bin with the sink flag may still have a
source pad and a bin with the source flag may have a sink pad. In this
case it is better to determine the element type by looking at the
available pads and pad templates.

Also rename srcpad and sinkpad where it actually represents
element_srcpad_name and element_sinkpad_name.

https://bugzilla.gnome.org/show_bug.cgi?id=752493
2015-07-16 16:23:20 +01:00
Stian Selnes fe6f694dbb harness: Forward sticky events to sink harness
Fixes issue where if a sink harness was added late the sticky events
would not be forwared.

https://bugzilla.gnome.org/show_bug.cgi?id=752494
2015-07-16 16:18:08 +01:00
Tim-Philipp Müller e066058fac harness: make header nicer to read 2015-07-16 12:41:51 +01:00
Vineeth TM 6d78d32d51 baseparse: estimate duration on EOS
For files which are smaller than 1.5 seconds, the duration
estimation does not happen. So the duration will always be
displayed as 0. Updating the duration on EOS when the estimation
has not happened already

https://bugzilla.gnome.org/show_bug.cgi?id=750131
2015-07-10 15:23:43 -04:00
Hyunjun Ko 427400be1d adapter: change log message properly
https://bugzilla.gnome.org/show_bug.cgi?id=752116
2015-07-10 10:46:38 +03:00
Hyunjun Ko af62e2874f adapter: fix to get valid (buffer_)list
get_list/get_buffer_list should be done with buffers in adapter remaining
while take_list/take_buffer_list flushes each buffer one by one.

https://bugzilla.gnome.org/show_bug.cgi?id=752116
2015-07-08 18:59:31 +03:00
Arnaud Vrac ea8cabe084 baseparse: put buffer in a correct state after gst_adapter_get_buffer call
We must make the buffer writable to write its PTS and DTS, and also
reset its duration.

The behaviour is now the same as before commit c3bcbadd, except metas
might still be attached to the buffer extracted from the adapter.

https://bugzilla.gnome.org/show_bug.cgi?id=752092
2015-07-08 13:33:37 +03:00
Tim-Philipp Müller 0728b219b9 harness: fix indentation and replace stress test function macros
These screw with indentation and seem a bit trivial. Just copy'n'paste.
2015-07-07 15:02:45 +01:00
Hyunjun Ko eaf4153668 meta: transform_func: return FALSE if not supported or failed
https://bugzilla.gnome.org/show_bug.cgi?id=751778
2015-07-07 13:40:17 +03:00
Tim-Philipp Müller b5cc88594e harness: make sure g_assert() statements are always active
We have code with side effects inside g_assert()s, so make
sure those are always enabled here (they might otherwise
get disabled for release builds).
2015-07-07 08:38:31 +01:00
Tim-Philipp Müller ac79c7f05a harness: rename GstHarnessPrepareBuffer -> GstHarnessPrepareBufferFunc
https://bugzilla.gnome.org/show_bug.cgi?id=751916
2015-07-07 00:58:15 +01:00
Tim-Philipp Müller 49c896db3a docs: add GstHarness to documentation
https://bugzilla.gnome.org/show_bug.cgi?id=751916
2015-07-07 00:53:48 +01:00
Havard Graff 66e25da313 check: Add GstHarness convenience API for unit tests
http://gstconf.ubicast.tv/videos/gstharness-again-a-follow-up/

https://bugzilla.gnome.org/show_bug.cgi?id=751916
2015-07-06 23:36:37 +01:00
Vineeth TM 274f4b784a baseparse: reverse playback in pull mode
right now reverse playback is disabled in pull mode.
enabling the code for the same and changing a bit of logic
to make reverse playback work.

https://bugzilla.gnome.org/show_bug.cgi?id=750783
2015-07-06 09:56:27 -04:00
Song Bing 8e2c72f125 basesink: Shouldn't drop buffer when sync=false
Shouldn't drop buffer when sync=false

https://bugzilla.gnome.org/show_bug.cgi?id=751819
2015-07-06 11:38:48 +03:00
Tim-Philipp Müller d0f85838ab queuearray: allow storing of structs in addition to pointers
This way we don't have to allocate/free temporary structs
for storing things in the queue array.

API: gst_queue_array_new_for_struct()
API: gst_queue_array_push_tail_struct()
API: gst_queue_array_peek_head_struct()
API: gst_queue_array_pop_head_struct()
API: gst_queue_array_drop_struct()

https://bugzilla.gnome.org/show_bug.cgi?id=750149
2015-07-04 11:03:51 +01:00
Sebastian Dröge 231e77338c transform: 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:50:19 +02:00
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