Commit graph

1825 commits

Author SHA1 Message Date
Wim Taymans
9bf8277d13 playbin2: add more support for subpictures 2009-03-24 18:29:28 +01:00
Wim Taymans
e7b382c6a9 playbin2: first support for subpictures
Add beginnings of subpicture support.
2009-03-24 17:12:53 +01:00
Wim Taymans
786b0c248c playbin2: blacklist subpictures for now
Blacklist the subpictures until we add support for them.
Add some small debug info.
See #576408.
2009-03-24 12:23:24 +01:00
Wim Taymans
852ace9cce uridecodebin: expose more media types
Expose more media types from a raw source, such as the subpicture and various
text pads.
Small cleanups  and add some more debugging.
See #576408.
2009-03-24 12:19:30 +01:00
Wim Taymans
7cf4e3eb15 playbin2: rescan audio sinks for volume/mute
Rescan the audio sinks for the mute and volume properties.
fixes #576180.
2009-03-24 10:42:04 +01:00
Wim Taymans
14be3f41e2 playbin2: fix reuse of the video chains
When reusing playbin with visualisations, reset the async property on the video
sink because some sinks might dynamically recreate their sinks.
Fixes #576188
2009-03-23 19:40:18 +01:00
Wim Taymans
7628319688 playbin2: allow dynamic swtiching of subtitles
When we have the textpad configured, enable and disable the subtitles by setting
the silent flag on the overlay element instead of trying to remove elements.
See #576187
2009-03-23 17:38:46 +01:00
Wim Taymans
d8003bea06 playbin2: fix dynamic switching of visualisations
Fix the switching of visualisations by requesting and releasing the tee request
pads on demand.
See #576187.
2009-03-23 16:06:43 +01:00
Stefan Kost
3d20bad4ba docs: add examples for tcp elements, also use correct section name. Fixes #564139
Updated the examples in the README to actually work. Add them to api docs. Tests
the api-docs and fix the section names to make the docs actualy show up.
The example for "tcpserversrc" needs review (might be an element bug).
2009-03-23 17:03:38 +02:00
Stefan Kost
46c18b2aa3 indent: fix damange that gst-indent did some time ago 2009-03-23 17:03:37 +02:00
Wim Taymans
7cc84f9205 playbin2: fix linking order
Link after doing the state change and unlink before shutting down. Makes the
window for causing races in toggling the visualisations smaller.
See #576187.
2009-03-23 15:27:27 +01:00
Wim Taymans
779d6f886d uridecodebin: reset counter
reset the number of pending dynamic operations back to 0 when we reuse
uridecodebin.
Fixes #576190
2009-03-23 12:28:18 +01:00
Wim Taymans
554b3aafe4 decodebin2: a pad starts out being not drained.
Mark a new pad as not drained until we get EOS on it.
2009-03-20 15:47:47 +01:00
LRN
23e603f054 win32: fix seeking in large files
Fix Seeking in large files by using the 64-bit seek functions.
Fixes #576019
2009-03-20 14:17:19 +01:00
Wim Taymans
600a810236 decodebin2: recover from failing to add a pad
When we cannot add a pad to the decodebin2 for some reason, print a warning but
continue adding the remaining pads.
2009-03-19 20:31:01 +01:00
Wim Taymans
20468a22c9 decodebin2: more cleanups and docs.
Add some more comments and use g_list_prepend().
2009-03-19 19:35:15 +01:00
Wim Taymans
17e7948325 decodebin2: refactoring and race fixes
Refactor some code so that we can take the right locks and in the right order.
Fixes quite a bit of races already.
2009-03-19 19:19:38 +01:00
Wim Taymans
2f39597919 playbin2: remove the group cond + cleanups
Remove the group GCond that we used for waiting for groups to finish because we
use pad blocking on the selectors and counters instead for waiting for the
groups to complete.

remove the obsolete about_to_finish variable set while emiting the
about-to-finish signal and fix some old comments.

We don't need to take the playbin lock when querying the uridecodebin.
2009-03-19 19:03:25 +01:00
Wim Taymans
563db0fdca decodebin2: add extra dynamic ref for demuxers
When we make a group connected to a demuxer, keep an extra dynamic refcount for
the group which is only decremented when no_more_pads or a multiqueue overrun is
detected. This way we avoid a race between exposing the group while more dynamic
refs are added from new pads.

