mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 21:51:09 +00:00
media-factory: add media-configure signal
Add signal to allow the application to configure the media after it was created from the factory.
This commit is contained in:
parent
56a16f9f5a
commit
85e2013ca4
2 changed files with 12 additions and 0 deletions
|
@ -39,6 +39,7 @@ enum
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
SIGNAL_MEDIA_CONSTRUCTED,
|
SIGNAL_MEDIA_CONSTRUCTED,
|
||||||
|
SIGNAL_MEDIA_CONFIGURE,
|
||||||
SIGNAL_LAST
|
SIGNAL_LAST
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -124,6 +125,12 @@ gst_rtsp_media_factory_class_init (GstRTSPMediaFactoryClass * klass)
|
||||||
media_constructed), NULL, NULL, g_cclosure_marshal_VOID__OBJECT,
|
media_constructed), NULL, NULL, g_cclosure_marshal_VOID__OBJECT,
|
||||||
G_TYPE_NONE, 1, GST_TYPE_RTSP_MEDIA);
|
G_TYPE_NONE, 1, GST_TYPE_RTSP_MEDIA);
|
||||||
|
|
||||||
|
gst_rtsp_media_factory_signals[SIGNAL_MEDIA_CONFIGURE] =
|
||||||
|
g_signal_new ("media-configure", G_TYPE_FROM_CLASS (klass),
|
||||||
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTSPMediaFactoryClass,
|
||||||
|
media_configure), NULL, NULL, g_cclosure_marshal_VOID__OBJECT,
|
||||||
|
G_TYPE_NONE, 1, GST_TYPE_RTSP_MEDIA);
|
||||||
|
|
||||||
klass->gen_key = default_gen_key;
|
klass->gen_key = default_gen_key;
|
||||||
klass->get_element = default_get_element;
|
klass->get_element = default_get_element;
|
||||||
klass->construct = default_construct;
|
klass->construct = default_construct;
|
||||||
|
@ -576,6 +583,10 @@ gst_rtsp_media_factory_construct (GstRTSPMediaFactory * factory,
|
||||||
if (klass->configure)
|
if (klass->configure)
|
||||||
klass->configure (factory, media);
|
klass->configure (factory, media);
|
||||||
|
|
||||||
|
g_signal_emit (factory,
|
||||||
|
gst_rtsp_media_factory_signals[SIGNAL_MEDIA_CONFIGURE], 0, media,
|
||||||
|
NULL);
|
||||||
|
|
||||||
/* check if we can cache this media */
|
/* check if we can cache this media */
|
||||||
if (gst_rtsp_media_is_shared (media)) {
|
if (gst_rtsp_media_is_shared (media)) {
|
||||||
/* insert in the hashtable, takes ownership of the key */
|
/* insert in the hashtable, takes ownership of the key */
|
||||||
|
|
|
@ -103,6 +103,7 @@ struct _GstRTSPMediaFactoryClass {
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*media_constructed) (GstRTSPMediaFactory *factory, GstRTSPMedia *media);
|
void (*media_constructed) (GstRTSPMediaFactory *factory, GstRTSPMedia *media);
|
||||||
|
void (*media_configure) (GstRTSPMediaFactory *factory, GstRTSPMedia *media);
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_rtsp_media_factory_get_type (void);
|
GType gst_rtsp_media_factory_get_type (void);
|
||||||
|
|
Loading…
Reference in a new issue