Commit graph

18521 commits

Author SHA1 Message Date
Jordan Petridis
bd83f11b71 Add Gitlab CI configuration
This commit adds a .gitlab-ci.yml file, which uses a feature
to fetch the config from a centralized repository. The intent is
to have all the gstreamer modules use the same configuration.

The configuration is currently hosted at the gst-ci repository
under the gitlab/ci_template.yml path.

Part of https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/29
2018-11-12 12:02:20 +00:00
Seungha Yang
94ac598204 tests: caps: Add more broken caps test case 2018-11-12 20:12:50 +09:00
Seungha Yang
3332e39baa gst: Fix string leak when G_VALUE_COLLECT_INIT() was failed
Returned string should be freed

Fixes #319
2018-11-12 20:12:41 +09:00
Sebastian Dröge
5f469abbed debugutils: Make sure that GST_DEBUG_GRAPH_SHOW_VERBOSE gets the correct value in introspection
Currently in Python it would become a signed 64 bit value but should
actually be an unsigned 32 bit value with all bits set.

This is the same problem as with GST_MESSAGE_TYPE_ANY.

See https://bugzilla.gnome.org/show_bug.cgi?id=732633
2018-11-10 19:08:52 +00:00
Havard Graff
1335110409 tests: fix tests when compiling with glib_checks=disabled
We won't be able to do ASSERT_CRITICAL, but the main body of the tests
are still valid, and given we ship GStreamer with this configuration, it
is important to be able to run some tests against it.
2018-11-10 15:37:36 +00:00
Havard Graff
320ac0ce1a test/datetime: fix test for windows
In the previous configuration, mktime returned -1 on Windows 10 compiled
with MSVC using meson.

Fix this by moving the hour one forward.
2018-11-10 15:37:36 +00:00
Havard Graff
4a7739f4b6 tests/uri: fix test after GHashTable changes in GLib 2.59
Maybe the implementation should not be dependent on a "random" hash-table
ordering, but at least this shows the problem clearly.
2018-11-10 15:37:36 +00:00
Zeeshan Ali
ef58a84571 gst-inspect: Pipe stderr to pager as well
If stderr is not redirected by the user, also page that.
2018-11-09 12:27:18 +00:00
Niels De Graef
cf3fdbe4c0 typefind: cleanup (un)reffing of several objects.
By using these functions, we can shave off a few lines, and make the
intent of that line more clear.
2018-11-09 08:44:11 +00:00
Tim-Philipp Müller
b92e34ebfd Fix distcheck
Follow-up to !18 and #320.
2018-11-08 14:09:32 +00:00
Michael Olbrich
bc621cc335 gst: add some gdb python macros
This adds gdb pretty printer for some GStreamer types.
For GstObject pointers the type and name is added, e.g.
"0x5555557e4110 [GstDecodeBin|decodebin0]".
For GstMiniObject pointers the object type is added, e.g.
"0x7fffe001fc50 [GstBuffer]".
For GstClockTime and GstClockTimeDiff the time is also printed in human
readable form, e.g. "150116219955 [+0:02:30.116219955]".

Fixes #320
2018-11-08 12:36:23 +00:00
Sebastian Dröge
1fda8c3bcf clock: Move clock GWeakRef to a private GstClockEntry struct
There's no need for it to be in the public struct and we can keep the
padding for things to be added in the future.
2018-11-08 09:07:07 +00:00
Matthew Waters
4fc4ad87d5 query: add a new bitrate query
Allows determining from downstream what the expected bitrate of a stream
may be which is useful in queue2 for setting time based limits when
upstream does not provide timing information.

Implement bitrate query handling in queue2

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/60
2018-11-07 15:04:14 +00:00
Matthew Waters
c4ccff7861 queue2: avoid ping-pong between 0% and 100% buffering messages
If upstream is pushing buffers larger than our limits, only 1 buffer
is ever in the queue at a time.  Once that single buffer has left the
queue, a 0% buffering message would be posted followed immediately by a
100% buffering message when the next buffer was inserted into the queue
a very short time later.  As per the recommendations, This would result
in the application pausing for a short while causing the appearance of
a short stutter.

