Commit graph

1170 commits

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