Commit graph

2143 commits

Author SHA1 Message Date
Edward Hervey
991d6462a8 typefindhelper: Avoid using buffer_get_size in tight loops
Calling gst_buffer_get_size represented 2/3 of the cost of helper_find_peek
which was called whenever a typefindfunction wanted to peek at data.

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

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

https://bugzilla.gnome.org/show_bug.cgi?id=704100
2013-07-15 11:32:10 +02:00
Thibault Saunier
6cc39f42a9 basesrc: Do not lock a mutex that does not exist
The GST_LIVE_LOCK is on GstBaseSrc, not on its source pad.
2013-07-04 20:56:19 -04:00
Wim Taymans
97b1e17b09 baseparse: reset PTS after seek
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=702778
2013-07-03 21:26:18 +02:00
Nicolas Dufresne
4656d18fd5 Add few missing allow-none annotation 2013-07-03 14:25:07 -04:00
Olivier Crête
75aa2bd86f check: Change stream_id parameter name to match GtkDoc 2013-07-01 20:07:03 -04:00
Jonas Holmberg
0ea8748c6b check: Added gst_check_setup_events_with_stream_id()
Added a new function gst_check_setup_events_with_stream_id(), since
gst_check_setup_events() does not work with multiple pads.

https://bugzilla.gnome.org/show_bug.cgi?id=703377
2013-07-01 15:54:11 +02:00
Sjoerd Simons
12a72d2b08 basetransform: optimize default acceptcaps implementation
Pass the fixed caps we're asked to accept as a filter for the caps
query, so we don't get a fully-expanded set of caps back (which we don't
need and can take a lot of time for intersection).

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

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

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

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

https://bugzilla.gnome.org/show_bug.cgi?id=694714
2013-05-24 23:01:09 +01:00
Sebastian Dröge
3e515099ec basetransform: Return GST_FLOW_ERROR if the allocator did not allow to allocate a buffer 2013-05-24 14:37:37 +02:00
Sebastian Dröge
516611bc33 check: Fix event handling in gst_check_element_push_buffer_list() 2013-05-15 11:22:25 +02:00
Nicolas Dufresne
a1866e64c5 check: Add helper that sends initial events
https://bugzilla.gnome.org/show_bug.cgi?id=700033
2013-05-10 09:23:28 +02:00
Sebastian Dröge
1319196349 basesrc: Add FIXME comment for unused assignment results 2013-05-08 08:52:25 +02:00
Sreerenj Balachandran
f2bbbdff59 controller: Fix the function signature and a minor typo fix
https://bugzilla.gnome.org/show_bug.cgi?id=699827
2013-05-07 14:53:23 +02:00
Tim-Philipp Müller
b48400b7a4 check: set CK_TIMEOUT_MULTIPLIER on ARM
https://bugzilla.gnome.org/show_bug.cgi?id=695599
2013-04-27 11:49:52 +01:00
Thibault Saunier
3b8181a8c5 controller: Fix element-type annotations 2013-04-25 18:51:33 -03:00
Sebastian Dröge
d420686764 netclock: Add support for IPv6 2013-04-24 15:59:45 +02:00
Sebastian Dröge
f27a3e12f6 baseparse: Only infer TS if PTS interpolation is enabled
Otherwise this is breaking timestamps of formats that
need reordering.

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

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

