Commit graph

11512 commits

Author SHA1 Message Date
David Schleef
e9afe72710 tests: Add test for greatest common divisor 2011-04-13 10:31:03 -07:00
Ole André Vadla Ravnås
037efe8738 elements: Fix pad callbacks so they handle when parent goes away
1) We need to lock and get a strong ref to the parent, if still there.
2) If it has gone away, we need to handle that gracefully.

This is necessary in order to safely modify a running pipeline. Has been
observed when a streaming thread is doing a buffer_alloc() while an
application thread sends an event on a pad further downstream, and from
within a pad probe (holding STREAM_LOCK) carries out the pipeline plumbing
while the streaming thread has its buffer_alloc() in progress.
2011-04-13 17:41:17 +02:00
Ole André Vadla Ravnås
e7bf5484c7 base: Fix pad callbacks so they handle when parent goes away
1) We need to lock and get a strong ref to the parent, if still there.
2) If it has gone away, we need to handle that gracefully.

This is necessary in order to safely modify a running pipeline. Has been
observed when a streaming thread is doing a buffer_alloc() while an
application thread sends an event on a pad further downstream, and from
within a pad probe (holding STREAM_LOCK) carries out the pipeline plumbing
while the streaming thread has its buffer_alloc() in progress.
2011-04-13 17:39:05 +02:00
Ole André Vadla Ravnås
7dd38cdcf4 ghostpad: Fix pad callbacks so they handle when parent goes away
1) We need to lock and get a strong ref to the parent, if still there.
2) If it has gone away, we need to handle that gracefully.

This is necessary in order to safely modify a running pipeline. Has been
observed when a streaming thread is doing a buffer_alloc() while an
application thread sends an event on a pad further downstream, and from
within a pad probe (holding STREAM_LOCK) carries out the pipeline plumbing
while the streaming thread has its buffer_alloc() in progress.
2011-04-13 17:37:54 +02:00
Janne Grunau
b2e6870edc queue2: prevent calculation with GST_CLOCK_TIME_NONE in update_time_level() 2011-04-13 17:35:39 +02:00
Tim-Philipp Müller
0e94961069 tests: fix unusued-but-assigned-variable warnings with gcc 4.6 2011-04-11 15:08:30 +01:00
Tim-Philipp Müller
8ba64e4e5d tests: disable test_many_bins unit test for now
It fails on the OSX bot (both with git and the last release), and
it doesn't really test anything useful, so may just as well disable
it for now.
2011-04-11 13:04:32 +01:00
Tim-Philipp Müller
918a62abcf pluginloader: fix compiler warnings
Cast string constants to make compiler happy.
2011-04-11 12:52:12 +01:00
Tim-Philipp Müller
6ca7284a54 tests: allow more time for the test_many_bins pipeline to preroll
Hopefully makes this test work on the OSX build bot and other
not-so-powerful machines.

https://bugzilla.gnome.org/show_bug.cgi?id=646624
2011-04-11 12:04:34 +01:00
Jan Schmidt
159cf687a1 pluginloader: make sure gst-plugin-scanner is called with the right arch on OSX
On OSX, GStreamer might be built as a 'fat/universal' binary containing
both 32-bit and 64-bit code. We must take care that gst-plugin-scanner
is executed with the same architecture as the GStreamer core, otherwise
bad things may happen and core/scanner will not be able to communicate
properly.

Should fix issues with (32-bit) firefox using a 32-bit GStreamer core
which then spawns a 'universal' gst-plugin-scanner binary which gets
run in 64-bit mode, causing 100% cpu usage / busy loops or just hanging
firefox until killed.

