Commit graph

6936 commits

Author SHA1 Message Date
Wim Taymans
82eb275ef9 query: copy structure in _add_allocation_meta()
Make gst_query_add_allocation_meta() take a copy of the passed caps instead of
taking ownership. This makes it easier for the caller in most cases because it
doesn't have to make a copy and deal with NULL values.
2012-07-10 10:31:00 +02:00
Wim Taymans
77bc2170f8 gst: add new flags 2012-07-10 10:11:57 +02:00
Matej Knopp
4afdef5586 miniobject: fix exclusive lock/unlock race 2012-07-10 09:46:36 +02:00
Stefan Sauer
f165a77fdc segment: also copy the segment flag
Fixes segmented seeks (as tested e.g. in the adder tests in base).
2012-07-09 22:16:46 +02:00
Tim-Philipp Müller
68a2eb5d18 gst: sprinkle some G_GNUC_INTERNAL for internal functions 2012-07-09 20:48:56 +01:00
Edward Hervey
94bd61b72d gstbin: collect and aggregate STREAM_START messages
when all sinks have posted a STREAM_START, the bin will forward a
new STREAM_START message to the parent bin or application
2012-07-09 20:31:45 +02:00
Edward Hervey
67b77667bb gstmessage: New GST_MESSAGE_STREAM_START
message counterpart to the GST_EVENT_STREAM_START event
2012-07-09 20:31:45 +02:00
Wim Taymans
5750f19712 docs: fix docs a little more 2012-07-09 16:28:22 +02:00
Wim Taymans
f362f643ac memory: Make GstAllocator a GstObject
Make GstAllocator a GstObject instead of a GstMiniObject, like bufferpool.
Make a new gstallocator.c file. Make a GstAllocator subclass for the default
allocator.
2012-07-09 16:28:22 +02:00
Wim Taymans
6e7c469b48 memory: remove unused macros 2012-07-09 16:28:22 +02:00
Wim Taymans
10f3adfd9d clock: make abstract
Make the GstClock type abstract.
Fix a horrible hack in the clock unit test.
2012-07-09 16:28:22 +02:00
Tim-Philipp Müller
f6e8786be8 toc: remove padding now that the structs are private 2012-07-09 13:15:46 +01:00
Tim-Philipp Müller
1ba0d6f6f6 toc: add gst_toc_dump() function for debugging
API: gst_toc_dump()
2012-07-09 13:12:27 +01:00
Tim-Philipp Müller
c0c79188ca bus, clock: make sure these never have a floating ref
Clear the initial floating ref in the init function for
busses and clocks. These objects can be set on multiple
elements, so there's no clear parent-child relationship
here. Ideally we'd just not make them derive from
GInitiallyUnowned at all, but since we want to keep
using GstObject features for debugging, we'll just do
it like this.

This should also fix some problems with bindings, which
seem to get confused when they get floating refs from
non-constructor functions (or functions annotated to
have a 'transfer full' return type). This works now:

from gi.repository import GObject, Gst

GObject.threads_init()
Gst.init(None)

pipeline=Gst.Pipeline()
bus = pipeline.get_bus()
pipeline.set_state(Gst.State.NULL)
del pipeline;