Add: gst_data_queue_peek
2013-04-18 14:45:47 -03:00
Tim-Philipp Müller
e2b09b1ab9 check: run skipped tests if explicitly requested via GST_CHECKS
If a test that's disabled with tcase_skip_broken_test() is listed
in the GST_CHECKS environment variable, run it anyway.
2013-04-18 00:19:23 +01:00
Wim Taymans
2541ddf123 nettimeprovider: notify of changed bound address
Notify when the bound address is known, just like the port.
2013-04-11 14:04:45 +01:00
Douglas Bagnall
39716e555b GstCollectPads documentation: gst_collect_pads_read is gone. 2013-04-11 10:39:25 +02:00
Tim-Philipp Müller
6e5405e9ce netclientclock: bind socket before querying local address
Fails on windows otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=697608
2013-04-09 19:38:59 +01:00
Josep Torra
3c9dfaea38 basesink: fixes compiler warning
gstbasesink.c: In function 'gst_base_sink_chain_unlocked':
gstbasesink.c:3204: warning: 'ret' may be used uninitialized in this function
2013-03-30 10:24:27 +01:00
Stefan Sauer
bd85fe34ad argb-controlbinding: fix messed up property setter
This was misassigning the control sources. It was also leaking the old values if
a control source would be replaced.
2013-03-28 16:51:25 +01:00
Mark Nauwelaerts
6ddbaaa95c baseparse: reset next_pts upon SEGMENT event
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=691481
2013-03-27 18:26:30 +01:00
Mark Nauwelaerts
76acdee908 baseparse: more inter-timestamp tracking
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=691481
2013-03-27 18:26:30 +01:00
Nicolas Dufresne
253035d395 basesrc: Don't send error if negotiate fails because we are flushing
Negotiation may be aborted by a flush from another thread that need to
stop the task (i.e. seek). Check that case and silently pause the task.

https://bugzilla.gnome.org/show_bug.cgi?id=696357
2013-03-25 08:57:06 +01:00
Stefan Sauer
03075cd144 docs: mention clipping of values in control-binding docs 2013-03-08 13:16:40 +01:00
Stefan Sauer
ec55363da3 controlbinding: relax the pspec for the control-source
We can change control sources on controlbindings.
2013-03-07 09:18:26 +01:00
Stefan Sauer
e642896565 lfo: set a sensible lower boundary for the frequency
Use DBL_MIN, which is a the smalles double greater than zero that is not in
denormal format. This exposes the limit better than the runtime check.
2013-03-07 09:18:25 +01:00
Stefan Sauer
1b076e995e lfocontrolsource: init the amplitude to the default and update the docs 2013-03-06 16:41:18 +01:00
Tim-Philipp Müller
f40aa2c4ad basesink: fix use of uninitialized variable
Running suite(s): GstBaseSink
==22023== Conditional jump or move depends on uninitialised value(s)
==22023==    at 0x505FFCE: gst_base_sink_get_sync_times (gstbasesink.c:1936)
==22023==    by 0x5068C80: gst_base_sink_do_sync (gstbasesink.c:2379)
==22023==    by 0x506BCD2: gst_base_sink_default_wait_event (gstbasesink.c:2903)
==22023==    by 0x50633A4: gst_base_sink_default_event (gstbasesink.c:2918)
==22023==    by 0x6F5C216: gst_fake_sink_event (gstfakesink.c:383)
==22023==    by 0x505F164: gst_base_sink_event (gstbasesink.c:3108)
==22023==    by 0x52FA090: gst_pad_send_event_unchecked (gstpad.c:4822)
==22023==    by 0x5303756: gst_pad_send_event (gstpad.c:4984)
==22023==    by 0x40165B: basesink_test_gap (basesink.c:148)
2013-03-03 16:03:42 +00:00
David Schleef
f671bd2754 collectpads: take DTS into account
Importantly, this patch converts DTS to running time.  Less importantly,
and possibly a problem for some muxers, is that it orders buffers by
DTS (if it is valid, otherwise PTS).  This is generally correct, but
might be somewhat surprising to muxers.

Also note that once converted to running time, DTS can end up negative.
2013-03-02 10:42:01 -08:00
Stefan Sauer
82f7bdd7bb seeking: add more logging for seeking
Especially add logging to error code paths.
2013-02-27 22:17:17 +01:00
Tim-Philipp Müller
5a73d15c80 basetransform: don't pass NULL outcaps to transform_size on shutdown
gst_pad_get_current_caps() on the source pad might yield NULL caps
if we're being shut down and the source pad has already been
deactivated by the other thread that's changing state. Just bail
out in that case, instead of passing NULL caps to the transform_size
function, which it might not expect.

Fixes spurious warnings in audioresample shutdown unit test.

https://bugzilla.gnome.org/show_bug.cgi?id=693996
2013-02-21 11:28:12 +00:00