Fixes #575588.
2009-03-17 19:09:02 +01:00
Wim Taymans
da6a544bdf playbin2: sync state of the sink correctly
Sync the state of the newly added chains to the state of the parent sink element
to avoid lost async-start messages. Fixes cdda:// async-done message storm.
2009-03-17 15:39:23 +01:00
Wim Taymans
a8579ffea0 playbin2: return NOT_LINKED for unselected streams
When streams are not selected in the selector, return NOT_LINKED so that
upstream elements can skip decoding. Only do this for audio and video pads
because for text streams the overhead is smaller and they could come from
external files.
2009-03-17 11:54:40 +01:00
Wim Taymans
5021c930ba playbin: set custom text sink properties
Set the custom sink async=FALSE to not make it participate in preroll because we
are dealing with sparse streams.
Try to set sync=TRUE on the custom text sink.
2009-03-17 11:51:58 +01:00
Wim Taymans
48f7f6b7c2 playbin2: don't try to set invalid stream numbers
Fix a problem with setting the stream numbers because we check for the wrong
range.
See #575239.
2009-03-16 16:42:18 +01:00
Wim Taymans
ba6d3b5aca playbin2: release the shutdown lock
Release the shutdown lock when we wait for other groups to complete or else we
have a deadlock when the other group completes and tries to grab the shutdown
lock.
Fixes #575550.
2009-03-16 16:16:30 +01:00
Tim-Philipp Müller
04a860c6f7 typefinding: make flac typefinder return lower probability for frame headers
The flac frame header typefinder overstates the likelihood of a match, leading
to false positives with e.g. aac streams and PDF files. Reduce probabilty
returned from LIKELY to POSSIBLE for the frame header matchin code.
Fixes #574939.
2009-03-15 19:57:36 +00:00
Tim-Philipp Müller
a622ff74b0 typefinding: improve image/bmp typefinder
Detect more variations and also bail out in more cases where the values
don't make sense. Furthermore, add width/height and bpp to the caps,
because we can.
2009-03-15 19:52:46 +00:00
Wim Taymans
777f8ab1bf playbin2: fix raw elements like cdda://
Fix a fixme with a one liner and make cd playback work again.
2009-03-12 18:27:25 +01:00
Wim Taymans
7849db42b8 playbin2: improve subtitle handling
Add property to playbin2 to configure a custom sink that receives the raw
subtitle buffers instead of using a textoverlay.
Improve the property finding code to make it more usable.
Use property find code to find async properties in custom sinks that are bins.
Improve text overlay code to gracefully handle missing elements.
2009-03-12 17:51:39 +01:00
Tim-Philipp Müller
4cbe4d2c72 typefinding: flac typefinder fixes
Use scan context for initial peek as well. Peek 6 bytes in the initial
peek rather than 5 bytes, to match the length of the memcmp we're doing
on that data later. Return immediately when we found caps from looking
at the beginning of the data - no point in continuing to scan the next
64kB for something matching a frame header.
2009-03-11 13:33:33 +00:00
Stefan Kost
e633c46e95 adder: log details in getcaps like in setcaps 2009-03-10 21:14:43 +02:00
Jonathan Matthew
db7ecda64f typefind: add photoshop typefind functions
Add photoshop typefind functions.
Fixes #574516.
2009-03-09 16:19:40 +01:00
Wim Taymans
72533ecccc decodebin2: only remove pads that were added
Flag pads that were added so that we can see if we need to remove them later or
not.
2009-03-09 15:46:21 +01:00
Mark Nauwelaerts
b7ea2a9105 Unblock blocked ghostpads when shutting down. Fixes #574293. 2009-03-09 13:32:21 +01:00
Edward Hervey
9acf7de5a4 typefind: Use the proper data pointer instead of poking random memory. 2009-03-09 09:08:00 +01:00
Michael Smith
e9e9d82fbe decodebin2: don't stay connected to notify::caps after negotiation
Disconnect the notify::caps signal in our callback (it'll be re-added
if we're not, in fact, finished getting complete caps). Ensures that
caps changes mid-stream (e.g. from an mp3 that changes from
stereo->mono mid-file) don't cause us to try to add a new pad.
2009-03-05 15:44:17 -08:00
Stefan Kost
79771eaba7 adder: add variants for unsigned to fix warnings for unneeded check
For unsigned int out+in can't be < 0.
2009-03-05 12:27:16 +02:00
Stefan Kost
2723c7e4f3 subparse: use the right variable in debug log, encoding is not yet initialized 2009-03-05 10:58:12 +02:00
Stefan Kost
388fa77c11 audioresample: add missing break in event handling, remove dead code 2009-03-05 10:39:33 +02:00
LRN
db596d27a2 subparse: Convert regex code to GRegex code
Fixes: #572993.  Patch author prefers to use an alias, contact
ds if you actually need a real name.

Signed-off-by: David Schleef <ds@schleef.org>
2009-03-02 11:47:39 -08:00
Stefan Kost
46833b9bc7 subparse: don't leak line, if flushing 2009-02-26 18:01:05 +02:00
Stefan Kost
60847e48d7 ffmpegcolorspace: remove unused code/variables 2009-02-26 18:01:04 +02:00
Stefan Kost
5e6447c0ac docs: fix random text after since: tag. Also fix class name to make the docs actual appear. 2009-02-26 10:10:00 +02:00
Stefan Kost
a6ea8280a2 docs: playbin2 has no stream-info 2009-02-26 10:09:59 +02:00
Peter Kjellerstedt
a038a8d46d rtsp, multifdsink: Unify the use of union gst_sockaddr. 2009-02-25 15:45:50 +01:00
Wim Taymans
f5a3387bdb playbin: use flushing pads instead of fakesink
Use the flushing pads on playsink to terminate on shutdown instead of plugging
fakesinks. this should be a little cheaper.
2009-02-25 12:48:53 +01:00
Wim Taymans
747841e97c playsink: Add FLUSHING pad type
Make it possible to request a flushing pad from the playsink. We can eventually
use these flushing pads to quickly terminate the dataflow when we are shutting
down.
2009-02-25 12:48:53 +01:00
Wim Taymans
dbfc80cd6c Release the group lock when setting states
Release the group lock while we perform the state changes on the uridecodebins
because that might trigger callbacks that we need to handle with the group lock
taken. Avoids a possible deadly embrace in some id3/flac files.
Fixes #567396.
2009-02-25 10:08:29 +01:00
Wim Taymans
0b2238b70b Combine finding and creating groups
Combine the search for the current group and optionally creating one into one
function so that we can avoid taking the lock multiple times.
2009-02-25 10:05:38 +01:00
Edward Hervey
2968cc8710 Playbin2: Don't leave unused parameters in debug statements.
Fixes build on macosx
2009-02-25 08:22:00 +01:00
Wim Taymans
b725e1d2c6 Add some G_UNLIKELY because we can
Add a G_UNLIKELY when checking the shutdown variable.
2009-02-24 18:44:54 +01:00
Jan Schmidt
fff6909c1b multifdsink: Fix strict aliasing error using a union 2009-02-24 17:03:08 +00:00
Sebastian Dröge
77a56d5975 ffmpegcolorspace: Add conversion from/to YVYU colorspace
Fixes bug #572872.
2009-02-24 14:06:38 +01:00
Jonas Danielsson
0842dd1c6f ffmpegcolorspace: Add direct UYVY->GRAY8 conversion
The conversion from UYVY to RGB24 and then to GRAY8
is quite slow. Fixes bug #569655.
2009-02-24 13:42:01 +01:00
Mark Nauwelaerts
d24e75f9fa playbin2: fix deadlock when shutting down. Fixes #572577. 2009-02-24 13:30:07 +01:00
Mark Nauwelaerts
bbd66c6baf playbin2/playsink: Set audiotee to PAUSED state in all cases. Fixes #565105. 2009-02-24 10:46:35 +01:00
Sebastian Dröge
6c28744f76 audioresample: Add locking to protect the resampling context
When setting the quality/filter-length while PLAYING the
resampling context will be destroyed and created again in
some cases, which will cause crashes in the transform function
if it's called at that time.
2009-02-15 07:30:17 +01:00
Sebastian Dröge
c080bfae6d ffmpegcolorspace/videotestsrc: Use v308 instead of V308 2009-02-13 10:10:25 +01:00
Sebastian Dröge
65c322edf2 ffmpegcolorspace: Add support for packed 4:4:4 YUV (format=V308)
Only conversions from/to are implemented, which
gives (indirect) support for all possible conversions.

Partially fixes bug #571147.
2009-02-12 19:09:40 +01:00
Sebastian Dröge
79d0fff231 videotestsrc: Add support for packed 4:4:4 YUV (format=V308)
Partially fixes bug #571147.
2009-02-12 19:09:40 +01:00
Michael Smith
4713bb3abc Revert "Remove pad-removed handlers after setting the decodebins to NULL."
This reverts commit b36d8f3e11.

This brought back some deadlocks. A small leak is better, for now. Need to
figure out a way to fix the leak properly.
2009-02-10 20:38:58 -08:00
Michael Smith
41314315c7 playbin2: Fix segfault on notify after group change.
If our group has been switched, then we get a selector active-pad
notification, we don't need to notify.
2009-02-10 17:20:12 -08:00
Michael Smith
a264efc627 playbin2: Look for volume/mute properties recursively in audio element.
Rather than only checking for volume property on the audio sink
directly, recursively look for it on sinks within it (if it's a bin).
Allows use of sink-as-volume-control where the application has supplied
an audio-sink bin that includes a real audio sink internally.
2009-02-10 17:20:12 -08:00
Sebastian Dröge
5fc20b9ec5 videotestsrc: Add support for Y444 (planar 4:4:4 YUV)
Partially fixes bug #571147.
2009-02-10 17:45:59 +01:00
Stefan Kost
f010a38b0d playbin2: implement GST_PLAY_FLAG_NATIVE_{AUDIO,VIDEO}
The flags where present but actually not been taken into account.
2009-02-04 13:56:14 +02:00
Stefan Kost
c6ab453eed audioresample: Add a proper deprecation comment and also drop G_PARAM_CONSTRUCT.
The comment will ensure that is is marked properly in the docs and the
GParamSpecflag was causing a duplicated initialisation of the same value.
2009-02-04 13:56:13 +02:00
Stefan Kost
b08c0a9003 audioresample: Only pull in liboil if its actualy used.
Liboil still has quite significant startup overhead especialy on embedded
platforms. In audioresample it was only used for the profiling timer.
2009-02-04 10:31:21 +02:00
Stefan Kost
080493ccff typefind: Make the flac check more tight to not mistace some aac files for flac. Fixes #570356.
Add comments about the flac format. Tighten the check to not allow values that
refer to headers.
2009-02-03 15:28:50 +02:00
Stefan Kost
0ea2afee42 Allow to configure the resampler function for integer to skip the benchmarking. Fix releasing the intger resampler in benchmark. 2009-02-02 15:45:44 +02:00
Wim Taymans
9996aab207 Fix documentation for autoplug-select
fix the documentation strings for the autoplug-select signal.
Fixes #570142.
2009-02-02 12:54:31 +01:00
Michael Smith
b36d8f3e11 Remove pad-removed handlers after setting the decodebins to NULL.
They do needed cleanup; without this we leak selector requestpads.
2009-01-30 18:30:10 -08:00
Michael Smith
61e81ada2c Unref selector request pad even if we no longer have a selector.
During destruction, we won't have a selector any more, but we still need
to unref the pad to avoid leaking it.
2009-01-30 18:30:10 -08:00
Michael Smith
c799f3f77f Unref source in playbin2's finalize method 2009-01-30 18:30:10 -08:00
Michael Smith
b6cbe7e331 Fix more leaks of pads and elements in gstplaysink.
Don't keep extra references to volume and mute elements; we don't need
to do so.
Ensure we unref pads that we have references to, and release request
pads.
2009-01-30 18:30:10 -08:00
Michael Smith
c34f444174 Avoid leaking all playsinks. Fix some internal leaks.
Playsink was holding references to itself. Don't do that, it's not cool.
Also, free all chains in dispose.
2009-01-30 18:30:10 -08:00
Michael Smith
906502b9bb Unref peer request pad after releasing it, since we hold a reference. 2009-01-30 18:30:10 -08:00
Michael Smith
af8d3c51f0 Fix caps leak in playbin2. 2009-01-30 18:30:10 -08:00
Michael Smith
ef1fa84575 Unref active pad from selector when finding active stream. 2009-01-30 18:30:10 -08:00
Michael Smith
f7abf8ed94 Free uris when finalizing playbin2 instance. 2009-01-30 18:30:10 -08:00
Michael Smith
a2b0229058 Unref pads when iterating over them in analyse_source.
Fixes leak of source's srcpad when using uridecodebin.
2009-01-30 18:30:09 -08:00
Jan Schmidt
5337bc03be Fix compilation warning on Forte 2009-01-30 17:58:15 +00:00
Jan Schmidt
6b1e08f277 Don't do void pointer arithmetic. 2009-01-30 17:16:39 +00:00
Michael Smith
81cc88326f Ensure we have sufficient data when using data scan contexts.
Fixes crashes typefinding things that look like they might contain AAC
data (but probably aren't actually AAC).
2009-01-26 18:02:00 -08:00
Sebastian Dröge
5dfcb63252 Rename files and types from speexresample to audioresample
Rename files and types from speexresample to audioresample
to finish the move and to prevent any confusion.
2009-01-23 12:33:41 +01:00
Wim Taymans
cc8b9ae5e8 Add typefind function for gsm
Because core now supports typefindfactories without a typefind function we can
register a factory fo GSM that will --if all else fails-- assume the file is a
GSM file based on the registered extension.
Fixes #566661.
2009-01-23 11:40:26 +01:00
Wim Taymans
8dd3c2d543 Use more performant link function
We can use gst_element_link_pads() instead of the more generic
gst_element_link() function because we know the pads. This saves some cycles
because the more generic function needs to search for possible compatible caps
etc.
2009-01-23 11:37:45 +01:00
Benjamin Gaignard
336e1346e4 Add typefinder for Mobile XMF. Fixes bug #568707. 2009-01-23 10:19:27 +01:00
Jan Schmidt
c42c6d6da0 Fix use-after-unref problem noticed by Josep Torra Valles, and run
gst-indent
2009-01-22 22:09:47 +00:00
Wim Taymans
397c00ac33 gst/playback/gstplaybin2.c: Provide the right arguments to a debug line.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (groups_set_locked_state):
Provide the right arguments to a debug line.
2009-01-13 14:47:19 +00:00
Wim Taymans
1e5f963882 gst/playback/gstplaybin2.c: Fix some comments and docs.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_set_uri), (gst_play_bin_set_suburi),
(no_more_pads_cb), (drained_cb), (group_set_locked_state_unlocked),
(activate_group), (deactivate_group), (groups_set_locked_state),
(gst_play_bin_change_state):
Fix some comments and docs.
Post an error message when we fail to link the selector to the sink.
Remove pushing of EOS, this seems unneeded.
Lock the state of deactivated groups so that they don't accidentally
reactivate when the playbin2 state changes.
Reuse uridecodebins.
Unlock and relock state of groups when playbin goes to NULL.
Fixes #566654.
Fixes #566341.
* gst/playback/gsturidecodebin.c: (pad_removed_cb), (type_found):
Only do something in the pad removed callback when we are dealing with
our sourcepads because the sinkpads don't have a ghostpad.
2009-01-07 13:52:14 +00:00
Wim Taymans
8632fc5545 gst/playback/gstplaybin2.c: Disconnect signal handlers before destroying a previous decodebin so that we don't end up...
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (notify_source_cb), (activate_group):
Disconnect signal handlers before destroying a previous decodebin so
that we don't end up causing deadlocks. Fixes #566586.
2009-01-05 12:18:52 +00:00
Wim Taymans
c3ec18af97 gst/audiotestsrc/gstaudiotestsrc.*: Add property to control pull/push based scheduling.
Original commit message from CVS:
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audio_test_src_class_init), (gst_audio_test_src_init),
(gst_audio_test_src_check_get_range),
(gst_audio_test_src_set_property),
(gst_audio_test_src_get_property):
* gst/audiotestsrc/gstaudiotestsrc.h:
Add property to control pull/push based scheduling.
2009-01-05 10:59:35 +00:00
Wim Taymans
dba6f1f28c gst/playback/gstplaybin2.c: Add some debug info.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (no_more_pads_cb):
Add some debug info.
* gst/playback/gstplaysink.c: (gen_video_chain), (gen_audio_chain),
(gst_play_sink_reconfigure), (gst_play_sink_request_pad),
(gst_play_sink_release_pad):
Add some more debug info.
Reconfigure the audio chain when we switch between raw and encoded audio
in gapless playback.
2008-12-20 12:48:43 +00:00
Stefan Kost
5a30245c38 gst/adder/: Cleanup variable names to make the adder-loop easier to understand.
Original commit message from CVS:
* gst/adder/Makefile.am:
* gst/adder/gstadder.c:
Cleanup variable names to make the adder-loop easier to understand.
Also try to use liboil to spee it up, but ifdef it out as it does not
make any change for me (Intel pentim M (sse,sse2) please try on other
systems).
2008-12-17 08:51:34 +00:00
Wim Taymans
0a6d8f01ef Add minimal docs to make the remaining tcp elements show up.
Original commit message from CVS:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-base-plugins-docs.sgml:
* docs/plugins/gst-plugins-base-plugins-sections.txt:
* gst/tcp/gsttcpclientsink.c:
* gst/tcp/gsttcpclientsrc.c:
* gst/tcp/gsttcpserversrc.c:
Add minimal docs to make the remaining tcp elements show up.
Fixes #564139.
2008-12-16 20:16:17 +00:00
Stefan Kost
552b5f5fcd gst/playback/: XRef to GstXOverlay.
Original commit message from CVS:
* gst/playback/gstplaybin.c:
* gst/playback/gstplaybin2.c:
XRef to GstXOverlay.
2008-12-12 13:06:48 +00:00
Edward Hervey
89413e390c gst/playback/gsturidecodebin.c: Free the factory array when finalizing.
Original commit message from CVS:
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_finalize):
Free the factory array when finalizing.
* sys/v4l/gstv4lsrc.c: (gst_v4lsrc_base_init):
Use a GstStaticPadTemplate since the src pad caps are fixed.
2008-12-12 10:54:45 +00:00
Edward Hervey
7a83664099 gst/subparse/samiparse.c: Some versions of libxml seem to be very picky as to strict formatting of the input and neve...
Original commit message from CVS:
* gst/subparse/samiparse.c: (sami_context_push_state),
(sami_context_pop_state), (start_sami_element), (end_sami_element):
Some versions of libxml seem to be very picky as to strict formatting
of the input and never 'close' the final </body> tag.
In order to fix that bad behaviour, we trigger the flushing of
remaining data on both </body> and </sami>.
Fixes #557365
2008-12-11 15:49:12 +00:00
Guillaume Emont
d477a37e7e gst/typefind/gsttypefindfunctions.c: Add typefinders for MS Word files and OS X .DS_Store files to prevent them to be...
Original commit message from CVS:
Patch by: Guillaume Emont <guillaume at fluendo dot com>
* gst/typefind/gsttypefindfunctions.c: (plugin_init):
Add typefinders for MS Word files and OS X .DS_Store files to
prevent them to be recognized as MPEG files. Fixes bug #564098.
2008-12-11 12:32:03 +00:00
Wim Taymans
08736ec1ae gst/playback/gstplaysink.c: Add some more debug info.
Original commit message from CVS:
* gst/playback/gstplaysink.c: (gen_audio_chain),
(gst_play_sink_reconfigure):
Add some more debug info.
Fix linking of just an encoded sink.
Handle failure to create a sink chain more gracefully than crashing.
2008-12-11 11:04:14 +00:00
Wim Taymans
172e478fd1 gst/playback/gstplaybin2.c: Error out with a missing-plugin error when the input-selector was not found.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (pad_added_cb):
Error out with a missing-plugin error when the input-selector was not
found.
* gst/playback/gstplaysink.c: (gst_play_sink_reconfigure):
Indentation.
2008-12-10 18:43:32 +00:00