Commit graph

2428 commits

Author SHA1 Message Date
Edward Hervey
bf9018b77c nettimeprovider: Use non-freed variable
address is only used temporarily. Use the proper variable instead.

CID #1212189
2014-05-09 14:46:59 +02:00
Nicolas Dufresne
157befa04c pool-nego: Correctly reset the configuration
When pool cannot be used, correctly reset the configuration before
configuration a default pool.
2014-05-08 14:12:16 -04:00
Nicolas Dufresne
23e69d98d8 pool-nego: Retry setting configuration with modified config
Buffer pool set_config() may return FALSE if requested configuration needed
small changes. Reget the config and try setting it again (validating the
changes first). This ensure we have a configured pool if possible.

https://bugzilla.gnome.org/show_bug.cgi?id=727916
2014-05-08 13:11:14 -04:00
Tim-Philipp Müller
250f89a7e9 sparsefile: add some Since markers to docs 2014-05-08 16:30:55 +01:00
Tim-Philipp Müller
4a6ab37591 sparsefile: sprinkle G_BEGIN_DECLS / G_END_DECLS
for c++, and remove outdated comment, and add
new unit test to .gitignore.
2014-05-08 16:27:21 +01:00
Wim Taymans
45855e2795 Add new downloadbuffer element
See https://bugzilla.gnome.org/show_bug.cgi?id=680183
2014-05-08 15:53:45 +02:00
Tim-Philipp Müller
a10ca2ee13 check: use _exit() instead of exit() in fail_unless() so we exit immediately
exit() will call atexit handlers, which may try to
clean up things or wait for things to get cleaned up,
which we don't want or need. We just want to stop
and let the parent know about the failure as quickly
as possible in case fork() is used.

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

http://sourceforge.net/p/check/patches/50/
2014-05-07 10:44:34 +01:00
Nicolas Dufresne
3895e431bd basesink: Always render prepared buffer
Currently, if prepare() takes too much time, we skip the call to render().
The side effect of this, is that we endup starving the render(). The solution
in this patch is to always render frames that are on time before prepare() is
executed. This will maximize the number of frames we display and smoothly
degrade the rendering performance.

https://bugzilla.gnome.org/show_bug.cgi?id=729335
2014-05-02 18:52:44 -04:00
Tim-Philipp Müller
6eb6d9ec38 docs: remove outdated and pointless 'Last reviewed' lines from docs
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-26 21:21:51 +01:00
Sebastian Dröge
63c1728040 basesrc: Make sure to always hold the LIVE_LOCK when going to the flushing label
https://bugzilla.gnome.org/show_bug.cgi?id=728596
2014-04-20 12:01:01 +02:00
Antoine Jacoutot
3e24bbefba libs: g-ir-scanner: do not hardcode libtool path
https://bugzilla.gnome.org/show_bug.cgi?id=726571
2014-04-17 09:26:20 +01:00
Edward Hervey
145517aa64 check: Fix exported symbol name
it's _template and not _templ
2014-04-16 07:59:27 +02:00
Sebastian Dröge
917a033d04 check: Add new API to set up pads from non-static pad templates 2014-04-15 12:58:59 +02:00
Tim-Philipp Müller
ed9d0381b2 testclock: replace newly-added GstTestClockIDList structure with a simple GList
Keep it simple. Likely also makes things easier for bindings,
and efficiency clearly has not been a consideration given how
the existing code handled these lists.
2014-04-12 15:33:50 +01:00
Tim-Philipp Müller
2e4900ba94 docs: testclock: fix up Since markers 2014-04-12 15:33:46 +01:00
Tim-Philipp Müller
8d4f245942 testclock: add back gst_test_clock_wait_for_pending_id_count()
.. but deprecate it. ABI stability and all that.
It's a dangerous and racy function to use.
2014-04-12 15:33:43 +01:00
Tim-Philipp Müller
f30ab21ba7 testclock: remove unused variable
Fixes compiler warning.
2014-04-12 15:33:36 +01:00
Havard Graff
3892cc4c2d testclock: add support for waiting and releasing multiple GstClockIDs
In order to be deterministic, multiple waiting GstClockIDs needs to be
released at the same time, or else one can get into the situation that
the one being released first can add itself back again before the next
one waiting is released.

