Commit graph

1080 commits

Author SHA1 Message Date
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
Mark Nauwelaerts 7b2c5f5168 multiqueue: set iterate_interal_links function on source pad 2009-12-30 22:59:29 +01:00
Wim Taymans 5e577aa385 tee: small cleanups, use some G_LIKELY 2009-12-22 22:52:02 +01:00
Olivier Crête 3144354aae tee: Don't crash if there is no source pad 2009-12-22 22:31:06 +01:00
Mark Nauwelaerts 5fde7d1ed0 filesrc: printf format fixes 2009-12-15 18:55:38 +01:00
Havard Graff 494495eae6 tee: release pads in dispose
Make sure to release all request-pads in the dispose-method, in case of a
shutdown-race, where a pad-alloc is about to happen.

Fixes #604091
2009-12-09 13:31:07 +01:00
Edward Hervey e572d3bf0b tee: avoid expensive typechecks, and avoid getting ref to parent.
Speeds up tee processing 2 to 5 times.
2009-12-07 09:51:03 +01:00
Tim-Philipp Müller 5351298266 filesink, filesrc: printf format fixes
gstfilesink.c:399: error: format ‘%d’ expects type ‘int’, but argument 8 has type ‘size_t’
gstfilesink.c:399: error: format ‘%d’ expects type ‘int’, but argument 9 has type ‘gsize’
gstfilesrc.c:588: error: format ‘%08llx’ expects type ‘long long unsigned int’, but argument 8 has type ‘off_t’
2009-12-03 20:53:25 +00:00
Stefan Kost c92178827b tee: add special case for only one pad conected
It is not easy to setup a tee on the fly, thus apps need to add them always if
they might need them. This changes the code so, that if only one src-pad is
active, we push buffers directly. In the normal code path all buffers are pushed
with an extra ref, that forces followup inplace elements to copy the data.
2009-12-03 16:44:28 +02:00
Stefan Kost 15bac7df00 tee: only message once per received buffer
Avoids checking for each source pad. The messages would be almost identical
anyway.
2009-12-03 16:11:59 +02:00
Stefan Kost d80750e8d2 tee: remove unused offset member 2009-12-03 16:06:35 +02:00
Stefan Kost 33f9abda38 tee: only notify alloc-pad property if changed. 2009-12-03 16:02:35 +02:00
Edward Hervey 4452672001 queue: Register debug funcptr only once.
Makes creating queue elements 3-4 times faster and avoids contention on the
global funcptr lock.
2009-12-01 19:29:25 +01:00
Thiago Santos 1a50186630 queue2: fix printf format
Cast the variable to gint to conform to the printf format used.
It is casted rather than changing the format because the
message is created with a cast to gint too.
2009-11-10 11:55:34 -03:00
Thiago Santos 245089c9bd queue2: avoid crashing due to negative percent
queue2 would crash when using small buffer sizes because
it would overflow when calculating the percentage, resulting
in the buffering GstMessage not being created and trying to be
used. This patch uses a gint64 instead of a gint to do the
percentage math, making it harder to overflow.
2009-11-10 10:10:56 -03:00
Thiago Santos 5c7104c002 queue2: Fix small doc typo 2009-11-10 09:52:30 -03:00
Bastien Nocera 9581e5887c implement buffering-left argument to buffer messages
Using the current fill level of the queue, and the average input
rate, we can determine how long it will take to finish downloading
the whole stream to the temporary file.

