Commit graph

17 commits

Author SHA1 Message Date
Philippe Normand
a6b5e3c7d5 transcoder: Add state-changed signal
Similar to GstPlayer, a new signal for state tracking is now emitted at runtime,
as a commodity for applications which then don't need to monitor the pipeline
GstBus for state changes anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2028>
2021-03-10 17:13:57 +00:00
Thibault Saunier
1d03fdcc09 transcoder: Add some missing API guards
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2044>
2021-03-01 12:37:44 +00:00
Thibault Saunier
d252ab2e06 transcoder: Fix potential use of uninitialized variables
gst_structure_get won't touch variables if the field is not present
leading to potential use of initialized vars

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2044>
2021-03-01 12:37:44 +00:00
Thibault Saunier
8c2fd4fff7 transcoder: Rework the API to create/get SignalAdapter
We can only have 1 single GstTranscoderSignalAdapter object for a
given GstTranscoder object, this enforces that by avoiding to expose
a constructor and instead add a method to GstTranscoder to get the
signal adapter (internally creating it when needed). We can still
cleanly ensure that the signal adapter is running for the requested
GMainContext and return NULL if it is not the case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2044>
2021-03-01 12:37:44 +00:00
Philippe Normand
552007f839 transcoder: Remove un-needed gst_init call
We can safely assume GStreamer is already initialized from here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1840>
2021-02-26 15:37:23 +00:00
Thibault Saunier
984f0c2d2f transcoder: Port to a GstBus API instead
Following the move made by GstPlayer in:

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/35

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1840>
2021-02-26 15:37:23 +00:00
Thibault Saunier
7cf6e4d8f2 transcoder: Automatically generate enums GTypes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1840>
2021-02-26 15:37:23 +00:00
Thibault Saunier
0a1dcc9546 transcoder: Port to G_DECLARE
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1840>
2021-02-26 15:37:23 +00:00
Thibault Saunier
76bc578bae player/transcoder: Use bus signal watch
Instead of implementing exactly the same thing ourself but making
`GstBus` not know that it is the case.

Since we are *sure* that the bus can't have been access at the point
where we add the watch we are guaranteed that the current thread
maincontext is going to be used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1870>
2020-12-14 12:30:14 +00:00
Thibault Saunier
b3544e24ba transcoder: Handle the case where several errors are posted
There were cases where the loop was already destroyed when we were
receiving the following message.
2020-11-30 15:16:01 -03:00
Thibault Saunier
9d890c152e transcoder: Minor refactoring to output better debug logs 2020-11-30 15:16:01 -03:00
Thibault Saunier
a5fd2a4bc3 uritranscodebin: Move to using a urisourcebin for our source.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1151>
2020-10-29 13:30:07 +00:00
Thibault Saunier
7d1f5e951f transcoder: Base sync transcoding variant on a GMainLoop
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1151>
2020-10-29 13:30:07 +00:00
Xavier Claessens
2efb4a7adb Meson: Use pkg-config generator 2020-10-23 11:14:18 -04:00
Stéphane Cerveau
6bc0e9527e remove various useless linefeed in logs 2019-12-11 10:51:29 +01:00
Alistair Buxton
8ba1b8146f meson: use gir_init_section in GstTranscoder
GstTranscoder adds extra_args for gir which call gst_init() during
introspection. These extra arguments are the same as the standard
ones defined in the top level meson.build as "git_init_section",
However, the top level definition also ensures an empty plugin
repository is used.

Because GstTranscoder does not use the standard args, plugins get
loaded when it is introspected. Since some of the plugins fail
without specific hardware, this causes #1100.

This patch makes it use gir_init_section.

Fixes #1100.
2019-10-19 13:58:50 +01:00
Saunier Thibault
7a66b16d97 Import GstTranscoder 2019-08-28 13:02:13 +00:00