https://bugzilla.gnome.org/show_bug.cgi?id=679286
https://bugzilla.gnome.org/show_bug.cgi?id=657202
2012-07-09 13:09:45 +01:00
Tim-Philipp Müller
93a2b6e9b3 value: use datetime serialise/deserialise functions for datetimes
This re-uses existing code and makes sure we properly serialise
and deserialise datetimes where not all fields are set (thus
fixing some warnings when serialising such datetimes).
2012-07-07 22:46:00 +01:00
Tim-Philipp Müller
8e7bc47ccd datetime: do our own serialisation so we can serialise microseconds as well
We still don't do that in _to_iso8601_string() though, since
this will probably mostly be used in tags, where it doesn't
matter so much and the microsecond argument might not be
well-received by some tag readers.
2012-07-07 22:43:33 +01:00
Tim-Philipp Müller
853e2bf67f datetime: when deserialising parse microseconds if available 2012-07-07 22:32:40 +01:00
Tim-Philipp Müller
dcc9941931 datetime: fix second parsing failure case when deserialising datetime
When we fail to parse the number of seconds, reset the value to -1
instead of passing some error value as seconds. Also, we can still
try to parse timezone information.
2012-07-07 19:05:55 +01:00
Sebastian Rasmussen
73ab9d17e3 gstinfo: Add destroy notify arguments to debug stubs
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=679535
2012-07-07 13:39:25 +01:00
Sebastian Rasmussen
aab5b579a8 gststructure: Set lcopy string const exactly as glib's macro
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=679534
2012-07-07 13:32:41 +01:00
Wim Taymans
408df31a48 memory: expose the GstAllocation structure
Expose the GstAllocation structure and provide an _init function. This makes it
easier to make 'subclasses' of the allocator that contain more info.
It also allows us to expose the flags on the allocator miniobject.
Make a flag to note that the allocator uses a custom alloc function.
2012-07-06 17:24:32 +02:00
Edward Hervey
d2627a158e structure: Demote WARNING to INFO
It is common to use gst_structure_get() to know if a field is present
or not.
2012-07-06 12:48:44 +02:00
Wim Taymans
3f80cb272e query: use more generic structure for meta params 2012-07-06 11:49:47 +02:00
Wim Taymans
8bca7537e6 query: make find_allocation_meta method
Make gst_query_find_allocation_meta() that also return the index of the metadata
and replaces gst_query_has_allocation_meta().
2012-07-06 11:22:43 +02:00
Wim Taymans
8173622844 query: add flags to allocation query
Make it possible to add API specific flags to the ALLOCATION query. This makes
it possible to also check what kinds of subfeatures of the metadata API are
supported.
2012-07-06 11:00:38 +02:00
Wim Taymans
50cf7f6a08 memory: add gst_memory_init()
Add a method that memory implementations can call to initialize the standard
GstMemory structure.
Move the parent handling in the _free handler.
Rearrange some internal function parameters so that the order is consistent.
Add more memory examples
2012-07-05 17:11:01 +02:00
Wim Taymans
e30930af4f miniobject: fix some miniobject docs 2012-07-05 16:18:27 +02:00
Sebastian Dröge
aa2309e54a event: Add format and position to the segment-done event 2012-07-05 13:04:31 +02:00
Wim Taymans
e2bbfd294d miniobject: increase amount of possible flags 2012-07-05 12:56:51 +02:00
Sebastian Dröge
49d2ad5633 event: Implement segment-done event 2012-07-05 12:52:51 +02:00
Sebastian Dröge
1b75a55b19 query: Remove the TOC query, it's not very useful now that we have sticky events 2012-07-05 12:34:41 +02:00
Sebastian Dröge
67324c4998 quark: Remove unneeded quarks 2012-07-05 12:29:02 +02:00
Sebastian Dröge
dfd9b60221 toc: Make structures opaque and clean up function names and fields a bit 2012-07-05 12:29:02 +02:00
Wim Taymans
070f7c4e1c buffer:fix debug category 2012-07-05 11:19:16 +02:00
Wim Taymans
3b16efa1d1 miniobject: add lock functionality to GstMiniObject
Move the locking methods from GstMemory to GstMiniObject.
Add a miniobject flag to enable LOCKABLE objects. LOCKABLE objects can
use the lock/unlock API to control the access to the object.
Add a minobject flag that allows you to lock an object in readonly mode.
Modify the _is_writable() method to check the shared counter for LOCKABLE
objects. This allows us to control writability separately from the refcount for
LOCKABLE objects.
2012-07-05 11:19:16 +02:00
Wim Taymans
afd5db3c6b info: add new locking debug category 2012-07-05 11:19:16 +02:00
Wim Taymans
4b322e37f8 memory: fix is_exclusive 2012-07-05 11:19:16 +02:00
Wim Taymans
24cd0d055d memory: add LOCK_FLAG_READWRITE define 2012-07-05 11:19:16 +02:00
Wim Taymans
1b52aca7ea memory: small cleanup 2012-07-05 11:19:16 +02:00
Wim Taymans
0ddb33bb4c update for new symbols 2012-07-05 11:19:16 +02:00
Wim Taymans
9a20741b0a memory: Fix the NO_SHARE flag in the constructor
The NO_SHARE flag does not influence the exclusiveness of the buffer initially
but only if a _share operation can be done. Otherwise, we would not be able to
WRITE map a buffer memory because it would have a share count of at least 2.
2012-07-05 11:19:16 +02:00
Wim Taymans
4a0dd59808 memory: only check the locking refcount 2012-07-05 11:19:16 +02:00
Wim Taymans
703683f51b buffer: fix resize
Correctly update the exclusive locks
2012-07-05 11:19:16 +02:00
Wim Taymans
61a9de98d9 memory: Use lock flags for map flags
We implement the locking in gst_memory_map with the lock flags, make matching
flags the same number so that we can use the map flags directly as lock flags.
2012-07-05 11:19:15 +02:00
Wim Taymans
76b30712f5 buffer: lock memory EXCLUSIVE
lock the memory that the buffer references as EXCLUSIVE. This makes sure that
when we share the memory with other buffers that it becomes unwritable.
2012-07-05 11:19:15 +02:00
Wim Taymans
70c1513eac memory: cleanup the locking code
cleanup and fix the locking code
2012-07-05 11:19:15 +02:00
Wim Taymans
93f279cd5a memory: expose the internal locking api
Expose the internally used methods for locking and unlocking the object. Pass
the access mode to the unlock function for extra checks and because we need it
for the EXCLUSIVE locks.
Make some new defines to specify the desired locking.
Add a new EXCLUSIVE lock mode which will increment the shared counter. Objects
with a shared counter > 1 will not be lockable in WRITE mode.
2012-07-05 11:19:15 +02:00
Tim-Philipp Müller
36b051f02e registry: remove outdated bits of warning message
I think we can be reasonable sure people are using an up-to-date
gst-uninstalled script now.
2012-07-04 18:32:47 +01:00
Tim-Philipp Müller
bcec051a5f Add versioned variants of some environment variables
Improve parallel installability in setups like jhbuild by
providing versioned variants of some environment variables:

 GST_REGISTRY_1_0
 GST_PLUGIN_PATH_1_0
 GST_PLUGIN_SYSTEM_PATH_1_0
 GST_PLUGIN_SCANNER_1_0

will now be checked before checking the unversioned ones.

https://bugzilla.gnome.org/show_bug.cgi?id=679407
2012-07-04 18:18:02 +01:00
Tim-Philipp Müller
7b5cd72920 docs: fix typo in GstSample docs 2012-07-04 17:55:58 +01:00