Test added for new API and old tests rewritten to comply.
2014-04-12 15:33:31 +01:00
Jose Antonio Santos Cadenas
f880742638 baseparse: Fix memory leak
Queued frames were not released after being pushed, this
caused a leak of the GstBaseParseFrame structure.

https://bugzilla.gnome.org/show_bug.cgi?id=727883
2014-04-09 10:47:39 +02:00
Tim-Philipp Müller
8924782dd4 Revert "check: only call setpgid on valid child PIDs"
This reverts commit b9313afc75.

This should be fixed in upstream libcheck instead. We want
to keep diff of our local copy to upstream libcheck
to a minimum.
2014-04-07 17:47:30 +01:00
Vincent Penquerc'h
b9313afc75 check: only call setpgid on valid child PIDs
Coverity 206186
2014-04-07 15:40:45 +01:00
Edward Hervey
6c2c49a590 baseparse: Remove always-true-checks
a gsize is guaranteed to be positive on all systems since it's an
unsigned value.

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

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

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

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

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

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

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

Contains unit test

https://bugzilla.gnome.org/show_bug.cgi?id=724757
2014-02-24 10:37:57 -03:00
Stefan Sauer
6fc23cd016 check: also use the glob on GST_CHECKS when forcing to run broken tests
GST_CHECKS can be simply "test*" to run run all tests (including those that are
marked broken). Update the sparse comments a bit to tell how this works.
2014-02-19 11:04:17 +01:00
Wim Taymans
04a6c661c8 basesrc: in automatic_eos mode, don't modify the size
Don't set the size to -1 in automatic_eos mode (which also updates the
duration to -1). We only want automatic_eos mode influence the maxsize
calculations without any side effects.

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

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

Also adds a test for this

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

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

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

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

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

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

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

https://bugzilla.gnome.org/show_bug.cgi?id=721350
2014-01-02 16:38:40 -03:00
Tim-Philipp Müller
2ddbe8df49 nettimeprovider: remove unnecessary NULL check
Error is never NULL when we break out of the loop.

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

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

COVERITY CID 1037151
2013-12-30 16:51:01 +01:00
David Svensson Fors
892d36211f basesrc: use segment start if DTS for first buffer is unset
https://bugzilla.gnome.org/show_bug.cgi?id=720199
2013-12-17 10:47:55 +01:00
Tim-Philipp Müller
fcfe7085b9 bytereader: add inline variant of gst_byte_reader_init() 2013-12-14 18:38:41 +00:00
Tim-Philipp Müller
a6010a9155 docs: fix docs for gst_queue_array_peek_head() 2013-12-14 18:31:38 +00:00
Edward Hervey
b363ab17e7 controller: Fix out-of-bounds detection
We want to abort if we higher than the maximum *OR* lower than the minimum
accepted value.

Detected by Coverity.
2013-12-10 17:09:07 -05:00
Sebastian Rasmussen
53ae1b2c9c docs: Fix typos in function/object descriptions
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=720029
2013-12-07 17:11:12 +00:00
Sebastian Rasmussen
e8ecf3c407 Fix some typos in code comments and debug messages
https://bugzilla.gnome.org/show_bug.cgi?id=720029
2013-12-07 17:09:39 +00:00
Olivier Crête
68697682ce basesrc: Set format to TIME if do-timestamp is TRUE
https://bugzilla.gnome.org/show_bug.cgi?id=702842
2013-12-05 13:29:05 -05:00
Sebastian Rasmussen
b40fa2b8c3 docs: cosmetic changes in references/decriptions
* fix typo GstBufferFlag -> GstBufferFlags
 * fix typo GstFeatures -> GstCapsFeatures
 * fix typo GstAllocatorParams -> GstAllocationParams
 * fix typo GstContrlSources -> GstControlSource
 * do not refer to gstcheck as an object
 * make references gtk_init() and tcase_set_timeout() not be references
 * gst_element_get_pad() renamed gst_element_get_static_pad()
 * gst_clock_id_wait_async_full() renamed gst_clock_id_wait_async()
 * _drop_element() is really gst_queue_array_drop_element()
 * gst_pad_accept_caps() was removed, do not refer to it
 * separate GST_META_TAG_MEMORY_STR declaration from description
 * do not describe removed gst_collect_pads_collect()
 * correctly link to GstElementClass' virtual set_context()

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=719614
2013-12-02 21:01:08 +00:00
Jan Schmidt
73a58cb0a2 netclock: Fix docstring for round-trip-limit and uninit access warning.
Fix a typo in a doc string - the property is round-trip-limit, not
roundtrip-limit.

