2 * Copyright (C) 2008 Wim Taymans <wim.taymans at gmail.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
26 #include <sys/types.h>
27 #include <netinet/in.h>
29 #include <sys/socket.h>
32 #include <arpa/inet.h>
35 #include <gst/rtsp/gstrtspconnection.h>
37 #ifndef __GST_RTSP_CLIENT_H__
38 #define __GST_RTSP_CLIENT_H__
40 #include "rtsp-media.h"
41 #include "rtsp-media-mapping.h"
42 #include "rtsp-session-pool.h"
46 #define GST_TYPE_RTSP_CLIENT (gst_rtsp_client_get_type ())
47 #define GST_IS_RTSP_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_RTSP_CLIENT))
48 #define GST_IS_RTSP_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_RTSP_CLIENT))
49 #define GST_RTSP_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_RTSP_CLIENT, GstRTSPClientClass))
50 #define GST_RTSP_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_RTSP_CLIENT, GstRTSPClient))
51 #define GST_RTSP_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_RTSP_CLIENT, GstRTSPClientClass))
52 #define GST_RTSP_CLIENT_CAST(obj) ((GstRTSPClient*)(obj))
53 #define GST_RTSP_CLIENT_CLASS_CAST(klass) ((GstRTSPClientClass*)(klass))
55 typedef struct _GstRTSPClient GstRTSPClient;
56 typedef struct _GstRTSPClientClass GstRTSPClientClass;
61 * @connection: the connection object handling the client request.
62 * @address: the address of the connection
63 * @media: handle to the media handled by the client.
64 * @pool: handle to the session pool used by the client.
65 * @thread: thread to handle the client connection
67 * The client structure.
69 struct _GstRTSPClient {
72 GstRTSPConnection *connection;
73 GstRTSPChannel *channel;
77 GstRTSPSessionPool *session_pool;
78 GstRTSPMediaMapping *media_mapping;
84 struct _GstRTSPClientClass {
85 GObjectClass parent_class;
88 GType gst_rtsp_client_get_type (void);
90 GstRTSPClient * gst_rtsp_client_new (void);
92 void gst_rtsp_client_set_session_pool (GstRTSPClient *client,
93 GstRTSPSessionPool *pool);
94 GstRTSPSessionPool * gst_rtsp_client_get_session_pool (GstRTSPClient *client);
96 void gst_rtsp_client_set_media_mapping (GstRTSPClient *client,
97 GstRTSPMediaMapping *mapping);
98 GstRTSPMediaMapping * gst_rtsp_client_get_media_mapping (GstRTSPClient *client);
100 void gst_rtsp_client_set_timeout (GstRTSPClient *client, guint timeout);
101 guint gst_rtsp_client_get_timeout (GstRTSPClient *client);
103 gboolean gst_rtsp_client_accept (GstRTSPClient *client,
104 GIOChannel *channel);
108 #endif /* __GST_RTSP_CLIENT_H__ */