Commit graph

2232 commits

Author SHA1 Message Date
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