Commit graph

778 commits

Author SHA1 Message Date
Wim Taymans
3d72274b19 basesink: add jitter to debug output 2010-05-18 18:38:14 +02:00
Stefan Kost
a1c2071300 basesrc: reflow to truncate caps just once
We get writable caps from the intersection (unless it failed). As we truncate
those anyway, we don't need to manualy copy the first structure.
2010-05-06 17:04:53 +03:00
Tim-Philipp Müller
f77f7e987c docs: document that gst_byte_writer_put_string*() writes the terminator too 2010-05-05 16:34:47 +01:00
Wim Taymans
6e4fde7195 docs: clarify the pull_range functions
Clarify the gst_pad_pull_range(), GstBaseSrc::create(), gst_pad_get_range()
and GstPadGetRange functions a little.

Fixes #617733
2010-05-05 12:01:50 +02:00
Wim Taymans
d00e97b7ea basesrc: improve debugging 2010-05-04 11:45:02 +02:00
Stefan Kost
c96dec2a06 basesink: implement percentage position and duration queries
If upstream does not handle them, then implement those ourself.
2010-04-30 10:03:38 +03:00
Stefan Kost
c29e34113f basesink: use gst_pad_peer_query instead of reinventing. 2010-04-30 10:03:38 +03:00
Stefan Kost
2d49414eef queries: add more logging
Log human readable formats and log query result.
2010-04-30 10:03:38 +03:00
Jonas Holmberg
a120f9f4e6 basesrc: fix gst_base_src_new_seamless_segment()
Keep track of pending newsegment in gst_base_src_new_seamless_segment()
to avoid pushing newsegment update before newsegment.
2010-04-06 17:41:34 +02:00
Tim-Philipp Müller
c4a4f2dad2 libs: point gobject-introspection scanner to .la files
Point g-ir-scanner to the .la file of our library, which hopefully
makes it find the right dependencies in all cases (ie. our locally
built libgstreamer and not the system-installed one). This is also
how it's done in Gtk+ and how it's documented in the wiki, see
http://live.gnome.org/GObjectIntrospection/AutotoolsIntegration

Based on patches by Vincent Untz and Alan Knowles.

Fixes #603710.
2010-04-03 13:41:52 +01:00
Thiago Santos
7558fed51b basetransform: Refactor caps suggestion on pad_alloc
Refactor the handling of sink suggestion caps variable
so that it always has a ref to the caps it points to.

Makes the code clearer.
2010-03-29 16:05:32 -03:00
Tim-Philipp Müller
1a72c2f01b libs: don't use fancy shell features when invoking gobject-introspection scanner
It's POSIX, but tcsh doesn't seem to support it.
2010-03-25 15:54:19 +00:00
Tim-Philipp Müller
8cc7274163 libs: fix PKG_CONFIG_PATH used when calling gobject-introspection scanner
Our own pkgconfig directory should come first, so that pkg-config uses
the in-tree libgstreamer and not some external one when --pkg=gstreamer-0.10
is passed to g-ir-scanner.

See #603710.
2010-03-25 13:48:19 +00:00
Edward Hervey
7a8004233a GstAdapter: add a unchecked variant of flush for internal usage
Trims off 10-20% cpu time when using gst_adapter_take[_buffer]
2010-03-25 10:28:21 +01:00
Robert Swain
9b6f93dcf3 basetransform: Implement QoS message posting
And some more for bug #322947
2010-03-18 16:57:17 +01:00
Wim Taymans
ba34494ce3 basesrc: catch, parse and store QoS event values
Catch, parse and store the QoS values from QoS events for later use.
2010-03-18 13:41:35 +01:00
Robert Swain
d576c1105e basesink: Implement QoS message posting in basesink
Post QoS messages when frames are dropped.
This goes a little further towards resolving bug #322947
2010-03-18 13:04:34 +01:00
Mart Raudsepp
96bff7ac62 docs: add missing "Since: 0.10.26" marker for gst_data_queue_new_full() 2010-03-17 11:03:15 +00:00
Tim-Philipp Müller
422e9c4ce3 docs: fix Since markers for gst_byte_writer_put_float*()
As the headers were broken in 0.10.26 the functions weren't really
usable back then, so we should advertise them as being there only
since 0.10.27.

