Commit graph

18162 commits

Author SHA1 Message Date
Matthew Waters
a0400a0d28 docs: include tracers in the documentation
Requires exposing the tracer GType from the GstTracerFactory in order
to link the plugin with the tracer in the documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=791253
2017-12-14 14:46:46 +11:00
Matthew Waters
fa302587dd check/harness: fix transfer annotations on buffer passing functions 2017-12-13 11:23:03 +11:00
Tim-Philipp Müller
18fe36a286 basesrc: add buffer list support
Add a gst_base_src_submit_buffer_list() function that allows subclasses
to produce a bufferlist containing multiple buffers in the ::create()
function. The buffers in the buffer list will then also be pushed out
in one go as a GstBufferList. This can reduce push overhead
significantly for sources with packetised inputs (such as udpsrc)
in high-throughput scenarios.

The _submit_buffer_list() approach was chosen because it is fairly
straight-forward, backwards-compatible, bindings-friendly (as opposed
to e.g. making the create function return a mini object instead),
and it allows the subclass maximum control: the subclass can decide
dynamically at runtime whether to return a list or a single buffer
(which would be messier if we added a create_list virtual method).

https://bugzilla.gnome.org/show_bug.cgi?id=750241
2017-12-07 12:17:09 +00:00
Tim-Philipp Müller
880c573e8d basesrc: minor code readability improvement 2017-12-07 12:17:09 +00:00
Tim-Philipp Müller
f05bd2a016 docs: Fix a few gtk-doc warnings
Broken links mostly.
2017-12-07 12:16:57 +00:00
Tim-Philipp Müller
c26a802f5a tests: aggregator: fix caps leak in unit test 2017-12-06 20:58:42 +00:00
Edward Hervey
0afc114629 gstpad: Handle GST_PAD_PROBE_HANDLED on sticky event push
When actually pushing an event, if we get GST_FLOW_CUSTOM_SUCCESS_1
(which is the conversion of GST_PAD_PROBE_HANDLED return value),
don't consider the stick event push as ignored, but as handled
2017-12-06 17:23:05 +01:00
Sebastian Dröge
adf304d5af event/query/message: Annotate get_structure() return value as nullable 2017-12-06 13:40:46 +02:00
Sebastian Dröge
c813b1c276 query: Add an empty structure in writable_structure() if there is none yet
This is consistent with how it works for GstEvent already.
2017-12-06 13:36:30 +02:00
Edward Hervey
62ebee096b docs: Misc addition/fixes
And also add the "Since" API sections for 1.12 and 1.14
2017-12-05 18:48:56 +01:00
Edward Hervey
eb6ba249c4 docs: Add documentation for GST_SEQNUM_INVALID
And link to it
2017-12-05 18:20:34 +01:00
Edward Hervey
e5c15f6b96 utils: Never return a group_id of 0, add GST_GROUP_ID_INVALID
Various plugins use special values (0 or G_MAXUINT32) as an
invalid/unset group_id, but nothing guarantees a groupid won't have
that value.

Instead define a value which group_id will never have and make
gst_group_id_next() always return a value different from that.

API: GST_GROUP_ID_INVALID
2017-12-05 18:19:32 +01:00
Tim-Philipp Müller
16d9954dd5 harness: make bindings use the GBytes variant for _take_all_data() 2017-12-05 16:42:57 +00:00
Havard Graff
e08834bff3 harness: use new take_all_data() function in _dump_to_file(). 2017-12-05 15:37:14 +00:00
Tim-Philipp Müller
d8e7fc40b1 harness: add gst_harness_take_all_data() + _take_all_data_as_{bytes,buffer}()
Convenience function to just grab all pending data
from the harness, e.g. if we just want to check if
it matches what we expect and we don't care about
the chunking or buffer metadata.

