Commit graph

1096 commits

Author SHA1 Message Date
Robert Swain
dbfcc727ab queue2: add ST-Ericsson copyright 2010-08-13 16:38:50 +02:00
Sebastian Dröge
98da78ed2a plugins: Add declarations for _get_type() functions to fix compiler warnings 2010-08-06 19:34:42 +02:00
Shixin Zeng
cfefcc7183 plugins: Make *_get_type() in plugins/* thread safe
It's not really needed here but using G_DEFINE_TYPE() reduces
some copy&paste boilerplate code.
2010-08-06 19:30:51 +02:00
Stefan Kost
5486683cb7 typefind: add comment and more logging 2010-08-02 11:45:28 +03:00
Mark Nauwelaerts
2057cf6d79 queue2: download mode; prevent range corruption due to race
Current range was being updated in the thread performing seek, but as
no locks were kept for a short section, data flow could resume before
current range updated, so data for the new range would be accepted as
from the previous range.

Rather, range should be updated in serialized manner based on
newsegment event.
2010-07-29 17:29:00 +02:00
Wim Taymans
808298833a multiqueue: implement acceptcaps function
Our acceptcaps function can simply forward the query.
2010-06-29 09:57:41 +02:00
Wim Taymans
0a84d81901 queue2: fix merging of ranges
When we merge two ranges, don't updata the current range writing_pos with
whereever we were writing earlier in the merged range.  Spotted by bilboed.
2010-06-21 11:41:46 +02:00
Tim-Philipp Müller
e1573f194c typefind: make sure buffers' metadata is writable before setting caps on them
Fixes warnings when using playbin2 with dvb:// streams, where typefind
comes after mpegtsparse.
2010-06-18 12:00:53 +01:00
Wim Taymans
bd9cd47633 fdsink: make sync property work correctly
Don't override the default get_times vmethod so that we can use the sync
property.
Set the default sync property to FALSE. It used to be set to TRUE but because
the get_times was NULL, it always behaved like FALSE.

Fixes #621530
2010-06-16 13:05:07 +02:00
Wim Taymans
4a5552bf15 fakesink: use method to set sync property
Use the basesink method to configure the sync property instead of poking the
parent structure.
2010-06-14 16:51:39 +02:00
Wim Taymans
2ced5a5d65 filesink: use the default get_times function
Use the default get_times function of basesink so that we honour the sync
property instead of never synchronizing to the clock.

Fixes #621530
2010-06-14 16:50:41 +02:00
Wim Taymans
61db882bae capsfilter: fix printf format 2010-06-14 13:01:55 +02:00
Wim Taymans
d612442fde capsfilter: implement custom accept_caps method
Implement a custom acceptcaps function. We can simply check if there is an
intersection with the new caps. This makes the accept caps function much faster.

See #621190
2010-06-14 12:45:20 +02:00
Olivier Crête
24b41d01c8 capsfilter: Remove transform_size
GstBaseTransform now assumes that the size is the same if there is not
transform_size.

https://bugzilla.gnome.org/show_bug.cgi?id=621334
2010-06-14 10:52:23 +02:00
Sebastian Dröge
640ce767d2 queue2: Don't ignore failure to open the temporary file location
And immediately leave the state change function on failures.
2010-06-13 16:31:21 +02:00
Wim Taymans
15141b3954 queue2: don't wait for data when EOS
When in download mode and we need to provide data for an offset that we don't
have, also perform a seek to the requested location when we are EOS. The reason
why we shouldn't wait for more data is because after EOS, there simply will be
no more data and we end up waiting forever.

Fixes #620500
2010-06-07 10:19:30 +02:00
Wim Taymans
d970d74842 queue2: add some more debug info 2010-04-09 15:19:12 +02:00
Wim Taymans
65752f7e8d fdsrc: allow specifying the size in bytes on the uri
Parse a size=value from the query string to specify a size. This is interesting
when reading from a file descriptor that actually has a size (and is not
stat-able, such as the socket of an http connection)
2010-04-09 13:21:19 +02:00
Wim Taymans
db172aaa6f queue2: when EOS we know the duration
When we are EOS, we don't need to do an upstream query for the duration in bytes
because we already know it is the offset of the last written byte.
2010-04-09 13:21:18 +02:00
Wim Taymans
b9ce2133dc queue2: handle write errors
Handle write errors to the temporary download file and post errors when
something went wrong.
2010-03-25 18:43:04 +01:00
Wim Taymans
0b1beba01d queue2: add element query function
Add an element query function that is a little more efficient than the generic
default query handler.
2010-03-25 18:13:02 +01:00
Wim Taymans
49278848d7 queue2: remove fixed FIXME 2010-03-25 18:05:28 +01:00
Wim Taymans
bf1f6969bb queue2: add the buffering percent in BUFFERING query 2010-03-25 17:38:02 +01:00
Wim Taymans
1f34682644 queue2: improve buffer level measurement in download mode
Keep track of the current buffer level in the current range in download mode so
that we post the correct buffering messages.
2010-03-25 17:38:01 +01:00
Wim Taymans
f9c6a0886e queue2: add more info in the buffering query
Add the estimated download time and estimated time left to the buffering query
results along with the estimated download and playback speed.
2010-03-24 19:03:44 +01:00
Wim Taymans
11304c1257 queue2: implement flushing in download buffering
Maintain a separate variable to control src and sink flowreturn values so that
we can unlock the src part without shutting down the sink part.
Add flushing for upstream pull based elements that unblocks our getrange
function. This implements seeking when blocking for more data.
Add some arbitrary threshold before attempting a seek. Add a FIXME for this
because we need to find a sensible threshold based on the input rate.
2010-03-24 19:03:44 +01:00
Philippe Normand
f534e35261 queue2: Fix uninitialized variable compiler warning 2010-03-24 10:57:08 +01:00
Wim Taymans
3f4f5fa59d queue2: implement seeking in download mode
When in download mode and the requested offset is too far away, attempt to do a
seek request to fetch the data.
Keep track of all downloaded parts and merge ranges when needed.

Fixes #600877
2010-03-23 19:28:34 +01:00
Edward Hervey
504f9c7a6c typefind: deactivate pad if we can't get length or it's a length of zero.
Fixes issues when re-using typefind after a file of length zero.
2010-03-17 07:39:29 +01:00
Benjamin Otte
7e7f51f617 Fixes for -Wmissing-declarations -Wmissing-prototypes
Also adds those flags to the configure warning flags

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-11 10:59:57 +01:00
Benjamin Otte
a9d1a493a7 Fixes for -Wwrite-strings
This changes some APIs in compatible ways:
- Some functions now take "const char *" arguments, not "char *"
- Some structs now have "conts char *" members, not "char *"
The changes may cause warnings when compiling with the right warning
flags. You've been warned.

Also adds -Wwrite-strings as a warning flag in configure.ac.

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 20:50:10 +01:00
Sebastian Dröge
1eea2495ff corelements: Combine redundant code 2010-02-19 14:31:54 +01:00
Andoni Morales Alastruey
09bbc1493d Fix compilation of fdsink and fdsrc with MSVC 2010-02-19 14:31:54 +01:00
Edward Hervey
1f0b6f35d5 filesrc: Don't use expensive cast checks in _create
_create() is a pad function set by ourselves, therefore we're sure basesrc
is a GstFileSrc.

Speeds up _create() by 17% and the total call by 8% (instruction calls measurements
done with valgrind).

Fixes #610246
2010-02-17 12:37:11 +01:00
Stefan Kost
3c2abf5581 fdsrc: cleanup parameter initialisation and add comemnt+logging
Initialize new_fd with DEFAULT_FD and fd with -1. Setting the property will set
new_fd and in _update_fd() we cehck fd against -1. Also add a coment about the
warning we get in the log from gst_poll_remove_fd(). We could get rid of the
warning if we want by tracking if fd has been added to fdset.
2010-02-17 11:31:07 +02:00
Stefan Kost
7937808ac7 docs: prefer short desc from GstElementDetails 2010-02-15 23:12:56 +02:00
Edward Hervey
ed6f62f763 typefind: Reset the working mode when going to READY/NULL
This allows properly re-using typefind (else it would think it's
already done the typefinding when being re-used with another
stream).
2010-02-13 15:18:05 +01:00
Thiago Santos
51d382e2ee typefind: Avoid messing pads activation
Typefind might mess up pads modes (pull/push) if a
downstream element is plugged and its pads activated
in 'step 2' of typefind pads activation.

This happens because the following steps don't check
if we already emitted typefound due to upstream setting
caps on buffers being pulled in the typefind helpers.

Avoid that by checking if typefound is already emmited.

Fixes #608036
2010-02-12 17:23:29 -03:00
Sebastian Dröge
88736cd675 typefindelement: Protect internal fields from concurrent changes from different threads
Fixes bug #608877.
2010-02-12 11:02:08 +01:00
Edward Hervey
4e0b2dc832 multiqueue: Don't stop threads on UNEXPECTED and forward flow returns.
When a downstream element returns GST_FLOW_UNEXPECTED we want to:
* let the dataqueue task running
* forward the flow return upstream.

This allows upstream elements to push EOS, and have that EOS event come
downstream.

Fixes #609274
2010-02-09 16:15:18 +01:00
Edward Hervey
9cc47f8cba Revert "multiqueue: handle UNEXPECTED flowreturn better"
This reverts commit fbdf4dceda.

Partly fixes #609274
2010-02-09 15:58:36 +01:00
Tim-Philipp Müller
467f0a2c0f filesrc: fix typo in warning message
Spotted by bsreerenj@gmail.com.

Fixes #608442.
2010-01-30 18:57:44 +00:00
Wim Taymans
fbdf4dceda multiqueue: handle UNEXPECTED flowreturn better
When we receive an UNEXPECTED flowreturn from downstream, we must not shutdown
the pushing thread because upstream will at some point push an EOS that we still
need to push further downstream.

To achieve this, convert the UNEXPECTED return value to OK. Add a fixme so that
we implement the right logic to propagate the flowreturn upstream at some point.

Also clean up the unit test a little.

Fixes #608136
2010-01-26 17:07:31 +01:00
Wim Taymans
62e0d976f3 queue2: add some docs to mark new property 2010-01-22 18:00:53 +01:00
Wim Taymans
183ffdc126 queue2: add option to remove the temp-file
Add an option to automatically remove the temp file (TRUE by default). This
should make it possible for the application to keep the temp file by other means
than hardlinking or holding an fd open.

Fixes #607739
2010-01-22 17:58:07 +01:00
Tim-Philipp Müller
2b0b3923e8 typefind: don't leak uri string 2010-01-22 02:05:58 +00:00
Tim-Philipp Müller
087aa6ced4 gst_private.h: make sure gst_private.h is included before glib.h
For the reason outlined at the beginning of gst_private.h (inline
functions in glib may need the g_log_domain variable). Also include
gst_private.h before using any G_OS_* defines, esp. in plugin loader.
2010-01-20 01:48:56 +00:00
Tim-Philipp Müller
745b35e7d4 docs: minor gtk-doc markup fixes 2010-01-20 01:48:56 +00:00
Wim Taymans
fc2f4ae37a typefindelement: use new typefind function
Refactor a little.
Use the new typefind helper function that uses the extension to speed up
typefinding.
2010-01-12 17:38:32 +01:00
Håvard Graff
a3c4a3201a tee: make release_pad threadsafe
Protect the ->removed field with the object lock as well. Take the DYN lock
earlier so that we can mark the pad removed and avoid a race in pad_alloc.

Fixes #606435
2010-01-11 11:55:52 +01:00