1 diff -urN /home/zzoon.ko/opensrc/tarball/gst-rtsp-server-1.2.3/gst/rtsp-server/Makefile.am ./Makefile.am
2 --- /home/zzoon.ko/opensrc/tarball/gst-rtsp-server-1.2.3/gst/rtsp-server/Makefile.am 2014-01-13 01:50:54.000000000 +0900
3 +++ ./Makefile.am 2015-01-15 16:49:47.091243189 +0900
8 + rtsp-media-factory-wfd.h \
9 rtsp-media-factory-uri.h \
13 rtsp-session-media.h \
28 rtsp-media-factory.c \
29 + rtsp-media-factory-wfd.c \
30 rtsp-media-factory-uri.c \
34 rtsp-session-media.c \
44 diff -urN /home/zzoon.ko/opensrc/tarball/gst-rtsp-server-1.2.3/gst/rtsp-server/rtsp-client.c ./rtsp-client.c
45 --- /home/zzoon.ko/opensrc/tarball/gst-rtsp-server-1.2.3/gst/rtsp-server/rtsp-client.c 2014-02-10 21:43:30.000000000 +0900
46 +++ ./rtsp-client.c 2015-02-23 16:33:37.059801061 +0900
48 GstRTSPContext * ctx);
49 static gchar *default_make_path_from_uri (GstRTSPClient * client,
50 const GstRTSPUrl * uri);
51 +static gboolean default_handle_options_request (GstRTSPClient * client,
52 + GstRTSPContext * ctx);
53 +static gboolean default_handle_set_param_request (GstRTSPClient * client,
54 + GstRTSPContext * ctx);
55 +static gboolean default_handle_get_param_request (GstRTSPClient * client,
56 + GstRTSPContext * ctx);
58 G_DEFINE_TYPE (GstRTSPClient, gst_rtsp_client, G_TYPE_OBJECT);
61 klass->params_set = default_params_set;
62 klass->params_get = default_params_get;
63 klass->make_path_from_uri = default_make_path_from_uri;
64 + klass->handle_options_request = default_handle_options_request;
65 + klass->handle_set_param_request = default_handle_set_param_request;
66 + klass->handle_get_param_request = default_handle_get_param_request;
68 g_object_class_install_property (gobject_class, PROP_SESSION_POOL,
69 g_param_spec_object ("session-pool", "Session Pool",
74 -handle_get_param_request (GstRTSPClient * client, GstRTSPContext * ctx)
75 +default_handle_get_param_request (GstRTSPClient * client, GstRTSPContext * ctx)
83 -handle_set_param_request (GstRTSPClient * client, GstRTSPContext * ctx)
84 +default_handle_set_param_request (GstRTSPClient * client, GstRTSPContext * ctx)
90 goto media_not_found_no_reply;
92 + /* FIXME-WFD : wfd url problem */
94 if (path[matched] == '\0')
95 goto control_not_found;
99 /* control is remainder */
100 control = &path[matched + 1];
102 + control = g_strdup ("stream=0");
105 /* find the stream now using the control part */
106 stream = gst_rtsp_media_find_stream (media, control);
107 @@ -1534,6 +1548,10 @@
108 /* create and serialize the server transport */
109 st = make_server_transport (client, ctx, ct);
110 trans_str = gst_rtsp_transport_as_text (st);
112 + /* FIXME-WFD : Temporarily force to set profile string */
113 + trans_str = g_strjoinv ("RTP/AVP/UDP", g_strsplit (trans_str, "RTP/AVP", -1));
115 gst_rtsp_transport_free (st);
117 /* construct the response now */
118 @@ -1820,7 +1838,7 @@
122 -handle_options_request (GstRTSPClient * client, GstRTSPContext * ctx)
123 +default_handle_options_request (GstRTSPClient * client, GstRTSPContext * ctx)
125 GstRTSPMethod options;
127 @@ -1906,6 +1924,9 @@
128 GstRTSPContext sctx = { NULL }, *ctx;
129 GstRTSPMessage response = { 0 };
131 + GstRTSPClientClass *klass;
133 + klass = GST_RTSP_CLIENT_GET_CLASS (client);
135 if (!(ctx = gst_rtsp_context_get_current ())) {
137 @@ -1995,7 +2016,7 @@
138 /* now see what is asked and dispatch to a dedicated handler */
140 case GST_RTSP_OPTIONS:
141 - handle_options_request (client, ctx);
142 + klass->handle_options_request (client, ctx);
144 case GST_RTSP_DESCRIBE:
145 handle_describe_request (client, ctx);
146 @@ -2013,10 +2034,10 @@
147 handle_teardown_request (client, ctx);
149 case GST_RTSP_SET_PARAMETER:
150 - handle_set_param_request (client, ctx);
151 + klass->handle_set_param_request (client, ctx);
153 case GST_RTSP_GET_PARAMETER:
154 - handle_get_param_request (client, ctx);
155 + klass->handle_get_param_request (client, ctx);
157 case GST_RTSP_ANNOUNCE:
158 case GST_RTSP_RECORD:
159 diff -urN /home/zzoon.ko/opensrc/tarball/gst-rtsp-server-1.2.3/gst/rtsp-server/rtsp-client.h ./rtsp-client.h
160 --- /home/zzoon.ko/opensrc/tarball/gst-rtsp-server-1.2.3/gst/rtsp-server/rtsp-client.h 2014-01-13 01:50:54.000000000 +0900
161 +++ ./rtsp-client.h 2015-02-17 15:57:28.047757756 +0900
163 GstRTSPResult (*params_get) (GstRTSPClient *client, GstRTSPContext *ctx);
164 gchar * (*make_path_from_uri) (GstRTSPClient *client, const GstRTSPUrl *uri);
166 + gboolean (*handle_options_request) (GstRTSPClient * client, GstRTSPContext * ctx);
167 + gboolean (*handle_set_param_request) (GstRTSPClient * client, GstRTSPContext * ctx);
168 + gboolean (*handle_get_param_request) (GstRTSPClient * client, GstRTSPContext * ctx);
171 void (*closed) (GstRTSPClient *client);
172 void (*new_session) (GstRTSPClient *client, GstRTSPSession *session);
174 GstRTSPSession *sess,
177 -GList * gst_rtsp_client_session_filter (GstRTSPClient *client,
178 +GList * gst_rtsp_client_session_filter (GstRTSPClient *client,
179 GstRTSPClientSessionFilterFunc func,
182 diff -urN /home/zzoon.ko/opensrc/tarball/gst-rtsp-server-1.2.3/gst/rtsp-server/rtsp-media.c ./rtsp-media.c
183 --- /home/zzoon.ko/opensrc/tarball/gst-rtsp-server-1.2.3/gst/rtsp-server/rtsp-media.c 2014-02-22 00:11:11.000000000 +0900
184 +++ ./rtsp-media.c 2015-02-17 15:57:25.483757666 +0900
185 @@ -241,10 +241,12 @@
186 "If this media pipeline can be reused after an unprepare",
187 DEFAULT_REUSABLE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
189 +#ifdef GST_TYPE_RTSP_PROFILE
190 g_object_class_install_property (gobject_class, PROP_PROFILES,
191 g_param_spec_flags ("profiles", "Profiles",
192 "Allowed transfer profiles", GST_TYPE_RTSP_PROFILE,
193 DEFAULT_PROFILES, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
196 g_object_class_install_property (gobject_class, PROP_PROTOCOLS,
197 g_param_spec_flags ("protocols", "Protocols",
198 diff -urN /home/zzoon.ko/opensrc/tarball/gst-rtsp-server-1.2.3/gst/rtsp-server/rtsp-stream.c ./rtsp-stream.c
199 --- /home/zzoon.ko/opensrc/tarball/gst-rtsp-server-1.2.3/gst/rtsp-server/rtsp-stream.c 2014-02-22 00:11:11.000000000 +0900
200 +++ ./rtsp-stream.c 2015-02-17 15:57:25.527757667 +0900
201 @@ -173,10 +173,12 @@
202 "The control string for this stream", DEFAULT_CONTROL,
203 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
205 +#ifdef GST_TYPE_RTSP_PROFILE
206 g_object_class_install_property (gobject_class, PROP_PROFILES,
207 g_param_spec_flags ("profiles", "Profiles",
208 "Allowed transfer profiles", GST_TYPE_RTSP_PROFILE,
209 DEFAULT_PROFILES, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
212 g_object_class_install_property (gobject_class, PROP_PROTOCOLS,
213 g_param_spec_flags ("protocols", "Protocols",
214 @@ -1001,6 +1003,9 @@
215 inetaddr = g_inet_address_new_any (family);
218 + /* FIXME-WFD : Force to set 19000 as port number */
221 rtp_sockaddr = g_inet_socket_address_new (inetaddr, tmp_rtp);
222 if (!g_socket_bind (rtp_socket, rtp_sockaddr, FALSE, NULL)) {
223 g_object_unref (rtp_sockaddr);
224 @@ -1171,9 +1176,14 @@
225 G_SOCKET_FAMILY_IPV4, priv->udpsrc_v4, priv->udpsink,
226 &priv->server_port_v4, &priv->server_addr_v4);
228 + /* FIXME-WFD : force to disable ipv6 mode in WFD mode */
230 priv->have_ipv6 = alloc_ports_one_family (priv->pool, priv->buffer_size,
231 G_SOCKET_FAMILY_IPV6, priv->udpsrc_v6, priv->udpsink,
232 &priv->server_port_v6, &priv->server_addr_v6);
234 + priv->have_ipv6 = FALSE;
237 return priv->have_ipv4 || priv->have_ipv6;
239 @@ -1552,6 +1562,8 @@
241 /* get the session */
242 g_signal_emit_by_name (rtpbin, "get-internal-session", idx, &priv->session);
243 + GST_DEBUG("zzoon unref internal session");
244 + g_object_unref(priv->session);
246 g_signal_connect (priv->session, "on-new-ssrc", (GCallback) on_new_ssrc,
248 @@ -1841,6 +1853,7 @@
249 gst_object_unref (priv->send_src[1]);
250 priv->send_src[1] = NULL;
252 + GST_DEBUG("Unref rtp session");
253 g_object_unref (priv->session);
254 priv->session = NULL;