https://bugzilla.gnome.org/show_bug.cgi?id=615357
2011-04-11 11:41:19 +01:00
Robert Swain
fd5aa095da pad: Allow tracking of buffers in GST_SCHEDULING debug output
As GST_SCHEDULING reports when buffers pass through pads due to
gst_pad_push calls, they are a good way of tracking the progress of
buffers through pipelines. As such, adding output of the buffer pointers
to these messages allows tracking of specific buffers, easing debugging.
2011-04-11 11:05:24 +02:00
Alessandro Decina
3f1ef2255a android: make it ready for androgenizer
Remove the android/ top dir
Fixe the Makefile.am to be androgenized

To build gstreamer for android we are now using androgenizer which generates the needed Android.mk files.
Androgenizer can be found here: http://git.collabora.co.uk/?p=user/derek/androgenizer.git
2011-04-11 01:08:07 +02:00
Tim-Philipp Müller
76559d4160 trace: don't put code with side effects into g_return_if_fail() 2011-04-09 23:54:20 +01:00
Tim-Philipp Müller
d353ddf38e docs: minor fixes for baseparse docs
Class vfunc references still aren't right, no idea what
the correct markup for those is.
2011-04-09 23:02:50 +01:00
Tim-Philipp Müller
3fc68cf9e8 element: unref event in default_send_event in case element has no pads
Spotted by  Haakon Sporsheim.
2011-04-09 18:04:55 +01:00
Tim-Philipp Müller
2401fe36fd baseparse: minor variable name clean-up 2011-04-08 19:07:02 +01:00
Tim-Philipp Müller
9d98c62f0e baseparse: rename _set_frame_props() to _set_frame_rate()
Seems like the best fit to what it does, and is shorter than
set_frame_properties() which might also have been confusing
because of GstBaseParseFrame.

https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:58 +01:00
Tim-Philipp Müller
5073948380 baseparse: replace format flags with gst_base_parse_set_{passthrough,syncable,has_timing_info}
This is more in line with e.g. GstBaseTransform's API, and makes for nicer
to read code. No getters for now since I don't see any use case for them,
the API is for subclasses, which usually know what format they're
dealing with already and hence know what they've set.

https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:58 +01:00
Tim-Philipp Müller
1874d63808 baseparse: make DRAIN and SYNC flags on baseparse, not the frame, and change to DRAINING and LOST_SYNC
The first because it seems a better fit conceptually, the second
to express booleanness. Also change the accessor macros for subclasses
to GST_BASE_PARSE_DRAINING and GST_BASE_PARSE_LOST_SYNC.

https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:58 +01:00
Tim-Philipp Müller
242e077e46 baseparse: add some padding to GstBaseParseFrame
Esp. since it's usually allocated on the stack.

https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller
99014adcae baseparse: fix typo in docs for GST_BASE_PARSE_FORMAT_FLAG_PASSTHROUGH
https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller
251dfa402c baseparse: use GQueue instead of GList for queued frames
and make buffer metadata writable before setting caps on queued
buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=646341
2011-04-08 15:44:57 +01:00
Zaheer Abbas Merali
783dbb9a71 baseparse: add GST_BASE_PARSE_FLOW_QUEUED to queue buffers until caps are known
This is useful for parser like flacparse or h264parse which may need to process
some buffers before they can construct the final caps, in which case they may
want to delay pushing the initial buffers until the full and proper caps are
known.

https://bugzilla.gnome.org/show_bug.cgi?id=646341
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller
22b7dfc800 baseparse: add to docs and fix up gtk-doc markup a little
And add Since markers.
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller
4709a26473 baseparse: replace set_seek() with _set_average_bitrate() and FLAG_SYNCABLE
This makes more sense conceptually, since the bitrate may be used
to estimate a seek position if there's no seek table or just for
duration reporting/estimation if we can't seek. Also, even if the
format is not syncable, we could still seek by pushing data from the
start and using the segment to make downstream clip.

https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller
de16d5adb3 baseparse: rename GstBaseFormat to GstBaseFormatFlags and fix up associated API
Also change gst_base_parse_set_format(parse,flags,switch_on) to
gst_base_parse_set_format_flags(parse,flags) which is more in line
with the rest of our API and how the function is used.
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller
f691be223e baseparse: don't expose GstAdapter in public header
None of the existing subclasses needs access to that, so there's
no reason to expose it for now.

