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., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
21 #include <gst/rtsp/gstrtspconnection.h>
23 #ifndef __GST_RTSP_WFD_CLIENT_H__
24 #define __GST_RTSP_WFD_CLIENT_H__
28 typedef struct _GstRTSPWFDClient GstRTSPWFDClient;
29 typedef struct _GstRTSPWFDClientClass GstRTSPWFDClientClass;
30 typedef struct _GstRTSPWFDClientPrivate GstRTSPWFDClientPrivate;
32 #include "rtsp-context.h"
33 #include "rtsp-mount-points.h"
35 #include "rtsp-auth.h"
36 #include "rtsp-client.h"
38 #define GST_TYPE_RTSP_WFD_CLIENT (gst_rtsp_wfd_client_get_type ())
39 #define GST_IS_RTSP_WFD_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_RTSP_WFD_CLIENT))
40 #define GST_IS_RTSP_WFD_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_RTSP_WFD_CLIENT))
41 #define GST_RTSP_WFD_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_RTSP_WFD_CLIENT, GstRTSPWFDClientClass))
42 #define GST_RTSP_WFD_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_RTSP_WFD_CLIENT, GstRTSPWFDClient))
43 #define GST_RTSP_WFD_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_RTSP_WFD_CLIENT, GstRTSPWFDClientClass))
44 #define GST_RTSP_WFD_CLIENT_CAST(obj) ((GstRTSPWFDClient*)(obj))
45 #define GST_RTSP_WFD_CLIENT_CLASS_CAST(klass) ((GstRTSPWFDClientClass*)(klass))
59 * GstRTSPWFDClientSendFunc:
60 * @client: a #GstRTSPWFDClient
61 * @message: a #GstRTSPMessage
62 * @close: close the connection
63 * @user_data: user data when registering the callback
65 * This callback is called when @client wants to send @message. When @close is
66 * %TRUE, the connection should be closed when the message has been sent.
68 * Returns: %TRUE on success.
70 typedef gboolean (*GstRTSPWFDClientSendFunc) (GstRTSPWFDClient *client,
71 GstRTSPMessage *message,
78 * The client object represents the connection and its state with a client.
80 struct _GstRTSPWFDClient {
83 gint supported_methods;
85 GstRTSPWFDClientPrivate *priv;
86 gpointer _gst_reserved[GST_PADDING];
90 * GstRTSPWFDClientClass:
91 * @create_sdp: called when the SDP needs to be created for media.
92 * @configure_client_media: called when the stream in media needs to be configured.
93 * The default implementation will configure the blocksize on the payloader when
94 * spcified in the request headers.
95 * @configure_client_transport: called when the client transport needs to be
97 * @params_set: set parameters. This function should also initialize the
98 * RTSP response(ctx->response) via a call to gst_rtsp_message_init_response()
99 * @params_get: get parameters. This function should also initialize the
100 * RTSP response(ctx->response) via a call to gst_rtsp_message_init_response()
102 * The client class structure.
104 struct _GstRTSPWFDClientClass {
105 GstRTSPClientClass parent_class;
108 void (*wfd_options_request) (GstRTSPWFDClient *client);
109 void (*wfd_get_param_request) (GstRTSPWFDClient *client);
112 gpointer _gst_reserved[GST_PADDING_LARGE];
115 GType gst_rtsp_wfd_client_get_type (void);
117 GstRTSPWFDClient * gst_rtsp_wfd_client_new (void);
119 void gst_rtsp_wfd_client_start_wfd(GstRTSPWFDClient *client);
120 GstRTSPResult gst_rtsp_wfd_client_trigger_request (
121 GstRTSPWFDClient * client, GstWFDTriggerType type);
123 GstRTSPResult gst_rtsp_wfd_client_set_video_supported_resolution (
124 GstRTSPWFDClient * client, guint64 supported_reso);
127 * GstRTSPWFDClientSessionFilterFunc:
128 * @client: a #GstRTSPWFDClient object
129 * @sess: a #GstRTSPSession in @client
130 * @user_data: user data that has been given to gst_rtsp_wfd_client_session_filter()
132 * This function will be called by the gst_rtsp_wfd_client_session_filter(). An
133 * implementation should return a value of #GstRTSPFilterResult.
135 * When this function returns #GST_RTSP_FILTER_REMOVE, @sess will be removed
138 * A return value of #GST_RTSP_FILTER_KEEP will leave @sess untouched in
141 * A value of #GST_RTSP_FILTER_REF will add @sess to the result #GList of
142 * gst_rtsp_wfd_client_session_filter().
144 * Returns: a #GstRTSPFilterResult.
146 typedef GstRTSPFilterResult (*GstRTSPWFDClientSessionFilterFunc) (GstRTSPWFDClient *client,
147 GstRTSPSession *sess,
154 #endif /* __GST_RTSP_WFD_CLIENT_H__ */