Commit graph

1547 commits

Author SHA1 Message Date
Sebastian Dröge 2a13275985 collectpads2: Use G_DEFINE_TYPE instead of GST_BOILERPLATE 2011-10-28 09:38:35 +02:00
Sebastian Dröge 6f231f89d6 base: Add collectpads2
This handles muxing of sparse/subtitle streams and has
lots of cleanup. Still missing is special support for
live streams but this can be added later without breaking
API/ABI.

Based on the version from the videomixer plugin.
https://bugzilla.gnome.org/show_bug.cgi?id=415754
2011-10-28 09:36:06 +02:00
Jan Schmidt 9a5109b86e basetransform: Fix refcount leak
Don't leak peercaps and a ref to the basetransform when returning
the cached caps.
2011-10-27 23:08:14 +11:00
Stefan Sauer 03797b9a12 controller: fix wrong order of calls in the docs. 2011-10-27 10:38:10 +02:00
Sebastian Dröge b046ba6e3a baseparse: Fix documentation, it's pre_push_frame and not pre_push_buffer 2011-10-20 16:59:01 +02:00
Vincent Penquerc'h 168e5c0abb basetransform: cache transformed caps where appropriate
Speeds up negotiation a fair bit on a contrived pipeline
with a dozen colorspace conversions.

Hopefully clears out the cache every time it ought to.

https://bugzilla.gnome.org/show_bug.cgi?id=662291
2011-10-20 16:54:27 +02:00
Sebastian Dröge 64493d9603 basebarse: Add detect vfunc to allow subclasses to do format detection before anything else
API: GstBaseParseClass::detect()

This is called with the first buffers until the subclass has finished detection
and only afterwards the original buffers are handled as before. The vfunc allows
detection of the stream format without breaking the upstream framing.
2011-10-20 11:48:24 +02:00
Thiago Santos 4c1397d572 baseparse: add since doc to new getcaps function 2011-10-18 18:58:14 -03:00
Stefan Sauer 2e6b434730 logging: more logging and prefer human readable details over memory locations 2011-10-18 15:24:21 +02:00
Thiago Santos e3f2d7db71 baseparse: add getcaps function
Adds a getcaps function to the sink pad to make parsers propagate
downstream caps restrictions to upstream.

The pipeline "audiotestsrc num-buffers=100 ! faac ! aacparse !
"audio/mpeg, version=(int)4, stream-format=(string)adts" ! filesink"
wouldn't work because aacparse wouldn't propagate the adts restriction
upstream to faac.

This patch adds a default getcaps to the sink pad to simply proxy
downstream caps and also adds a 'get_sink_caps' function pointer
to GstBaseParseClass for subclasses that need more refined getcaps.

https://bugzilla.gnome.org/show_bug.cgi?id=661874
2011-10-18 08:04:31 -03:00
Wim Taymans f08b2203c8 basesrc: also update the stream time 2011-10-18 12:39:03 +02:00
Sebastian Dröge 1eb73339b9 baseparse: Fix handling of queued frames
gst_base_parse_push_frame() already frees the frame, no need to
do it another time again.
2011-10-18 10:58:57 +02:00
Wim Taymans cdd3c303f1 basesrc: properly adjust start time
When we do a non-flushing seek and closed the current segment,
make sure that we open the next segment from where we closed.
2011-10-12 17:17:53 +02:00
Mark Nauwelaerts 49bd7b40ca baseparse: send duration message when updating internal duration 2011-10-06 14:47:54 +02:00
Stas Sergeev fafbc109f1 baseparse: Return success if optional start/stop method is not provided
This allows to not implement the optional start/stop methods.
2011-10-03 11:40:36 +02:00
Tim-Philipp Müller 0ac0b70c15 baseparse: make estimating the position in query handler actually work
No point estimating if we don't set the result afterwards.
2011-09-30 15:25:20 +01:00
Vincent Penquerc'h f94701261a baseparse: answer position query in stream time and try upstream first
Let the demuxer have first say as well.

https://bugzilla.gnome.org/show_bug.cgi?id=659485
2011-09-30 15:23:33 +01:00
Vincent Penquerc'h 01172b8126 basetransform: send delayed events earlier
Some elements (such as videorate) might push buffers early,
for instance in in transform_ip. We want events (and in particular
any NEWSEGMENT event) to be pushed before that.

This fixes transmageddon wedging on converting a file starting
with a non zero offset to Ogg.

https://bugzilla.gnome.org/show_bug.cgi?id=660165
2011-09-27 12:00:23 +02:00
Vincent Penquerc'h 56b3acb043 basetransform: delay serialized events when src caps are not set yet
https://bugzilla.gnome.org/show_bug.cgi?id=659571
2011-09-21 13:22:02 +02:00
Tim-Philipp Müller 46e401b6d9 lfocontrolsource: fix clang compiler warning
Cast enum to int before checking for negative values, which are
impossible according to the enum list.

