mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
rtsp-client: make create_sdp virtual method
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=680173
This commit is contained in:
parent
d803c8e29f
commit
228e2ccc2d
2 changed files with 11 additions and 1 deletions
|
@ -64,6 +64,7 @@ static void gst_rtsp_client_set_property (GObject * object, guint propid,
|
||||||
const GValue * value, GParamSpec * pspec);
|
const GValue * value, GParamSpec * pspec);
|
||||||
static void gst_rtsp_client_finalize (GObject * obj);
|
static void gst_rtsp_client_finalize (GObject * obj);
|
||||||
|
|
||||||
|
static GstSDPMessage * create_sdp (GstRTSPClient * client, GstRTSPMedia * media);
|
||||||
static void client_session_finalized (GstRTSPClient * client,
|
static void client_session_finalized (GstRTSPClient * client,
|
||||||
GstRTSPSession * session);
|
GstRTSPSession * session);
|
||||||
static void unlink_session_streams (GstRTSPClient * client,
|
static void unlink_session_streams (GstRTSPClient * client,
|
||||||
|
@ -82,6 +83,8 @@ gst_rtsp_client_class_init (GstRTSPClientClass * klass)
|
||||||
gobject_class->set_property = gst_rtsp_client_set_property;
|
gobject_class->set_property = gst_rtsp_client_set_property;
|
||||||
gobject_class->finalize = gst_rtsp_client_finalize;
|
gobject_class->finalize = gst_rtsp_client_finalize;
|
||||||
|
|
||||||
|
klass->create_sdp = create_sdp;
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_SESSION_POOL,
|
g_object_class_install_property (gobject_class, PROP_SESSION_POOL,
|
||||||
g_param_spec_object ("session-pool", "Session Pool",
|
g_param_spec_object ("session-pool", "Session Pool",
|
||||||
"The session pool to use for client session",
|
"The session pool to use for client session",
|
||||||
|
@ -1143,6 +1146,9 @@ handle_describe_request (GstRTSPClient * client, GstRTSPClientState * state)
|
||||||
guint i, str_len;
|
guint i, str_len;
|
||||||
gchar *str, *content_base;
|
gchar *str, *content_base;
|
||||||
GstRTSPMedia *media;
|
GstRTSPMedia *media;
|
||||||
|
GstRTSPClientClass *klass;
|
||||||
|
|
||||||
|
klass = GST_RTSP_CLIENT_GET_CLASS (client);
|
||||||
|
|
||||||
/* check what kind of format is accepted, we don't really do anything with it
|
/* check what kind of format is accepted, we don't really do anything with it
|
||||||
* and always return SDP for now. */
|
* and always return SDP for now. */
|
||||||
|
@ -1163,8 +1169,9 @@ handle_describe_request (GstRTSPClient * client, GstRTSPClientState * state)
|
||||||
if (!(media = find_media (client, state)))
|
if (!(media = find_media (client, state)))
|
||||||
goto no_media;
|
goto no_media;
|
||||||
|
|
||||||
|
|
||||||
/* create an SDP for the media object on this client */
|
/* create an SDP for the media object on this client */
|
||||||
if (!(sdp = create_sdp (client, media)))
|
if (!(sdp = klass->create_sdp (client, media)))
|
||||||
goto no_sdp;
|
goto no_sdp;
|
||||||
|
|
||||||
g_object_unref (media);
|
g_object_unref (media);
|
||||||
|
|
|
@ -34,6 +34,7 @@ typedef struct _GstRTSPClientState GstRTSPClientState;
|
||||||
#include "rtsp-media-mapping.h"
|
#include "rtsp-media-mapping.h"
|
||||||
#include "rtsp-session-pool.h"
|
#include "rtsp-session-pool.h"
|
||||||
#include "rtsp-auth.h"
|
#include "rtsp-auth.h"
|
||||||
|
#include "rtsp-sdp.h"
|
||||||
|
|
||||||
#define GST_TYPE_RTSP_CLIENT (gst_rtsp_client_get_type ())
|
#define GST_TYPE_RTSP_CLIENT (gst_rtsp_client_get_type ())
|
||||||
#define GST_IS_RTSP_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_RTSP_CLIENT))
|
#define GST_IS_RTSP_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_RTSP_CLIENT))
|
||||||
|
@ -108,6 +109,8 @@ struct _GstRTSPClient {
|
||||||
struct _GstRTSPClientClass {
|
struct _GstRTSPClientClass {
|
||||||
GObjectClass parent_class;
|
GObjectClass parent_class;
|
||||||
|
|
||||||
|
GstSDPMessage * (*create_sdp) (GstRTSPClient *client, GstRTSPMedia *media);
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*closed) (GstRTSPClient *client);
|
void (*closed) (GstRTSPClient *client);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue