Commit graph

1326 commits

Author SHA1 Message Date
Olivier Crête
37e02eb7c7 valve: Remove superflous checking casts 2010-12-31 00:51:11 +00:00
Olivier Crête
80a766b39b valve: Fix style, improve comments
Minor improvements to the comments and break a few overly long lines
2010-12-31 00:51:11 +00:00
Stefan Kost
f90bddfa39 valve: move default: parst in the switch statement to the end
Now sure if it matters, but the previous form looks weired.
2010-12-31 00:51:11 +00:00
Stefan Kost
65f13f70f6 valve: move debug-category registration to type init 2010-12-31 00:51:11 +00:00
Stefan Kost
4b1c3896d6 valve: use G_PARAM_STATIC_STRINGS on properties 2010-12-31 00:51:11 +00:00
Stefan Kost
2b70b14591 valve: GST_BOILERPLATE already sets parent_class 2010-12-31 00:51:11 +00:00
Benjamin Otte
a2de9458c1 valve: gst_element_class_set_details => gst_element_class_set_details_simple 2010-12-31 00:51:10 +00:00
Olivier Crête
91190eea08 docs: document valve element 2010-12-31 00:51:10 +00:00
Olivier Crête
59d98afb9b fsvalve: rename to valve 2010-12-31 00:51:10 +00:00
Olivier Crête
aad953be13 fsvalve: re-indent gst style 2010-12-31 00:51:10 +00:00
Olivier Crête
fc4deda3aa fsvalve: Ignore errors if dropping is set to true 2010-12-31 00:51:10 +00:00
Olivier Crête
a3d21f7147 fsvalve: Add getcaps proxying to the valve 2010-12-31 00:51:10 +00:00
Olivier Crête
01fdde0876 fsvalve: Rebase valve onto gstelement instead of basetransform 2010-12-31 00:51:10 +00:00
Olivier Crête
6119abb63c fsvalve: Revert "Fix refcounting issues in prepare_output_buffer"
This reverts commit 65dd460f0a3a9c4882e638c86208f74ef62c3460.
2010-12-31 00:51:10 +00:00
sjoerd@luon.net
ff36774a30 fsvalve: Fix refcounting issues in prepare_output_buffer
20080805113057-be0f2-9dc270781f0a0f21c616ed11dbd1f198fd1b326e.gz
2010-12-31 00:51:10 +00:00
Olivier Crete
2b612137d7 fsvalve: Remove unused dispose method in valve
20080409163221-3e2dc-92ccb2db874e46e0d92c15520577c1be0e2bc617.gz
2010-12-31 00:51:10 +00:00
Olivier Crete
e384295df0 fsvalve: Dont hold the object lock while calling base alloc function
20071219203230-3e2dc-6519175d8d81496515b2d9060ac316650560f691.gz
2010-12-31 00:51:09 +00:00
Olivier Crete
8362bb9275 fsvalve: Set the DISCONT flag after dropping buffers
20071219203218-3e2dc-bc5f03d88ff5837040b9214de016cc142776dfc2.gz
2010-12-31 00:51:09 +00:00
Olivier Crete
6db2a426c1 fsvalve: Use do the alloc_buffer function in the valve
20071219005739-3e2dc-2a0fdfa2f38f03ab4791fe5c4ab85e8790113683.gz
2010-12-31 00:51:09 +00:00
Olivier Crete
67c6adaf31 fsvalve: Only set passthrough to TRUE on newer versions of gst
20071121200858-3e2dc-b16cdeabbc3c0562c6fc7b11b9b9792c910f569e.gz
2010-12-31 00:51:09 +00:00
Olivier Crete
51af047576 fsvalve: Compare minor, not major
20071121181729-3e2dc-a5997c3b7f5c86966370969714facf8ee242659d.gz
2010-12-31 00:51:09 +00:00
Olivier Crete
1a47ba87dc fsvalve: Make the valve element work with gst < 0.10.13
20071026223749-3e2dc-18f685a4e45fbdce677ac777586876fc719d7222.gz
2010-12-31 00:51:09 +00:00
Olivier Crete
32b5931ae2 fsvalve: Rename valve to fsvalve
20071024224246-3e2dc-c54216af2ef0ef3f1a2206d723e87be2a23ab8ed.gz
2010-12-31 00:51:08 +00:00
Olivier Crete
5ddbaf15d5 fsvalve: Add valve element
20071024224147-3e2dc-f28ab0c073e283894b65c22c4f44397c897dec01.gz
2010-12-31 00:51:08 +00:00
Tim-Philipp Müller
239a63a777 fakesink: make variable static 2010-12-30 18:31:11 +00:00
Tim-Philipp Müller
8a7fc1d8c9 Revert "micro-optim: if (x) is cheaper than if (x > 0) for unsigned integers"
This reverts commit 6aa8ca37ee.

