Commit graph

7753 commits

Author SHA1 Message Date
Jonas Holmberg
fb19ebbd8f bufferpool: Fixed compiler warning
The pool variable was unused when buidling with debug disabled.
2015-06-24 16:05:37 +02:00
Sebastian Dröge
d78b9a5ada bufferlist: Warn if copying a buffer fails in gst_buffer_list_copy_deep() 2015-06-24 10:52:56 +02:00
Hyunjun Ko
7ecef53dbb bufferlist: add new api gst_buffer_list_copy_deep
https://bugzilla.gnome.org/show_bug.cgi?id=751420
2015-06-24 10:52:56 +02:00
Song Bing
5109173abf pad: Clear EOS flag after received STREAM_START event
Clear EOS flag after received STREAM_START event

https://bugzilla.gnome.org/show_bug.cgi?id=750761
2015-06-23 10:35:46 +02:00
Thiago Santos
1418e9e85c utils: use caps when getting a compatible pad by template
Do not ignore the caps argument when requesting a pad by template.

This is particularly harmful when the pad caps query by default
returns ANY so it will match the first template instead of the
one that actually intersects with the caps.

https://bugzilla.gnome.org/show_bug.cgi?id=751235
2015-06-22 17:18:43 -03:00
Jan Schmidt
cba677bebb gstsample.h: Include gstbufferlist.h now that it uses GstBufferList 2015-06-23 00:14:30 +10:00
Hyunjun
e8db96b033 sample: add gst_sample_set/get_buffer_list apis
Allowed to set/get buffer list to sample if needed

https://bugzilla.gnome.org/show_bug.cgi?id=751026
2015-06-22 13:17:01 +02:00
Nicolas Dufresne
ddedc412f5 doc: Unify Since mark for attribute and enum
As this show up as prose in the doc, simply make it consistent
and "arguable" nicer to read.
2015-06-18 11:51:48 -04:00
Nicolas Dufresne
210c29665a doc: Remove parenthesis around Since:
This confuse the parser, hence it does not endup in the doc and the
index properly.
2015-06-18 11:48:50 -04:00
Jan Schmidt
4d4e436376 Add GstParentBufferMeta
A core meta which helps implement the old concept
of sub-buffering in some situations, by making it
possible for a buffer to keep a ref on a different
parent buffer. The parent buffer is unreffed when
the Meta is freed.

This meta is used to ensure that a buffer whose
memory is being shared to a child buffer isn't freed
and returned to a buffer pool until the memory
is.

https://bugzilla.gnome.org/show_bug.cgi?id=750039
2015-06-19 01:15:25 +10:00
Nicolas Dufresne
632431aecb gi: Use INTROSPECTION_INIT for --add-init-section
This new define was added to common. The new init section fixed
compilation warning found in the init line that was spread across
all files.
2015-06-16 18:08:24 -04:00
Nicolas Dufresne
5bdd92be75 clock: Fix _STIME_FORMAT macros
This macro didn't work well as it relied on the sign on the last
divided number (number of days). This value is most of the time
zero, and zero is considered positive in printf. Instead, deal with
the sign manually, and resuse the original macros for the rest. This
actually simplify the macro a lot.
2015-06-15 10:06:00 -04:00
Nicolas Dufresne
48700c7791 doc: More doc warning fixes
So from this point, the remaining warning for libgstreamer are about
protected member not showing in the doc. This may need some discussion
with upstream gtk-doc people.

