Commit graph

11 commits

Author SHA1 Message Date
Nirbheek Chauhan 945fd11907 audio: Add logging that was useful in figuring out the last commit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1461>
2022-01-08 05:15:30 +00:00
Nirbheek Chauhan 554a2a5145 audio-converter: Fix resampling when there's nothing to output
Sometimes we can't output anything because we don't have enough
incoming frames. In that case, the resampler was trying to call
do_quantize() and do_resample() in a loop forever because there would
never be samples to output (so chain->samples would always be NULL).

Fix this by not calling chain->make_func() in a loop -- seems
completely unnecessary since calling it over and over won't change
anything if the make_func() can't output samples.

Also add some checks for the input and / or output being NULL when
doing conversion or quantization. This will happen when we have
nothing to output.

We can't bail early, because we need resampler->samples_avail to be
updated in gst_audio_resampler_resample(), so we must call that and
no-op everything along the way.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1461>
2022-01-08 05:15:30 +00:00
Nirbheek Chauhan 5d3009b7f8 audio-resampler: Fix segfault when we can't output any frames
Sometimes the resampler has enough space to store all the incoming
samples without outputting anything. When this happens,
gst_audio_resampler_get_out_frames() returns 0.

In that case, the resampler should consume samples and just return.
Otherwise, we get a segfault when gst_audio_resampler_resample() tries
to resample into a NULL 'out' pointer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1343>
2021-11-12 16:12:27 +00:00
Xavier Claessens eb072600a6 Revert "audio: Merge simd libs into the main one"
This reverts commit 4d3a200358.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1194>
2021-10-19 16:56:35 +00:00
Tim-Philipp Müller cf9be70946 gst-plugins-base: define G_LOG_DOMAIN for all libraries
Fixes #634

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1009>
2021-10-19 00:12:25 +00:00
Mathieu Duponchelle c3d878e990 audio/video aggregator: make use of new aggregator inactive pad API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/867>
2021-10-18 22:34:11 +00:00
Thibault Saunier 6e79932ad9 meson: List libraries and their corresponding gir definition
Introduces a `libraries` variable that contains all libraries in a
list with the following format:

``` meson
libraries = [
    [pkg_name, {
        'lib': library_object
        'gir': [ {full gir definition in a dict } ]
    ],
    ....
]
```

It therefore refactors the way we build the gir so that we can reuse the
same information to build them against 'gstreamer-full' in gst-build
when linking statically

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1093>
2021-10-15 19:27:30 -03:00
Thibault Saunier e2dd28a753 meson: Mark files as files()
Making it more robust and future proof

And fix issues that it creates

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1093>
2021-10-15 19:27:30 -03:00
Olivier Crête 4d3a200358 audio: Merge simd libs into the main one
Actually extract the .o objects from the convience libraries and put
them into the main one. Without this, they will just be referenced by
the .pc file, but it will be unusable because they are not installed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1122>
2021-10-13 01:28:16 +00:00
Tim-Philipp Müller 43ed0df54c audio: make GST_AUDIO_INFO_IS_UNPOSITIONED return a boolean
Luckily this worked right since the flag we check is the
only flag and its vale is 1, but feels more correct to
actually check for non-zeroness.

Spotted by Stirling Westrup.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/926>
2021-09-29 23:53:12 +00:00
Thibault Saunier 2fd28195ca Move files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir 2021-09-24 16:13:26 -03:00