Spotted by Mart Raudsepp.
2010-03-17 11:03:15 +00:00
Thiago Santos
a6a3c129d1 basetransform: Accept non-fixed caps suggestions
When doing pad_allocs, use non-fixed caps suggestions and
try to fixate them before using. This makes possible to
have suggested buffer size with 0 in basetransform just
to signal upstream a renegotiation is needed

Fixes #576234
Fixes #609046
2010-03-16 17:12:37 -03:00
Sebastian Dröge
2e05ca5de4 bytewriter: Use correct gtk-doc workaround 2010-03-15 14:52:41 +01:00
Benjamin Otte
e8f65e8bff Make code safe for -Wredundant-decls
Adds that warning to configure.ac

Includes a tiny change of the GST_BOILERPLATE_FULL() macro:
The get_type() function is no longer declared before being defined.

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 20:45:33 +01:00
Sebastian Dröge
ce74a1ae19 build: Make some more rules silent if requested 2010-03-09 20:57:17 +00:00
Tim-Philipp Müller
91a09b9fd4 docs: fix up bytewriter doc chunks for float functions as well 2010-03-03 12:06:30 +00:00
Tim-Philipp Müller
e50b9aa71e bytewriter: fix headers for float/double writing functions
The functions are called gst_byte_writer_put_{float32|float64}_*() and not
gst_byte_writer_put_{float|double}_*().

Spotted by: Benjamin Otte <otte@redhat.com>
2010-03-03 11:28:27 +00:00
Mark Nauwelaerts
8cdf5a586f basesink: fix emergency rendering timestamp tracking
Specifically, if all (including initial) buffers turn up late,
emergency rendering should also kick in appropriately.

Fixes #611087.
2010-02-26 15:48:41 +01:00
Thiago Santos
035e5c74be collectpads: Improve docs about 'data' attribute
Adds a reminder to 'data' attribute doc

Fixes #610366
2010-02-18 17:00:05 -03:00
Edward Hervey
bc9e129990 basesrc: Don't use expensive cast checks in get_range.
_get_range() is a pad function set by ourselves, therefore we're certain that
the parent is a GstBaseSrc.

Speeds up _get_range by 38%, and the total call by 30%. (valgrind instruction
calls measurements).

Fixes #610246
2010-02-17 12:36:57 +01:00
Thiago Santos
bfff7a1b4e bytewriter: add _fill function
Adds a new function to GstByteWriter that writes
a constant value to a memory area (aka memset).
Useful for adding padding to buffers.

Also updates .def file and docs.

API: gst_byte_writer_fill()
2010-02-12 17:23:29 -03:00
Sebastian Dröge
fae502056f basesrc: Make locking of the segment a bit more strict and update documentation
Updating the segment values must only be done while holding the
STREAM_LOCK and OBJECT_LOCK. This means, reading can be done as
long as one of them is held, not both, which removes some lock-unlock
blocks from performance critical code paths.

Also document, that gst_base_src_set_format() *must* be called in
states <= READY and add an assertion for this. Changing the format
later will completely mess up the segment information.
2010-02-12 14:58:42 +01:00
Sebastian Dröge
5998e902a3 basesrc: Protect segment values from concurrent access from different threads
This could happen easily in the query functions or when the size is set
on appsrc from some non-streaming thread.
2010-02-12 11:02:08 +01:00
Thiago Santos
86a216b1ba gstbytewriter: Fix different function names in .h and .c
gst_byte_writer_reset_and_get_buffer wasn't declared
in .h, instead there was _reset_and_get_data_as_buffer.

Replace it with the real function name, that is smaller
and matches gst_byte_writer_free_and_get_buffer