Remove a bogus GST_WARNING that can print an uninitialised variable
and is redundant anyway.
2013-11-27 18:32:22 +11:00
Carlos Rafael Giani
1ce704d45d netclock: Add round-trip-limit parameter
Sometimes, packets might take a very long time to return. Such packets
usually are way too late and destabilize the regression with their
obsolete data. On Wi-Fi, round-trips of over 7 seconds have been observed.

If the limit is set to a nonzero value, packets with a round-trip period
larger than the limit are ignored.

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>

https://bugzilla.gnome.org/show_bug.cgi?id=712385
2013-11-27 18:15:20 +11:00
Jan Schmidt
75aa78ca70 netclock: Fix C99 comment 2013-11-26 02:43:54 +11:00
Jan Schmidt
5b2df52c6a netclock: Implement rolling-average filter on observations.
Keep a rolling average of the round trip time for network clock
observations, favouring shorter round trips as being more accurate.

Don't pass any clock observation to the clock slaving if it has a
round-trip time greater than 2 times the average.

Actual shifts in the network topology will be noticed after some
time, as the rolling average incorporates the new round trip times.
2013-11-26 02:20:14 +11:00
Jan Schmidt
5db5fc4227 basesink: Add debug into gst_base_sink_default_query() for accept_caps 2013-11-26 02:20:14 +11:00
Tim-Philipp Müller
9f669e5ea5 docs: cosmetic since marker fixes 2013-11-16 16:09:40 +00:00
Mark Nauwelaerts
e24722c52c baseparse: ensure to preserve upstream timestamps
... rather than have subclass coming up with an internally parsed one.

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

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

API: gst_collect_pads_set_flush_function()
API: gst_collect_pads_src_event_default()

https://bugzilla.gnome.org/show_bug.cgi?id=708416
2013-11-11 16:50:42 +01:00
Mark Nauwelaerts
e10af7c409 basesrc: mind boggling wrap when comparing offsets 2013-11-02 16:13:27 +01:00
Mark Nauwelaerts
8da78d1595 baseparse: try first frame pts and dts for a valid start timestamp 2013-11-02 16:13:27 +01:00
Mark Nauwelaerts
3aaa3fcf92 baseparse: print proper variable in debug statement 2013-11-02 16:13:27 +01:00
Philip Withnall
3c8424d9ae net: Constify a parameter to gst_net_client_clock_new()
Even though this parameter is not used, it should be const to fit in with the
coding standards for other similar parameters. Client code already passes in
const strings under the expectation that they won’t be modified.

https://bugzilla.gnome.org/show_bug.cgi?id=710442
2013-10-18 09:59:25 +01:00
Thibault Saunier
0564c1c2b8 collectpads: Call the collected function while it returns FLOW_OK
This allows us to make sure the elements is EOS and does not have
remaining buffers to be drained.

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

Thus there exists a possible race where :

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