The first step of a solution involves not posting a buffering message if
there is still data waiting on the sink pad for insertion into the queue.
This successfully drops the 0% messages from being posted however a
message is still posted on each transition to 100% when the new buffer
arrives resulting in a string of 100% buffering messages.  We silence
these by storing the last posted buffering percentage and only posting a
new message when it is different from or last posted message.
2018-11-07 15:04:14 +00:00
Nicolas Dufresne
e1be065293 tracers: log: Fix post query trace
The post tracer hooks have a GstQuery argument which was truncated from
the trace. As the post hook is the one that contains the useful data,
this bug was hiding the important information from that trace.
2018-11-06 15:41:01 -05:00
Havard Graff
8a8f2cebf4 docs: add new GstTestClock API 2018-11-06 15:02:21 +01:00
Havard Graff
fa34768729 harness: improve _wait_for_clock_id_waits performance
By moving the functionality down to the testclock, the implementation
no longer needs to poll the waits, but rather wait properly for
them to be added.

The performance-hit here would be that by polling the test-clock
regularly, you would create contention on the testclock-lock, making code
using the testclock (gst_clock_id_wait) fighting for the lock.
2018-11-06 11:46:06 +01:00
Havard Graff
c6e5f59b2c systemclock: pre-calculate the ratio for multiplying the perf-count on win
Saves a lot of computations.
2018-11-06 10:39:05 +01:00
Havard Graff
4b3872f757 gstpad: use hook_id instead of hook in called_probes list
A pointer to a hook in this list can easily not be unique, given both
the slice-allocator reusing memory, and the OS re-using freed blocks
in malloc.

By doing many repeated add and remove of probes, this becomes very easily
reproduced.

Instead use hook_id, which *is* unique for a added GHook.
2018-11-06 10:04:00 +01:00
Matthew Waters
ddfcc28c8b gst/buffer: add a new function for wrapping GBytes
One restriction on the GBytes is that the data cannot be NULL as this is
explicitly forbidden by GstMemory.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/318
2018-11-06 16:12:42 +11:00
Matthew Waters
874ad5faca meson: generate pkg-config files for our plugins 2018-11-05 15:18:41 +00:00
Jan Alexander Steffens (heftig)
92d5d5bc57
gst_clear_*: Remove volatile from arguments
g_clear_pointer is not thread-safe and never was. GLib similarly removed
the volatile from g_clear_object in 2aacef39b1.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/327
2018-11-05 14:16:36 +01:00
Jan Alexander Steffens (heftig)
1c3db34150
gst_clear_*: Cast to GstMiniObject** when needed 2018-11-05 14:03:54 +01:00
Niels De Graef
8410490727 docs: update gstreamer-sections.txt with new API 2018-11-05 11:06:30 +00:00
Niels De Graef
b7bb44fb72 query: add gst_query_take()
This makes its API consistent with the other GstMiniObject subclasses
2018-11-05 11:06:30 +00:00
Niels De Graef
ef1438f847 message: add gst_message_take()
This makes its API consistent with the other GstMiniObject subclasses
2018-11-05 11:06:30 +00:00
Niels De Graef
00b358d461 taglist: add gst_tag_list_replace/take()
This makes its API consistent with the other GstMiniObject subclasses.
2018-11-05 11:06:30 +00:00
Niels De Graef
63e3edecfd bufferlist: add gst_buffer_list_replace/take()
This makes its API consistent with the other GstMiniObject subclasses.
2018-11-05 11:06:30 +00:00
Niels De Graef
e35dc31fda structure: add gst_clear_structure()
Basically, you can use this instead of using gst_structure_free (which
needs to be preceded by a NULL-check).

Also fixes #275
2018-11-05 11:06:30 +00:00
Niels De Graef
fdeddb4b93 taglist: add gst_clear_tag_list()
Basically, you can use this instead of using gst_tag_list_unref (which
needs to be preceded by a NULL-check).

Also fixes #275
2018-11-05 11:06:30 +00:00
Niels De Graef
bb07550c2d query: add gst_clear_query()
Basically, you can use this instead of using gst_query_unref (which
needs to be preceded by a NULL-check).

