onvif-media-factory: define autoptr cleanup function

And have the factory in the onvif-server example inherit from
GstRTSPOnvifMediaFactory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/133>
This commit is contained in:
Mathieu Duponchelle 2020-06-10 13:45:04 +02:00 committed by GStreamer Merge Bot
parent e9e15579e6
commit ec5aa720d7
3 changed files with 6 additions and 2 deletions

View file

@ -524,7 +524,7 @@ fail:
struct _OnvifFactory struct _OnvifFactory
{ {
GstRTSPMediaFactory parent; GstRTSPOnvifMediaFactory parent;
}; };
G_DEFINE_TYPE (OnvifFactory, onvif_factory, GST_TYPE_RTSP_MEDIA_FACTORY); G_DEFINE_TYPE (OnvifFactory, onvif_factory, GST_TYPE_RTSP_MEDIA_FACTORY);

View file

@ -27,6 +27,6 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (ReplayBin, replay_bin, REPLAY, BIN, GstBin); G_DECLARE_FINAL_TYPE (ReplayBin, replay_bin, REPLAY, BIN, GstBin);
G_DECLARE_FINAL_TYPE (OnvifFactory, onvif_factory, ONVIF, FACTORY, G_DECLARE_FINAL_TYPE (OnvifFactory, onvif_factory, ONVIF, FACTORY,
GstRTSPMediaFactory); GstRTSPOnvifMediaFactory);
G_END_DECLS G_END_DECLS

View file

@ -88,4 +88,8 @@ guint gst_rtsp_onvif_media_factory_get_backchannel_bandwidth (GstRTSPOnvifMediaF
GST_RTSP_SERVER_API GST_RTSP_SERVER_API
gboolean gst_rtsp_onvif_media_factory_requires_backchannel (GstRTSPMediaFactory * factory, GstRTSPContext * ctx); gboolean gst_rtsp_onvif_media_factory_requires_backchannel (GstRTSPMediaFactory * factory, GstRTSPContext * ctx);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstRTSPOnvifMediaFactory, gst_object_unref)
#endif
#endif /* __GST_RTSP_ONVIF_MEDIA_FACTORY_H__ */ #endif /* __GST_RTSP_ONVIF_MEDIA_FACTORY_H__ */