Tr : class derivation question

narcisse doudieu siewe wambenarcisse at yahoo.fr
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_IS_EXTEND_SERVER(obj)           (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RTSP_TYPE_EXTEND_SERVER))

#define RTSP_IS_EXTEND_SERVER_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), RTSP_TYPE_EXTEND_SERVER))

#define RTSP_EXTEND_SERVER_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), RTSP_TYPE_EXTEND_SERVER, RtspExtendServerClass))

#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 mutualink.net>
À : Discussion of the development of and with GStreamer <gstreamer-devel at lists.freedesktop.org> 
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).

TIA!
Chuck

_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130702/a011be8b/attachment.html>


More information about the gstreamer-devel mailing list