Fixes #600726
2009-11-05 15:22:35 +01:00
Stefan Kost 69ea131cfa build: include stdio.h for FILE 2009-11-03 17:30:14 +02:00
Sebastian Dröge 22fbce48bb queue2: Use "Queue 2" as long name 2009-10-29 11:38:21 +01:00
Sebastian Dröge 0f1c4ab188 queue2: Use GST_BOILERPLATE_FULL() and add pad templates/set details in base_init 2009-10-29 11:35:08 +01:00
Sebastian Dröge 5c821a0df5 queue2: Use gst_element_class_set_details_simple() 2009-10-29 11:30:57 +01:00
Sebastian Dröge 40732dd308 queue2: Integrate into coreplugins 2009-10-29 11:30:11 +01:00
Sebastian Dröge 08e3cb531c queue2: Move struct declarations to a separate header 2009-10-29 11:21:36 +01:00
Sebastian Dröge 9236921a34 queue2: Move queue2 to gstreamer coreplugins
Fixes bug #599996.
2009-10-29 11:18:20 +01:00
Tim-Philipp Müller daecaf0e8a Remove GST_DEBUG_FUNCPTR where they're pointless
There's not much point in using GST_DEBUG_FUNCPTR with GObject
virtual functions such as get_property, set_propery, finalize and
dispose, since they'll never be used by anyone anyway. Saves a
few bytes and possibly a tenth of a polar bear.
2009-10-28 00:44:24 +00:00
Tim-Philipp Müller ff7d9470b7 capsfilter: sprinkle some GST_DEBUG_FUNCPTR 2009-10-28 00:44:07 +00:00
Wim Taymans 03baa04059 multiqueue: buffering is implemented now 2009-10-27 14:40:19 +01:00
Wim Taymans b852da60d4 multiqueue: make sure percent increases
Keep track of the last posted percent message and make sure the next percent
messages are strictly increasing.
2009-10-27 14:40:17 +01:00
Wim Taymans 30fc865162 multiqueue: refactor buffering code
Move the buffering update code to a separate function so that we can call it
when the buffering state changes due to EOS.
Avoid dividing by 0.
2009-10-27 14:40:15 +01:00
Wim Taymans 99dd9830a9 multiqueue: add buffering support
Add support for buffering mode where we post BUFFERING messages based on the
level of the queues. It currently operates on the first queue that goes over or
under the high/low thresholds.
2009-10-27 14:40:12 +01:00
Wim Taymans 07991ae4ab multiqueue: don't check visible items in buffering
In buffering mode we want to ignore the max visible items to decide when the
queue is filled. Instead, we only look at the number of bytes and/or time in the
queue.
2009-10-27 14:40:09 +01:00
Wim Taymans 6ac9191527 multiqueue: hook up low/high percent
Hook up the low/high percent properties for the buffering mode.
2009-10-27 14:40:07 +01:00
Wim Taymans b9d4f6e550 multiqueue: hook up property for buffering 2009-10-27 14:40:02 +01:00
Wim Taymans c6b0d4a43d multiqueue: small cleanups
Remove unused variable to avoid confusion
Fix some typo
2009-10-27 13:22:47 +01:00
Wim Taymans 6082b0bc89 multiqueue: add FIXME for wrong code
Needs further investigation
2009-10-27 13:18:31 +01:00
Wim Taymans 354cf53f81 multiqueue: fix debug output 2009-10-27 13:18:29 +01:00
Wim Taymans 606852c586 multiqueue: avoid shadowing function argument
Don't shadow the sq argument in the underrun_cb function but use
a different variable name to iterate the other queues.
Use the same variable name in the overrun_cb function.
2009-10-27 13:18:25 +01:00
Wim Taymans 814ee012e7 multiqueue: make queue arg explicit
Make the queue argument to IS_FILLED explicit
2009-10-27 13:18:20 +01:00
Wim Taymans c490d7542c multiqueue: fix properties
Fix properties, make the extra-size properties as not implemented.
2009-10-27 13:18:00 +01:00
Wim Taymans 2f7b348fc0 tee: implement custom acceptcaps function
Implement a custom acceptcaps function on the sinkpad. We can accept any caps as
long as it is accepted by all downstream peer elements.
2009-10-21 16:26:01 -04:00
Wim Taymans b95cc5031b multiqueue: avoid lock for taking the counter
The counter for incomming data is already protected with the STREAM_LOCK so we
don't need to add another lock around it.
2009-10-21 13:38:57 -04:00
Stefan Kost 9f9353a84a queue: more queue optimizations
Split gst_queue_locked_enqueue() into variant for buffer and event to get rid of
the if() and make the code more readable (constant boolean parameters are never
nice). Removes the if (item) checks as we dereference the pointer before anyway.

Also apply the same idea of reusing the previous knowledge in
gst_queue_locked_dequeue to remove more type checks.
2009-10-08 10:54:42 +03:00
Stefan Kost 963932b1f1 multiqueue: split gst_multi_queue_item_new
Split gst_multi_queue_item_new into buffer and event variant to make save an if
and make code more readable.
2009-10-08 10:54:35 +03:00
Edward Hervey 4cfe11d42c plugins/gstfilesrc: Make a fast-path for length == 0 buffer creation.
If the requested length is 0, we don't need to read anything from the file.
2009-10-08 08:55:59 +02:00