Tr : class derivation question

narcisse doudieu siewe wambenarcisse at
Tue Jul 2 07:46:19 PDT 2013

Get a look to the rtsp-server.h   source code first.

if I wan to sublcass GstRTSPServer I can do this:

typedef struct RtspExtendServer  RtspExtendServer_t;

typedef struct RtspExtendServerClass  RtspExtendServerClass_t;

#define RTSP_TYPE_EXTEND_SERVER              (gst_rtsp_extend_server_get_type ())




#define RTSP_EXTEND_SERVER(obj)              (G_TYPE_CHECK_INSTANCE_CAST ((obj), RTSP_TYPE_EXTEND_SERVER, RtspExtendServer))

#define RTSP_EXTEND_SERVER_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), RTSP_TYPE_EXTEND_SERVER, RtspExtendServerClass))

#define RTSP_EXTEND_SERVER_CAST(obj)         ((RtspExtendServer*)(obj))

#define RTSP_EXTEND_SERVER_CLASS_CAST(klass) ((RtspExtendServerClass*)(klass))

struct RtspExtendServer
     GstRTSPServer server;
    /*some object variables*/

struct RtspExtendServerClass
     GstRTSPServerClass server;
    /*some function ans signals here*/

Hope that you will find what to do.

----- Mail transféré -----
De : Chuck Crisler <ccrisler at>
À : Discussion of the development of and with GStreamer <gstreamer-devel at> 
Envoyé le : Mardi 2 juillet 2013 14h21
Objet : class derivation question

This is really a GObject question but I am sure many people on this list know the answer.

I am trying to extend the RTSP server code, so I am deriving from the RTSP objects. How do I connect my derived classes to the GStreamer RTSP classes up to GObject? I have read through the GObject doc but they seem to assume that you are deriving from GObject (with the RTSP classes do).


gstreamer-devel mailing list
gstreamer-devel at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list