Based on patch by: Havard Graff <havard.graff@gmail.com>
2017-12-05 15:37:00 +00:00
Tim-Philipp Müller
bcc5e5bcd5 buffer: document that _extract_dup() will return NULL for 0-sized buf
And make it explicit, and don't call _extract() on NULL data buffer.
2017-12-05 15:18:29 +00:00
Nirbheek Chauhan
7d1dabe020 meson: Use array syntax instead of .get() in tests 2017-12-05 12:27:18 +05:30
Nirbheek Chauhan
3c5edc76e5 meson: Use new find_program fallback syntax
We use this syntax in libs/gst/helpers/meson.build already.
2017-12-05 12:26:44 +05:30
Sebastian Dröge
16de48ae03 gst: gst_element_remove_pad() is transfer none for the pad
While the refcount of the pad is decreased, it's the refcount that is
owned by the parent (i.e. the element) and not the one passed in by the
caller.

Fixes a memory leak in bindings.
2017-12-04 18:10:23 +02:00
Tim-Philipp Müller
76b54099bd aggregator: add finish_buffer() vfunc
So subclasses can override the finish behaviour
and/or decorate or modify buffers before they
get pushed out.

https://bugzilla.gnome.org/show_bug.cgi?id=760981
2017-12-04 15:27:04 +00:00
Tim-Philipp Müller
e9483fbffb aggregator: disable tag merging and forwarding for now
Subclasses should handle this for now.
2017-12-04 12:29:05 +00:00
Jan Alexander Steffens (heftig)
d9b20492f3 devicemonitor: Avoid maybe-uninitialized compiler warning
On Arch Linux x86_64, gcc 7.2.0-3, -Og -g3:

gstdevicemonitor.c: In function ‘bus_sync_message’:
gstdevicemonitor.c:276:8: error: ‘matches’ may be used uninitialized in this function [-Werror=maybe-uninitialized]

This commit also simplifies the code a bit.

https://bugzilla.gnome.org/show_bug.cgi?id=789983
2017-12-04 10:56:44 +00:00
Sebastian Dröge
464f840a23 gst: Annotate various strings as type filename if they represent a path/filename 2017-12-03 14:48:54 +02:00
Tim-Philipp Müller
e6dbbb3854 aggregator: hook up to docs 2017-12-02 19:00:32 +00:00
Tim-Philipp Müller
cea9641fa9 aggregator: hook up to build system
https://bugzilla.gnome.org/show_bug.cgi?id=739010
2017-12-02 15:44:40 +00:00
Tim-Philipp Müller
39664da1f0 Move GstAggregator from -bad to core
Merge branch 'aggregator-move'

https://bugzilla.gnome.org/show_bug.cgi?id=739010
2017-12-02 15:27:22 +00:00
Mathieu Duponchelle
79d0239e2f aggregator: Remove klass->sinkpads_type
This posed problems for the python bindings (and possibly others).

Instead, subclasses now use add_pad_template_with_gtype.

https://bugzilla.gnome.org/show_bug.cgi?id=789986
2017-12-02 15:10:27 +00:00
Tim-Philipp Müller
4e4438de21 aggregator: add doc blurb for gst_aggregator_pad_is_eos() 2017-12-02 15:10:27 +00:00
Tim-Philipp Müller
41f7b04c81 aggregator: also remove now-unused PadForeachFunc declaration
https://bugzilla.gnome.org/show_bug.cgi?id=785679
2017-12-02 15:10:27 +00:00
Olivier Crête
e9fafb3e17 aggregator: Remove pad iterator function
Use new gst_element_foreach_sink_pad() from core instead.

https://bugzilla.gnome.org/show_bug.cgi?id=785679
2017-12-02 15:10:27 +00:00
Tim-Philipp Müller
2f3fbf24bc aggregator: use new gst_element_foreach_sink_pad()
Instead of gst_aggregator_iterate_sinkpads() which will
soon be removed.