https://bugzilla.gnome.org/show_bug.cgi?id=708636
2013-09-24 10:44:34 +02:00
Wim Taymans
cba26c9ed9 tests: handle unscheduled entries correctly
Make the testclock return GST_CLOCK_UNSCHEDULED when an unscheduled entry is
used for gst_clock_wait() or gst_clock_wait_async().

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=708605
2013-09-23 11:47:14 +02:00
Tim-Philipp Müller
0e66790134 check: testclock: fix function guards
Should be g_return_*() not g_assert(), even if it's for tests only.
2013-09-19 17:12:14 +01:00
Tim-Philipp Müller
cc4ba028ff check: testclock: don't put code with side-effects in g_assert()
Fixes unit test failures when -DG_DISABLE_ASSERT is used.

https://bugzilla.gnome.org/show_bug.cgi?id=706551
2013-09-19 16:43:18 +01:00
Rico Tzschichholz
f1971fe1e9 controlbindings: fix pspec relaxation for control source properties
The change should have been from PARAM_CONSTRUCT_ONLY to
PARAM_CONSTRUCT, otherwise bindings are affected, since
they look for the CONSTRUCT flag.

See ec55363d
2013-09-10 16:41:30 +01:00
Mathieu Duponchelle
8d24c4e451 basetransform: implement a default transform_meta.
If a metadata has no dependency as shown by the tags, copy it.
2013-09-09 15:32:18 +02:00
Thiago Santos
3dc8ee97e5 basesrc: preserve seqnum on segments after seeks
The seqnum of the segment after a seek should be the same of
the seek event. Downstream elements might rely on seqnums to
identify events related to a seek.

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

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

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

https://bugzilla.gnome.org/show_bug.cgi?id=706600
2013-08-22 19:06:47 +02:00
Jonas Holmberg
3c4873458e check: Call gst_deinit() at exit of all processes 2013-08-16 10:21:19 +01:00
Wim Taymans
44811ab650 basesrc: improve flush-start handling
Use custom code to implement flush-stop, we can't reuse the set_flushing code
because we can't touch the live_playing flag and we need to signal the
streaming thread.
2013-08-14 17:44:48 +02:00
Wim Taymans
9006f203d0 basesrc: stop flushing in flush-stop 2013-08-14 17:14:15 +02:00
Wim Taymans
d95c227641 basesrc: handle flush better
Unlock the streaming thread when flushing so that we can
insert the flush-stop correctly.
2013-08-14 16:58:41 +02:00
Edward Hervey
0bfc375a54 check: Don't use nodist headers on gir scanner
Just creates noise and bogus symbols
2013-08-14 07:21:06 +02:00
Edward Hervey
3c49b5d23b baseparse: Add a property to disable passthrough
In some specific cases (like transmuxing) we want to force the element
to actually parse all incoming data even if the element deems it is not
necessary.

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

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

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

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

API: gst_data_queue_push_force

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

https://bugzilla.gnome.org/show_bug.cgi?id=702357
2013-08-10 18:54:34 -04:00
Adrian Pardini
d4f6c8e0e6 controller: fixes int overflow with properties that span +-INT_MAX
When the range for a property is defined as -INT_MAX-1 .. INT_MAX, like
the xpos in a videomixer the following expression in the macro
definitions of convert_g_value_to_##type (and the equivalent in
convert_value_to_##type)

v = pspec->minimum + (g##type) ROUNDING_OP ((pspec->maximum - pspec->minimum) * s);

are converted to:

v = -2147483648 + (g##type) ROUNDING_OP ((2147483647 - -2147483648) * s);

(2147483647 - -2147483648) overflows to -1 and the net result is:

v = -2147483648 + (g##type) ROUNDING_OP (-1 * s);

so v only takes the values -2147483648 for s == 0 and 2147483647
for s == 1.

Rewriting the expression as minimum*(1-s) + maximum*s gives the correct
result in this case.

https://bugzilla.gnome.org//show_bug.cgi?id=705630
2013-08-08 12:31:49 +02:00
Kjartan Maraas
280f557380 docs: some small gtk-doc markup fixes
https://bugzilla.gnome.org/show_bug.cgi?id=705156
2013-07-30 23:33:28 +01:00