Wim Taymans
ba6b915651
base: avoid using buffer caps
...
Comment all code using buffer caps.
Rework capsfilter code a little.
Fix some unit tests
2011-05-08 12:46:17 +02:00
Tim-Philipp Müller
dccde2652f
baseparse: don't post loads of empty taglists
...
Only post bitrate updates if there's something to post, don't
post empty taglists if nothing changed.
2011-05-06 23:44:15 +01:00
Wim Taymans
02e5feb2bf
pad: avoid using the old GST_PAD_CAPS
...
Don't use GST_PAD_CAPS but instead use the new gst_pad_get_current_caps()
method.
Avoid setting caps on buffers.
2011-05-06 19:04:54 +02:00
Wim Taymans
5f06f3b0ae
check: let the normal code unset caps
2011-05-06 17:39:08 +02:00
Wim Taymans
fb3da828e5
element: rename gst_element_lost_state_full()
...
Rename gst_element_lost_state_full() to gst_element_lost_state() and
remove the old method name.
2011-05-06 12:19:16 +02:00
Sebastian Dröge
0069dc08ec
basetransform: Don't get the parent twice in the setcaps function
2011-05-05 18:21:21 +02:00
Sebastian Dröge
aebe4a3c13
basetransform: In getcaps() prefer the caps order and caps of downstream if possible
2011-05-05 15:22:08 +02:00
Sebastian Dröge
a6c1cbe69a
basetransform: Prefer caps order given by the subclass of the template caps order
2011-05-05 15:20:10 +02:00
Sebastian Dröge
07f59f5404
basesrc: Use the reconfigure flag on the pad instead of the event
2011-05-05 15:20:02 +02:00
Sebastian Dröge
1cc95da945
basetransform: Use new reconfigure flag on the pads instead of the reconfigure event
2011-05-05 15:19:56 +02:00
Sebastian Dröge
0179530bf1
basesrc: Only renegotiate once after receiving a renegotiate event
...
Also make this threadsafe.
2011-05-05 15:04:16 +02:00
Thiago Santos
93904ef3ad
basesrc: Handle the new renegotiate event
...
Makes basesrc handle the new renegotiate event by using a
renegotiate flag.
2011-05-05 15:03:54 +02:00
Sebastian Dröge
24cef7aa2f
basetransform: Also call gst_base_transform_reconfigure() on renegotiate events
2011-05-05 15:02:56 +02:00
Thiago Santos
3baed25383
basetransform: Handle the new renegotiate event
...
Let basetransform push a renegotiate event upstream
when it gets a new suggestion
2011-05-05 15:02:46 +02:00
Wim Taymans
c4751ec8c1
Revert "context: use context on buffers instead of caps"
...
This reverts commit 9ef1346b1f
.
Way to much for one commit and I'm not sure we want to get rid of the pad caps
just like that. It's nice to have the buffer and its type in onw nice bundle
without having to drag the complete context with it.
2011-05-05 13:17:08 +02:00
Sebastian Dröge
de5ce36dd1
basetransform: Remove nowadays unused and uninitialized setcaps variable
2011-05-05 12:28:02 +02:00
Sebastian Dröge
65eafd9340
Merge branch 'master' into 0.11
...
Conflicts:
docs/gst/gstreamer-sections.txt
gst/gstelementfactory.c
gst/gstminiobject.c
2011-05-05 12:27:51 +02:00
Wim Taymans
9ef1346b1f
context: use context on buffers instead of caps
...
Put the srcpad context on buffers instead of caps. This allows us to associate
all the relevant info contained in events with a buffer.
2011-05-04 18:59:47 +02:00
Stefan Kost
511f556915
docs: it its %TRUE (constant)
...
As spotted by Tim.
2011-05-03 14:01:57 +03:00
Stefan Kost
217b209aba
docs: add missing parameter docs
2011-05-03 13:03:21 +03:00
Stefan Kost
59670baf8e
docs: add docs for GstDPPacketizer
2011-05-03 13:03:20 +03:00
Wim Taymans
baebf253ad
transform: do pad_alloc fallback correctly
2011-04-29 13:42:57 +02:00
Wim Taymans
6ab7e6c15d
Remove pad_alloc, this can now be done better
...
Remove pad_alloc and all references. This can now be done more efficiently and
more flexible with the ALLOCATION query and the bufferpool objects. There is no
reverse negotiation yet but that will be done with an event later.
2011-04-29 13:26:19 +02:00
Josep Torra
5ccda2f8f4
Small cosmetic cleanups
...
Make sure the return values from g_return_* are of the right type.
2011-04-25 11:10:47 +02:00
Wim Taymans
070cdaab7c
Merge branch 'master' into 0.11
2011-04-25 10:30:41 +02:00
Thiago Santos
0253c85b0d
basetransform: fix negotiation regression
...
Fixup patch for 83597767b1
Use a separate variable for knowing if a pad alloc has been made
instead of checking for the flow return that might not be the
result of the pad alloc
https://bugzilla.gnome.org/show_bug.cgi?id=648220
2011-04-21 14:04:49 +01:00
Wim Taymans
24bb414035
Merge branch 'master' into 0.11
...
Conflicts:
configure.ac
2011-04-19 16:21:15 +02:00
Havard Graff
38dcd41b97
basetransform: don't unref trans until the function is done using it
...
trans->priv->force_alloc = FALSE would crash if the ref held is the last
https://bugzilla.gnome.org/show_bug.cgi?id=648215
2011-04-19 15:09:14 +01:00
Tim-Philipp Müller
b35d54dcd1
baseparse: don't deadlock when setting external index
...
Protect index with its own lock. gst_index_get_writer_id() may take
the object lock internally (the default resolver, GST_INDEX_RESOLVER_PATH,
will anyway), so if we're using that to protect the index as well,
we'll deadlock.
https://bugzilla.gnome.org/show_bug.cgi?id=646811
2011-04-19 13:05:53 +01:00
Tim-Philipp Müller
c364539620
baseparse: make fmtlist constant
2011-04-19 11:51:30 +01:00
Sebastian Dröge
1cff66d587
base{sink,src}: Don't try to fixate ANY caps
2011-04-19 11:45:36 +02:00
Sebastian Dröge
100bdfb01c
net: Use G_DEFINE_TYPE instead of GST_BOILERPLATE
2011-04-19 11:45:36 +02:00
Sebastian Dröge
7da7494adc
base: Use G_DEFINE_TYPE instead of GST_BOILERPLATE
2011-04-19 11:45:36 +02:00
Tim-Philipp Müller
94c0bc74ce
docs: remove reference to baseparse API that didn't make it
2011-04-16 15:20:08 +01:00
Sebastian Dröge
caaf5ad528
Merge branch 'master' into 0.11
2011-04-16 16:06:02 +02:00
Sebastian Dröge
9b90d3d9c0
base: Update docs to say class_init instead of base_init
...
And remove a useless base_init in basesrc
2011-04-16 15:59:40 +02:00
Sebastian Dröge
64f6a18bad
net: Use G_DEFINE_TYPE
2011-04-16 15:59:40 +02:00
Tim-Philipp Müller
0bb5b6e435
libs: gobject-introspection scanner doesn't need to scan or update plugin info
...
Make sure the scanner doesn't load or introspect or check any plugins,
(especially not outside the build directory).
2011-04-16 10:45:16 +01:00
Tim-Philipp Müller
62d0001c84
libs: make sure gobject-introspection scanner calls gst_init()
...
https://bugzilla.gnome.org/show_bug.cgi?id=647922
2011-04-16 10:33:53 +01:00
Sebastian Dröge
8bfdd8c817
Merge branch 'master' into 0.11
2011-04-16 09:33:06 +02:00
Sebastian Dröge
f51a23a83c
Merge branch 'master' into 0.11
2011-04-16 08:59:58 +02:00
Tim-Philipp Müller
886246661f
baseparse: expose gst_base_parse_frame_free() for completeness
...
API: gst_base_parse_frame_free()
2011-04-15 19:07:55 +01:00
Tim-Philipp Müller
84a92464cf
baseparse: init frames on the stack with gst_base_parse_frame_init()
...
Frames must now be inited this way, can't just zero them
out and use them.
2011-04-15 18:52:18 +01:00
Tim-Philipp Müller
127df9a586
baseparse: more debug logging, minor clean-up
...
Trace frames, split out code to queue a frame for later.
2011-04-15 18:38:46 +01:00
Tim-Philipp Müller
8fe1924678
baseparse: change gst_base_parse_frame_init() to not take a GstBaseParse argument
2011-04-15 18:00:21 +01:00
Tim-Philipp Müller
e8ccbf4ca9
baseparse: make GstBaseParseFrame handling more bindings-friendly
...
Change semantics of gst_base_parse_push_frame() and make it take
ownership of the whole frame, not just the frame contents. This
is more in line with how gst_pad_push() etc. work. Just transfering
the content, but not the container of something that's not really
known to be a container is hard to annotate properly and probably
won't work. We mark frames allocated on the stack now with a private
flag in gst_base_parse_frame_init(), so gst_base_parse_frame_free()
only frees the contents in that case but not the frame struct itself.
https://bugzilla.gnome.org/show_bug.cgi?id=518857
API: gst_base_parse_frame_new()
2011-04-15 17:50:46 +01:00
Tim-Philipp Müller
37d7857e18
baseparse: register boxed type for GstBaseFrameParse
...
To make this usable for bindings.
https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-15 17:47:22 +01:00
Robert Swain
223a1f62be
baseparse: Remove unused but set variable
...
GCC 4.6.0 spits warnings about these.
2011-04-15 10:53:56 +02:00
Ole André Vadla Ravnås
e7bf5484c7
base: Fix pad callbacks so they handle when parent goes away
...
1) We need to lock and get a strong ref to the parent, if still there.
2) If it has gone away, we need to handle that gracefully.
This is necessary in order to safely modify a running pipeline. Has been
observed when a streaming thread is doing a buffer_alloc() while an
application thread sends an event on a pad further downstream, and from
within a pad probe (holding STREAM_LOCK) carries out the pipeline plumbing
while the streaming thread has its buffer_alloc() in progress.
2011-04-13 17:39:05 +02:00
Wim Taymans
62329c606a
baseparse: port to 0.11
2011-04-11 10:53:39 +02:00
Wim Taymans
6be4dbdb5a
Merge branch 'master' into 0.11
...
Conflicts:
android/base.mk
android/controller.mk
android/dataprotocol.mk
android/elements.mk
android/gst-inspect.mk
android/gst-launch.mk
android/gst-plugin-scanner.mk
android/gst.mk
android/indexers.mk
android/net.mk
win32/common/libgstbase.def
2011-04-11 10:26:54 +02:00
Alessandro Decina
3f1ef2255a
android: make it ready for androgenizer
...
Remove the android/ top dir
Fixe the Makefile.am to be androgenized
To build gstreamer for android we are now using androgenizer which generates the needed Android.mk files.
Androgenizer can be found here: http://git.collabora.co.uk/?p=user/derek/androgenizer.git
2011-04-11 01:08:07 +02:00
Tim-Philipp Müller
d353ddf38e
docs: minor fixes for baseparse docs
...
Class vfunc references still aren't right, no idea what
the correct markup for those is.
2011-04-09 23:02:50 +01:00
Tim-Philipp Müller
2401fe36fd
baseparse: minor variable name clean-up
2011-04-08 19:07:02 +01:00
Tim-Philipp Müller
9d98c62f0e
baseparse: rename _set_frame_props() to _set_frame_rate()
...
Seems like the best fit to what it does, and is shorter than
set_frame_properties() which might also have been confusing
because of GstBaseParseFrame.
https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:58 +01:00
Tim-Philipp Müller
5073948380
baseparse: replace format flags with gst_base_parse_set_{passthrough,syncable,has_timing_info}
...
This is more in line with e.g. GstBaseTransform's API, and makes for nicer
to read code. No getters for now since I don't see any use case for them,
the API is for subclasses, which usually know what format they're
dealing with already and hence know what they've set.
https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:58 +01:00
Tim-Philipp Müller
1874d63808
baseparse: make DRAIN and SYNC flags on baseparse, not the frame, and change to DRAINING and LOST_SYNC
...
The first because it seems a better fit conceptually, the second
to express booleanness. Also change the accessor macros for subclasses
to GST_BASE_PARSE_DRAINING and GST_BASE_PARSE_LOST_SYNC.
https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:58 +01:00
Tim-Philipp Müller
242e077e46
baseparse: add some padding to GstBaseParseFrame
...
Esp. since it's usually allocated on the stack.
https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller
99014adcae
baseparse: fix typo in docs for GST_BASE_PARSE_FORMAT_FLAG_PASSTHROUGH
...
https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller
251dfa402c
baseparse: use GQueue instead of GList for queued frames
...
and make buffer metadata writable before setting caps on queued
buffer.
https://bugzilla.gnome.org/show_bug.cgi?id=646341
2011-04-08 15:44:57 +01:00
Zaheer Abbas Merali
783dbb9a71
baseparse: add GST_BASE_PARSE_FLOW_QUEUED to queue buffers until caps are known
...
This is useful for parser like flacparse or h264parse which may need to process
some buffers before they can construct the final caps, in which case they may
want to delay pushing the initial buffers until the full and proper caps are
known.
https://bugzilla.gnome.org/show_bug.cgi?id=646341
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller
22b7dfc800
baseparse: add to docs and fix up gtk-doc markup a little
...
And add Since markers.
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller
4709a26473
baseparse: replace set_seek() with _set_average_bitrate() and FLAG_SYNCABLE
...
This makes more sense conceptually, since the bitrate may be used
to estimate a seek position if there's no seek table or just for
duration reporting/estimation if we can't seek. Also, even if the
format is not syncable, we could still seek by pushing data from the
start and using the segment to make downstream clip.
https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller
de16d5adb3
baseparse: rename GstBaseFormat to GstBaseFormatFlags and fix up associated API
...
Also change gst_base_parse_set_format(parse,flags,switch_on) to
gst_base_parse_set_format_flags(parse,flags) which is more in line
with the rest of our API and how the function is used.
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller
f691be223e
baseparse: don't expose GstAdapter in public header
...
None of the existing subclasses needs access to that, so there's
no reason to expose it for now.
https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller
e2bf3647f8
baseparse: move various segment-related members into the private instance struct
...
If none of the existing subclasses uses these, there's probably no
need to expose them at the moment. Keep the segment itself exposed
though.
https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller
b2a76895af
baseparse: remove unused GST_BASE_PARSE_{SINK,SRC}_NAME
...
https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller
9f1b9f1419
baseparse: re-indent header
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller
c88a143cb6
baseparse: fix up GType name and make _get_type() function thread-safe
...
Rename GType from GstBaseParseBad to GstBaseParse.
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller
20f29628aa
libs: add GstBaseParse which was moved from -bad
2011-04-08 15:44:57 +01:00
David Schleef
d6847fd4a1
baseparse: make_metadata_writable() fix
2011-04-08 15:44:56 +01:00
Tim-Philipp Müller
940a47ae09
baseparse: rename GType from GstAudioBaseParseBad to GstBaseParseBad
...
We use it for video as well now.
2011-04-08 15:44:56 +01:00
Stefan Kost
0774878e92
baseparse: trim trailing whitespace
2011-04-08 15:44:56 +01:00
Stefan Kost
e8f04e76b7
baseparse: use delta-unit flags instead of none
2011-04-08 15:44:56 +01:00
David Schleef
35a7228ed5
baseparse: update documentation for API changes
2011-04-08 15:44:56 +01:00
David Schleef
e57cb6b47a
baseparse: Create baseparse library
2011-04-08 15:44:56 +01:00
Havard Graff
3d833e42b6
basesrc: Make src query MT-safe
...
It is possible that the element might be going down while the event arrives
2011-04-08 14:58:41 +02:00
Sebastian Dröge
237e54d4fe
base: Unref events if the parent element disappeared
...
And also unref events if the basetransform subclass has no
event handler and the event is not forwarded at all.
2011-04-08 14:57:05 +02:00
Havard Graff
0daedb7409
base: Make upstream events MT-safe
2011-04-08 14:57:00 +02:00
Wim Taymans
5077630a99
Merge branch 'master' into 0.11
2011-04-07 16:13:56 +02:00
Sebastian Dröge
7945821f92
basesrc: Handle tag and custom downstream events the same
...
Especially drop tag events when flushing to not send them over
and over again.
Should've been in the last commit already but I forgot to call
git rebase --continue...
2011-04-07 10:48:04 +02:00
Sebastian Dröge
c7c3e46b08
bla
2011-04-07 10:40:16 +02:00
Sebastian Dröge
1d9cd86af6
basesrc: Send syncronized custom downstream/both events downstream from the streaming thread
...
Instead of just silently dropping them. The same was done for tag events
before already.
Fixes bug #635718 .
2011-04-07 10:29:41 +02:00
Wim Taymans
d1a7d54cb5
bytewriter: don't add NULL data
2011-03-31 18:39:57 +02:00
Wim Taymans
468ec5bc40
bufferlist: simplify bufferlists
...
We now have multiple memory blocks as part of the buffers and we can therefore
reduce the bufferlist to a simple array of buffers.
2011-03-31 17:51:02 +02:00
Wim Taymans
ebb14d95b2
buffer: more API tweaks
...
_trim -> _resize
_create_sub -> copy_region
2011-03-30 16:47:55 +02:00
Wim Taymans
a12ede3fb1
Merge branch 'master' into 0.11-fdo
...
Conflicts:
gst/gst.c
libs/gst/base/gstcollectpads.c
2011-03-28 20:11:20 +02:00
Wim Taymans
121b82ce27
buffer: fix subbuffers
2011-03-28 20:08:47 +02:00
Wim Taymans
826a7d83d4
buffer: more fixes
2011-03-28 20:08:47 +02:00
Wim Taymans
beac9c4a95
buffer: fix remaining unit tests
2011-03-28 20:08:46 +02:00
Wim Taymans
121ab46aa6
memory: remove memory metadata again
2011-03-28 20:08:46 +02:00
Wim Taymans
38ffe30745
memory: more work on implementing buffer memory
2011-03-28 20:08:46 +02:00
Wim Taymans
d82c8bd2af
memory: port code to new buffer data API
2011-03-28 20:08:45 +02:00
Arun Raghavan
bae67f116c
basesrc: Return FALSE if we don't handle an event
...
basesrc's default event handler returns TRUE regardless of whether the
event is handled or not. This fixes the handler to conform with the
expected behaviour (which is to only return TRUE when the event has
actually benn handled). gst_bin_do_latency_func() depended on this
(incorrect) behaviour, and is now modified as well.
(Remaining 1-liner change in gstbasesrc.c is to keep gst-indent happy)
2011-03-28 21:48:23 +05:30
Stefan Kost
02eda0e3d9
docs: cleanup and xref fixes
...
Deal with the hints from gtk-doc and fix the xrefs. Apply a work-around for ()
precedence over @. Move "MT Safe" text to doc body in many places. Trim eol
whitespaces.
2011-03-24 18:32:20 +02:00
Stefan Kost
71dcd52cc0
basesink: print flow return as a name in debug log
2011-03-24 18:32:20 +02:00
Edward Hervey
d979eb3e9e
basesrc: Keep downstream caps order when fixating
...
This allows use to use the first intersecting format prefered by downstream.
https://bugzilla.gnome.org/show_bug.cgi?id=617045
2011-03-24 12:30:42 -03:00
Edward Hervey
0f0a62f316
basetransform: Retain caps order when getting caps
...
If the element gave us caps in a specific order, let's retain that
by intersecting against the template but retaining the order given
by the element.
https://bugzilla.gnome.org/show_bug.cgi?id=617045
2011-03-24 11:47:32 -03:00
Tim-Philipp Müller
5300a5e73b
bytereader, bytewriter: fix up inline functions to make g++ happy
...
gstbytereader.h: In function ‘guint8* gst_byte_reader_dup_data_unchecked(GstByteReader*, guint)’:
gstbytereader.h:249:75: error: invalid conversion from ‘void*’ to ‘guint8*’
gstbytewriter.h: In function ‘gboolean _gst_byte_writer_ensure_free_space_inline(GstByteWriter*, guint)’:
gstbytewriter.h:196:75: error: invalid conversion from ‘void*’ to ‘guint8*’
https://bugzilla.gnome.org/show_bug.cgi?id=645595
2011-03-23 20:52:44 +00:00
Jason D. Clinton
a789096c04
build: fix build with -Werror with GCC 4.6.0
...
This touches three areas of code, removes unused variables and discards
return values from two functions with (void).
https://bugzilla.gnome.org/show_bug.cgi?id=645267
2011-03-21 09:29:19 +01:00
Wim Taymans
f505f778cc
pad: more preroll lock to basesink
...
Move the preroll lock to basesink where it belongs.
2011-03-04 17:25:02 +01:00
Wim Taymans
230c3455ac
Merge branch 'master' into 0.11
...
Conflicts:
gst/gstregistry.h
2011-03-02 11:08:34 +01:00
Tim-Philipp Müller
c71241d9dd
docs: typo fixes
...
convinience -> convenience
2011-02-28 15:01:54 +00:00
Wim Taymans
6c18c9508d
miniobject: more boxed type fixing
...
More miniobject fixing, leaks horribly somewhere..
2011-02-23 10:35:09 +01:00
Wim Taymans
1218511185
libs: cleanups for 0.11
...
Remove deprecated stuff, fix padding, rearrange methods.
2011-02-22 19:09:48 +01:00
Wim Taymans
0894ed2053
Merge branch 'master' into 0.11
2011-02-22 15:08:51 +01:00
Wim Taymans
238b9a57cc
Merge branch 'master' into 0.11
...
Conflicts:
configure.ac
gst/gstelement.c
gst/gstelement.h
gst/gstpad.c
gst/gstutils.c
libs/gst/base/Makefile.am
libs/gst/check/Makefile.am
libs/gst/controller/Makefile.am
libs/gst/dataprotocol/Makefile.am
libs/gst/net/Makefile.am
win32/common/libgstreamer.def
2011-02-22 14:11:59 +01:00
Thiago Santos
83597767b1
basetransform: Be smarter with pad allocs
...
Avoid doing unnecessary pad-allocs when on passthrough mode.
If multiple basetransform elements are on a pipeline, they
would do a pad-alloc for each received buffer, each element
would do this, so we would have lots of pad allocs on the
pipeline for a single buffer being pushed through it.
This patch attempts to reduce this amount by avoiding
doing pad-allocs if the element has already done it
after the last pushed buffer. So it will only be allowed
to do a new pad-alloc after it has pushed a buffer, so we get
1x1 pad-alloc and buffer ratio
https://bugzilla.gnome.org/show_bug.cgi?id=642373
2011-02-21 10:31:22 -03:00
Thiago Santos
3aaef921c5
basetransform: Check for pad alloc caps when suggestion is not fixed
...
If after computing the suggestion with downstream caps we still have
a non-fixed suggestion caps try to intersect with the input caps
of the pad alloc to avoid useless renegotiations.
https://bugzilla.gnome.org/show_bug.cgi?id=642130
2011-02-14 15:59:25 +01:00
Wim Taymans
f8828eace6
basesink: improve duration calculation
...
Keep track of the average distance between incomming timestamps and
use that to estimate the frame duration when buffers have no duration set on
them.
2011-02-14 15:17:45 +01:00
Wim Taymans
79665e8247
basesink: improve rate calculation
...
When there is no duration on input buffers, assume the rate is 1.0
instead of (the undefined) 0.0.
2011-02-14 15:17:44 +01:00
Wim Taymans
9661a713ba
basesink: improve average duration calculation
...
Improve the calculation of the duration. When we have no input duration set on
the input buffers stop is set to start and then we end up using a 0 duration in
the average calculation.
2011-02-14 15:17:44 +01:00
Wim Taymans
dc0120fe28
basesink: rename variable
...
Rename an internal variable to better reflact what its value means.
2011-02-14 15:17:44 +01:00
Wim Taymans
c8d1abdd00
basesink: fix some comments
2011-02-10 15:21:46 +01:00
Wim Taymans
d19f40c716
basesink: keep track of earliest QoS timestamp
...
Keep track of the earliest allowed timestamp according to the latest
QoS report and drop buffers before that time. Activate this filter
when throttling is enabled. We could later also activate this in the
other QoS cases.
See #638891
2011-02-10 15:21:46 +01:00
Wim Taymans
dad43fa004
basesink: use new QoS type
...
Use the new QoS type and send throttling QoS messages.
2011-02-10 15:21:46 +01:00
Wim Taymans
4ee5c61a2d
basesink: add property to configure a throttle-time
...
Add a property to configure the throttle time on a sink. The
property is not yet used.
See #638891
2011-02-10 15:21:45 +01:00
Mark Nauwelaerts
af13409798
net: use socklen_t where appropriate rather than specific type
...
In particular, fixes Cygwin build where socklen_t is defined as int
in line with native win32 api definition.
2011-01-31 18:55:21 +01:00
Stefan Kost
5cc2e6af79
nettimeprovider: handle invalid network addresses earlier
...
Handle inet_aton() return code.
2011-01-25 16:17:14 +02:00
Stefan Kost
7fc30f2d83
checks: add a comment to indicate that we intentionally leave out the 'break'
2011-01-25 16:17:14 +02:00
Stefan Kost
b6926d6707
docs: small controller api docs improvement
2011-01-25 16:17:14 +02:00
Tim-Philipp Müller
9382017b42
check: don't leak xml file name if GST_CHECK_XML is set
...
Spotted by nvineeth@gmail.com
2011-01-24 12:52:04 +00:00
Tim-Philipp Müller
a1581a5364
gobject-introspection: try harder to make g-ir-scanner use the right libgstreamer
...
Apply fix from libgstbase to all core libs now that we know that it
works. Should fix problems with g-ir-scanner using the wrong
(ie. system) libgstreamer, leading to linking errors such as
undefined reference to `gst_clock_single_shot_id_reinit'.
https://bugzilla.gnome.org/show_bug.cgi?id=637549
2011-01-18 09:04:51 +00:00
Tim-Philipp Müller
6c073ca2c7
gobject-introspection: another attempt to make g-i find the right libgstreamer
...
Turns out g-i puts the additional -L we specify at the end, helpfully.
https://bugzilla.gnome.org/show_bug.cgi?id=637549
2011-01-13 20:12:16 +00:00
Tim-Philipp Müller
d4407efd66
controller: update g-i include paths as well for header changes
...
Hopefully makes Lucid and Maverick build bots happy again
2011-01-12 10:21:43 +00:00
Benjamin Otte
835bac05b9
controller: Fix headers to use < > in #include statements
...
The behavior of " " in include statements is implementation-defined -
see the C standard, section 6.10.2 or
http://stackoverflow.com/questions/21593
2011-01-11 19:26:40 +01:00
Benjamin Otte
a9de00089e
gstnet: Fix --c-include for gir generation
...
Previously it was - probably due to copy/paste error - looking for
gstbase headers.
It's changed now to only include the one public header for gstnet.h
2011-01-11 19:16:43 +01:00
Tim-Philipp Müller
1ae28ed41c
gobject-introspection: make g-ir-scanner try harder to find the right libgstreamer
...
It's not quite clear to me why g-ir-scanner doesn't get this info from
the pkg-config file, nor why libtool doesn't get it from the .la.
https://bugzilla.gnome.org/show_bug.cgi?id=637549
2011-01-11 14:41:27 +00:00
Wim Taymans
5c479aa3a4
basesrc: make sure we wait and release the live lock
...
Make sure we release the live lock and wait in all cases when we need to wait
for the playing or flushing state change.
Fixes #635785
2011-01-10 13:30:05 +01:00
Tim-Philipp Müller
655451db54
basesrc, basesink: add some FIXMEs for the type of the blocksize property
2011-01-02 16:59:18 +00:00
Wim Taymans
e444ffecf7
basesrc: fix deadlock
...
Only go into LIVE_WAIT when the are not live_running and only stop waiting when
live_running is TRUE. If we don't loop, we could deadlock when called from
outside of basesrc, such as baseaudiosrc.
Fixes #635785
2010-12-29 11:48:18 +01:00
Wim Taymans
ef44d4b539
basesink: also preroll async=false sinks
...
Also preroll async=false sinks after a flush.
2010-12-28 16:23:32 +01:00
Wim Taymans
041d33e5f5
basesink: fix typo
2010-12-21 10:35:40 +01:00
Edward Hervey
bf41fb056a
base: documentation fixups and annotation
2010-12-17 19:19:40 +01:00
Edward Hervey
5372e81c9a
basesrc: Use an atomic integer instead of a lock for checking tags presence
...
https://bugzilla.gnome.org/show_bug.cgi?id=636455
2010-12-17 10:59:25 +01:00
Sebastian Dröge
0a74684b41
basetransform: Handle downstream giving a buffer with new caps but invalid size
...
This can happen for example when downstream proposed new caps, later proposed
the previous caps again which in turn enables passthrough mode in upstream
elements and the wrong-sized buffer appears in an element where the caps
change never happened. Simply allocate a new buffer in this case.
See bug #635461 .
2010-12-16 10:58:33 +01:00
Wim Taymans
6da39bf508
basesink: improve last_stop calculation
...
Only update the last_stop value when we had a valid stop position for the
clipping or else the clipping code assumes the stop position extends to the end
of the segment, which makes the position reporting return weird values.
2010-12-14 19:00:14 +01:00
Wim Taymans
4fd63f0ce2
basesink: fix object type handling in queued preroll
...
Factor out the method to get the object type.
When preroll-queue-len > 0, use the right object type instead of ignoring
buffer-lists.
2010-12-14 15:54:41 +01:00
Edward Hervey
c62c009d7e
libs: Fix GIR build for srcdir != builddir
2010-12-11 10:10:04 +01:00
Stefan Kost
1de8b60034
docs: fix wrong use of Since: keyword
2010-12-08 12:17:35 +02:00
Tim-Philipp Müller
686b16756d
docs: libgstbase: more gobject introspection annotations
...
Many of these are superfluous and were added for clarity.
2010-12-07 18:37:04 +00:00
Wim Taymans
b2ab72b916
pad: remove get_caps_reffed variants
...
Make the _get_caps functions behave like the _get_caps_reffed variants and
remove the _reffed variants. This means that _get_caps doesn't return a writable
caps anymore and an explicit _make_writable() is needed before modifying the
caps.
2010-12-07 18:14:38 +01:00
Wim Taymans
ce0355e6d0
Merge branch 'master' into 0.11
2010-12-07 15:53:56 +01:00
Edward Hervey
d1eb8a14c5
libs: Add -I$(top_srcdir)/libs to g-ir-scanner commands
...
Without this, it will fail finding all headers.
2010-12-07 13:19:10 +01:00
Wim Taymans
d1c3840eba
libs: remove deprecated code
2010-12-06 19:40:03 +01:00
Wim Taymans
99775e5271
more 0.10 -> 0.11
2010-12-06 13:21:45 +01:00
Edward Hervey
27c0bc93b7
basesink: Don't forget to unref the cached ClockId
2010-12-05 15:58:48 +01:00
Edward Hervey
4525a405d5
gstcheck: Don't check pad refcount too early
...
Because of the new pad caching system, the peer pad might still
have a reference on a pad. We therefore delay the refcount checking
til 'after' we unlink the pad from any potential peer.
2010-12-05 14:46:28 +01:00
Edward Hervey
01039b1671
gstdataqueue: Don't break ABI
...
The order of the field was wrong, and the size of the structure didn't
end up being the same.
2010-12-02 19:44:41 +01:00
Wim Taymans
a813aad0ac
basesink: rework position reporting code
...
Unify the different position reporting code paths to make it more
understandable.
Use start_time to get more accurate position reporting in paused.
Fix unit tests for more accurate reporting.
2010-12-02 19:10:46 +01:00
Wim Taymans
79570f49dc
basesink: perform wait_preroll in a while loop
...
We need to continue calling wait_preroll() as long as the need_preroll variable
is true.
2010-12-02 19:10:45 +01:00
Wim Taymans
9076d5688f
basesink: also preroll after a flush with async=false
...
Make sure to preroll after a flush even when we are async=false.
Add unit test.
Fixes #634965
2010-12-02 19:10:45 +01:00
Wim Taymans
19e5a54c9f
adapter: improve docs a little.
2010-12-02 19:10:45 +01:00
Edward Hervey
ece40dacbc
basesink: Re-using GstClockID instead of constantly recreating one
...
Makes _sink_wait_clock at least 2 times faster.
https://bugzilla.gnome.org/show_bug.cgi?id=632778
2010-12-02 19:04:56 +01:00
Edward Hervey
7115b77aab
basesink: Pass along miniobject type through various functions
...
Avoids doing useless GST_IS_*
https://bugzilla.gnome.org/show_bug.cgi?id=632778
2010-12-02 19:04:56 +01:00
Edward Hervey
606e59468d
basesink: Switch enable_last_buffer to an atomic int
...
Avoids having to take a lock to read/write it.
https://bugzilla.gnome.org/show_bug.cgi?id=632778
2010-12-02 19:04:56 +01:00
Edward Hervey
7cc08390b9
gstdataqueue: Only emit g_cond_signal when needed
...
Keep track of which cond we're waiting for and only emit when needed.
https://bugzilla.gnome.org/show_bug.cgi?id=632779
2010-12-02 19:04:55 +01:00
Evan Nemerson
4906671694
introspection: Include exported packages information in GIRs
...
https://bugzilla.gnome.org/show_bug.cgi?id=635389
2010-11-21 00:36:30 +00:00
Jonathan Matthew
754c3038be
basetransform: use input position for queries if we have no output position
2010-10-29 15:45:04 +02:00
Wim Taymans
ce919c0573
basetransform: fix reverse negotiation
...
When the downstream element suggests a new format, pass the suggestion
upstream if we can't convert to it.
Fixes #633147
2010-10-29 12:03:48 +01:00
Tim-Philipp Müller
07755fd5ee
bytereader: const-ify byte reader argument in peek/scan API
...
Because we can.
2010-10-22 12:04:09 +01:00
Mark Nauwelaerts
21c5064783
basesink: recompute correct running time for buffer ending flushing step
...
Prevents delaying/hanging when resuming PLAYING.
Fixes #632433 .
2010-10-20 18:46:39 +02:00
Tim-Philipp Müller
b0d7c61f18
docs: fix misc. gtk-doc warnings in libs
...
(for gtk-doc 1.15)
2010-10-16 19:19:47 +01:00
Tim-Philipp Müller
1d9fbd1a7c
Revert "libs/gst/dataqueue: Document gst_data_queue_new_full"
...
This reverts commit 80727c1177
.
This doesn't make sense. gst_data_queue_new_full() is already
documented above. And we need the doc blurb for _new() here.
2010-10-16 18:30:18 +01:00
Tim-Philipp Müller
5b25761f29
docs: add some gtk-doc Since: markers
...
Add some gtk-doc Since: markers, fix one Since: marker,
fix typo.
2010-10-16 16:53:49 +01:00
Edward Hervey
80727c1177
libs/gst/dataqueue: Document gst_data_queue_new_full
2010-10-13 12:07:56 +02:00
Edward Hervey
906ae99742
base/gstdataqueue: inline some functions, get levels with memcpy.
2010-10-13 12:07:17 +02:00
Stefan Kost
ad2e7b1de3
docs: use the gtk-doc shortcuts to get coloured and xrefed example
2010-10-11 16:44:01 +03:00
Wim Taymans
428a6477d8
basesrc: tag as a SOURCE element
...
Tag all elements deriving from the basesrc with the IS_SOURCE flag.
2010-10-11 11:16:27 +02:00
Sebastian Dröge
14023fff89
basetransform: Report the output position on POSITION queries on the srcpad
...
There can be a difference between input and output last_stop.
Fixes bug #629410 .
2010-10-10 18:18:23 +02:00
Sebastian Dröge
894f833da9
bytewriter: Add missing file
2010-10-08 12:48:42 +02:00
Sebastian Dröge
69ef479ce4
bytewriter: Add unchecked variants of the writing functions
...
These don't check if there's enough free space available and are
available as inline functions only.
API: gst_byte_writer_put_int8_unchecked
API: gst_byte_writer_put_int16_be_unchecked
API: gst_byte_writer_put_int16_le_unchecked
API: gst_byte_writer_put_int24_be_unchecked
API: gst_byte_writer_put_int24_le_unchecked
API: gst_byte_writer_put_int32_be_unchecked
API: gst_byte_writer_put_int32_le_unchecked
API: gst_byte_writer_put_int64_be_unchecked
API: gst_byte_writer_put_int64_le_unchecked
API: gst_byte_writer_put_uint8_unchecked
API: gst_byte_writer_put_uint16_be_unchecked
API: gst_byte_writer_put_uint16_le_unchecked
API: gst_byte_writer_put_uint24_be_unchecked
API: gst_byte_writer_put_uint24_le_unchecked
API: gst_byte_writer_put_uint32_be_unchecked
API: gst_byte_writer_put_uint32_le_unchecked
API: gst_byte_writer_put_uint64_be_unchecked
API: gst_byte_writer_put_uint64_le_unchecked
API: gst_byte_writer_put_float32_be_unchecked
API: gst_byte_writer_put_float32_le_unchecked
API: gst_byte_writer_put_float64_be_unchecked
API: gst_byte_writer_put_float64_le_unchecked
API: gst_byte_writer_put_data_unchecked
API: gst_byte_writer_fill_unchecked
2010-10-08 12:19:45 +02:00
Tim-Philipp Müller
9bd4432d08
controller, dataprotocol: make public enum _get_type() functions thread-safe
...
Not that it is likely to matter in practice, but since these are public
API they should probably be thread-safe.
2010-10-08 09:34:47 +01:00
Tim-Philipp Müller
c7e3bab65d
dataprotocol, lfocontrolsource: fix enum value name in enums that are public API
...
So run-time bindings can introspect the names correctly (we abuse this
field as description field only in elements, not for public API
(where the description belongs into the gtk-doc chunk).
https://bugzilla.gnome.org/show_bug.cgi?id=629946
2010-10-08 09:28:21 +01:00
Sebastian Dröge
3ee6ae4030
bytewriter: Fix possible infinite loop caused by an overflow
2010-10-08 09:47:12 +02:00
Tim-Philipp Müller
3adac1b9cd
lfocontrolsource: use math-compat.h for M_PI
2010-10-05 18:31:58 +01:00
Stefan Kost
a11b047d00
basesink: don't take preroll-lock in get_property
...
Use atomic ops to read and write more properties. Taking the preroll lock in get_property
can lock up applications reading the property during preroll.
2010-10-05 12:30:34 +03:00
Stefan Kost
72e9834e88
basesink: add a fixme for 0.11
2010-10-05 12:29:19 +03:00
Wim Taymans
c9c9894552
basesink: format negative values better
...
Format negative values properly in the debug log.
2010-10-04 15:56:59 +02:00
Sebastian Dröge
f758e465c8
bytewriter: Add inline variants of all important functions
2010-10-03 23:32:06 +02:00
Sebastian Dröge
dd762eb49f
bitreader: Add inlined and unchecked versions of the important functions
...
API: gst_bit_reader_skip_unchecked
API: gst_bit_reader_skip_to_byte_unchecked
API: gst_bit_reader_get_bits_uint16_unchecked
API: gst_bit_reader_get_bits_uint32_unchecked
API: gst_bit_reader_get_bits_uint64_unchecked
API: gst_bit_reader_get_bits_uint8_unchecked
API: gst_bit_reader_peek_bits_uint16_unchecked
API: gst_bit_reader_peek_bits_uint32_unchecked
API: gst_bit_reader_peek_bits_uint64_unchecked
API: gst_bit_reader_peek_bits_uint8_unchecked
This alone makes flacparse about 3 times faster.
2010-10-03 15:32:41 +02:00
Sebastian Dröge
10c18151d2
bytewriter: Add guards to the inlined get_pos/get_remaining/get_size/etc functions
2010-10-03 15:32:41 +02:00
Sebastian Dröge
c41c2f7964
bitreader: Optimize peek_bits/get_bits a bit
...
Use local variables instead of dereferencing the bitreader
pointer all the time and don't copy the reader for peek_bits.
2010-10-03 15:32:41 +02:00
Wim Taymans
29e23e9142
basesink: improve adjust_time()
...
Add some more comments.
Make sure we don't end up with negative timestamps.
2010-09-24 12:22:33 +02:00
Havard Graff
54a5871434
basesink: renderdelay needs to be subtracted in adjust_time()
...
latency is already sink-latency + render-delay, and here we only
want to deal with the sink-latency.
Fixes #630436
2010-09-24 12:16:48 +02:00
Havard Graff
51d20158be
basetransform: Make a WARNING into a DEBUG statement
...
Fixes bug #630437 .
2010-09-23 21:55:04 +02:00
Wim Taymans
90d65cb446
basetransform: avoid useless memcpy
...
Because of the awkward refcounting in prepare_output_buffer, we might end up
with writable buffers that point to the same data. Check for those cases so that
we avoid a useless memcpy and keep valgrind quiet.
Fixes #628176
2010-09-23 18:23:39 +02:00
David Schleef
9dbe690f72
adapter: Add check for pattern bits not in mask
2010-09-18 19:29:09 -07:00
Wim Taymans
1afaa1680f
adapter: add function to get a list of buffers
...
Add a function to retrieve a list of buffers containing the first N bytes from
the adapter. This can be done without a memcpy and should make it possible to
transfer the list to a GstBufferList later.
2010-09-17 17:35:41 +02:00
Wim Taymans
a144882871
adapter: reuse more data in _peek()
...
Optimize _peek() some more by reusing already assembled data when we can.
2010-09-17 15:07:50 +02:00
Wim Taymans
961e2029db
adapter: optimize _take() a little more
...
When we have already assembled some data before, reuse this data and only copy
the part that is new.
2010-09-17 13:57:39 +02:00
Wim Taymans
fc4caf55c9
adapter: refactor adapter take
...
Move some common code into one place
2010-09-17 12:48:55 +02:00
Wim Taymans
1dde3cb440
adapter: add support for 0 sized buffers
...
Add support for 0 sized buffers. This is interesting in combination with the
timestamp functions.
Fixes #629553
2010-09-17 12:40:12 +02:00
Jeffrey S. Smith
4375e998ee
Fix casts in a bunch of inline functions to maintain correct const-ness
...
Make code including GStreamer headers compile with -Wcast-qual by
maintaining const-ness when casting. Also fix function signature of
gst_byte_writer_set_pos(): the byte writer should not be marked as
const.
https://bugzilla.gnome.org/show_bug.cgi?id=627910
2010-09-02 00:09:08 +01:00
Tim-Philipp Müller
f9204d5d70
build: use new AG_GST_PKG_CONFIG_PATH m4 macro from common
...
Sets up a GST_PKG_CONFIG_PATH variable for use in Makefile.am
(avoids trailing ':' in PKG_CONFIG_PATH used). A useful side
effect of this is also that the PKG_CONFIG_PATH environment
is now logged in the configure output.
2010-09-01 17:08:58 +01:00
Edward Hervey
8c2481dd57
check: Use g_strcmp0 instead of strcmp
...
Avoids segfaults when using NULL arguments.
2010-08-30 12:48:40 +02:00
Sebastian Dröge
2dfb0d2772
base: Stop using GST_FLOW_IS_FATAL()
...
And document the special handling of WRONG_STATE.
2010-08-27 16:59:09 +02:00
Wim Taymans
f8abf35000
basetransform: recover from invalid downstream suggestions
...
When we are handling a buffer and need to allocate an output buffer, handle the
case when downstream suggests us a format that we can't convert the input buffer
to. In that case, check if there is another format available downstream instead
of failing.
Fixes #621332 and see also #614296
2010-08-26 15:18:47 +02:00
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