https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller
e2bf3647f8 baseparse: move various segment-related members into the private instance struct
If none of the existing subclasses uses these, there's probably no
need to expose them at the moment. Keep the segment itself exposed
though.

https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller
b2a76895af baseparse: remove unused GST_BASE_PARSE_{SINK,SRC}_NAME
https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller
9f1b9f1419 baseparse: re-indent header 2011-04-08 15:44:57 +01:00
Tim-Philipp Müller
c88a143cb6 baseparse: fix up GType name and make _get_type() function thread-safe
Rename GType from GstBaseParseBad to GstBaseParse.
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller
20f29628aa libs: add GstBaseParse which was moved from -bad 2011-04-08 15:44:57 +01:00
David Schleef
d6847fd4a1 baseparse: make_metadata_writable() fix 2011-04-08 15:44:56 +01:00
Tim-Philipp Müller
940a47ae09 baseparse: rename GType from GstAudioBaseParseBad to GstBaseParseBad
We use it for video as well now.
2011-04-08 15:44:56 +01:00
Stefan Kost
0774878e92 baseparse: trim trailing whitespace 2011-04-08 15:44:56 +01:00
Stefan Kost
e8f04e76b7 baseparse: use delta-unit flags instead of none 2011-04-08 15:44:56 +01:00
David Schleef
35a7228ed5 baseparse: update documentation for API changes 2011-04-08 15:44:56 +01:00
David Schleef
e57cb6b47a baseparse: Create baseparse library 2011-04-08 15:44:56 +01:00
Mark Nauwelaerts
3882b7f2ed baseparse: tune QUERY_SEEKING response
Even if we currently do not have a duration yet, assume seekable if
it looks like we'll likely be able to determine it later on
(which coincides with needed information to perform seeking).

Fixes #641047.
2011-04-08 15:44:56 +01:00
Arun Raghavan
694d5c4b75 baseparse: Update min/max bitrate before first posting them
This avoids posting an initial min-bitrate of G_UINTMAX and max-bitrate
of 0.

https://bugzilla.gnome.org/show_bug.cgi?id=641857
2011-04-08 15:44:56 +01:00
Mark Nauwelaerts
ae23eb9955 baseparse: tune default duration estimate update interval
Rather than a fixed default frame count, estimate frame count to aim for
an interval duration depending on fps if available, otherwise use old
fixed default.
2011-04-08 15:44:56 +01:00
Mark Nauwelaerts
d6d56d2420 baseparse: reverse playback; mind keyframes for fragment boundary 2011-04-08 15:44:55 +01:00
Mark Nauwelaerts
6f933050b0 baseparse: ensure non-empty candidate frames 2011-04-08 15:44:55 +01:00
Mark Nauwelaerts
123b2b063c baseparse: clarify some debug statements 2011-04-08 15:44:55 +01:00
Mark Nauwelaerts
dccb20cd58 baseparse: properly track upstream timestamps
... rather than with a delay.
2011-04-08 15:44:55 +01:00
Mark Nauwelaerts
212eae966a baseparse: need proper frame duration to obtain sensible frame bitrate 2011-04-08 15:44:55 +01:00
Mark Nauwelaerts
ebf124251f baseparse: proper initial values for index tracking variables 2011-04-08 15:44:55 +01:00
Mark Nauwelaerts
ef641d0515 baseparse: arrange for consistent event handling 2011-04-08 15:44:55 +01:00
Mark Nauwelaerts
ec835b45b7 baseparse: header style cleaning 2011-04-08 15:44:54 +01:00
Mark Nauwelaerts
070db250b3 baseparse: provide some more initial frame metadata in parse_frame
... and document accordingly.
2011-04-08 15:44:54 +01:00