See http://article.gmane.org/gmane.comp.video.gstreamer.devel/32282
2010-12-26 21:21:43 +00:00
David Schleef
3889c3c579 elements: reenable fdsrc/fdsink on MSVC 2010-12-24 14:02:08 -08:00
Mark Nauwelaerts
e0f15e666a multiqueue: return upon input when already eos
... rather than hanging incoming thread (as considered full in eos).
2010-12-03 13:35:49 +01:00
Edward Hervey
6aa8ca37ee micro-optim: if (x) is cheaper than if (x > 0) for unsigned integers 2010-12-03 12:03:42 +01:00
Andoni Morales Alastruey
d2d42082c3 fakesink: Print sink-message events like a message and the GstMessage structure 2010-12-03 09:50:31 +02:00
Edward Hervey
8f12a5e7cd queue2: Only call update_buffering if needed.
update_buffering is so big it will never be inlined (and shouldn't),
we therefore move the check outside of it.
2010-12-02 19:04:57 +01:00
Edward Hervey
66bba2a49e queue2: Avoid re-checking many times whether an item is a buffer
Avoids calling 6 times gst_buffer_get_type() for every item coming
through queue2
2010-12-02 19:04:56 +01:00
Edward Hervey
080c965f4f queue2: Reduce amount of time locks are taken 2010-12-02 19:04:56 +01:00
Edward Hervey
ccb9ed2e80 queue2: Fixup documentation of some properties 2010-12-02 19:04:56 +01:00
Edward Hervey
8a79c1aa98 queue2: Avoid useless segment_to_running_time() calculations.
* Cache src and sink time
* Use a boolean to known whether src/sink time needs to be recalculated

Avoids 50% of calls to gst_segment_to_running_time()
2010-12-02 19:04:56 +01:00
Edward Hervey
0c2086a475 queue: Remove useless checks from e406f7
srcresult was being rechecked in places it couldn't have changed.
queue level was being rechecked in places it couldn't have changed.

https://bugzilla.gnome.org/show_bug.cgi?id=632780
2010-12-02 19:04:56 +01:00
Sebastian Dröge
6720373610 queue2: Remove dead assignment and unused variable 2010-12-02 19:02:08 +01:00
Sebastian Dröge
3b9d85d1a7 queue2: Remove dead assignment and move variable declaration into inner block 2010-12-02 19:02:08 +01:00
Sebastian Dröge
e554c7a1f6 queue2: Remove redundant variable
Other than saving an immense amount of 4 bytes of memory this
prevents clang from complaining and keeps the ring buffer state
in a single variable instead of two.
2010-12-02 19:02:08 +01:00
Tim-Philipp Müller
2ee5e4d8ac queue2: don't leak pad ref in pull mode when flushing
Fix pad leak when queue2 is flushing or being shut down.
2010-11-01 12:34:15 +00:00
Tim-Philipp Müller
ce35fb79da queue2: don't send seeks beyond the end of the file upstream in pull mode
If downstream is operating in pull mode, short-circuit any pulls beyond
the end of the file and return FLOW_UNEXPECTED immediately instead of
sending a seek beyond the end of the file upstream, since this might
confuse upstream elements (and/or http servers, for example). Fixes
playback of apple trailers in totem and youtube/html5 clips in
WebkitGTK+.

https://bugzilla.gnome.org/show_bug.cgi?id=632977
2010-11-01 12:34:15 +00:00
Jan Schmidt
691807d634 multiqueue: Fix tracking of unlinked streams.
33082eb9e4 introduced a bug
preventing sparse unlinked streams from advancing properly,
leading to the queue blocking.

Fixes: #633176
2010-10-27 18:12:36 +02:00
Edward Hervey
cb2c028b39 queue2: Remove unused argument from find_range() 2010-10-13 12:05:44 +02:00
Edward Hervey
3812283854 fdsink: cleanup get_property/set_property 2010-10-13 12:05:38 +02:00
Wim Taymans
aa62c60a6c queue: avoid g_cond_signal when we can
Keep track of what cond we are waiting on and only signal when some other thread
is waiting.
2010-10-12 18:48:10 +02:00
Wim Taymans
62ffd66f10 queue2: release queue2 lock before notify
Make sure that we don't hold the lock when we notify the temp-location
property,

Fixes #631853
2010-10-11 18:10:07 +02:00
Wim Taymans
85a23c6f80 queue: add debug statement 2010-10-11 16:45:40 +02:00
Ognyan Tonchev
36b533d5b2 queue: apply sink segment on the source if queue is empty
Apply the sink segment on the source immediatly when it is received
and there is nothing in the queue.

Solves #482147
2010-10-11 15:56:31 +02:00
Edward Hervey
518364e7ac multiqueue: Remove unused variable and simplify code
oldid was only used when we were doing multiple pops per loop.
2010-10-08 13:26:37 +02:00
Tim-Philipp Müller
863d783beb elements: minor performance improvement when doing g_object_notify() for the "last-message" property
Make sure property names passed to g_object_notify() are in the canonical form
(ie. "last-message" not "last_message"), so that g_param_spec_pool_lookup()
doesn't have to do strdup/canonicalize/free for every single notify call.
This only applies when building against older GLib versions (< 2.26).
2010-10-07 19:04:00 +01:00
Tim-Philipp Müller
fe9bb36ac7 fakesink: use g_object_notify_by_pspec() and remove work-around for old GLib versions if possible
Use more efficient g_object_notify_by_pspec() if we're compiling against
GLib >= 2.26, and also remove work-around for g_object_notify() thread-
safety issues with older GLib versions if it's not needed any more.
2010-10-07 19:04:00 +01:00
Tim-Philipp Müller
67503c9d43 tee: use g_object_notify_by_pspec() if possible
Use more efficient g_object_notify_by_pspec() if we're compiling against
GLib >= 2.26.
2010-10-07 19:03:55 +01:00
Tim-Philipp Müller
b5e8957bfe fakesrc: use g_object_notify_by_pspec() if possible
Use more efficient g_object_notify_by_pspec() if we're compiling against
GLib >= 2.26.
2010-10-07 19:03:42 +01:00
Tim-Philipp Müller
cd3f4d7d92 identity: use g_object_notify_by_pspec() and remove work-around for old GLib versions if possible
Use more efficient g_object_notify_by_pspec() if we're compiling against
GLib >= 2.26, and also remove work-around for g_object_notify() thread-
safety issues with older GLib versions if it's not needed any more.
2010-10-07 19:03:42 +01:00
Stefan Kost
41e00e58e7 queue2: remove var only used for debug statement 2010-09-23 15:12:32 +03:00
Wim Taymans
2d1450d777 queue2: only post buffering message when percent changed 2010-09-15 13:29:52 +02:00
Wim Taymans
e3176a31e9 queue2: always update buffering status
Update the buffering status even when we are not using a queue so that EOS can
properly finish the buffering.
2010-09-15 13:15:19 +02:00
Sebastian Dröge
62d40fa0db identity: identity is GAP flag aware, no need to let it be unset by basetransform 2010-09-09 16:12:26 +02:00
Philippe Normand
410ca5c164 queue2: buffering_ranges query support
Fixes bug 623121
2010-09-03 19:59:28 +02:00
Stefan Kost
def17d30f4 fakesrc: fix use of empty subbuffers
Remove a short cut that was ignoring src->data allocation mode. All
the called code-path below handle size==0.
2010-09-02 14:19:24 +03:00
Stefan Kost
e406f7c572 queue: add silent property to suppress signal emission
Allow to turn off signal emission and therefore extra locking if this is not needed.
Fixes #621299
2010-08-30 09:46:53 +03:00
Sebastian Dröge
33082eb9e4 multiqueue: Don't do an infinite loop in the loop function
Instead return after every iteration, which makes sure that the
stream lock is released for a short time after every iteration,
task state changes are checked, etc and this allows the task
to be stopped properly.
2010-08-27 16:59:09 +02:00
Sebastian Dröge
8035f13bbf multiqueue: Flush the data queue if downstream return WRONG_STATE too 2010-08-27 16:59:09 +02:00
Sebastian Dröge
2e6f80bf81 elements: Stop using GST_FLOW_IS_FATAL() 2010-08-27 16:59:09 +02:00
Stefan Kost
4f3cccc77a fakesink: keep properties in order 2010-08-27 16:31:55 +03:00
Stefan Kost
23337eabf9 queue: ARG_ -> PROP_ for property constants 2010-08-27 16:31:55 +03:00
Wim Taymans
77f806bf9f queue2: fix on-disk buffering again 2010-08-26 17:04:20 +02:00
Jonas Holmberg
97cab76ca7 queue: Push newsegment when linking in PLAYING
Fixes #611918
2010-08-20 16:11:41 +02:00
Edward Hervey
cc4b33ffdf queue2: Use G_GUINT64_FORMAT where needed
Fixes build on macosx
2010-08-19 09:58:55 +02:00
Stefan Kost
6ee61e4cb3 plugins: add example launch lines and more explanation to the docs.
The plugins where almost undocumented :/ ...
2010-08-16 18:08:39 +03:00
Wim Taymans
bb45ff49a9 queue2: fix compilation 2010-08-13 16:38:59 +02:00
Robert Swain
dec12cb2b8 queue2: Fix a special case during range management
When a range contained no data, if it was new or newly empty, it would
be mishandled if it were the current range.
2010-08-13 16:38:58 +02:00
Robert Swain
414911b90a queue2: fix locking around init_ranges
This fixes a segfault where the ready to paused state change causes
freeing and allocation of new ranges while another thread is trying to
use them.
2010-08-13 16:38:58 +02:00
Robert Swain
0182c0d88b queue2: More ring buffer fixes
- Set reading_pos correctly in _create_read ()
- Seek to data if it is further than QUEUE_MAX_BYTES (queue) -
  cur_level.bytes away. This should avoid a situation where the ring
  buffer is full but the data offset from which we shall read is not in
  the ring buffer.
- Only update the max_reading_pos to a lower value to protect data when
  necessary
- Always signal an ADD in _locked_enqueue () so that an EOS unlocks the
  reader
- More useful debug output
2010-08-13 16:38:58 +02:00
Robert Swain
c78996a313 queue2: ring buffer fixes
One must not affect the values of the current range based on a read
request before the correct range is activated.
2010-08-13 16:38:58 +02:00
Robert Swain
602f4774c7 queue2: Fix bugs
update_buffering () needs to be called every time we write to the ring
buffer so that applications don't get stuck waiting for a 100% buffered
message while queue2 is waiting for space

_create_write () must only be called for temp file/ring buffer cases
2010-08-13 16:38:57 +02:00
Robert Swain
9df54eb4ff queue2: extend ring buffer to support ram mode 2010-08-13 16:38:57 +02:00
Robert Swain
e29cca10a4 queue2: merge write buffer functions and fix bugs
Cached data could have been overwritten so it is now protected until
it is read. Similarly data was overread as _have_data () was always
looking for the originally requested data even if part of it had been
read already.
2010-08-13 16:38:57 +02:00
Wim Taymans
04f1572ea2 queue2: small cleanup 2010-08-13 16:38:56 +02:00
Wim Taymans
695da33ef5 queue2: cleanup write_to_ring_buffer
Use cur_level.bytes to see how much space is free in the ringbuffer.
Simplyfy the write function, avoid taking subbuffers, move waiting for free
space in one spot, use simply counter to write data of a buffer.
2010-08-13 16:38:56 +02:00
Wim Taymans
abc9ab1747 queue2: cleanups
Add a macro to get the max size of the queue in bytes, which depends on the
max_level.bytes and the ring_buffer_max_size.
Some cleanups.
2010-08-13 16:38:56 +02:00
Wim Taymans
ecd8d3be3a queue2: remove unused variable 2010-08-13 16:38:56 +02:00
Wim Taymans
4478c90642 queue2: cleanups
Make sure the cur_level.bytes is updated after we change the writing_pos or the
max_reading_pos.
Refactor get_free_space()
Add some comments
2010-08-13 16:38:55 +02:00
Wim Taymans
aec4ea0bfe queue2: remove unneeded signal 2010-08-13 16:38:55 +02:00
Wim Taymans
7de963c0e0 queue2: set buffering mode correctly 2010-08-13 16:38:55 +02:00
Wim Taymans
cb6d9b071e queue2: fix calculation of available ringbuffer data 2010-08-13 16:38:55 +02:00
Wim Taymans
8de7cc2222 queue2: reading_pos is updated in create_read only 2010-08-13 16:38:54 +02:00
Wim Taymans
cda4967839 queue2: refactor and add debug 2010-08-13 16:38:54 +02:00
Wim Taymans
117d12f325 queue2: fix flushing 2010-08-13 16:38:54 +02:00
Wim Taymans
e037dd37ae queue2: add debug 2010-08-13 16:38:53 +02:00
Wim Taymans
e882e1b533 queue2: don't try to write 0 bytes 2010-08-13 16:38:53 +02:00
Wim Taymans
73e27fb017 queue2; cleanups and fixes
Make a macro for some frequent checks
Emit the removed signal in all cases when we remove something
2010-08-13 16:38:53 +02:00
Wim Taymans
6339bd0bec queue2: refactorings
Check and handle seek errors
Refactor the wait_free_space function.
2010-08-13 16:38:53 +02:00
Robert Swain
c847b981f4 queue2: Use ring-buffer-max-size prop to control ring buffer 2010-08-13 16:38:52 +02:00
Robert Swain
500d6a9986 queue2: Clean up and improve code 2010-08-13 16:38:52 +02:00
Robert Swain
bde816451e queue2: Fix conditions where behaviour should differ between ring
buffer and temp file
2010-08-13 16:38:52 +02:00
Robert Swain
68e2275bb9 queue2: add useful debug messages and fix an assumption in _have_data () 2010-08-13 16:38:51 +02:00
Robert Swain
9d11b3e79e queue2: fix buffering percentage in ring buffer mode 2010-08-13 16:38:51 +02:00
Robert Swain
178821aace queue2: various ring buffer fixes
- make _get_range () emit the del signal once a buffer has been read
- use do {} while (); for wait code as queue is locked and no data could
  have been read in the mean time so it makes no sense to check before
  waiting
- make _is_filled () more robust
2010-08-13 16:38:51 +02:00
Robert Swain
d1809558e5 queue2: ring buffer work in progress 2010-08-13 16:38:51 +02:00
Robert Swain
f093707189 queue2: Add use-ring-buffer and ring-buffer-max-size properties 2010-08-13 16:38:50 +02:00
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
Tim-Philipp Müller
71f3a6f0f7 Don't include <libxml/parser.h> from public headers if GST_DISABLE_DEPRECATED is defined
Since everything GstXML related has been deprecated, we can now skip the
libxml includes from the public headers when GST_DISABLE_DEPRECATED is
defined.

See #463435.
2010-06-26 10:35:38 +01: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
Mark Nauwelaerts
2aea9ad231 memindex: avoid busy loop when doing EXACT lookup
Fixes #610367.
2010-02-18 17:17:34 +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