Commit graph

1181 commits

Author SHA1 Message Date
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
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
Michael Smith 0c3a8165b6 filesink: Use _wfopen on win32 to open files with non-ascii filenames correctly. 2009-10-07 16:03:30 -07:00
Mark Nauwelaerts e51a34985f multiqueue: flush queue upon fatal flowreturn and release upstream thread 2009-10-07 18:51:52 +02:00
Edward Hervey 61ec6a561c plugins/multiqueue: Avoid instance check
We know earlier on in the code whether we're handling an event or a buffer,
just pass that information through.

This commit and the previous commit reduce instruction fetch:
* when pushing buffer (_chain) by 10%
* when popping buffer (_loop) by 3%
2009-10-07 10:07:01 +02:00
Edward Hervey c15879f94e plugins/multiqueue: Cache input/output time, avoid expensive calls.
* Cache the input/output time
* Only recalculate it when needed.

Avoids 50% calls to gst_segment_to_running_time
2009-10-07 10:07:01 +02:00
Stefan Kost cfb4aa4627 build: sprintf, sscanf need stdio.h 2009-10-07 10:59:54 +03:00
Edward Hervey 7c6d555848 plugins/multiqueue: Use new GstDataQueue constructor 2009-10-07 09:32:47 +02:00
Edward Hervey 8c67b6390e plugins/multiqueue: Use cached value instead of expensive object get.
The task will always exist as long as its owner (i.e. the pad) and that
owner's owner (i.e. multiqueue) exist.

Reduces the number of instruction fetches by 36%.
2009-10-07 09:25:41 +02:00
Edward Hervey d28a3e7435 plugins/queue: Use previous knowledge of data type to avoid typecheck.
We know whether we have a buffer or an event, use that instead of going
trough the expensive GLib typecheck.

The overall instruction fetch reduction introduced by this commit and the
2 previous commits:
* receiving a buffer (_chain) by 20%
* popping a buffer (_loop) by 14%

Numbers acquired through callgrind passing 100000 buffers through queue.
2009-10-07 09:15:13 +02:00
Edward Hervey 9be7fdc857 plugins/queue: Avoid useless segment_to_running_time() calculations.
* Cache src and sink time
* Use a boolean to know whether src/sink time need to be recalculated

Avoids 50% calls to gst_segment_to_running_time()
2009-10-07 09:06:21 +02:00
Edward Hervey b1945ad429 plugins/queue: Just cast to the object parent instead of typechecking. 2009-10-07 09:06:11 +02:00
Sebastian Dröge d6de0e4cce multiqueue: Improve iterate internal links function
Pads have their GstSingleQueue stored as element private data
so there's no need to iterate over the list of single queues
every time. Also every pad only has a single internal link so
use a single iterator instead of a complex custom iterator.

Set the element private data of the pad to NULL when freeing the
single queue.
2009-10-07 07:18:04 +02:00
Tim-Philipp Müller 6ce1f0cbce dataqueue, elements: avoid unnecessary runtime type checks 2009-10-06 20:04:10 +01:00
Wim Taymans b3d262d730 fix whitespace 2009-09-07 18:32:10 +02:00
Wim Taymans eaf7582b8f queue: whitespace fixes 2009-08-28 17:49:11 +02:00
Sebastian Dröge 269d3581c5 multiqueue: Use iterate_internal_links instead of deprecated get_internal_links 2009-08-18 14:57:18 +02:00
Laurent Glayal abafed991e filesink: Add property to allow to append to an already existing file
Fixes bug #591441.
2009-08-18 08:45:08 +02:00
Mark Nauwelaerts 3352c5d970 queue: post error message when pausing task
If downstream returns error and upstream has already delivered
everything (including EOS) and will no longer be around to find
out that we paused (and why), post error message.  Fixes #589991.
2009-08-06 13:42:25 +02:00
Wim Taymans 2f5ed9e29d capsfilter: only set caps when different
When we have an input buffer with caps and when those caps are different from
the caps we want, only then make a writable copy of the input buffer as the
output buffer and set the caps on that output buffer. This avoids some cases
where we took a subbuffer for setting caps that were the same.
2009-08-06 10:53:12 +02:00
Wim Taymans 49f24e2044 queue: get caps after making writable
Get the caps of the buffer after we made the buffer writable. This did not
cause any problems but it's nicer this way.
2009-08-06 10:52:56 +02:00
Wim Taymans 04f3f096c3 capsfilter: fix refcounting problem
Make sure the metadata is writable before setting the caps on a buffer.
2009-08-06 10:52:45 +02:00
Andoni Morales 741ef2bc80 filesink: Fix segfault with MSVC
Don't use deprecated fileno on MSVC but replace with _fileno

