Commit 41dd6399 authored by Wim Taymans's avatar Wim Taymans

Reorganize things, prepare for media sharing

Added various other test server examples
Move the SDP message generation to a separate helper.
Refactor common code for finding the session.
Add content-base for realplayer compatibility
Clean up request uris before processing for better vlc compatibility.
Move prerolling and pipeline construction to the RTSPMedia object.
Use multiudpsink for future pipeline reuse.
parent 82a684e1
noinst_PROGRAMS = gst-rtsp-server
noinst_PROGRAMS = test-video test-ogg test-mp4
INCLUDES = -I$(top_srcdir) -I$(srcdir)
gst_rtsp_server_SOURCES = \
main.c
gst_rtsp_server_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
gst_rtsp_server_LDFLAGS = \
AM_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
AM_LDFLAGS = \
$(GST_LIBS) \
$(top_builddir)/gst/rtsp-server/libgstrtspserver-@GST_MAJORMINOR@.la
/* GStreamer
* Copyright (C) 2008 Wim Taymans <wim.taymans at gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include <gst/gst.h>
#include <gst/rtsp-server/rtsp-server.h>
int
main (int argc, char *argv[])
{
GMainLoop *loop;
GstRTSPServer *server;
GstRTSPMediaMapping *mapping;
GstRTSPMediaFactory *factory;
gchar *str;
gst_init (&argc, &argv);
if (argc < 2) {
g_message ("usage: %s <filename.ogg>", argv[0]);
return -1;
}
loop = g_main_loop_new (NULL, FALSE);
/* create a server instance */
server = gst_rtsp_server_new ();
/* get the mapping for this server, every server has a default mapper object
* that be used to map uri mount points to media factories */
mapping = gst_rtsp_server_get_media_mapping (server);
str = g_strdup_printf (
"( "
"filesrc location=%s ! qtdemux name=d "
"d. ! queue ! rtph264pay pt=96 name=pay0 "
"d. ! queue ! rtpmp4apay pt=97 name=pay1 "
")", argv[1]);
/* make a media factory for a test stream. The default media factory can use
* gst-launch syntax to create pipelines.
* any launch line works as long as it contains elements named pay%d. Each
* element with pay%d names will be a stream */
factory = gst_rtsp_media_factory_new ();
gst_rtsp_media_factory_set_launch (factory, str);
g_free (str);
/* attach the test factory to the /test url */
gst_rtsp_media_mapping_add_factory (mapping, "/test", factory);
/* don't need the ref to the mapper anymore */
g_object_unref (mapping);
/* attach the server to the default maincontext */
gst_rtsp_server_attach (server, NULL);
/* start serving */
g_main_loop_run (loop);
return 0;
}
/* GStreamer
* Copyright (C) 2008 Wim Taymans <wim.taymans at gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include <gst/gst.h>
#include <gst/rtsp-server/rtsp-server.h>
int
main (int argc, char *argv[])
{
GMainLoop *loop;
GstRTSPServer *server;
GstRTSPMediaMapping *mapping;
GstRTSPMediaFactory *factory;
gchar *str;
gst_init (&argc, &argv);
if (argc < 2) {
g_message ("usage: %s <filename.ogg>", argv[0]);
return -1;
}
loop = g_main_loop_new (NULL, FALSE);
/* create a server instance */
server = gst_rtsp_server_new ();
/* get the mapping for this server, every server has a default mapper object
* that be used to map uri mount points to media factories */
mapping = gst_rtsp_server_get_media_mapping (server);
str = g_strdup_printf (
"( "
"filesrc location=%s ! oggdemux name=d "
"d. ! queue ! theoraparse ! rtptheorapay name=pay0 "
"d. ! queue ! vorbisparse ! rtpvorbispay name=pay1 "
")", argv[1]);
/* make a media factory for a test stream. The default media factory can use
* gst-launch syntax to create pipelines.
* any launch line works as long as it contains elements named pay%d. Each
* element with pay%d names will be a stream */
factory = gst_rtsp_media_factory_new ();
gst_rtsp_media_factory_set_launch (factory, str);
g_free (str);
/* attach the test factory to the /test url */
gst_rtsp_media_mapping_add_factory (mapping, "/test", factory);
/* don't need the ref to the mapper anymore */
g_object_unref (mapping);
/* attach the server to the default maincontext */
gst_rtsp_server_attach (server, NULL);
/* start serving */
g_main_loop_run (loop);
return 0;
}
......@@ -47,10 +47,11 @@ main (int argc, char *argv[])
factory = gst_rtsp_media_factory_new ();
gst_rtsp_media_factory_set_launch (factory, "( "
"videotestsrc ! video/x-raw-yuv,width=352,height=288,framerate=15/1 ! "
"x264enc bitrate=300 ! rtph264pay name=pay0 pt=96 "
"ffenc_h263 ! rtph263pay name=pay0 pt=96 "
"audiotestsrc ! audio/x-raw-int,rate=8000 ! "
"alawenc ! rtppcmapay name=pay1 pt=97 "
")");
/* attach the test factory to the /test url */
gst_rtsp_media_mapping_add_factory (mapping, "/test", factory);
......
......@@ -4,6 +4,7 @@ public_headers = \
rtsp-media.h \
rtsp-media-factory.h \
rtsp-media-mapping.h \
rtsp-sdp.h \
rtsp-session-pool.h \
rtsp-session.h
......@@ -13,6 +14,7 @@ c_sources = \
rtsp-media.c \
rtsp-media-factory.c \
rtsp-media-mapping.c \
rtsp-sdp.c \
rtsp-session-pool.c \
rtsp-session.c
......
This diff is collapsed.
......@@ -73,10 +73,8 @@ struct _GstRTSPClient {
struct sockaddr_in address;
GThread *thread;
GstRTSPSessionPool *pool;
GstRTSPMediaFactory *factory;
GstRTSPMediaMapping *mapping;
GstRTSPSessionPool *session_pool;
GstRTSPMediaMapping *media_mapping;
};
struct _GstRTSPClientClass {
......
......@@ -210,15 +210,6 @@ gst_rtsp_media_factory_construct (GstRTSPMediaFactory *factory, const GstRTSPUrl
return res;
}
static void
caps_notify (GstPad * pad, GParamSpec * unused, GstRTSPMediaStream * stream)
{
if (stream->caps)
gst_caps_unref (stream->caps);
if ((stream->caps = GST_PAD_CAPS (pad)))
gst_caps_ref (stream->caps);
}
static GstElement *
default_get_element (GstRTSPMediaFactory *factory, const GstRTSPUrl *url)
{
......@@ -276,12 +267,13 @@ default_construct (GstRTSPMediaFactory *factory, const GstRTSPUrl *url)
if (element == NULL)
goto no_element;
media = g_object_new (GST_TYPE_RTSP_MEDIA, NULL);
/* create a new empty media */
media = gst_rtsp_media_new ();
media->element = element;
/* try to find all the payloader elements, they should be named 'pay%d'. for
* each of the payloaders we will create a stream, collect the source pad and
* add a notify::caps on the pad. */
* each of the payloaders we will create a stream and collect the source pad.
*/
for (i = 0; ; i++) {
gchar *name;
......@@ -297,7 +289,6 @@ default_construct (GstRTSPMediaFactory *factory, const GstRTSPUrl *url)
/* create the stream */
stream = g_new0 (GstRTSPMediaStream, 1);
stream->media = media;
stream->element = element;
stream->payloader = pay;
stream->idx = media->streams->len;
......@@ -305,16 +296,12 @@ default_construct (GstRTSPMediaFactory *factory, const GstRTSPUrl *url)
/* ghost the pad of the payloader to the element */
stream->srcpad = gst_ghost_pad_new (name, pad);
gst_element_add_pad (stream->element, stream->srcpad);
stream->caps_sig = g_signal_connect (pad, "notify::caps", (GCallback) caps_notify, stream);
gst_object_unref (pad);
gst_element_add_pad (media->element, stream->srcpad);
gst_object_unref (pay);
g_free (name);
/* add stream now */
g_array_append_val (media->streams, stream);
gst_object_unref (pay);
g_free (name);
}
return media;
......
......@@ -56,22 +56,27 @@ struct _GstRTSPMediaFactory {
/**
* GstRTSPMediaFactoryClass:
* @get_element: Construct an return a #GstElement thast is a #GstBin containing
* the pipeline to use for the media. The bin should contain elements
* pay%d for each stream. The default implementation of this functions
* returns the bin created from the launch parameter.
* @construct: the vmethod that will be called when the factory has to create the
* #GstRTSPMedia for @url. The default implementation of this
* function calls get_element to retrieve an element and then looks for
* pay%d to create the streams.
* @handle_message: Handle a bus message for @media created from @factory.
* @get_element: Construct an return a #GstElement thast is a #GstBin containing
* the pipeline to use for the media. The bin should contain elements
* pay%d for each stream. The default implementation of this functions
* returns the bin created from the launch parameter.
*
* the #GstRTSPMediaFactory class structure.
*/
struct _GstRTSPMediaFactoryClass {
GObjectClass parent_class;
GstElement * (*get_element) (GstRTSPMediaFactory *factory, const GstRTSPUrl *url);
GstRTSPMedia * (*construct) (GstRTSPMediaFactory *factory, const GstRTSPUrl *url);
GstRTSPMedia * (*construct) (GstRTSPMediaFactory *factory, const GstRTSPUrl *url);
void (*handle_message) (GstRTSPMediaFactory *factory, GstRTSPMedia *media,
GstMessage *message);
GstElement * (*get_element) (GstRTSPMediaFactory *factory, const GstRTSPUrl *url);
};
GType gst_rtsp_media_factory_get_type (void);
......
This diff is collapsed.
......@@ -42,10 +42,18 @@ typedef struct _GstRTSPMediaClass GstRTSPMediaClass;
/**
* GstRTSPMediaStream:
*
* @media: the owner #GstRTSPMedia
* @idx: the stream index
* @element: the toplevel element
* @srcpad: the srcpad of the stream
* @payloader: the payloader of the format
* @prepared: if the stream is prepared for streaming
* @server_port: the server udp ports
* @recv_rtp_sink: sinkpad for RTP buffers
* @recv_rtcp_sink: sinkpad for RTCP buffers
* @recv_rtp_src: srcpad for RTP buffers
* @recv_rtcp_src: srcpad for RTCP buffers
* @udpsrc: the udp source elements for RTP/RTCP
* @udpsink: the udp sink elements for RTP/RTCP
* @caps_sig: the signal id for detecting caps
* @caps: the caps of the stream
*
......@@ -54,18 +62,38 @@ typedef struct _GstRTSPMediaClass GstRTSPMediaClass;
struct _GstRTSPMediaStream {
GstRTSPMedia *media;
guint idx;
guint idx;
GstPad *srcpad;
GstElement *payloader;
gboolean prepared;
GstRTSPRange server_port;
/* pads on the rtpbin */
GstPad *recv_rtcp_sink;
GstPad *send_rtp_sink;
GstPad *send_rtp_src;
GstPad *send_rtcp_src;
GstElement *element;
GstPad *srcpad;
GstElement *payloader;
gulong caps_sig;
GstCaps *caps;
/* sinks used for sending and receiving RTP and RTCP, they share
* sockets */
GstElement *udpsrc[2];
GstElement *udpsink[2];
/* the caps of the stream */
gulong caps_sig;
GstCaps *caps;
};
/**
* GstRTSPMedia:
* @media: the owner #GstRTSPMedia
* @element: the data providing element
* @stream: the different streams provided by @element
* @prepared: if the media is prepared for streaming
* @pipeline: the toplevel pipeline
* @rtpbin: the rtpbin
* @multifdsink: multifdsink element for TCP transport
*
* A class that contains the GStreamer element along with a list of
* #GstRTSPediaStream objects that can produce data.
......@@ -77,6 +105,16 @@ struct _GstRTSPMedia {
GstElement *element;
GArray *streams;
gboolean prepared;
/* the pipeline for the media */
GstElement *pipeline;
/* RTP session manager */
GstElement *rtpbin;
/* for TCP transport */
GstElement *multifdsink;
};
struct _GstRTSPMediaClass {
......@@ -85,10 +123,24 @@ struct _GstRTSPMediaClass {
GType gst_rtsp_media_get_type (void);
/* creating the media */
GstRTSPMedia * gst_rtsp_media_new (void);
/* dealing with the media */
guint gst_rtsp_media_n_streams (GstRTSPMedia *media);
GstRTSPMediaStream * gst_rtsp_media_get_stream (GstRTSPMedia *media, guint idx);
/* prepare the media for playback */
gboolean gst_rtsp_media_prepare (GstRTSPMedia *media);
/* add destinations to a stream */
gboolean gst_rtsp_media_stream_add (GstRTSPMediaStream *stream, GstRTSPTransport *ct);
gboolean gst_rtsp_media_stream_remove (GstRTSPMediaStream *stream, GstRTSPTransport *ct);
GstStateChangeReturn gst_rtsp_media_play (GstRTSPMedia *media);
GstStateChangeReturn gst_rtsp_media_pause (GstRTSPMedia *media);
GstStateChangeReturn gst_rtsp_media_stop (GstRTSPMedia *media);
G_END_DECLS
#endif /* __GST_RTSP_MEDIA_H__ */
/* GStreamer
* Copyright (C) 2008 Wim Taymans <wim.taymans at gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include <string.h>
#include "rtsp-sdp.h"
/**
* gst_rtsp_sdp_from_media:
* @media: a #GstRTSPMedia
*
* Create a new sdp message for @media.
*
* Returns: a new sdp message for @media. gst_sdp_message_free() after usage.
*/
GstSDPMessage *
gst_rtsp_sdp_from_media (GstRTSPMedia *media)
{
GstSDPMessage *sdp;
guint i, n_streams;
n_streams = gst_rtsp_media_n_streams (media);
gst_sdp_message_new (&sdp);
/* some standard things first */
gst_sdp_message_set_version (sdp, "0");
gst_sdp_message_set_origin (sdp, "-", "1188340656180883", "1", "IN", "IP4", "127.0.0.1");
gst_sdp_message_set_session_name (sdp, "Session streamed with GStreamer");
gst_sdp_message_set_information (sdp, "rtsp-server");
gst_sdp_message_add_time (sdp, "0", "0", NULL);
gst_sdp_message_add_attribute (sdp, "tool", "GStreamer");
gst_sdp_message_add_attribute (sdp, "type", "broadcast");
for (i = 0; i < n_streams; i++) {
GstRTSPMediaStream *stream;
GstSDPMedia *smedia;
GstStructure *s;
const gchar *caps_str, *caps_enc, *caps_params;
gchar *tmp;
gint caps_pt, caps_rate;
guint n_fields, j;
gboolean first;
GString *fmtp;
stream = gst_rtsp_media_get_stream (media, i);
gst_sdp_media_new (&smedia);
s = gst_caps_get_structure (stream->caps, 0);
/* get media type and payload for the m= line */
caps_str = gst_structure_get_string (s, "media");
gst_sdp_media_set_media (smedia, caps_str);
gst_structure_get_int (s, "payload", &caps_pt);
tmp = g_strdup_printf ("%d", caps_pt);
gst_sdp_media_add_format (smedia, tmp);
g_free (tmp);
gst_sdp_media_set_port_info (smedia, 0, 1);
gst_sdp_media_set_proto (smedia, "RTP/AVP");
/* for the c= line */
gst_sdp_media_add_connection (smedia, "IN", "IP4", "127.0.0.1", 0, 0);
/* get clock-rate, media type and params for the rtpmap attribute */
gst_structure_get_int (s, "clock-rate", &caps_rate);
caps_enc = gst_structure_get_string (s, "encoding-name");
caps_params = gst_structure_get_string (s, "encoding-params");
if (caps_params)
tmp = g_strdup_printf ("%d %s/%d/%s", caps_pt, caps_enc, caps_rate,
caps_params);
else
tmp = g_strdup_printf ("%d %s/%d", caps_pt, caps_enc, caps_rate);
gst_sdp_media_add_attribute (smedia, "rtpmap", tmp);
g_free (tmp);
/* the config uri */
tmp = g_strdup_printf ("stream=%d", i);
gst_sdp_media_add_attribute (smedia, "control", tmp);
g_free (tmp);
/* collect all other properties and add them to fmtp */
fmtp = g_string_new ("");
g_string_append_printf (fmtp, "%d ", caps_pt);
first = TRUE;
n_fields = gst_structure_n_fields (s);
for (j = 0; j < n_fields; j++) {
const gchar *fname, *fval;
fname = gst_structure_nth_field_name (s, j);
/* filter out standard properties */
if (!strcmp (fname, "media"))
continue;
if (!strcmp (fname, "payload"))
continue;
if (!strcmp (fname, "clock-rate"))
continue;
if (!strcmp (fname, "encoding-name"))
continue;
if (!strcmp (fname, "encoding-params"))
continue;
if (!strcmp (fname, "ssrc"))
continue;
if (!strcmp (fname, "clock-base"))
continue;
if (!strcmp (fname, "seqnum-base"))
continue;
if ((fval = gst_structure_get_string (s, fname))) {
g_string_append_printf (fmtp, "%s%s=%s", first ? "":";", fname, fval);
first = FALSE;
}
}
if (!first) {
tmp = g_string_free (fmtp, FALSE);
gst_sdp_media_add_attribute (smedia, "fmtp", tmp);
g_free (tmp);
}
else {
g_string_free (fmtp, TRUE);
}
gst_sdp_message_add_media (sdp, smedia);
}
return sdp;
}
/* GStreamer
* Copyright (C) 2008 Wim Taymans <wim.taymans at gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include <gst/gst.h>
#include <gst/sdp/gstsdpmessage.h>
#include "rtsp-media.h"
#ifndef __GST_RTSP_SDP_H__
#define __GST_RTSP_SDP_H__
G_BEGIN_DECLS
/* creating SDP */
GstSDPMessage * gst_rtsp_sdp_from_media (GstRTSPMedia *media);
G_END_DECLS
#endif /* __GST_RTSP_SDP_H__ */
......@@ -30,8 +30,8 @@ enum
PROP_0,
PROP_BACKLOG,
PROP_PORT,
PROP_POOL,
PROP_MAPPING,
PROP_SESSION_POOL,
PROP_MEDIA_MAPPING,
PROP_LAST
};
......@@ -78,23 +78,25 @@ gst_rtsp_server_class_init (GstRTSPServerClass * klass)
g_param_spec_int ("port", "Port", "The port the server uses to listen on",
1, 65535, DEFAULT_PORT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstRTSPServer::pool
* GstRTSPServer::session-pool
*
* The session pool of the server. By default each server has a separate
* session pool but sessions can be shared between servers by setting the same
* session pool on multiple servers.
*/
g_object_class_install_property (gobject_class, PROP_POOL,
g_param_spec_object ("pool", "Pool", "The session pool to use for client session",
g_object_class_install_property (gobject_class, PROP_SESSION_POOL,
g_param_spec_object ("session-pool", "Session Pool",
"The session pool to use for client session",
GST_TYPE_RTSP_SESSION_POOL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstRTSPServer::mapping
* GstRTSPServer::media-mapping
*
* The media mapping to use for this server. By default the server has no
* media mapping and thus cannot map urls to media streams.
*/
g_object_class_install_property (gobject_class, PROP_MAPPING,
g_param_spec_object ("mapping", "Mapping", "The media mapping to use for client session",
g_object_class_install_property (gobject_class, PROP_MEDIA_MAPPING,
g_param_spec_object ("media-mapping", "Media Mapping",
"The media mapping to use for client session",
GST_TYPE_RTSP_MEDIA_MAPPING, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
klass->accept_client = gst_rtsp_server_accept_client;
......@@ -105,8 +107,8 @@ gst_rtsp_server_init (GstRTSPServer * server)
{
server->server_port = DEFAULT_PORT;
server->backlog = DEFAULT_BACKLOG;
server->pool = gst_rtsp_session_pool_new ();
server->mapping = gst_rtsp_media_mapping_new ();
server->session_pool = gst_rtsp_session_pool_new ();
server->media_mapping = gst_rtsp_media_mapping_new ();
}
/**
......@@ -207,12 +209,12 @@ gst_rtsp_server_set_session_pool (GstRTSPServer *server, GstRTSPSessionPool *poo
g_return_if_fail (GST_IS_RTSP_SERVER (server));
old = server->pool;
old = server->session_pool;
if (old != pool) {
if (pool)
g_object_ref (pool);
server->pool = pool;
server->session_pool = pool;
if (old)
g_object_unref (old);
}
......@@ -235,7 +237,7 @@ gst_rtsp_server_get_session_pool (GstRTSPServer *server)
g_return_val_if_fail (GST_IS_RTSP_SERVER (server), NULL);
if ((result = server->pool))
if ((result = server->session_pool))
g_object_ref (result);
return result;
......@@ -255,12 +257,12 @@ gst_rtsp_server_set_media_mapping (GstRTSPServer *server, GstRTSPMediaMapping *m
g_return_if_fail (GST_IS_RTSP_SERVER (server));
old = server->mapping;
old = server->media_mapping;
if (old != mapping) {
if (mapping)
g_object_ref (mapping);
server->mapping = mapping;
server->media_mapping = mapping;
if (old)
g_object_unref (old);
}
......@@ -283,7 +285,7 @@ gst_rtsp_server_get_media_mapping (GstRTSPServer *server)
g_return_val_if_fail (GST_IS_RTSP_SERVER (server), NULL);
if ((result = server->mapping))
if ((result = server->media_mapping))
g_object_ref (result);
return result;
......@@ -302,10 +304,10 @@ gst_rtsp_server_get_property (GObject *object, guint propid,
case PROP_BACKLOG:
g_value_set_int (value, gst_rtsp_server_get_backlog (server));
break;
case PROP_POOL:
case PROP_SESSION_POOL:
g_value_take_object (value, gst_rtsp_server_get_session_pool (server));
break;
case PROP_MAPPING:
case PROP_MEDIA_MAPPING:
g_value_take_object (value, gst_rtsp_server_get_media_mapping (server));
break;
default:
......@@ -326,10 +328,10 @@ gst_rtsp_server_set_property (GObject *object, guint propid,
case PROP_BACKLOG:
gst_rtsp_server_set_backlog (server, g_value_get_int (value));
break;
case PROP_POOL:
case PROP_SESSION_POOL:
gst_rtsp_server_set_session_pool (server, g_value_get_object (value));
break;
case PROP_MAPPING:
case PROP_MEDIA_MAPPING:
gst_rtsp_server_set_media_mapping (server, g_value_get_object (value));
break;
default:
......@@ -444,10 +446,10 @@ gst_rtsp_server_accept_client (GstRTSPServer *server, GIOChannel *channel)
client = gst_rtsp_client_new ();
/* set the session pool that this client should use */
gst_rtsp_client_set_session_pool (client, server->pool);
gst_rtsp_client_set_session_pool (client, server->session_pool);
/* set the session pool that this client should use */
gst_rtsp_client_set_media_mapping (client, server->mapping);
gst_rtsp_client_set_media_mapping (client, server->media_mapping);
/* accept connections for that client, this function returns after accepting
* the connection and will run the remainder of the communication with the
......
......@@ -58,22 +58,21 @@ struct _GstRTSPServer {
GObject parent;
/* server information */
gint server_port;
gint backlog;
gchar *host;
struct sockaddr_in server_sin;