gstlfocontrolsource.c:652:45: error: comparison of unsigned enum expression < 0
      is always false [-Werror,-Wtautological-compare]
  if (waveform >= num_waveforms || waveform < 0) {
                                   ~~~~~~~~ ^ ~

https://bugzilla.gnome.org/show_bug.cgi?id=653137
2011-09-13 23:04:09 +01:00
Nicolas Dufresne f0219b327d basesink: make it easy to override the pad query
Add a vmethod to handle the pad query.
Install a default handler for the pad query.
Use the new query function in filesink
2011-09-08 14:46:59 +02:00
Sebastian Dröge 0bc6d49c95 Revert "basetransform: Use check for subsets and not non-empty intersection to check if caps are compatible"
This reverts commit 5e5cc5e89e.

See bug #658541.
2011-09-08 13:42:52 +02:00
Piotr Fusik 14f5518f3d docs, gst: typo fixes
https://bugzilla.gnome.org/show_bug.cgi?id=658449
2011-09-07 18:03:17 +01:00
Sebastian Dröge a121713f0c basetransform: If there's no peer we still have to transform ANY caps in getcaps()
Otherwise elements like capsfilter will return ANY caps if no
peer is present instead of the filter caps. The transform_caps()
vfunc could do transformations to the template caps that do not
result in the unmodified template caps.
2011-09-07 16:05:07 +02:00
Sebastian Dröge 5e5cc5e89e basetransform: Use check for subsets and not non-empty intersection to check if caps are compatible 2011-09-06 12:37:16 +02:00
Josep Torra 1ec901321f lfocontrolsource: explicitly cast to the enum type
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:15 +02:00
Josep Torra 306e317ae9 typefind: add GST_TYPE_FIND_NONE and use it
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:15 +02:00
Josep Torra 81794a4248 baseparse: use the enum values for 0 and don't abuse on gboolean coincidence
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:15 +02:00
Josep Torra ab3c6173b3 baseparse: put the arguments of g_return_val_if_fail in the proper order 2011-08-26 14:11:15 +02:00
Sjoerd Simons 0c0dc0441f basetransform: Fix bodged previous commit 2011-08-26 13:02:34 +01:00
Sjoerd Simons 888e6a91a4 basetransform: Use GstPadDirection in the query vfunc
Wim suggested that using GstPadDirection instead of a GstPad in the
arguments to the new query vfunc would be more consistent with the other
functions.
2011-08-26 12:43:13 +01:00
Sjoerd Simons 63a21ca8b1 BaseTransform: Add a query vfunc 2011-08-26 10:39:44 +02:00
Mark Nauwelaerts c1988b7e55 basesink: ensure start_time reset upon flush 2011-08-23 18:21:38 +02:00
Tim-Philipp Müller c7f2e85d86 baseparse: don't use == in debug string
It messes up GST_DEBUG=*:5 make foo/bar.valgrind, because
our Makefile looks for '==' as marker of valgrind output.
2011-08-18 20:46:01 +01:00
Tim-Philipp Müller 7043bf9d55 baseparse: fix crash on seek from streaming thread on newsegment event
Event if it's not allowed, we can easily prevent it, so let's do
that.

https://bugzilla.gnome.org/show_bug.cgi?id=656771
2011-08-18 20:44:01 +01:00
Evan Nemerson cf6b41aa78 base: add missing (out) annotation for byte reader/writer functions
https://bugzilla.gnome.org/show_bug.cgi?id=655381
2011-07-27 10:12:33 +01:00
Tim-Philipp Müller 6a1e2cc6e5 controller: fix build failure due to compiler warning
Presumably with newer GLib version.

https://bugzilla.gnome.org/show_bug.cgi?id=655155
2011-07-23 08:00:09 +01:00
Tim-Philipp Müller 59441b36b6 baseparse: fix printf format in debug message 2011-07-14 12:45:33 +01:00
Mark Nauwelaerts 27313d05c1 basesink: unset PLAYING transition flag when transition completed 2011-07-13 11:40:26 +02:00
Mark Nauwelaerts c8b9275578 basesink: try harder to arrange increasing position reporting
... rather than having a momentary decreasing one while transitioning
to PLAYING.

Fixes #628021.
2011-07-11 11:14:02 +02:00
Tim-Philipp Müller f47c3472df baseparse: fix invalid memory access in debug messages
Don't use buffers that we've given away or unrefed in debug messages.
2011-07-07 14:57:18 +01:00
Mark Nauwelaerts 0993102834 basesrc: do not sneakily mess with current offset when updating length 2011-06-30 17:59:27 +02:00
Philip Jägenstedt 9f0e066102 basesink: Fix typo in documentation
Fixes #652577.
2011-06-17 01:54:31 -07:00
Tim-Philipp Müller 954bcb09c7 docs: update for gst_base_src_set_dynamic_size
Add to sections file and add Since: marker. Also update
win32 .def file.

API: gst_base_src_set_dynamic_size()
2011-06-10 12:45:37 +01:00
Mark Nauwelaerts f8168cd75f basesrc: add dynamic size handling
This allows subclass to indicate that size reported by src may not be static
and should as such be updated regularly, rather than only when really
needed.

Particular examples are filesrc or fdsrc reading from a file that is still
growing (e.g. being downloaded).

Fixes #652037.
2011-06-08 20:16:25 +02:00
Mark Nauwelaerts c040305b8c Revert "basesrc: Send an update NEWSEGMENT event downstream if the duration changes"
This reverts commit 934faf163c.

Original commit leads to possibly sending newsegment event downstream
in pull mode.  In push mode, quite some downstream elements
are likely to only expect newsegment event following a seek they performed
and as such may have their state messed up.
2011-06-08 20:14:16 +02:00
Sebastian Dröge 934faf163c basesrc: Send an update NEWSEGMENT event downstream if the duration changes
This allows streaming the complete file for files that have grown since
streaming started.

Fixes bug #647940.
2011-05-27 09:05:46 +02:00
Debarshi Ray f9a4dcd074 check: add fail_unless_equals_int64
https://bugzilla.gnome.org/show_bug.cgi?id=650973
2011-05-24 16:21:20 +02:00
Sebastian Dröge 1d57e46dbd basesink: Only reinit the cached GstClockID if it is for the same clock
The clock might have changed since the clock ID was created and in
that case we have to request a new one.
2011-05-20 13:05:04 +02:00
Mark Nauwelaerts 35567592ef baseparse: maintain frame state during frame parsing round
See #650093.
2011-05-18 09:49:35 +02:00