Commit graph

156 commits

Author SHA1 Message Date
Tim-Philipp Müller
c51a2c1ddf basesrc, basesink, baseparse, typefind: use GST_SEGMENT_FLAG with segment flags 2012-07-09 21:51:07 +01:00
Sebastian Dröge
aa2309e54a event: Add format and position to the segment-done event 2012-07-05 13:04:31 +02:00
Sebastian Dröge
49d2ad5633 event: Implement segment-done event 2012-07-05 12:52:51 +02:00
Wim Taymans
76e8b2ecda task: add GDestroyNotify to _new
Add a GDestroyNotify to the user_data we pass to gst_task_new()
Change gst_pad_start_task() to also take the notify
2012-06-20 10:31:49 +02:00
Wim Taymans
c10d39a804 event: add name to sticky_multi events
The name of the event is used to store multiple sticky events of a certain type
on a pad.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=676859
2012-06-06 12:52:09 +02:00
Mark Nauwelaerts
584892bf79 baseparse: also perform state processing upon non-OK return
... since processing might still continue (if e.g. NOT_LINKED)
and then proper state (e.g. offset) needs to be maintained
(e.g. to arrange for a new frame setup).
2012-06-04 11:47:55 +02:00
Edward Hervey
98e1463411 baseparse: always attempt to push if not-linked
This avoids ending up with plenty of pending data (since we'll only
 try to parse/push one frame from the incoming buffer).

Fixes increasing memory consumption when parsers aren't linked

Conflicts:

	libs/gst/base/gstbaseparse.c
2012-04-02 15:27:14 +02:00
Sebastian Dröge
eadebb172d baseparse: Rename ::event() to ::sink_event() for consistency 2012-03-30 12:03:40 +02:00
Wim Taymans
e017498cb0 baseparse: do queries more directly
Just call our internal query function instead of going through the pad and the
query handler etc.
2012-03-20 17:11:19 +01:00
Wim Taymans
83af60019e query: rework the ALLOCATION query
Separate the bufferpool and allocator hints in the allocation query, some
of the values don't always make sense together.
Keep the bufferpool and its configuration together.
Keep the allocator and its parameters together.
Allow for multiple bufferpool configurations in the query.
2012-03-15 20:23:59 +01:00
Sebastian Dröge
38d398448a baseparse: Fix merge mistake 2012-03-08 10:32:02 +01:00
Sebastian Dröge
6b4091a30d Merge branch 'master' into 0.11
Conflicts:
	libs/gst/base/gstbaseparse.c
	libs/gst/base/gstbasetransform.c
	plugins/elements/gsttee.c
2012-03-08 10:19:52 +01:00
Sebastian Dröge
ed7f480222 baseparse: Fix 'self-comparison always evaluates to true'
This was really a bug.
2012-03-06 12:28:02 +01:00
Sebastian Dröge
495aca4905 baseparse: Fix handling of multiple newsegment events
Previously only the last would be pushed, which would cause
invalid running times downstream. This also fixes the handling
of update newsegment events.
2012-03-05 14:41:12 +01:00
Sebastian Dröge
563ba031a2 baseparse: Also flush the close_segment
Pushing this after flushing will confuse downstream.
2012-03-05 14:37:57 +01:00
Sebastian Dröge
747dfc09b2 baseparse: Remove obsolete code and move gap handling to the correct place
The segment start adjustment code in pull mode should never trigger
anymore because the bisection code earlier would have already made
sure that we're at the desired position.

