Commit graph

1345 commits

Author SHA1 Message Date
Thiago Santos
ac9bfe25ae gstcollectpads: Fix docs about GstCollectData list
Add to the docs the fact that is only safe to iterate
GstCollectPad's data list inside the collected callback.

Fixes #610366
2010-08-12 16:05:35 -03:00
Sebastian Dröge
27bebf7456 basesrc: Make sure the buffer metadata is writable before changing it 2010-08-06 18:44:33 +02:00
Stefan Kost
2237af4b6b debug: logging improvements
Use the event serialisation. Log formats name instead of number.
2010-08-05 10:31:50 +03:00
Stefan Kost
5d0015048b check: don't use c++ keywords as variable names 2010-08-05 10:31:50 +03:00
Stefan Kost
71b494639b basesrc: log seek event details 2010-08-05 10:31:50 +03:00
Stefan Kost
a82b607885 basesrc: avoid some caps manipulation
After the intersect we have writable caps. Copy the template caps so that also
there we have writable caps.
2010-08-05 09:40:02 +03:00
Thiago Santos
1b99e2e2dc bytereader: Fix docs
Fix typo in docs for the unsigned peek functions
2010-08-04 13:47:23 -03:00
Rob Clark
29289ee79e basetransform fix for upstream caps-renegotiation
If initially pass-through caps are negotiated between a transform element's
sink and src pads, but then the downstream element returns different caps
on a buffer from pad_alloc(), basetransform gets stuck with proxy_alloc=TRUE
even though the upstream peer doesn't accept the caps, causing
gst_pad_peer_accept_caps() to be called on each buffer in _buffer_alloc():

    if (!gst_caps_is_equal (newcaps, caps)) {
      GST_DEBUG_OBJECT (trans, "caps are new");
      /* we have new caps, see if we can proxy downstream */
>>    if (gst_pad_peer_accept_caps (pad, newcaps)) {
        /* peer accepts the caps, return a buffer in this format */
        GST_DEBUG_OBJECT (trans, "peer accepted new caps");

which is taking ~40ms/frame.

This patch does two things.  (1) if the buffer returned from pad_alloc() has
new caps, trigger the decision whether to proxy the buffer-alloc to be
revisited, and (2) disable proxy if peer does not accept new caps.  (The first
part may not be strictly needed, but seemed like a good idea.)

Note that this issue would not arise except in case of downstream elements
who have on their template-caps, some that would be suitable for pass-through,
but at runtime pick more restrictive caps (for ex, after querying a driver for
what formats it actually supports).
2010-07-27 17:34:49 +02:00
Thiago Santos
574e6ab423 basetransform: Try suggesting caps on bad caps pad_alloc
When basetransform received an unsupported caps on pad_alloc
it just returned not-negotiated. This patch makes it query
the allowed caps between his sinkpad and upstream's srcpad
to find a caps to suggest.

This happens when dinamically switching pipeline elements
and upstream pad_allocs with the previous caps that was
being used.

Fixes #614296
2010-07-26 14:49:14 -03:00
Sebastian Dröge
29a35e70e1 basetransform: Allow the subclass to add new fields to caps when getting new caps from downstream
This was already done in all other cases where new caps are handled
except upstream negotiation.
2010-07-17 21:30:18 +02:00
Tim-Philipp Müller
da289fd8e9 gstcheck: fix some silly list iteration code
g_list_length() is not the best way to check if a list is empty or not.
2010-07-16 18:20:57 +01:00
Sebastian Dröge
55986b9a10 basesrc: Return values in stream time for the POSITION query
Fixes bug #623622.
2010-07-16 17:26:54 +02:00
Sebastian Dröge
249c4c18d0 basesink: Implement GstElement::get_query_types() 2010-07-16 17:26:50 +02:00
Sebastian Dröge
b2e7c4bd45 basesink: Only answer the SEGMENT query in pull mode
Otherwise the element handling the seeks should answer this query.

Fixes bug #623622.
2010-07-16 17:26:31 +02:00
Sebastian Dröge
e2db318921 basetransform: Implement POSITION query
Fixes bug #623541.
2010-07-16 17:26:22 +02:00
Alessandro Decina
3a553f4eda basesink: add accessors for the enable-last-buffer property.
API: gst_base_sink_set_last_buffer_enabled
API: gst_base_sink_is_last_buffer_enabled
2010-07-06 16:39:18 +02:00
Alessandro Decina
f079ff3f20 basesink: add new enable-last-buffer property.
Add a new enable-last-buffer property. When false, it disables storing the last
received buffer in basesink::last-buffer. This can be useful in cases where
buffers need to be released asap.

API: GstBaseSink::enable-last-buffer
2010-07-06 12:38:21 +02:00
Sebastian Dröge
e0467b0100 controller: Fix build with GST_REMOVE_DEPRECATED 2010-06-25 18:25:40 +02:00
Sebastian Dröge
a15344515a basesink: Initialize jitter to prevent printing an uninitialized variable if waiting for the clock failed 2010-06-17 13:20:13 +02:00
Wim Taymans
f80a824a2f basetransform: reevaluate proxy_alloc when reconfigured
When we reconfigure the transform element, make sure we reevaluate the proxying
of buffer_alloc the next time around.

Fixes #621332
2010-06-14 16:20:18 +02:00
Mark Nauwelaerts
7e23719a74 adapter: optimize progressive masked_scan
Retain the last scanned buffer entry and offset, so we can resume buffer
scanning there in case of a typical progressive scan.
Also potentially optimize _copy subsequently occurring in that area.
2010-06-14 15:09:59 +02:00
Mark Nauwelaerts
d5ed339f20 adapter: add extended masked_scan_uint32_peek that also provides matching value
Also add to .def and docs.

Fixes #619828.

API: gst_adapter_masked_scan_uint32_peek
2010-06-14 15:09:38 +02:00
Wim Taymans
76f7a001fc basetransform: add accept_caps vmethod
Allow subclasses to override the acceptcaps function because in some cases a
custom implementation can be much much faster than the default one.

See #621190
2010-06-14 12:45:20 +02:00
Olivier Crête
828f2a3389 basetransform: Assume size is the same if no transform_size/get_unit_size
Subclasses that don't implemen transform_size should be assumed to produce output
buffers of the same size.

https://bugzilla.gnome.org/show_bug.cgi?id=621334
2010-06-14 10:52:22 +02:00
Sebastian Dröge
83929a5849 basesink: Make sure we have a valid object to render in _render_object() 2010-06-13 18:05:41 +02:00
Sebastian Dröge
e6e29192bc Remove some dead assignments 2010-06-13 17:08:48 +02:00
Stefan Kost
6ea0bdadd5 check: use globbing for selective test invocation via GST_CHECKS
Use glib globbing instead of simple string matching to allow e.g.
GST_CHECKS="test_inter*" make gst/gstcaps.check
2010-06-06 23:19:58 +03:00
Stefan Kost
9b5bc5199e basetransform: avoid a caps-copy
We can simply truncate the caps, as 'othercaps' is the result of intersect
operations and thus ours and writable.
2010-06-05 23:20:50 +03:00
Philippe Normand
6b8baaed50 basesink: Make gst_base_sink_query return TRUE if the segment query succeeded.
Fixes bug #620490.
2010-06-03 17:40:45 +02:00
Tim-Philipp Müller
53c122df2b check: log plugins available to unit tests and their paths 2010-06-01 12:03:56 +01:00
Mark Nauwelaerts
aa8b8b57d7 adapter: fix _try_to_merge_up
That is, provide correct return value (as documented), and actually
loop to consider more than the first 2 buffers.
2010-05-27 14:57:29 +02:00
Mark Nauwelaerts
7479b64a2a collectpads: fix documentation glitch 2010-05-27 14:57:26 +02:00
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
Benjamin Otte
6fb4cda8fb controller: Fix gst_interpolation_control_source_find_control_point_iter
The logic in that function is broken. Various NULL-checking bandaids for
guaranteed non-NULL variables didn't even help there.

This patch updates the function to check if a previous item exists
before fetching it instead of after. This makes all other tests
unnecessary.
In particular, it makes the check for an empty list unnecessary, because
for empty lists the only iter is the begin iter (and the end iter) and
so the new check catches that case.

https://bugzilla.gnome.org/show_bug.cgi?id=616846
2010-04-26 16:46:11 +02:00
Sebastian Dröge
69992811f4 lfocontrolsource: Use correct setter for double GValues 2010-04-15 22:05:38 +02:00
Tim-Philipp Müller
47ac7cf1fc build: when building executables, put libs to link to into LDADD instead of LDFLAGS
Use foo_LDADD instead of foo_LDFLAGS to specify the libraries to link to.
This should make sure arguments are passed to the linker in the right
order. See #615697.
2010-04-14 11:23:37 +01:00
Stefan Kost
dbfebe4348 build: fix out of sourcedir build for check
Move the internal header to nodist (as we copy it around anyway).
Use builddir in pattern substitution for it.
Fixes #61483.
2010-04-06 21:22:22 +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
Alan Knowles
f38d864bf7 net: fix typo in net client clock structure
It's sockaddr_in, not sockaddr_id.
2010-03-29 10:25:07 +01: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