https://bugzilla.gnome.org/show_bug.cgi?id=608726
2010-02-01 17:47:25 -03: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
Sebastian Dröge
743cde4b49 basetransform: Only use suggested caps in buffer allocation if a size was suggested too 2010-01-17 08:23:48 +01:00
Sebastian Dröge
0a0c32ef88 basetransform: Handle buffers with NULL caps correctly
This means that the caps didn't change so don't try to handle
the NULL caps as the new caps.
2010-01-14 20:19:05 +01:00
Wim Taymans
8fff434835 typefind: add a new method that also uses the file extension
Add a method to perform get_range typefinding that also uses the
uri/location extension as an extra hint. It will first try to call the
typefind functions of the factories that handle the given extension. The result
is that in the common case, we only call one typefind function, which speeds up
the typefinding a lot.
2010-01-12 17:34:39 +01:00
Wim Taymans
d7ecbc6ac3 collectpads: don't keep buffers reffed longer than needed
Make sure we take ownership of the buffer early without increasing its refcount
when we go in the collect function. This reduces the amount of copies needed in
order to make the buffer writable in most cases.
2009-12-24 19:25:52 +01:00
Wim Taymans
633e8f4d9f collectpads: avoid doing subbuffers when we can
In some cases we can avoid allocating a subbuffer and instead simply ref
the buffer. Callers should perform _make_metadata_writable() in all
cases now.
2009-12-24 16:53:15 +01:00
Wim Taymans
4718b7ef09 collectpads: add ability to install clipping functions
Add a method to install a clipping function that is called when a buffer is
received. Users of collectpads can then perform clipping on the incomming
buffers.

Also retab the header file a little.

See #590265
2009-12-24 15:25:14 +01:00
Wim Taymans
a3fdb45aa6 basesink: add some more debugging 2009-12-11 16:19:18 +01:00
Sebastian Dröge
25fc43487b basesink: Allow update NEWSEGMENT events after EOS
This allows demuxers to update the segment stop of an already
finished stream. This might be needed if some stream goes to
EOS before the duration of the longest stream is known to properly
set the segment stop of all streams to the same value in the end.
2009-12-08 15:24:43 +01:00
Jan Schmidt
f490508490 basesrc: Shut down the pad task when the initial seek fails.
Set the pad flushing and stop the pad task when the initial seek fails
during activation. Avoids racy calls into the _create() function when
BaseSrc::stop() has already run.

Fixes: #603059

Also, fix some misspelled comments.
2009-12-04 12:41:58 +00:00
Edward Hervey
efa5aee509 basesrc/basesink: Register debug funcptr only once.
Makes basesrc/basesink initialization 3-4 times faster and avoids
contention on the global funcptr lock
2009-12-01 19:27:47 +01:00
Wim Taymans
8d34217dcc basesink: clip stepping boundaries
Rounding errors with the floating point rate could make it so that we
don't end up exactly at the required stepping duration.
Use the segment clipping boundaries, which are not subject to rate
adjustements, instead to detect when we reached the stepping duration.

Add some debug info related to going to the PAUSED state.
2009-11-28 22:34:19 +01:00
Stefan Kost
a9a6c0f0cd docs: fix broken xrefs 2009-11-27 18:31:39 +02:00
Stefan Kost
2ba8b37d15 docs: fix broken xrefs 2009-11-27 16:39:37 +02:00
Jan Schmidt
332eb4ea4d basesrc: Add gst_base_src_new_seamless_segment()
Merge new function from resindvd into the primary GstBaseSrc for
starting a new seamless segment.

API: gst_base_src_new_seamless_segment()
2009-11-21 18:23:51 +01:00
Tim-Philipp Müller
022970e9f9 bytewriter: fix compiler warning
Some gcc versions warn about bytewriter writing to memory accessed
via a const guint8 pointer, despite our explicit cast to guint8 *.
Work around that by using an intermediary variable.

Fixes #598526.
2009-11-20 16:14:54 +00:00
Jan Schmidt
81d3fda6e8 basesink: Clamp the base time correctly in position reporting
When clamping the base time, correctly use 'now', instead of
'-now' - the intent is to prevent 'now-base' ever being
negative, which would cause a position report outside the segment.

Fixes: #602419
2009-11-19 19:02:22 +01:00
Sebastian Dröge
cb28889b11 basesink: Handle the new sink-message event 2009-11-18 13:12:28 +01:00