Fixes #587052
2009-07-13 12:00:47 +02:00
Tim-Philipp Müller 480b92006d typefindelement: log probability in debug message 2009-07-02 01:18:57 +01:00
Jan Schmidt 3c87b8850f multiqueue: Fire the overrun signal on EOS
Fixes startup of some short MPEG files with decodebin2/playbin2
where all the data fits in the multiqueue and EOS arrives before
the group is exposed.
2009-06-24 15:22:51 +01:00
Chad Hanna 26d91daacb capsfilter: Add GAP flag support
capsfilter doesn't actually touch the data so we don't want the GAP flag to
be unset by basetransform.

Fixes bug #586566.
2009-06-23 12:58:29 +02:00
Wim Taymans b054530479 tee: add buffer-list support 2009-06-19 19:35:04 +02:00
Tim-Philipp Müller 26f8292860 fdsink: clean up some more error and debug messages 2009-06-19 13:52:41 +01:00
Tim-Philipp Müller 536baf3d65 fdsink: fix error message
Users should never see the term 'file descriptor', much less a file
descriptor number, in an error message. Put that into the debug
string instead and use the default error message.
2009-06-18 11:39:26 +01:00
Wim Taymans 6c1a1634b4 fdsink: add the new field in the header 2009-06-18 11:49:33 +02:00
Benjamin Gaignard 1a6f82f4b0 fdsink: make fdsink seekable
Implement the same logic as filesink to implement seeking.

Fixes #578908
2009-06-18 10:55:39 +02:00
Tim-Philipp Müller 8624aaa415 queue: fix compiler warning
The compiler suggests to add some () to indicate if the && or the || takes
priority, so reflow code a bit so we don't have to add yet another layer
of (). Hopefully this was the intended meaning of the code.
2009-06-15 20:11:05 +01:00
Arnout Vandecappelle 34aeb8ba7e don't lock when min-threshold and max-size conflict.
When min-threshold is set on a queue, it is possible that one of
the minima remains unsatisfied while one of the maxima is already
reached. Therefore, always consider the queue non-empty if it is full.

