mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
media: add signal to notify of unprepare
This commit is contained in:
parent
5dab222089
commit
0c1df5e023
2 changed files with 17 additions and 0 deletions
|
@ -30,6 +30,12 @@ enum
|
|||
PROP_LAST
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
SIGNAL_UNPREPARED,
|
||||
SIGNAL_LAST
|
||||
};
|
||||
|
||||
static void gst_rtsp_media_get_property (GObject *object, guint propid,
|
||||
GValue *value, GParamSpec *pspec);
|
||||
static void gst_rtsp_media_set_property (GObject *object, guint propid,
|
||||
|
@ -40,6 +46,8 @@ static gpointer do_loop (GstRTSPMediaClass *klass);
|
|||
static gboolean default_handle_message (GstRTSPMedia *media, GstMessage *message);
|
||||
static void unlock_streams (GstRTSPMedia *media);
|
||||
|
||||
static guint gst_rtsp_media_signals[SIGNAL_LAST] = { 0 };
|
||||
|
||||
G_DEFINE_TYPE (GstRTSPMedia, gst_rtsp_media, G_TYPE_OBJECT);
|
||||
|
||||
static void
|
||||
|
@ -63,6 +71,11 @@ gst_rtsp_media_class_init (GstRTSPMediaClass * klass)
|
|||
"If this media pipeline can be reused after an unprepare",
|
||||
DEFAULT_REUSABLE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
gst_rtsp_media_signals[SIGNAL_UNPREPARED] =
|
||||
g_signal_new ("unprepared", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstRTSPMediaClass, unprepared), NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0, G_TYPE_NONE);
|
||||
|
||||
klass->context = g_main_context_new ();
|
||||
klass->loop = g_main_loop_new (klass->context, TRUE);
|
||||
|
||||
|
|
|
@ -186,7 +186,11 @@ struct _GstRTSPMediaClass {
|
|||
GMainLoop *loop;
|
||||
GThread *thread;
|
||||
|
||||
/* vmethods */
|
||||
gboolean (*handle_message) (GstRTSPMedia *media, GstMessage *message);
|
||||
|
||||
/* signals */
|
||||
gboolean (*unprepared) (GstRTSPMedia *media);
|
||||
};
|
||||
|
||||
GType gst_rtsp_media_get_type (void);
|
||||
|
|
Loading…
Reference in a new issue