Commit graph

2202 commits

Author SHA1 Message Date
Zaheer Abbas Merali 4e880d4d1e 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-09 12:40:01 +02:00
Adrian Pardini 16b2a6a234 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-26 12:39:18 +01:00
Tim-Philipp Müller 06978dac05 timeprovider: g-i: allow None as address for gst_net_time_provider_new()
Conflicts:
	libs/gst/net/gstnettimeprovider.c
2013-07-17 18:46:23 +01:00
Wim Taymans 5691ef8575 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-07-15 22:33:37 +01:00
Thibault Saunier 592fbfb043 basesrc: Do not lock a mutex that does not exist
The GST_LIVE_LOCK is on GstBaseSrc, not on its source pad.
2013-07-05 19:34:49 +01:00
Nicolas Dufresne 2616feed42 Add few missing allow-none annotation
https://bugzilla.gnome.org/show_bug.cgi?id=703562

Conflicts:
	gst/gstmessage.c
2013-07-03 14:28:39 -04:00
Wim Taymans 8374517c45 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 07:12:58 +02:00
Thibault Saunier b133903093 controller: Fix element-type annotations 2013-04-26 08:19:32 +02:00
Nicolas Dufresne 9ce8e5b7ff 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-04-15 08:19:55 +02:00
Tim-Philipp Müller 5ef30a7019 netclientclock: bind socket before querying local address
Fails on windows otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=697608
2013-04-13 12:07:37 +01:00
Tim-Philipp Müller 9f3d06c4d4 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:36:55 +00:00
Stefan Sauer e52bebfa57 docs: update the controller docs
Add the control bindings to the docs. Add a little more detail.
2013-02-05 18:42:43 +00:00
Wim Taymans 0b72d1af1a basesink: handle sync of EOS after item without duration
After a buffer or GAP without duration, an EOS event should be rendered
immediately instead of waiting for the end of the segment.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=692868

Conflicts:
	libs/gst/base/gstbasesink.c
2013-02-05 17:37:13 +01:00
Wim Taymans 1ee8ec7921 basesrc: handle renegotiation correctly
Don't retry to negotiate when we fail to negotiate but instead produce a
NOT_NEGOTIATED error. We only want to retry negotiation if the result from
gst_pad_push() returned NOT_NEGOTIATED.
2013-01-29 10:08:06 +01:00
Niv Sardi d285109a5c basesrc: set NEED_RECONFIGURE flag if negotiate fails
When negotiation fails, mark the pad as needing a reconfigure again so
that it gets picked up again next time.

Signed-off-by: Niv Sardi <xaiki@evilgiggle.com>

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=691986
2013-01-24 10:15:20 +01:00
Tim-Philipp Müller 7ae5371302 docs: add a note to the gst_adapter_take_buffer() docs about buffer flags
https://bugzilla.gnome.org/show_bug.cgi?id=682110
2013-01-17 10:33:57 +00:00
Tim-Philipp Müller bfa593bb11 docs: minor GstBaseParse docs fixes
Expose docs for gst_base_parse_finish_frame().
2013-01-17 10:33:57 +00:00
Wim Taymans 63e020c502 typefind: handle map failure 2013-01-17 10:33:57 +00:00
Wim Taymans 23570c6ca5 basesrc: handle map failure 2013-01-17 10:33:56 +00:00
Wim Taymans ed001daaeb adapter: handle map failure 2013-01-17 09:34:05 +00:00
Wim Taymans 5379cb5ed1 NEWSEGMENT -> SEGMENT 2012-12-14 15:33:21 +01:00
Wim Taymans ef7d83d515 basesrc: call _stop when start failed
When we failed to complete the start, call stop again. This makes sure that all
successfull calls to _start are paired with a _stop.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=687845
2012-12-14 15:33:00 +01:00
Wim Taymans 0a491a8c56 baseparse: improve debug
Add pts and dts in debug log
2012-12-14 15:32:32 +01:00
Wim Taymans c447ec34df adapter: fix 0.10 docs to make more sense in 1.0 2012-12-10 13:44:25 +00:00
Wim Taymans 986d709725 adapter: fix docs for 1.0
Add parent to chain function signature and use it.
2012-12-10 13:44:22 +00:00
Wim Taymans bb9c38a750 basesink: add some debug 2012-11-20 18:58:09 +00:00
Wim Taymans 3c8f5c0d1c basesink: reset START_TIME when needed
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=685870
2012-11-20 18:58:09 +00:00
Arnaud Vrac 14d2fcdf8b baseparse: forward stream-start event in push mode 2012-11-20 12:47:15 +01:00
Jan Schmidt ef3fe1e4bf collectpads: Clarify docs about the buffer handler callback.
Clarify that the callback owns a ref on a passed buffer.
2012-10-30 23:34:09 +00:00
Vincent Penquerc'h f7e6dd53e1 baseparse: prevent excessively high memory usage with long streams
Large streams would index one frame every second, which can get quite
large with multi-hour streams, so add an additional byte-based
minimum distance as well, which will kick in for long streams
and make sure we never have more than a couple of thousand index
entries.