https://bugzilla.gnome.org/show_bug.cgi?id=785679
2017-12-02 15:10:27 +00:00
Stefan Sauer
f51557dbc5 aggregator: add more comments 2017-12-02 15:10:27 +00:00
Stefan Sauer
917214ed91 tests: comment and logging cleanups for audiomixer and aggregator
Remove some references to 'collectpads'. Logs pads through the object variants.
Add some more comments. Remove a left over comment.
2017-12-02 15:10:27 +00:00
Stefan Sauer
063787d770 aggregator: fix type for latency property (int64 -> GStClockTime)
The value is used as GstClockTiem in the code. Adapt the hack^H^H^H^Hcode
in live-adder.
2017-12-02 15:10:27 +00:00
Olivier Crête
3d0dad59a0 aggregator: Don't take flush lock from output thread
Instead just take it in the chain function.

https://bugzilla.gnome.org/show_bug.cgi?id=784911
2017-12-02 15:10:27 +00:00
Olivier Crête
8b60b25917 aggregator: Don't block if adding to the tail of the queue
If we're adding to the tail of the queue, it's because we're converting
a gap event, so don't block there it means we're calling from the output
thread.

https://bugzilla.gnome.org/show_bug.cgi?id=784911
2017-12-02 15:10:27 +00:00
Stefan Sauer
a083391fb5 aggregator: review code related to time level
Add a comment for when the state matters. Use a local var for priv in
update_time_level() to improve readability. Move the our_latency local
var below the query results checks.
2017-12-02 15:10:27 +00:00
Stefan Sauer
23692ee688 aggregator: init latency values with 0 instead of FALSE 2017-12-02 15:10:27 +00:00
Stefan Sauer
fb3c9f3808 aggregator: code cleanup for event and query func
Only look up klass for non serialized events/queries. For events remove
superfluous assignment for the return value in the flushing case.
2017-12-02 15:10:27 +00:00
Stefan Sauer
8776900cf7 aggregator: simplify pad_event_func for FLUSH_STOP events
We want to skip serialization for FLUSH_STOP events (apparently). We can
simplify the code to add it to the top-level conditions. There was nothing
done in the first code path if the event was FLUSH_STOP.
2017-12-02 15:10:27 +00:00
Stefan Sauer
5509920c27 aggregator: drop special casing for eos
Just queue it like any other serialized event. This way we don't need to
check if there still are buffers in the queue.

Validated with the tests and gst-launch-1.0 pipelines.
2017-12-02 15:10:27 +00:00
Stefan Sauer
113a2c508b aggregator: add a doc-blob for the event_func 2017-12-02 15:10:27 +00:00
Stefan Sauer
45cef5726f aggregator: rename a local variable
The variable tracks wheter the queue is not empty, but num_buffers==0. That
means we have events or queries to process. Rename accordingly.
2017-12-02 15:10:27 +00:00
Stefan Sauer
498cdd8fac aggregator: remove commented code
The SEGMENT_DONE event does not require any special treatment. This is
commented out in 6efc106a67.
2017-12-02 15:10:27 +00:00
Stefan Sauer
656a2616f2 aggregator: move the comment for the locks to the lock macros
Looks like some code was inserted afterwards.
2017-12-02 15:10:27 +00:00
Stefan Sauer
5a06c3d12b aggregator: improve section docs
Mention how data ends up in the queues. Document the relation of the pad
functions and the class vmethods to get events and queries.
2017-12-02 15:10:27 +00:00
Stefan Sauer
00d6f46ff8 aggregator: add two more tests for a sequence of data
This verifies that we handle events and queries at the head of the queue and
then buffers.
2017-12-02 15:10:27 +00:00
Stefan Sauer
fbe82b7fa1 aggregator: refactor the test helper
Make the test helpers use a queue. This lets us also test sequences of events,
queries and data.
2017-12-02 15:10:27 +00:00
Stefan Sauer
9efffd05e2 aggregator: test cleanup
Remove gst_init() from a few tests. Use _OBJECT variants in logging. Remove
arbitrary extra blank lines. Make push_event() more like push_buffer() - set
the event to NULL and add cleanup to _chain_data_clear().
2017-12-02 15:10:27 +00:00
Stefan Sauer
4808f4836c aggregator: cleanup event forwarding
Don't copy the whole event struct. Set the input params when we call the
forwarding helper. Initialize the internal fields and return values in the
helper.
2017-12-02 15:10:27 +00:00