Commit graph

3222 commits

Author SHA1 Message Date
Niels De Graef
09141c6e1f Use G_DEFINE_AUTOPTR_CLEANUP_FUNC unconditionally
Since we started depending on GLib 2.44, we can be sure this macro is
defined (it will be a no-op on compilers that don't support it). For
plugins we should just start using `G_DECLARE_FINAL_TYPE` which means
we no longer need the macro there, but for most types in core we don't
want to break ABI, which means it's better to just keep it like it is
(and use the `#ifdef` instead).
2019-06-04 08:50:59 +02:00
Thibault Saunier
6dac555e32 aggregator: Minor documentation fix 2019-05-25 10:56:50 -04:00
Tim-Philipp Müller
1a3bf3234f aggregator: fix flow-return boolean return type mismatch
Not that it matters, since we don't check the return value
anyway. Unclear why the aggregator pad flush function should
have a return value at all really, and perhaps it should be
called reset anyway. Spotted by dv on irc.
2019-05-25 14:33:27 +02:00
Michael Olbrich
96b88ffe35 gdb: add gst_element_pad() function
Another helper to navigate a pipeline. It makes it possible to easily
access the pads of an element:

(gdb) print $gst_element_pad(basesink, "sink")
$1 = 0x7fffe80770f0 [GstPad|sink]
2019-05-24 10:37:50 +00:00
Michael Olbrich
4877afc145 gdb: print more data for segment events
This add the different timestamps for segment events:

(gdb) gst-print pad
SrcPad(src, push) {
  events:
[...]
    segment: time
      rate: 1.1
      start:    0:03:08.449753330
      time:     0:03:08.449753330
      position: 0:03:08.449753330
      duration: 0:12:14.166687500
[...]
}
2019-05-24 10:37:50 +00:00
Michael Olbrich
2bd2ed289a gdb: add 'gst-pipeline-tree' command
It shows a simple tree of all elements in pipeline.
As with gst-dot, the toplevel bin is found from any element of the
pipeline:

(gdb) gst-pipeline-tree bsink
playbin
  inputselector1
  inputselector0
  uridecodebin0
    queue2-0
    decodebin0
      avdec_aac0
      aacparse0
      vaapidecodebin0
        vaapipostproc0
        capsfilter1
        vaapi-queue
        vaapidecode0
      capsfilter0
      h264parse0
      multiqueue0
      matroskademux0
      typefind
    typefindelement0
    source
  playsink
    abin
      aconv
        resample
        conv
        identity
      aqueue
      pulsesink0
    vbin
      vconv
        scale
        conv
        identity
      vqueue
      vaapisink0
    vdbin
      deinterlace
      vdconv
    audiotee
    streamsynchronizer0
2019-05-24 10:37:50 +00:00
Michael Olbrich
ebce5a7ee9 gdb: add gst_pipeline() and gst_bin_get() functions
This simplifies navigating in a GStreamer pipeline, e.g.

(gdb) print $gst_bin_get($gst_pipeline(pad), "matroskademux0")
$1 = 0x7fffe81b4050 [GstMatroskaDemux|matroskademux0]
2019-05-24 10:37:50 +00:00
Michael Olbrich
8ccb9f2595 gdb: handle ghost and proxy pads while looking for the top-level element
The parent object for pads is not always a GstElement. Handle GstProxyPad
parents as well.
2019-05-24 10:37:50 +00:00
Michael Olbrich
320a4cba4b gdb: refactor finding top-level pipeline
No functional changes. Just refactoring to make it possible to reuse this
later.
2019-05-24 10:37:50 +00:00
Michael Olbrich
36c2fc3bc3 gdb: gst-print add more pad and element information
For elements, this adds all child elements, the state and base/start time:

(gdb) gst-print pipeline
0x5555556ebd20 "pipeline0"
GstPipeline(pipeline0) {
    children:
      fakesink0
      queue0
      videotestsrc0
    state: PLAYING
    base_time: +2:54:36.892581150
    start_time: 0:00:00.000000000
}

For pads, this adds the peer pads and the current task state and the
offset (if not zero):

(gdb) gst-print pad
SrcGhostPad(src, push) {
  events:
    [...]
  peer: vaapisink0:sink
  inner peer: scale:src
}

(gdb) gst-print pad
SrcPad(src, push) {
  events:
    [...]
  peer: queue0:sink
  task: STARTED
  offset: 30000000 [+0:00:00.030000000]
}
2019-05-24 10:37:50 +00:00
Michael Olbrich
0d7db77bae gdb: refactor time formating
Make it reuseable independent of the GstClockTimePrinter.
2019-05-24 10:37:50 +00:00
Sebastian Dröge
904d552176 basesink: Remove leading space from Since maker of gst_base_sink_get_stats()
gobject-introspection does not like this.
2019-05-16 15:24:02 +00:00
Sebastian Dröge
f23f864774 basesink: Fix syntax for gtk-doc comment of the new stats property 2019-05-16 15:24:02 +00:00
Thibault Saunier
949fba4b1f doc: Fix hotdoc warnings
* Making sure that `static inline` function are in the GIR (by first
  defining them, and make sure to mark as skiped)
* Do not try to link to unexisting symbols
* Also generate GIR information about gst_tracers
2019-05-13 16:34:09 -04:00
Thibault Saunier
a0c65067e0 Port to hotdoc 2019-05-13 16:34:09 -04:00
Thibault Saunier
4e29b4aa34 doc: Add some missing docstrings 2019-05-13 11:33:49 -04:00
Thibault Saunier
5b2da0835e doc: Fix and add some missing docstrings 2019-05-13 11:33:49 -04:00
Michael Olbrich
0364f74643 meson: set correct install path for gdb helper
The original version of the patch used glib-2.0 but that was later changed
to gstreamer-1.0 for autotools. The meson file was forgotten.

Fix the path to match the one used in libgstreamer-gdb.py.in.
2019-05-11 18:40:15 +02:00
Víctor Manuel Jáquez Leal
19467a7d8d gstbasesink: Fix gir annotation 2019-05-09 08:59:59 +02:00
Aaron Boxer
fa99a88558 gstbasesink: add stats getter method
fixes #355
2019-05-08 14:45:42 -04:00
Rasmus Thomsen
cc9c3c3175 meson: check for libcap via pkg-config
It's possible that setcap is installed, but the libcap headers/libs aren't (e.g.
during cross compilation, when you have the program installed for the host,
but need the headers of the target). Also removes the need to manually check
for the libcap headers.
2019-04-24 13:27:42 +00:00
Sebastian Dröge
f57e79a073 bitwriter: Fix inclusion of header in C++ code
../subprojects/gstreamer/libs/gst/base/gstbitwriter.h: In function 'gboolean _gst_bit_writer_check_remaining(GstBitWriter*, guint32)':
../subprojects/gstreamer/libs/gst/base/gstbitwriter.h:161:31: error: invalid conversion from 'gpointer' {aka 'void*'} to 'guint8*' {aka 'unsigned char*'} [-fpermissive]
   bitwriter->data = g_realloc (bitwriter->data, (new_bit_size >> 3));
                     ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-04-23 15:15:56 +00:00
Sebastian Dröge
e823f02b5a base: Include gstbitwriter.h in the single-include header 2019-04-23 15:15:56 +00:00
Sebastian Dröge
52f1c98443 libs: Fix various Since markers 2019-04-23 15:07:08 +03:00
Sebastian Dröge
0a0496f98f aggregator: Mark all public structs as Since: 1.14 2019-04-23 14:54:03 +03:00
Sebastian Dröge
0058eeb1de bitwriter: Mark the whole type as Since: 1.16 2019-04-23 14:53:11 +03:00
Robert Rosengren
3b5933eadd netutils: make gst_net_utils_set_socket_dscp external
Internal gst_net_utils_set_socket_dscp renamed and turned into external
function. Similar functionality exists in e.g. multidupsink, which could
instead use this one.
2019-04-22 09:01:14 +00:00
Robert Rosengren
3faab6f017 netutils: Add IPv6 support to QoS DSCP
Added IPv6 support as already implemented in multiudpsink
(gst-plugins-good).
2019-04-22 09:01:14 +00:00
Olivier Crête
61f2d9b07a basesrc: Downgrade EOS warning
In the case of pushfilesrc, this is the expected behaviour, so let's
downgrade the warning to a debug message to avoid confusing users.
2019-04-18 13:55:47 +00:00
Tim-Philipp Müller
41f873fa0a aggregator: fix doc chunk for new buffer-consumed signal
Fixes 'Warning: GstBase: incorrect number of parameters in
comment block, parameter annotations will be ignored.' from
g-ir-scanner.
2019-04-16 23:51:19 +01:00
Mathieu Duponchelle
fee108f7cf basesrc: do not send EOS when automatic_eos is FALSE 2019-04-05 18:00:29 +00:00
Mathieu Duponchelle
ae57b1c76d aggregator: add buffer-consumed pad signal
The signal will be emitted when a buffer was consumed on
a pad, if the newly-added "emit-signals" property has been
set to TRUE.

Handlers connected to the signal will receive a valid reference on
the consumed buffer, allowing for example the retrieval of metas in
order to forward them once an output buffer is pushed out.
2019-04-05 12:13:54 +00:00
Tim-Philipp Müller
93d190b5b3 check: suppress some g-i warnings
gstcheck.c:142: Warning: GstCheck: gst_check_add_log_filter: return value: Invalid non-constant return of bare structure or union; register as boxed type or (skip)
gstcheck.h:178: Warning: GstCheck: gst_check_run_suite: argument suite: Unresolved type: 'Suite*'
2019-03-23 18:17:43 +00:00
Tim-Philipp Müller
cef902814d bitwriter: mark as 'skip' for gobject-introspection
Silences g-ir-scanner warnings. We do the same for ByteWriter.
2019-03-23 17:53:07 +00:00
Matthew Waters
c6691abba1 aggregator: don't leak gap buffer when out of segment 2019-03-21 19:18:46 +11:00
Matthew Waters
619dfc91bb aggregator: take the pad lock around queue gap event removal
As is done for every other queue interaction
2019-03-21 19:18:46 +11:00
Matthew Waters
b8d00b9e6e baseparse: don't reset the disable-passthrough property value
Resetting as a result of _reset() on PAUSED->READY is unexpected.
2019-03-20 17:44:30 +11:00
Nirbheek Chauhan
febfabb39f misc: Fix various compiler warnings on MinGW
gstharness.c: Use G_GSIZE_FORMAT instead of hard-coding %zu
error: unknown conversion type character 'z' in format [-Werror=format]

gst-inspect.c: GPid is void* on non-UNIX, and we only use it on UNIX
error: initialization makes pointer from integer without a cast [-Werror]

gstmeta.c: Use and then discard value
error: value computed is not used [-Werror=unused-value]

With this, gstreamer builds with -Werror on MinGW
2019-02-05 18:45:54 +05:30
Tim-Philipp Müller
41d5f22334 aggregator: fix typo in docs 2019-01-05 18:55:12 +00:00
Michael Olbrich
c5b85da8ef gdb: implement 'gst-dot' and 'gst-print' commands
This adds two custom gdb commands:

'gst-dot' creates dot files that a very close to what
GST_DEBUG_BIN_TO_DOT_FILE() produces. Object properties and buffer content
(e.g. codec-data in caps) are not available.

'gst-print' produces high-level information about GStreamer objects. This
is currently limited to pads for GstElements and events for the pads. The
output can look like this:

(gdb) gst-print pad.object.parent
GstMatroskaDemux (matroskademux0) {
    SinkPad (sink, pull) {
    }
    SrcPad (video_0, push) {
      events:
        stream-start:
          stream-id: 0463ccb080d00b8689bf569a435c4ff84f9ff753545318ae2328ea0763fd0bec/001:1274058367
        caps: video/x-theora
          width: 1920
          height: 800
          pixel-aspect-ratio: 1/1
          framerate: 24/1
          streamheader: < 0x5555557c7d30 [GstBuffer], 0x5555557c7e40 [GstBuffer], 0x7fffe00141d0 [GstBuffer] >
        segment: time
          rate: 1
        tag: global
          container-format: Matroska
    }
    SrcPad (audio_0, push) {
      events:
        stream-start:
          stream-id: 0463ccb080d00b8689bf569a435c4ff84f9ff753545318ae2328ea0763fd0bec/002:1551204875
        caps: audio/mpeg
          mpegversion: 4
          framed: true
          stream-format: raw
          codec_data: 0x7fffe0014500 [GstBuffer]
          level: 2
          base-profile: lc
          profile: lc
          channels: 2
          rate: 44100
        segment: time
          rate: 1
        tag: global
          container-format: Matroska
        tag: stream
          audio-codec: MPEG-4 AAC audio
          language-code: en
    }
}
2018-12-31 16:19:05 +00:00
Michael Olbrich
e43a0c9943 gdb: make the code PEP-8 compliant 2018-12-31 16:19:05 +00:00
Tim-Philipp Müller
33267b2ecc basesrc: ensure submitted buffer list is writable
Fixes flaky appsrc unit test where depending on scheduling
the submitted list might not be writable if submitted via
an action signal from the application thread.

Fixes gst-plugins-base#522
2018-12-19 00:34:40 +00:00
Edward Hervey
34b02908c7 harness: assert on result of gst_pad_push_event()
That assertion was accidentally removed in the refactoring done in
60de1f26c7
2018-12-15 11:07:21 +01:00
Roman Sivriver
c9e2057ec6 gst: fixed the install command for gdb python macros on macos - install -D is not supported by BSD install 2018-12-06 20:22:21 +00:00
KimTaeSoo
bf1979e55f baseparse: Use buffer from short reads instead of pulling again
baseparse internally uses a 64kb buffer for pulling data from upstream.
If a 64kb pull is failing with a short read, it would previously pull
again the requested size.

Doing so is not only inefficient but also seems to cause problems with
some elements (rawvideoparse) where the second pull would fail with EOS.

Short reads are only allowed in GStreamer at EOS.

Closes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/294
2018-11-28 17:38:58 +02:00
Jordan Petridis
84512152c1
Run gst-indent through the files
This is required before we enabled an indent test in the CI.

https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/33
2018-11-28 05:58:53 +02:00
Mathieu Duponchelle
f83b8ab701 Revert "harness: Take ownership of floating references (pads, elements) passed to the harness"
This reverts commit 2faf93c009.

THis broke half our unit tests, oops:

https://ci.gstreamer.net/job/GStreamer-master/11203/testReport/
2018-11-27 02:59:41 +01:00
Sebastian Dröge
2faf93c009 harness: Take ownership of floating references (pads, elements) passed to the harness
Without this bindings get confused about the meaning of references, and
we really own these references if they are not already owned by
something else.
2018-11-26 17:03:23 +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
Tim-Philipp Müller
b92e34ebfd Fix distcheck
Follow-up to !18 and #320.
2018-11-08 14:09:32 +00:00