Fixes #585433.
2009-06-15 19:06:12 +02:00
Stefan Kost 36bb7c76b1 filesrc/sink: turn the bus messages into g_warning
Its a programming error.
2009-06-12 17:55:02 +03:00
Stefan Kost e938861cb8 filesrc/sink: improve warning message a bit (wrong state)
Unify and turn those into element warnings.
2009-06-11 18:16:05 +03:00
Jan Schmidt 2e2695f594 multiqueue: Use the slice allocator for MultiQueueItems 2009-06-11 10:34:28 +01:00
Wim Taymans 5a77f18278 multiqueue: check byte range even when we have timestamps
As found by thaytan on IRC.
Also check the byte limit, even if we have timestamps because there might just
not be a time limit.
2009-06-09 13:08:54 +02:00
Stefan Kost 7e27a53265 fakesrc: add a FIXME comment for blocksize vs. size-max property issue 2009-06-01 09:51:20 +03:00
Tim-Philipp Müller d9df74ea3e identity: hack around g_object_notify() bug by protecting it with a lock
Out-of-band events might lead to us calling g_object_notify() from a
non-streaming thread, which can cause crashes if g_object_notify() is
being called from the streaming thread at the same time. See #554460.
2009-05-31 21:30:18 +01:00
Tim-Philipp Müller 7e4b164c12 fakesink: hack around crasher bug in g_object_notify() for out-of-band events
GObject may crash if two threads do concurrent g_object_notify() on the same
object. This may happen if fakesink receives an out-of-band event such as
FLUSH_START while processing a buffer or serialised event in the streaming
thread. Since this may happen with the default settings during a common
operation like a seek, and there seems to be little chance of a timely fix
in GObject (see #166020), we should hack around this issue by protecting all
of fakesink's direct g_object_notify() calls with a lock.

Also add unit test for the above.

Fixes #554460.
2009-05-31 19:17:33 +01:00
Arnout Vandecappelle ef9ad30fde typefind: don't leak the force-caps property
Fixes #581321
2009-05-12 10:21:26 +02:00
Sebastian Dröge d20e695a00 filesrc: Improve debugging a bit on invalid URIs 2009-05-12 09:02:45 +02:00
Wim Taymans 103b2a41bf fakesink: avoid typecheck 2009-05-11 22:35:08 +02:00
Jan Schmidt 4c6c9c2d5b paramspecs: revert gst_param_spec_is_mutable() for release
Revert the gst_param_spec_is_mutable API for this release so we can
discuss it a bit further first.
2009-04-16 00:48:11 +01:00
David Schleef 1ecf114c0e Add param spec flags for when a property can be changed
Adds GST_PARAM_MUTABLE* flags to indicate in which states a
property can be changed and take effect.  Fixes #571559
2009-04-12 18:45:24 -07:00
Olivier Crete 376bed78ce tee: add property to control the alloc pad
Add a property to control the pad used for proxying the buffer_alloc function on
the sinkpad.
Fixes #577891.
2009-04-09 18:27:21 +02:00
Edward Hervey 00cbbc87c7 Remove unused variables detected by LLVM's Clang static analyzer. 2009-04-03 12:56:48 +02:00
Edward Hervey ca662eb57a capsfilter. Always calls _suggest, even with NULL caps. Fixes #574805 2009-03-31 15:15:29 +02:00
LRN ef5be37882 win32: fix seeking in files >4GB
Use 64-bit functions on windows to implement seeking in files bigger
than 4GB.
Fixes #575988
2009-03-20 14:14:52 +01:00
Stefan Kost 36205e7d42 logging: some additional logging for tracing caps negotiation.
Demote one log that can come quite often. Remove one fixme that is done. Apply
gst-indent changes.
2009-03-10 21:13:40 +02:00
Alessandro Decina c20fb4c16f identity: ignore the return value of gst_pad_event_default when sending out the newsegment event in single-segment mode.
This makes identity single-segment=true ! oggmux work again after a change in
oggmux (commit b0e3d449 in -base).
2009-03-06 12:13:14 +01:00
Edward Hervey 69b8a22ffa capsfilter: Properly reset the capsfilter when setting caps ANY. 2009-02-27 13:35:35 +01:00
Ali Sabil cd1f18bd12 Use the correct unref function 2009-02-22 18:53:10 +01:00
Stefan Kost 4262f6c641 cleanup: remove unused variables in _class_init() and reindent. 2009-02-05 17:25:01 +02:00
Stefan Kost 1ca248bac6 queue: remove unused code
Skip looping thru a dummy implementation.
2009-02-05 13:59:48 +02:00
Jan Schmidt e89ce19497 Update a bunch of gitignores to clean up my git status output 2009-01-23 16:08:40 +00:00
Sebastian Dröge e5ce299593 Improve debug output by logging the offsets. Fixes bug #568678.
In create() also log the offsets and not only the
buffer size.
2009-01-22 13:58:57 +01:00
Wim Taymans 5b868cbbb0 If no type was found using the typefind functions, try doing an upstream
URI query to guess the type from the extension. See #566661.
2009-01-21 12:50:29 +01:00
Stefan Kost 7dd8b92448 gst/gstdebugutils.c: Add some ideas, how to make the graph smaller.
Original commit message from CVS:
* gst/gstdebugutils.c:
Add some ideas, how to make the graph smaller.
* gst/gstutils.c:
Add a comment from a debug session.
* libs/gst/base/gstbasetransform.c:
Log more context.
* libs/gst/controller/gstinterpolationcontrolsource.c:
Indet.
* plugins/elements/gstcapsfilter.c:
Fix typo in docs.
2009-01-01 21:27:06 +00:00
Sebastian Dröge 9b65eb6838 API: Add URI query type. This is useful to query the URI of a sink/source element and can be used by demuxers that ne...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstquark.c:
* gst/gstquark.h:
* gst/gstquery.c: (gst_query_new_uri), (gst_query_set_uri),
(gst_query_parse_uri):
* gst/gstquery.h:
API: Add URI query type. This is useful to query the URI
of a sink/source element and can be used by demuxers that
need to get data from other files.
This query should go upstream by default.
Fixes bug #562949.
* plugins/elements/gstfdsink.c: (gst_fd_sink_query):
* plugins/elements/gstfdsrc.c: (gst_fd_src_class_init),
(gst_fd_src_query):
* plugins/elements/gstfilesink.c: (gst_file_sink_query):
* plugins/elements/gstfilesrc.c: (gst_file_src_class_init),
(gst_file_src_query):
Implement URI query.
2008-12-20 17:33:44 +00:00
Wim Taymans 55eff82256 plugins/elements/gsttee.c: Check for changed pads-list before checking the last returned
Original commit message from CVS:
* plugins/elements/gsttee.c: (gst_tee_handle_buffer):
Check for changed pads-list before checking the last returned
GstFlowReturn because the pad could have been removed and we
need to ignore the value in that case.
2008-12-08 22:28:05 +00:00
Edward Hervey aa1dfbb004 plugins/elements/gstfilesrc.c: Fix memory leak.
Original commit message from CVS:
* plugins/elements/gstfilesrc.c: (gst_file_src_uri_set_uri):
Fix memory leak.
2008-11-24 11:56:44 +00:00
Stefan Kost 9e501b274f plugins/elements/gstidentity.c: Don't warning on offset==-1. Taken from _check_imperfect_offset().
Original commit message from CVS:
* plugins/elements/gstidentity.c:
Don't warning on offset==-1. Taken from _check_imperfect_offset().
2008-11-21 20:57:16 +00:00
Michael Smith 42c08ab20f plugins/elements/gstfilesrc.c: Check for localhost in URI was backwards, fix it. Fixes unit test.
Original commit message from CVS:
* plugins/elements/gstfilesrc.c:
Check for localhost in URI was backwards, fix it. Fixes unit test.
2008-11-21 18:26:14 +00:00
Michael Smith c9a4a6d6f5 plugins/elements/gstfilesrc.c: Use g_filename_from_uri() for URI parsing in filesrc rather than rolling out own sligh...
Original commit message from CVS:
* plugins/elements/gstfilesrc.c:
Use g_filename_from_uri() for URI parsing in filesrc rather than rolling
out own slightly incorrect version. Fixes use of some paths on
win32.
2008-11-20 21:05:14 +00:00
Thomas Vander Stichele a0e5eab525 plugins/elements/gstfilesink.c: Update Author string to match others.
Original commit message from CVS:
* plugins/elements/gstfilesink.c:
Update Author string to match others.
2008-11-10 13:56:51 +00:00
Stefan Kost fa7e7d29a2 plugins/elements/gstidentity.c: Doc typo. Use return value of parent_class->event.
Original commit message from CVS:
* plugins/elements/gstidentity.c:
Doc typo. Use return value of parent_class->event.
* plugins/elements/gsttypefindelement.c:
Chain up at the end for consistency.
2008-10-31 08:53:27 +00:00
Sebastian Dröge 5357a24dbf plugins/elements/: Use gst_buffer_try_new_and_alloc() and handle errors instead of using gst_buffer_new_and_alloc() w...
Original commit message from CVS:
* plugins/elements/gstfdsrc.c: (gst_fd_src_create):
* plugins/elements/gstfilesrc.c: (gst_file_src_create_read):
Use gst_buffer_try_new_and_alloc() and handle errors instead of
using gst_buffer_new_and_alloc() which aborts if the buffer couldn't
be allocated.
2008-10-23 12:52:58 +00:00
Sebastian Dröge 075811e654 plugins/elements/gsttee.c: Fix flow aggregation of tee. Error out immediately for all flow returns except OK and NOT_...
Original commit message from CVS:
* plugins/elements/gsttee.c: (gst_tee_handle_buffer):
Fix flow aggregation of tee. Error out immediately for all flow returns
except OK and NOT_LINKED, return NOT_LINKED if all pads are not linked
and return OK if at least one pad is linked.
Before we errored out on "fatal" flow returns (i.e. not for WRONG_STATE)
and otherwise returned the flow return of the last pad, which is wrong.
* tests/check/elements/tee.c: (_fake_chain), (_fake_chain_error),
(GST_START_TEST), (tee_suite):
Add unit tests for the flow aggregation.
2008-10-14 12:34:56 +00:00
Stefan Kost 35a2a49c00 plugins/: Don't install static libs for plugins. Fixes #550851 for core.
Original commit message from CVS:
* plugins/elements/Makefile.am:
* plugins/indexers/Makefile.am:
Don't install static libs for plugins. Fixes #550851 for core.
2008-10-13 16:47:51 +00:00
Jan Schmidt 18e2042e28 plugins/elements/gstqueue.c: Allow through queries when we don't know how as otherwise it's not possible to query the...
Original commit message from CVS:
* plugins/elements/gstqueue.c:
Allow through queries when we don't know how
to adjust them (not TIME or BYTES), as otherwise it's
not possible to query the current position in order
to seek in other formats at all.
2008-10-08 11:20:17 +00:00
Jan Schmidt 86db1f680c Fix assertion in basetransform when the subclass chooses not to allocate a buffer in prepare_buffer(), and make capsf...
Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
* plugins/elements/gstcapsfilter.c:
* tests/check/Makefile.am:
* tests/check/elements/.cvsignore:
* tests/check/elements/capsfilter.c:
Fix assertion in basetransform when the subclass chooses not to
allocate a buffer in prepare_buffer(), and make capsfilter error out
cleanly if requested to apply caps that don't completely specify the
buffer. Fixes #551509
2008-09-28 21:19:15 +00:00
Stefan Kost c55cc1ff39 plugins/elements/: Call super::event() when not handling it. Fixes #544855.
Original commit message from CVS:
reviewed by: Wim Taymans <wim.taymans@collabora.co.uk>
* plugins/elements/gstfakesink.c:
* plugins/elements/gstfakesrc.c:
Call super::event() when not handling it. Fixes #544855.
2008-08-20 07:03:40 +00:00
Alessandro Decina 9693804ba5 plugins/elements/gstfilesrc.c: Use 64 bit variants of stat functions on win32, to enable support of large files there.
Original commit message from CVS:
Patch by: Alessandro Decina <alessandro@nnva.org>
* plugins/elements/gstfilesrc.c:
Use 64 bit variants of stat functions on win32, to enable support
of large files there.
Fixes #547277.
2008-08-19 17:23:18 +00:00
Ole André Vadla Ravnås fe969e6391 plugins/elements/gsttee.*: Protect pad_alloc with a new lock so that we can be sure that nothing is performing a pad_...
Original commit message from CVS:
Patch by: Ole André Vadla Ravnås  <ole.andre.ravnas at tandberg com>
* plugins/elements/gsttee.c: (gst_tee_finalize), (gst_tee_init),
(gst_tee_request_new_pad), (gst_tee_release_pad),
(gst_tee_find_buffer_alloc), (gst_tee_buffer_alloc):
* plugins/elements/gsttee.h:
Protect pad_alloc with a new lock so that we can be sure that nothing is
performing a pad_alloc when removing the pad. Fixes #547835.
* tests/check/elements/tee.c: (buffer_alloc_harness_setup),
(buffer_alloc_harness_teardown), (app_thread_func),
(final_sinkpad_bufferalloc), (GST_START_TEST), (tee_suite):
Added testcase for shutdown race.
2008-08-15 17:01:07 +00:00
Stefan Kost 3897306e70 plugins/elements/gsttee.c: Unlock, instead of locking again.
Original commit message from CVS:
* plugins/elements/gsttee.c:
Unlock, instead of locking again.
2008-08-07 07:01:15 +00:00
Wim Taymans d041a7411a plugins/elements/gstcapsfilter.c: Use new caps suggestion feature of basetransform to request a caps negotiation upst...
Original commit message from CVS:
* plugins/elements/gstcapsfilter.c: (copy_func),
(gst_capsfilter_set_property):
Use new caps suggestion feature of basetransform to request a caps
negotiation upstream.
2008-08-05 11:12:29 +00:00
Sebastian Dröge 4bfb1fe70c Remove GST_DISABLE_(ENUMTYPES|INDEX|URI) everywhere.
Original commit message from CVS:
* configure.ac:
* docs/gst/gstreamer-sections.txt:
* docs/gst/gstreamer.types:
* docs/gst/gstreamer.types.in:
* gst/Makefile.am:
* gst/gst.c:
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_set_index_func):
* gst/gstconfig.h.in:
* gst/gstelement.c: (gst_element_get_index):
* gst/gstregistrybinary.c: (gst_registry_binary_save_feature),
(gst_registry_binary_load_feature),
(gst_registry_binary_read_cache):
* gst/gstregistryxml.c: (load_feature),
(gst_registry_xml_read_cache), (gst_registry_xml_save_feature):
* plugins/Makefile.am:
* tools/gst-indent:
* tools/gst-inspect.c: (print_index_info), (print_element_list),
(print_plugin_features), (print_element_features):
* tools/gst-xmlinspect.c: (print_event_masks),
(print_element_info):
* win32/common/gstconfig.h:
Remove GST_DISABLE_(ENUMTYPES|INDEX|URI) everywhere.
Disabling the indexers and URI handler code will only reduce the
required amount of memory by a very small amount but on the other hand
requires much more maintaince work. Apart from that many places of
code are broken when disabling them.
Disabling the enum types doesn't reduce the required amount of memory
by more than a few bytes and makes it hard to fix bugs like #539772,
i.e. use the enums as GObject properties.
2008-07-31 15:20:32 +00:00
Wim Taymans f688febd0f plugins/elements/gstcapsfilter.c: Make setting the caps more threadsafe.
Original commit message from CVS:
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_set_property),
(gst_capsfilter_get_property), (gst_capsfilter_transform_caps):
Make setting the caps more threadsafe.
2008-07-31 09:55:14 +00:00
Wim Taymans 66d6f67b02 plugins/elements/gstqueue.c: Add and use a custom acceptcaps function instead of falling back to the potentially less...
Original commit message from CVS:
* plugins/elements/gstqueue.c: (gst_queue_init),
(gst_queue_acceptcaps):
Add and use a custom acceptcaps function instead of falling back to the
potentially less optimized default implementation.
2008-07-31 08:37:04 +00:00
Stefan Kost f4caf88854 plugins/elements/gsttee.*: Reverting as not everything is clear yet. Needs some general design work.
Original commit message from CVS:
* plugins/elements/gsttee.c:
* plugins/elements/gsttee.h:
Reverting as not everything is clear yet. Needs some general design
work.
2008-07-29 14:32:51 +00:00
Stefan Kost dd7f2c7076 plugins/elements/gsttee.*: Relay tag events in tee. Fixes parts of #474016.
Original commit message from CVS:
* plugins/elements/gsttee.c:
* plugins/elements/gsttee.h:
Relay tag events in tee. Fixes parts of #474016.
2008-07-29 11:57:11 +00:00
Thijs Vermeir 6d4dc1a807 plugins/elements/gstmultiqueue.*: revert extra-size-buffers stuff, caused some race conditions and extra-size-buffers...
Original commit message from CVS:
* plugins/elements/gstmultiqueue.c:
* plugins/elements/gstmultiqueue.h:
revert extra-size-buffers stuff, caused some race conditions
and extra-size-buffers is not used anymore. Docs needs some updates
2008-06-26 20:27:00 +00:00
Thijs Vermeir e25fd35125 plugins/elements/gstmultiqueue.*: Fix dead-lock in underrun_cb
Original commit message from CVS:
* plugins/elements/gstmultiqueue.c:
* plugins/elements/gstmultiqueue.h:
Fix dead-lock in underrun_cb
2008-06-25 15:39:02 +00:00
Thijs Vermeir 15b694fc7a plugins/elements/gstmultiqueue.c: Add functionality to extra-size-buffers property.
Original commit message from CVS:
* plugins/elements/gstmultiqueue.c:
Add functionality to extra-size-buffers property.
2008-06-22 19:19:35 +00:00
Thijs Vermeir d7d1eecb97 plugins/elements/gstmultiqueue.c: Don't update the cur_time on GST_CLOCK_TIME_NONE (#537804) and don't activate the p...
Original commit message from CVS:
* plugins/elements/gstmultiqueue.c:
Don't update the cur_time on GST_CLOCK_TIME_NONE (#537804) and don't
activate the pads if they are added in STATE_NULL.
2008-06-22 14:35:13 +00:00
Stefan Kost ef70805d24 plugins/elements/: Remove short_description. Add basic docs for gsttypefindelement.
Original commit message from CVS:
* plugins/elements/gstcapsfilter.c:
* plugins/elements/gstfakesink.c:
* plugins/elements/gstfakesrc.c:
* plugins/elements/gstfdsink.c:
* plugins/elements/gstfdsrc.c:
* plugins/elements/gstfilesink.c:
* plugins/elements/gstfilesrc.c:
* plugins/elements/gstidentity.c:
* plugins/elements/gstmultiqueue.c:
* plugins/elements/gstqueue.c:
* plugins/elements/gsttee.c:
* plugins/elements/gsttypefindelement.c:
Remove short_description. Add basic docs for gsttypefindelement.
Simplify markup for fakesrc/fdsrc.
2008-06-20 10:14:54 +00:00
Wim Taymans 98440eb49d plugins/elements/gstfdsrc.c: Added Since doc.
Original commit message from CVS:
* plugins/elements/gstfdsrc.c: (gst_fd_src_class_init):
Added Since doc.
2008-06-20 10:07:28 +00:00
joel larsson c8c34e8dff Add timeout property like udpsrc. Fixes #538628.
Original commit message from CVS:
Patch by: joel larsson <tilljoel at gmail dot com>
* docs/plugins/gstreamer-plugins.args:
* plugins/elements/gstfdsrc.c: (gst_fd_src_class_init),
(gst_fd_src_init), (gst_fd_src_update_fd),
(gst_fd_src_set_property), (gst_fd_src_get_property),
(gst_fd_src_create):
* plugins/elements/gstfdsrc.h:
Add timeout property like udpsrc. Fixes #538628.
Add some more docs and example pipelines.
2008-06-20 10:02:14 +00:00
Wim Taymans 7a0d8307e8 plugins/elements/gsttypefindelement.c: Use faster and safer _pad_push_event().
Original commit message from CVS:
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_src_event),
(gst_type_find_element_handle_event):
Use faster and safer _pad_push_event().
2008-05-27 10:57:11 +00:00
Wim Taymans 095ce0b2b3 plugins/elements/: Small cleanups. Add note adbout g_fopen() on windows and why we don't use it yet.
Original commit message from CVS:
* plugins/elements/gstfilesink.c: (gst_file_sink_set_location),
(gst_file_sink_render):
* plugins/elements/gstfilesrc.c: (gst_file_src_set_location),
(gst_file_src_start):
Small cleanups. Add note adbout g_fopen() on windows and why we don't
use it yet.
2008-05-21 16:06:53 +00:00
Sebastian Dröge 65715dbc66 plugins/elements/: Use custom marshalers that take GstMiniObject as first parameter.
Original commit message from CVS:
* plugins/elements/gstfakesink.c:
(marshal_VOID__MINIOBJECT_OBJECT), (gst_fake_sink_class_init):
* plugins/elements/gstfakesrc.c: (marshal_VOID__MINIOBJECT_OBJECT),
(gst_fake_src_class_init):
Use custom marshalers that take GstMiniObject as first parameter.
Using OBJECT as parameter while a GstMiniObject is given will lead
to assertions if built with G_ENABLE_DEBUG. Fixes bug #525532.
2008-05-13 12:54:00 +00:00
Sebastian Dröge f2422145da plugins/elements/gsttypefindelement.c: Clean up on FLUSH_STOP and not FLUSH_START. Forward both events immediately.
Original commit message from CVS:
* plugins/elements/gsttypefindelement.c:
(gst_type_find_element_handle_event),
(gst_type_find_element_send_cached_events),
(gst_type_find_element_change_state):
Clean up on FLUSH_STOP and not FLUSH_START. Forward both events
immediately.
2008-05-13 12:38:31 +00:00
Sebastian Dröge 88c412bdc1 plugins/elements/gsttypefindelement.c: Forward FLUSH_START events immediately and clean up instead of caching them.
Original commit message from CVS:
* plugins/elements/gsttypefindelement.c:
(gst_type_find_handle_src_query), (stop_typefinding),
(gst_type_find_element_handle_event),
(gst_type_find_element_send_cached_events),
(gst_type_find_element_change_state):
Forward FLUSH_START events immediately and clean up instead of
caching them.
2008-05-13 11:45:24 +00:00
Jan Schmidt 4fa54750f6 plugins/elements/gstmultiqueue.c: Add documentation for the signals to push our core plugin docs coverage back up to ...
Original commit message from CVS:
* plugins/elements/gstmultiqueue.c:
Add documentation for the signals to push our core plugin docs
coverage back up to 100%.
2008-05-09 14:02:53 +00:00
Wim Taymans ae658f35dd plugins/elements/gstfakesrc.*: Added format property to control the format of the newsegment events.
Original commit message from CVS:
* plugins/elements/gstfakesrc.c: (gst_fake_src_class_init),
(gst_fake_src_init), (gst_fake_src_set_property),
(gst_fake_src_get_property), (gst_fake_src_start):
* plugins/elements/gstfakesrc.h:
Added format property to control the format of the newsegment events.
API: GstFakeSrc:format
2008-05-07 09:34:58 +00:00
Tim-Philipp Müller 76f4e0eec9 plugins/elements/gstmultiqueue.c: Small docs fix.
Original commit message from CVS:
* plugins/elements/gstmultiqueue.c:
Small docs fix.
2008-05-05 16:25:23 +00:00
Tim-Philipp Müller 449a426169 plugins/elements/gstqueue.c: Since we're not called only from the chain function any longer, we can't assume that the...
Original commit message from CVS:
* plugins/elements/gstqueue.c: (gst_queue_leak_downstream):
Since we're not called only from the chain function any longer,
we can't assume that there's always data in the queue, so move
the is_full check to the beginning of the loop (otherwise we'd
hit the assert when changing the limit properties while the
queue is empty or not running yet).
Also, only set a discont if items were actually removed from
the queue.
* tests/check/elements/queue.c: (test_leaky_downstream):
Test case for the above.
2008-04-30 14:20:48 +00:00
Jonas Holmberg 0da9f87257 plugins/elements/gstqueue.c: When changing thr max capacity of a leaky queue, immediatly drop buffers instead of wait...
Original commit message from CVS:
Patch by: Jonas Holmberg <jonas dot holmberg at axis dot com>
* plugins/elements/gstqueue.c: (gst_queue_leak_downstream),
(gst_queue_chain), (queue_capacity_change),
(gst_queue_set_property):
When changing thr max capacity of a leaky queue, immediatly drop buffers
instead of waiting for a push on the sinkpad. Fixes #530637.
2008-04-30 09:35:43 +00:00
Olivier Crete 8c484d5a14 plugins/elements/gstqueue.c: Add the min-threshold to the min latency if possible. Fixes #529148.
Original commit message from CVS:
Patch by: Olivier Crete <tester at tester dot ca>
* plugins/elements/gstqueue.c: (gst_queue_handle_src_query):
Add the min-threshold to the min latency if possible. Fixes #529148.
2008-04-21 08:34:09 +00:00
Sebastian Dröge 64bf111c92 plugins/elements/gstidentity.c: Fix imperfect timestamp/offset checks when we get another NEWSEGMENT event after proc...
Original commit message from CVS:
* plugins/elements/gstidentity.c: (gst_identity_event),
(gst_identity_start):
Fix imperfect timestamp/offset checks when we get another NEWSEGMENT
event after processing some data. Fixes bug #526042.
2008-04-09 08:19:36 +00:00