Commit graph

4697 commits

Author SHA1 Message Date
Tim-Philipp Müller 5dc534c642 docs: it's its
The panda says no!
2009-08-31 17:00:17 +01:00
Mark Nauwelaerts 1b6da398fb registry: fill in elementfactory when registering element
elementfactory field is filled in by gst_element_base_class_init,
but it needs some info set on the element's type, so have it
available prior to class structure creation spinning up.
This affects elements that have a well-known/public type (e.g. pipeline)
and can be created by other means than gst_element_factory_make
(which will also fill in the element's factory).
2009-08-31 15:34:54 +02:00
Wim Taymans b0c1ebbd08 utils: use 128bits division on x86_64 2009-08-31 11:45:17 +02:00
Руслан Ижбулатов 4ad052fed7 systemclock: fix compilation of win32 code
Fixes #593460.
2009-08-29 11:32:21 +01:00
Wim Taymans d4012be469 bin: cache index
Cache the last index that was set with _set_index() and return this in the
_get_index() call.
Set the cached index on newly added elements.

Fixes #566881
2009-08-28 18:41:42 +02:00
Wim Taymans a3f9908266 element: better type checks
Add GST_CLOCK typecheck for _set_clock().
Allow setting NULL indexes on element (clear the current index)
Some whitespace fixes.
2009-08-28 18:36:45 +02:00
Wim Taymans a9095a2d73 element; whitespace fixes 2009-08-28 18:14:23 +02:00
Wim Taymans e54e5eb9bb systemclock: use preformance counters on windows
Based on clock implementation by Håvard Graff <havard.graff@tandberg.com>

Try to get the time on windows using the performance counters. These have a much
higher resolution and accuracy than the regular getcurrenttime(). Be careful to
fall back to regular getcurrenttime() or posix clocks when performance counters
are not available.
2009-08-28 17:02:30 +02:00
Wim Taymans 7c054f5f53 systemclock: fix indentation 2009-08-28 16:07:16 +02:00
Wim Taymans 378b1e30e7 utils: use shift instead of division
We can use a shift for scaling the denominator instead of a divide since the
denom is always positive. This avoids having the compiler generate code for the
different rounding rules when scaling negative values.
2009-08-28 15:32:26 +02:00
Wim Taymans 6cf8948663 utils: make inlining explicit 2009-08-28 13:45:38 +02:00
Wim Taymans d8911f269f utils: optimize for x86_64 with some inline asm
64bit x86 has native 64x64->128 bit multiply that we can use with some inline
assembler to speed up large multiplications.
Use bsr to find the number of leading zeros more efficiently.
2009-08-28 12:43:43 +02:00
Wim Taymans 0ef7a5af52 utils: factor out the leading zero count code 2009-08-28 12:33:37 +02:00
Wim Taymans 2b8d7a54cc utils: pass correction factor around
Pass the correction factor around to get rid of the enum, some code
and some branches.
2009-08-28 12:30:41 +02:00
Wim Taymans 75e8e9eb42 utils: whitespace fixes 2009-08-28 12:21:28 +02:00
Wim Taymans 2b66b29355 utils: move common correction code in a macro 2009-08-28 12:19:34 +02:00
Sebastian Dröge a1ae8a3a3e iterator: Allow to use NULL as object for the single iterator 2009-08-26 16:51:32 +02:00
Sebastian Dröge b2cab40745 iterator: API: Add gst_iterator_new_single()
This allows "iteration" over a single object of some type,
which happens often for the GstPadIterIntLinksFunction for example.
2009-08-26 16:39:19 +02:00
David Schleef 6df1127daa It's __GNUC__, not _GNUC_
This appears to be an 8 year old bug.
2009-08-22 15:49:12 -07:00
Tim-Philipp Müller a01e5b8dca pluginfeature: add guard to gst_plugin_feature_type_name_filter
So we don't just crash if there's a refcounting bug somewhere else.
2009-08-20 11:55:44 +01:00
Sebastian Dröge 884467d493 gstpad: Add some DISABLE_DEPRECATED markers in the header too
The internal links function is deprecated since some time and
there already were GST_REMOVE_DEPRECATED markers in the source file,
now add them to the header too.

Fixes bug #592209.
2009-08-18 14:57:08 +02:00
Antoine Tremblay c87d551705 gstbin: Don't try to change children's state if they're already in the state we want
Fixes bug #368536.
2009-08-18 11:36:36 +02:00
Sebastian Dröge a0ed1a44a5 ghostpad: Always get the proxypad's ghostpad via the ghostpad in the src caps change notify handler
Before the signal handler would get the ghostpad passed as second
argument but it could've already been unreffed and destroyed.
This would then lead to crashes and all that.

Now we get the ghostpad from the proxy pad, which we get from the
target pad as it's peer.

Fixes bug #591318.
2009-08-18 11:33:17 +02:00
Kipp Cannon 9cfd9f9374 gstutils: API: Add rounding to nearest and next integer versions of the 64 bit integer scaling functions
The new functions are
gst_util_uint64_scale_int_round()
gst_util_uint64_scale_int_ceil()
gst_util_uint64_scale_round()
gst_util_uint64_scale_ceil()

Fixes bug #590919.
2009-08-13 16:32:28 +02:00
Kipp Cannon 61481c1b79 gstutils: Revert parts of last change to optimize the scaling functions again
Partially fixes bug #590919.
2009-08-13 16:32:28 +02:00
Sebastian Dröge 6a84be95be gstutils: Fix violations of strict-aliasing rules in gst_util_uint64_scale() 2009-08-13 16:32:27 +02:00
Kipp Cannon 3d359729af gstutils: Refactor gst_util_uint64_scale()
This will later make it possible to provide rounding versions
of it without much code duplication.

Partially fixes bug #590919.
2009-08-13 16:32:27 +02:00
Jonas Holmberg 824a0b5f5f bufferlist: update doc string 2009-08-11 15:21:33 +02:00
Sebastian Dröge 276a55fd24 gstsegment: Actually start==stop==segment_start is inside the segment
Still the old code was wrong as it claimed that start==stop<segment_start
would be inside the segment and returned insane clipping differences.
2009-08-11 13:21:35 +02:00
Sebastian Dröge ca8a0376c5 gstsegment: Clipping should detect start=stop<segment_start as outside the segment
Before it returned that [start,stop] is inside the segment and that the
difference between segment_start and start needs to be clipped. If the
clipping is done on a buffer (like in baseaudiosink) this will result
in the data pointer being at a invalid memory position.

Fixes bug #589849.
2009-08-11 12:59:13 +02:00
Edward Hervey 51bc185f7f gst: Remove dead assignments 2009-08-08 14:47:40 +02:00
Wim Taymans aa33db85cc gstbuffer: add additional checking for writability
Check for metadata writability when setting caps on buffer or when copying
metadata flags. Only enable these extra assertions in git versions.
This should help us find bad elements.
2009-08-06 18:47:32 +02:00
Tim-Philipp Müller 459c2b9c79 docs: fix Since: tag for new gst_caps_can_intersect() function 2009-08-06 14:11:46 +01:00
Stefan Kost 50fbc34f3f utils: use new _caps_can_intersect() 2009-08-06 15:30:34 +03:00
Stefan Kost aee208ff30 pad: use new _caps_can_intersect() 2009-08-06 15:30:33 +03:00
Stefan Kost 568202cb47 caps: add gst_caps_can_intersect()
Often we don't need the result of the intersection. Add a variant that only
tries to intersect. It can break out earlier and does less GValue copying.
API: gst_caps_can_intersect()
2009-08-06 15:30:33 +03:00
Stefan Kost baaf7e5319 caps: split callback for structure intersect into two functions
We call this separately. there is no much benefit in reusing the callback.
Splitting is let us remove a branch also.
2009-08-06 15:30:33 +03:00
Stefan Kost f5314ecae1 logging: log if we copy caps to be able to track it 2009-08-06 15:30:33 +03:00
Stefan Kost 24517c8975 caps: add comments about g_ptr_array size behaviour
Just explain the behaviour to avoid that someone else is wasting time trying to
improve this too.
2009-08-06 15:30:33 +03:00
Stefan Kost 12f9b39fac pad: use correct variable in test 2009-08-06 15:30:32 +03:00
Stefan Kost e4ee7831e3 registry: add filename to debug message, like elsewhere 2009-08-06 15:30:32 +03:00
Stefan Kost b01fb4d230 bin: fix compiler warning about unused var when disabling debug logging 2009-08-06 15:13:36 +03:00
Wim Taymans 950c70c8bb caps: add some more debugging in _replace 2009-08-06 10:52:12 +02:00
Wim Taymans 4146fa2eed pad: Add some more debugging 2009-08-06 10:52:05 +02:00
Wim Taymans 3b26e0c600 ghostpad: small improvements
Unref the target pad after we used it for debugging.
Add some more debug.
Only replace caps when they changed.
2009-08-06 10:51:54 +02:00
John Millikin 3e538b71fb taglist: Add support for ALBUM_ARTIST tag
The "album artist" tag is used when the artist of an entire
album differs from the artist of an individual track; for example,
when a "guest artist" appears on an album, or on compilations.

Fixes bug #590430.
2009-08-06 06:41:58 +02:00
Stefan Kost 1a44bd93d6 gstregistrybinary: add +1 after error checking
The current code made the error checking pointless by changing -1 to 0 in error
cases. Also don't leak a pad template on error.
2009-07-20 20:59:29 +03:00
Wim Taymans a78199ae5e task: fix taskpool leak
GstTaks does not always unref the taskpool it was created from because it
depends on when the pool provided an ID for joining the task.
Rework some code so that we always unref the pool and optionally join when the
pool provided an id.

Fixes #589127
2009-07-20 18:02:53 +02:00
Stefan Kost de1e991dec binaryregistry: don't unref NULL if we have an early read error 2009-07-20 11:06:22 +03:00
Tim-Philipp Müller 9459a93cb4 tags: only emit a g_warning() for empty tag strings for git versions
For now, don't show a g_warning() for empty tag strings and NULL
tags with non-git versions; we should wait for the fixes in our
plugin modules to make it into a release before we enable this
unconditionally.
2009-07-16 13:59:07 +01:00