Also fixes #275
2018-11-05 11:06:30 +00:00
Niels De Graef
24f1fb252a message: add gst_clear_message()
Basically, you can use this instead of using gst_message_unref (which
needs to be preceded by a NULL-check).

Also fixes #275
2018-11-05 11:06:30 +00:00
Niels De Graef
efbfa54a4a event: add gst_clear_event()
Basically, you can use this instead of using gst_event_unref (which
needs to be preceded by a NULL-check).

Also fixes #275
2018-11-05 11:06:30 +00:00
Niels De Graef
a0fd447abe caps: add gst_clear_caps()
Basically, you can use this instead of using gst_caps_unref (which
needs to be preceded by a NULL-check).

Also fixes #275
2018-11-05 11:06:30 +00:00
Niels De Graef
fa1d7a86af bufferlist: add gst_clear_buffer_list()
Basically, you can use this instead of using gst_buffer_list_unref
(which needs to be preceded by a NULL-check).

Also fixes #275
2018-11-05 11:06:30 +00:00
Niels De Graef
1068d9e2c8 buffer: add gst_clear_buffer()
Basically, you can use this instead of using gst_buffer_unref (which
needs to be preceded by a NULL-check).

Also fixes #275
2018-11-05 11:06:30 +00:00
Niels De Graef
7e69305657 miniobject: add gst_clear_mini_object()
This is based on g_clear_object(). Basically, you can use this instead
of using gst_mini_object_unref (which needs to be preceded by a NULL-check).

Also fixes #275
2018-11-05 11:06:30 +00:00
Niels De Graef
c5793f82d3 object: add gst_clear_object()
This is based on g_clear_object(). Basically, you can use this instead
of using g_object_unref (which needs to be preceded by a NULL-check).

Fixes #275
2018-11-05 11:06:30 +00:00
Haihao Xiang
e261c9534d Clone the code from gitlab
This fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/326
2018-11-05 12:29:45 +08:00
Sebastian Dröge
23e6096d0b typefind: Always forward RECONFIGURE events upstream
Based on a patch by Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/67
2018-11-04 12:45:57 +02:00
Sebastian Dröge
8250b8d81a clock: Move clock weak ref into its own ABI struct
Otherwise it will be hard to add other things into the padding later
without breaking API.
2018-11-03 19:00:36 +02:00
Sebastian Dröge
4de89865d4 clock: Add new functions to the documentation 2018-11-03 19:00:35 +02:00
Sebastian Dröge
f34472822c clock: Fix deprecation handling of the GstClock clock field 2018-11-03 19:00:24 +02:00
Thomas Bluemel
36ab067905 clock: Keep weak reference to underlying clock
Fixes potential segmentation fault when using a GstClockID that
is referencing an already freed GstClock

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/187
2018-11-03 19:00:22 +02:00
Zeeshan Ali
8abe052590 gst-inspect: Don't page if output fits the screen 2018-10-30 15:30:38 +01:00
Zeeshan Ali
4fbd3baf1e gst-inspect: Flush stdout before closing stdout FD
Otherwise, last line can be lost.
2018-10-30 14:53:00 +01:00
Sebastian Dröge
c3214e8deb harness: Add API for proposing meta APIs from the allocation query
https://bugzilla.gnome.org/show_bug.cgi?id=797350
2018-10-28 17:05:27 +00:00
Jan Schmidt
80015d69a7 segment: Allow stop == -1 in gst_segment_to_running_time() and rate < 0
If a segment has stop == -1, then gst_segment_to_running_time()
would refuse to calculate a running time for negative rates,
but gst_segment_do_seek() allows this scenario and uses a
valid duration for calculations.

Make the 2 functions consistent by using any configured duration
to calculate a running time too in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=796559
2018-10-29 04:03:56 +11:00
Zeeshan Ali
5d115a5d64 gst-inspect: Pipe stdout to less if not piped already
https://bugzilla.gnome.org/show_bug.cgi?id=797344
2018-10-28 13:19:47 +00:00
Sebastian Dröge
3eb334a7f9 typefind: Lower debug level of some output related to the URI query
It's not a warning if an URI doesn't have an extension, and it's also
not mandatory that sources have an URI or even answer the URI query.
2018-10-26 09:21:42 +01:00