https://bugzilla.gnome.org/show_bug.cgi?id=666053
2012-10-30 23:33:08 +00:00
Wim Taymans 9f42bd643e basesrc: use new GCond for async state change
Use a new GCond, protected with the object lock, to signal completion
of the async state change. We can't reuse the live lock because that
one can be locked when the create function blocks.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=686723
2012-10-24 11:16:12 +02:00
Sebastian Dröge 1042857f33 configure: Properly check for pthread
The old check failed on Android for example.
2012-10-22 15:05:24 +02:00
Tim-Philipp Müller d86ecaf53e collectpads: fix g-i annotation for GstCollectPadsBufferFunction
We pass ownership of the buffer to the function.
2012-10-20 19:44:43 +01:00
Tim-Philipp Müller 73b2a3dd66 collectpads: minor docs fixes 2012-10-15 19:56:36 +01:00
Tim-Philipp Müller bb2fda64f7 collectpads: fix buffer leak in clip_time 2012-10-15 19:55:42 +01:00
Mark Nauwelaerts 81aef52ac4 collectpads: call clip function with user data 2012-10-15 18:44:56 +02:00
Mark Nauwelaerts a6b75fb322 collectpads: ensure all timestamps are in same time domain
... by not only processing incoming buffers through a clip function,
but also other timestamps such as those coming from GAP event.
2012-10-10 11:43:25 +02:00
Mark Nauwelaerts bd3a27f24c docs: adjust some parameter mismatches 2012-10-10 11:43:25 +02:00
Wim Taymans f688d4d8a7 basesrc: retrieve the result from start_complete
gst_base_src_start_complete() can fail when the thread could not be
started, for example. Make sure it causes the state change to fail by
retrieving the result from _start_complete().
2012-10-09 15:31:19 +02:00
Wim Taymans e89ac90fa1 basesrc: improve debug 2012-10-09 15:31:04 +02:00
Tim-Philipp Müller 4e373aa952 docs: add Since markers for new API and add it to docs and .def file 2012-10-04 11:24:09 +01:00
Wim Taymans d5b81aba6a basetrans: add an option to prefer passthrough
Basetransform attempts to do passthrough mode regardless of the order of
the transform_caps method. Add a method to disable this.
This is needed for elements like capsfilter that want to transform caps
based on the order of the caps property.
2012-10-04 11:15:36 +02:00
Wim Taymans 664f7141be basetrans: improve some comments 2012-10-04 10:01:19 +02:00
Wim Taymans ed19974e25 meta: do metadata registration threadsafe
We need to use g_once to register the metadata implementations
only once.

See https://bugzilla.gnome.org/show_bug.cgi?id=685332
2012-10-03 13:45:22 +02:00
Jan Schmidt 906738ab49 basesrc: Fix seamless segment function
The 3rd parameter of gst_base_src_new_seamless_segment in
0.10 is the time associated with the start of the new segment,
not the position in the new segment. Fix the name of the parameter,
the docs, and the implementation to match the needs of the only
extant consumer: DVD playback.
2012-09-30 04:07:31 +10:00
Tim-Philipp Müller d13ba1a304 docs: fix up basesrc/basesink docs formatting 2012-09-26 23:32:35 +01:00
Wim Taymans c1b31eaa4c update docs for 1.0 API 2012-09-26 17:11:05 +02:00
Jan Schmidt d08d3d8227 baseparse: Move some run of the mill debug statements to LOG level 2012-09-26 15:04:14 +10:00
Jan Schmidt a663a4b9a0 baseparse: Output timestamps after a seek.
Reinitialise the DTS after a seek so as to continue
generating timestamps when baseparse is not downstream
of a demuxer.

Fixes: #684538
2012-09-26 15:04:04 +10:00
Wim Taymans 79ae0b8445 docs: fix basesink docs 2012-09-25 14:45:15 +02:00