mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
8c2fd4fff7
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>
43 lines
No EOL
1.6 KiB
C
43 lines
No EOL
1.6 KiB
C
/* GStreamer
|
|
*
|
|
* Copyright (C) 2020 Stephan Hesse <stephan@emliri.com>
|
|
* Copyright (C) 2020 Thibault Saunier <tsaunier@igalia.com>
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Library General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Library General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Library General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
* Boston, MA 02110-1301, USA.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#define GST_TRANSCODER_MESSAGE_DATA "gst-transcoder-message-data"
|
|
#define GST_TRANSCODER_MESSAGE_DATA_TYPE "transcoder-message-type"
|
|
#define GST_TRANSCODER_MESSAGE_DATA_POSITION "position"
|
|
#define GST_TRANSCODER_MESSAGE_DATA_DURATION "duration"
|
|
#define GST_TRANSCODER_MESSAGE_DATA_ERROR "error"
|
|
#define GST_TRANSCODER_MESSAGE_DATA_WARNING "warning"
|
|
#define GST_TRANSCODER_MESSAGE_DATA_ISSUE_DETAILS "issue-details"
|
|
|
|
struct _GstTranscoderSignalAdapter
|
|
{
|
|
GObject parent;
|
|
GstBus *bus;
|
|
GSource *source;
|
|
|
|
GWeakRef transcoder;
|
|
};
|
|
|
|
|
|
GstTranscoderSignalAdapter * gst_transcoder_signal_adapter_new_sync_emit (GstTranscoder * transcoder);
|
|
GstTranscoderSignalAdapter * gst_transcoder_signal_adapter_new (GstTranscoder * transcoder, GMainContext * context); |