* Remove % in from of none macro
* Fixed GST_TYPE_FAGS -> GST_TYPE_FAG_SET
* Minor wording fix
* Can't link to GstUri.port, so split the .port part
2015-06-14 10:29:04 -04:00
Nicolas Dufresne
6eb58a67a9 doc: In GstUri we meant nul-terminated, not %NULL
%NULL refers to the pointer. I've written it this way in one
word as this is what GLib uses.
2015-06-14 09:17:21 -04:00
Nicolas Dufresne
781865e0da doc: Cannot reference GST_PACKAGE_RELEASE_DATETIME
So simply remove the % sign.
2015-06-13 21:02:20 -04:00
Nicolas Dufresne
b059520926 doc: Fix typo in ref _clock_wait_for_sync() 2015-06-13 20:52:01 -04:00
Nicolas Dufresne
6f2fb1e37e doc: Fix GstUri doc typos
* Use &perctn; instead of reserved character %
* NULL take two L
2015-06-13 20:37:34 -04:00
Nicolas Dufresne
bd9ea8d18f doc: Fix Since: marks
There was few Since: mark missing their column. Also unify the way
we set the Since mark on enum value and structure members. These
sadly don't show up in the index.
2015-06-13 20:19:59 -04:00
Nicolas Dufresne
b3f42b0c35 doc: Add gst_buffer_copy_deep() 2015-06-13 20:02:18 -04:00
Nicolas Dufresne
2ec88e0939 doc: Remove uneeded protectionevent section
These functions are part of gstevent section already. Keep the doc,
since it's good.
2015-06-13 13:14:30 -04:00
Nicolas Dufresne
7fdb15d6a2 taglist: Add missing scope to func param
This tell GI if this function is for actions (call) or is the
answer of this method being asynchronous (async). In this case
it's a call. This also silence warning from the GI scanner.
2015-06-13 12:32:49 -04:00
Nicolas Dufresne
92087ba75a gstprotection: Add missing Since 1.6 mark 2015-06-13 12:27:31 -04:00
Nicolas Dufresne
bdfcf43f74 gstprection: _add_protection_meta() is transfer none
Just like gst_buffer_add_meta() this function should also be
transfer none. This also silence a gi warning about returning
a copy of a non boxed bare structure.
2015-06-13 12:26:13 -04:00
Nicolas Dufresne
a65cea7c69 gstprotection: Add missing namespace to macro
GST_PROTECTION_SYSTEM_ID_CAPS_FIELD was missing the GST_ namespace.
Add it before its too late.
2015-06-13 12:25:19 -04:00
Nicolas Dufresne
0e8a318dd7 doc: Keep SECTION: after the ifdef
Otherwise GTK doc will see it as often as we include that files
and warn about duplicated SECTION:
2015-06-13 11:55:10 -04:00
Nicolas Dufresne
9fa4c67632 gi: Skip mini object method that play with refcounting
It make no sense to allow using that. Any use would lead to leak
of crash. Note that GMiniObject is entirely unusable as you cannot
cast from let's say GstBuffer to GstMiniObject.
2015-06-13 10:25:48 -04:00
Nicolas Dufresne
54f6540f16 doc: Fix annoation for GstMiniObject
Replacing reprecated "Ref Func:", "Unref Fun:" etc. comment block
with appropriate (ref-func name) etc. annotation.
2015-06-13 09:37:46 -04:00
Nicolas Dufresne
b09a7bb5af doc: Fix unbalanced parenthesis 2015-06-13 09:34:06 -04:00
Nicolas Dufresne
17006c4ee8 doc: Fix more typo 2015-06-13 09:30:24 -04:00
Nicolas Dufresne
ea03cd4190 doc: Fix type in previous commit
Marker is (value .. not (alue.
2015-06-13 09:22:41 -04:00
Nicolas Dufresne
18536930ff doc: Don't use deprecated Value: and Type: comment
Instead use appropriate annotation. Annotations can be added
to the right of the constant name in a comment block.
2015-06-13 09:19:27 -04:00
Nicolas Dufresne
5cab2e14c4 clock: Add signed time utilities
Add utility to print signed value of time. This is useful to
trace running time values in gint64 or GstClockTimeDiff values.
Additionally, define GST_CLOCK_STIME_NONE to indicate an invalid
signed time value and validation macro. New macros are:

GST_CLOCK_STIME_NONE
GST_CLOCK_STIME_IS_VALID
GST_STIME_FORMAT
GST_STIME_ARGS

https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-06-12 17:20:16 -04:00
Thiago Santos
4b4a8295ae message: add allow-none to gst_message_new_ function
No restriction for creating messages without a source
2015-06-12 09:54:37 -03:00
Matthew Waters
d61ba38118 memory: provide a mem_map_full that takes the GstMapInfo
Follow up of 7130230ddb

Provide the memory implementation the GstMapInfo that will be used to
map/unmap the memory.  This allows the memory implementation to use
some scratch space in GstMapInfo to e.g. track different map/unmap
behaviour or store extra implementation defined data about the map
in use.

https://bugzilla.gnome.org/show_bug.cgi?id=750319
2015-06-12 16:12:10 +10:00
Sebastian Dröge
abfcffde46 pipeline: Add gst_pipeline_set_latency(), getter and GObject property
This overrides the default latency handling and configures the specified
latency instead of the minimum latency that was returned from the LATENCY
query.

https://bugzilla.gnome.org/show_bug.cgi?id=750782
2015-06-11 12:55:34 +02:00
Jan Schmidt
ade4a83e63 Add GST_BUFFER_FLAG_SYNC_AFTER flag, and implement in filesink.
Makes it possible to get filesink to fsync() after rendering
a buffer.
2015-06-08 19:13:18 +10:00
Sebastian Dröge
fe3249b0e1 clock: Add GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC and related API
gst_clock_wait_for_sync(), gst_clock_is_synced() and gst_clock_set_synced()
plus a signal to asynchronously wait for the clock to be synced.

This can be used by clocks to signal that they need initial synchronization
before they can report any time, and that this synchronization can also get
completely lost at some point. Network clocks, like the GStreamer
netclientclock, NTP or PTP clocks are examples for clocks where this is useful
to have as they can't report any time at all before they're synced.

https://bugzilla.gnome.org/show_bug.cgi?id=749391
2015-06-03 13:53:27 +02:00
Matthew Waters
7130230ddb memory: provide a mem_unmap function that takes the flags to unmap
There are gstmemory's available that operate in two memory domains
and need to ensure consistent access between these domains.

Imagine a scenario where e.g. the GLMemory is mapped twice in both
the GPU and the CPU domain.  On unmap or a subsequent map, it would
like to ensure that the most recent data is available in the memory
domain requested.  Either by flushing the writes and/or initiating a
DMA transfer.  Without knowing which domain is being unmapped, the
memory does not know where the most recent data is to transfer to
the other memory domain.

Note: this still does not allow downgrading a memory map.

https://bugzilla.gnome.org/show_bug.cgi?id=750319
2015-06-03 20:41:59 +10:00
Matthew Waters
e9c15d5321 memory: gst_memory_share may fail to exclusively lock the parent memory
Now that locking exclusively dows not always succeed, we need to signal
the failure case from gst_memory_init.

Rather than introducing an API or funcionality change to gst_memory_init,
workaround by checking exclusivity in the calling code.

https://bugzilla.gnome.org/show_bug.cgi?id=750172
2015-06-03 20:41:44 +10:00
Matthew Waters
eb71ee4040 buffer: locking memory exclusively may fail
Attempt to return a copy of the memory instead.

https://bugzilla.gnome.org/show_bug.cgi?id=750172
2015-06-03 20:41:44 +10:00
Matthew Waters
ad4569c893 miniobject: disallow a double write/exclusive lock
gst_memory_lock (mem, WRITE | EXCLUSIVE);
gst_memory_lock (mem, WRITE | EXCLUSIVE);

Succeeds when the part-miniobject.txt design doc suggests that this should fail:

  "A gst_mini_object_lock() can fail when a WRITE lock is requested and
  the exclusive counter is > 1. Indeed a GstMiniObject object with an
  exclusive counter 1 is locked EXCLUSIVELY by at least 2 objects and is
  therefore not writable."

https://bugzilla.gnome.org/show_bug.cgi?id=750172
2015-06-03 20:41:44 +10:00
Tim-Philipp Müller
935ecd85ea uri: match return type of get_uri_type() implementation to declaration
https://bugzilla.gnome.org/show_bug.cgi?id=750292
2015-06-02 20:32:35 +01:00
Jan Schmidt
b0c072711d gstbuffer: Add a note about metas needing to be copied last 2015-06-03 00:48:17 +10:00
Jan Schmidt
58e5cd2695 gstvalue: Implement gst_value_is_subset() for flagsets 2015-06-03 00:48:17 +10:00
Reynaldo H. Verdejo Pinochet
01b9874687 structure: add note about missing field creation on _set() 2015-05-31 20:22:34 -03:00
Nirbheek Chauhan
b174ec6903 gst/gst.c: Add a warning about DllMain to prevent misuse
DllMain should not be relied on for anything except storing the DLL handle.
It should also not be defined for static builds, but doing so is not
straightforward and is mostly harmless, so let's just add a comment about that
for now.
2015-05-27 13:21:03 +01:00
Jan Schmidt
f9e5178dd1 gstvalue: Add GstFlagSet type
GstFlagSet is a new type designed for negotiating sets
of boolean capabilities flags, consisting of a 32-bit
flags bitfield and 32-bit mask field. The mask field
indicates which of the flags bits an element needs to have
as specific values, and which it doesn't care about.

This allows efficient negotiation of arrays of boolean
capabilities.

The standard serialisation format is FLAGS:MASK, with
flags and mask fields expressed in hexadecimal, however
GstFlagSet has a gst_register_flagset() function, which
associates a new GstFlagSet derived type with an existing
GFlags gtype. When serializing a GstFlagSet with an
associated set of GFlags, it also serializes a human-readable
form of the flags for easier debugging.

It is possible to parse a GFlags style serialisation of a
flagset, without the hex portion on the front. ie,
+flag1/flag2/flag3+flag4, to indicate that
flag1 & flag4 must be set, and flag2/flag3 must be unset,
and any other flags are don't-care.

https://bugzilla.gnome.org/show_bug.cgi?id=746373
2015-05-25 16:23:33 +10:00
Thibault Saunier
99d3179634 gstvalue: Add a comparision function for GstStructures 2015-05-20 20:21:24 +02:00
Vincent Penquerc'h
d0c3e33bbe pad: bump chain function call logs from LOG to DEBUG
They're really useful compared to other LOG stuff in there, so
there is value is including them and not the rest.
2015-05-15 14:57:14 +01:00
Stefan Sauer
b8c6ebd0f2 gstobject: add gst_object_has_as_ancestor and deprecate previous function
The old gst_object_has_ancestor will call the new code. This establishes the
symetry with the new gst_object_has_as_parent.

API: gst_object_has_as_ancestor()
2015-05-15 13:55:19 +02:00