Also move the gap handling some lines below after sending the currently
configured segments. Otherwise we might fill gaps in a segment that is
not configured downstream yet.
2012-03-05 14:23:17 +01:00
Sebastian Dröge
13930dad53 baseparse: Clear some more state when receiving FLUSH_STOP
Like pending serialized events and the currently cached buffer.
2012-03-05 13:12:18 +01:00
Sebastian Dröge
cd195f2143 baseparse: Only queue serialized events for sending them later 2012-03-05 13:01:14 +01:00
Wim Taymans
7b0e4f27fb memory: make _new_wrapped take user_data and notify
Make it possible to configure a GDestroyNotify and user_data for
gst_memory_new_wrapped() this allows for more flexible wrapping of foreign
memory blocks.
2012-02-22 02:10:21 +01:00
Mark Nauwelaerts
d95d2cfa1b baseparse: tweak some documentation 2012-02-15 17:12:09 +01:00
Mark Nauwelaerts
bfa4bb7150 baseparse: simplify and improve frame state handling
Use a frame flag to signal to subclass it should reset any retained
state w.r.t. frame parsing since the frame being passed is 'new',
i.e. not related to previously passed and processed data.
2012-02-15 17:11:54 +01:00
Wim Taymans
2609c7b452 baseparse: don't leak event
In the unlikely case where the subclass set the event function to NULL, don't
leak the event.
2012-02-15 13:15:55 +01:00
Wim Taymans
b6b239ceaa baseparse: make activation code more like other
Make the pad activation code look more like other activation code.
Only start the sinkpad task when we decide to activate in pull mode, when we
later add srcpad pullmode this will be needed.
2012-02-15 12:19:13 +01:00
Wim Taymans
49a7832499 baseparse: add some more debug 2012-02-15 11:11:11 +01:00
Mark Nauwelaerts
d148569cd4 baseparse: track consumed input size
... as used by subsequent input data rate estimation (and seeking).
2012-02-15 11:00:36 +01:00
Wim Taymans
63ba55865c baseparse: chain up to parent for defaults
Chain up to the parent instead of using the FALSE return value from the event
function (because it's otherwise impossible to return an error).
2012-02-15 10:13:37 +01:00
Mark Nauwelaerts
36cc9efa80 baseparse: Revert "baseparse: really provide upstream ts to subclass"
This reverts commit 2363490ef5.
2012-02-14 20:17:37 +01:00
Mark Nauwelaerts
a40b993bc3 baseparse: remove dead code and superfluous loop level 2012-02-14 19:33:50 +01:00
Mark Nauwelaerts
193e1cf16e baseparse: modify reverse playback handling
... so as to allow the push-mode case to provide data to subclass
on a buffer by buffer basis (as in regular forward case), rather
than all buffers of a fragment chucked together.

Also refactor buffer handling some more, and add some debug.
2012-02-14 19:33:46 +01:00
Mark Nauwelaerts
2363490ef5 baseparse: really provide upstream ts to subclass 2012-02-14 19:33:33 +01:00
Wim Taymans
ebf502d1c6 Merge branch 'master' into 0.11 2012-02-14 10:35:06 +01:00
Mark Nauwelaerts
b761f5479a baseparse: modify API to a _finish_frame based approach
... which aligns it with other baseclass in the wild, and should give
converter parsers a bit cleaner freedom.
2012-02-13 18:41:00 +01:00
Mark Nauwelaerts
c8ea9994aa baseparse: fix reverse playback
... especially for all-keyframe (audio) cases.
2012-02-13 18:14:02 +01:00
Wim Taymans
5fbdd763bb Merge branch 'master' into 0.11 2012-02-10 15:03:03 +01:00
Mark Nauwelaerts
954dd59fdd baseparse: bitrate mechanics should not deal with duration update
... since that is already handled by _update_duration, or should not be done
altogether if the duration is determined by non-estimated means.

Fixes #669502.
2012-02-10 14:47:00 +01:00
Mark Nauwelaerts
a306518cee baseparse: clean up a few minor extraneous tokens 2012-02-08 15:38:28 +01:00
Mark Nauwelaerts
2aaa475a4f baseparse: remove closing segment handling 2012-02-08 15:38:07 +01:00
Olivier Crête
e234a10c63 Use macros to register boxed types thread safely 2012-01-28 16:42:38 +00:00
Wim Taymans
21455d35b1 tests: fix some more leaks 2012-01-27 12:52:01 +01:00
Tim-Philipp Müller
13d91d1f6c Use recent GLib API unconditionally now that we depend on the latest GLib 2012-01-22 01:25:22 +00:00
Wim Taymans
252327f87a Update for new gthread API 2012-01-19 09:27:04 +01:00
Tim-Philipp Müller
66d19b65fb Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	tools/gst-inspect.c
2012-01-13 00:22:03 +00:00
Antoine Tremblay
df6de8fe0c baseparse: clear adapter in reset so baseparse is reusable
GstBaseParse was not clearing its adapter on reset causing
problems when a pipeline went for example from PLAYING to NULL
state and then back to PLAYING again. The data from the last
stream would be used in the parser.

https://bugzilla.gnome.org/show_bug.cgi?id=667444
2012-01-12 19:53:11 +00:00
Wim Taymans
9540014d2e baseparse: turn assert into a real error
Post a real error instead of just asserting.
2012-01-02 15:42:46 +01:00
Tim-Philipp Müller
c61b2ade7b index: rename GstAssocFlags to GstIndexAssociationFlags
Just in case we resurrect this later.
2011-12-30 18:32:59 +00:00
Tim-Philipp Müller
be04f3945c index: remove GstIndex and GstIndexFactory for now
There are many good use cases for GstIndex and we want
to add it back again in some form, but possibly not with
the current API, which is very powerful (maybe too powerful),
but also a bit confusing. At the very least we'd need to
make the API bindings-friendly.
2011-12-30 18:32:57 +00:00
Tim-Philipp Müller
f6a4af20b2 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	libs/gst/base/gstbasetransform.c
	libs/gst/controller/gstinterpolationcontrolsource.c
	libs/gst/controller/gstlfocontrolsource.c
	plugins/elements/gstfilesrc.c

Dit not merge controller or basetransform changes.
2011-12-25 11:58:12 +00:00
Matej Knopp
f4040d3f6b baseparse: Clear queued frames with other queues 2011-12-12 13:37:25 +01:00
Tim-Philipp Müller
eaa2d81474 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst/gstindexfactory.c
	libs/gst/base/gstbasetransform.c
	plugins/elements/gstfakesink.c
	plugins/elements/gstfakesrc.c
	plugins/elements/gstidentity.c
	plugins/elements/gstinputselector.c
	plugins/elements/gstoutputselector.c

Note: did not merge any of the basetransform changes from 0.10.
2011-12-08 00:39:10 +00:00
Vincent Penquerc'h
e7b3305f70 baseparse: do not use a byte value instead of a time value when bisecting
This fixes FLAC seeking on some FLAC files.
2011-12-07 17:57:49 +00:00