...
 
Commits (21)
=== release 1.10.5 ===
2017-06-15 Sebastian Dröge <slomo@coaxion.net>
* configure.ac:
releasing 1.10.5
2017-02-23 17:24:39 +0000 Tim-Philipp Müller <tim@centricular.com>
* meson.build:
meson: update version
=== release 1.10.4 ===
2017-02-23 16:06:55 +0200 Sebastian Dröge <sebastian@centricular.com>
* ChangeLog:
* NEWS:
* RELEASE:
* configure.ac:
* gst-rtsp-server.doap:
Release 1.10.4
=== release 1.10.3 ===
2017-01-30 16:28:50 +0200 Sebastian Dröge <sebastian@centricular.com>
* ChangeLog:
* NEWS:
* RELEASE:
* configure.ac:
* gst-rtsp-server.doap:
Release 1.10.3
2017-01-19 14:57:19 +0200 Sebastian Dröge <sebastian@centricular.com>
* gst/rtsp-server/rtsp-client.c:
rtsp-client: Also handle the (S|G)ET_PARAMETER case of size==0 || !data as keep-alive
If there is no Content-Length header, no body would be allocated and the
'\0' would also not be appended to the body.
2017-01-19 14:24:07 +0200 Sebastian Dröge <sebastian@centricular.com>
* gst/rtsp-server/rtsp-client.c:
rtsp-client: Fix handling of keep-alive GET_PARAMETER/SET_PARAMETER
While they logically have 0 bytes length, GstRTSPConnection is appending
a '\0' to everything making the size be 1 instead.
2017-01-10 08:34:50 +0100 Patricia Muscalu <patricia@axis.com>
* gst/rtsp-server/rtsp-stream.c:
rtsp-stream: corrected if-statement in _get_server_port()
This bug was accidentally introduced while fixing a segfault
in _get_server_port() function.
https://bugzilla.gnome.org/show_bug.cgi?id=776345
2017-01-09 14:12:05 +0100 Patricia Muscalu <patricia@axis.com>
* gst/rtsp-server/rtsp-stream.c:
* tests/check/gst/stream.c:
rtsp-stream: fixed segmenation fault in _get_server_port()
Calling function gst_rtsp_stream_get_server_port() results in
segmenation fault in the RTP/RTSP/TCP case.
Port that the server will use to receive RTCP makes only
sense in the UDP case, however the function should handle
the TCP case in a nicer way.
https://bugzilla.gnome.org/show_bug.cgi?id=776345
2016-12-21 13:41:50 +0100 Patricia Muscalu <patricia@axis.com>
* gst/rtsp-server/rtsp-stream.c:
* tests/check/gst/rtspserver.c:
rtsp-stream: Fixed TCP transport case
Make sure that the appsink element is actually added to
the bin before trying to link it with the elements in it.
https://bugzilla.gnome.org/show_bug.cgi?id=776343
2016-12-01 18:04:34 +0200 Sebastian Dröge <sebastian@centricular.com>
* gst/rtsp-server/rtsp-media-factory.c:
rtsp-media-factory: Don't create a pipeline for the media pipeline string
We're going to put a pipeline into a pipeline otherwise, which is not
exactly ideal.
2016-10-25 15:41:28 +0300 Kseniia Vasilchuk <vasilchukkseniia@gmail.com>
* gst/rtsp-server/rtsp-media.c:
media: Fix race condition around finish_unprepare() if called multiple time
https://bugzilla.gnome.org/show_bug.cgi?id=755329
2016-12-02 15:40:09 +0100 Edward Hervey <edward@centricular.com>
* gst/rtsp-server/rtsp-media.c:
media: Fix pt map caps
Since decryption is handled within rtpbin, all outcoming stream
caps will be application/x-rtp (i.e. regular rtp)
Fixes RECORD with SRTP streams
2016-12-02 15:38:04 +0100 Edward Hervey <edward@centricular.com>
* gst/rtsp-server/rtsp-media-factory.c:
media-factory: Create media objects with the proper transport mode
The function called immediately afterwards (collect_streams()) will
need it to work properly
2016-11-30 14:06:36 +1100 Jan Schmidt <jan@centricular.com>
* gst/rtsp-sink/gstrtspclientsink.c:
rtspclientsink: Don't leave stale pointer after unref
Fix a warning on shutdown - don't keep a pointer to an
alread-unreffed object.
=== release 1.10.2 ===
2016-11-29 16:22:26 +0200 Sebastian Dröge <sebastian@centricular.com>
* ChangeLog:
* NEWS:
* RELEASE:
* configure.ac:
* gst-rtsp-server.doap:
Release 1.10.2
2016-11-21 23:29:56 +1100 Matthew Waters <matthew@centricular.com>
* gst/rtsp-server/rtsp-stream.c:
stream: block the output of rtpbin instead of the source pipeline
85c52e194bcb81928b96614be0ae47d59eccb1ce introduced a more correct
detection of the srtp rollover counter to add to the SDP.
Unfortunately, it was incomplete for live pipelines where the logic
blocks the source bin before creating the SDP and thus would never have
the necessary informaiton to create a correct SDP with srtp encryption.
Move the pad blocks to rtpbin's output pads instead so that the
necessary information can be created before we need the information for
the SDP.
https://bugzilla.gnome.org/show_bug.cgi?id=770239
2016-11-21 13:05:50 +0100 Göran Jönsson <goranjn@axis.com>
* gst/rtsp-server/rtsp-stream.c:
rtsp-stream: Set close-socket FALSE on UDP src:es
With this RTSP server can use the sockets independent on the udpsrc
state.
When the udp src is finalized it will unref socket and when g_socket
is finalized the socket will be closed.
https://bugzilla.gnome.org/show_bug.cgi?id=765673
2016-11-20 14:54:46 +0000 Tim-Philipp Müller <tim@centricular.com>
* meson.build:
meson: update version
=== release 1.10.1 ===
2016-11-17 15:58:08 +0200 Sebastian Dröge <sebastian@centricular.com>
* ChangeLog:
* NEWS:
* RELEASE:
* configure.ac:
* gst-rtsp-server.doap:
Release 1.10.1
2016-11-01 19:43:38 +0000 Tim-Philipp Müller <tim@centricular.com>
* meson.build:
meson: update version
=== release 1.10.0 ===
2016-11-01 Sebastian Dröge <slomo@coaxion.net>
2016-11-01 18:06:46 +0200 Sebastian Dröge <sebastian@centricular.com>
* ChangeLog:
* NEWS:
* RELEASE:
* configure.ac:
releasing 1.10.0
* gst-rtsp-server.doap:
Release 1.10.0
2016-10-28 18:38:01 +0100 Tim-Philipp Müller <tim@centricular.com>
......
# GStreamer 1.10 Release Notes
**GStreamer 1.10.0 was released on 1st November 2016.**
GStreamer 1.10.0 was originally released on 1st November 2016.
The latest bug-fix release in the 1.10 series is [1.10.5](#1.10.5) and was
released on 15 June 2017.
The GStreamer team is proud to announce a new major feature release in the
stable 1.x API series of your favourite cross-platform multimedia framework!
......@@ -11,7 +13,7 @@ improvements.
See [https://gstreamer.freedesktop.org/releases/1.10/][latest] for the latest
version of this document.
*Last updated: Tuesday 1 Nov 2016, 15:00 UTC [(log)][gitlog]*
*Last updated: Thursday 15 Jun 2017, 09:30 UTC [(log)][gitlog]*
[latest]: https://gstreamer.freedesktop.org/releases/1.10/
[gitlog]: https://cgit.freedesktop.org/gstreamer/www/log/src/htdocs/releases/1.10/release-notes-1.10.md
......@@ -39,7 +41,7 @@ improvements.
- A new `gst-docs` module has been created, and we are in the process of moving
our documentation to a markdown-based format for easier maintenance and
updates
- A new `gst-examples` module has been create, which contains example
- A new `gst-examples` module has been created, which contains example
GStreamer applications and is expected to grow with many more examples in
the future
- Various OpenGL and OpenGL|ES-related fixes and improvements for greater
......@@ -1073,6 +1075,138 @@ which is a stable branch.
1.10.0 was released on 1st November 2016.
<a name="1.10.1"></a>
### 1.10.1
The first 1.10 bug-fix release (1.10.1) was released on 17 November 2016.
This release only contains bugfixes and it should be safe to update from 1.10.x.
#### Major bugfixes in 1.10.1
- Security-relevant bugfix in the vmnc decoder (CVE-2016-9445, CVE-2016-9446)
- Various bugfixes to playbin3/decodebin3
- Fix error at the end of playing any WAV file
- Fix usability of androidmedia plugin if the camera or sensor API is not
available, but codecs are
- Handle redirections on PLAY, and missing control attribute in the RTSP source
- Various OpenGL related bugfixes
- ... and many, many more!
For a full list of bugfixes see [Bugzilla][buglist-1.10.1]. Note that this is
not the full list of changes. For the full list of changes please refer to the
GIT logs or ChangeLogs of the particular modules.
[buglist-1.10.1]: https://bugzilla.gnome.org/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&classification=Platform&limit=0&list_id=168172&order=bug_id&product=GStreamer&query_format=advanced&resolution=FIXED&target_milestone=1.10.1
<a name="1.10.2"></a>
### 1.10.2
The second 1.10 bug-fix release (1.10.2) was released on 29 November 2016.
This release only contains bugfixes and it should be safe to update from 1.10.x.
#### Major bugfixes in 1.10.2
- Security-relevant bugfix in the FLI/FLX/FLC decoder (CVE-2016-9634,
CVE-2016-9635, CVE-2016-9636)
- Various fixes for crashes, assertions and other failures on fuzzed input
files. Among others, thanks to Hanno Böck for testing and reporting
(CVE-2016-9807, CVE-2016-9808, CVE-2016-9809, CVE-2016-9810, CVE-2016-9811,
CVE-2016-9812, CVE-2016-9813).
- SAVP/SAVPF profile in gst-rtsp-server works for live streams again, and the
correct MIKEY policy message is generated
- Further OpenGL related bugfixes
- gst-libav was updated to ffmpeg 3.2.1
- ... and many, many more!
For a full list of bugfixes see [Bugzilla][buglist-1.10.2]. Note that this is
not the full list of changes. For the full list of changes please refer to the
GIT logs or ChangeLogs of the particular modules.
[buglist-1.10.2]: https://bugzilla.gnome.org/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&classification=Platform&limit=0&list_id=168172&order=bug_id&product=GStreamer&query_format=advanced&resolution=FIXED&target_milestone=1.10.2
<a name="1.10.3"></a>
### 1.10.3
The third 1.10 bug-fix release (1.10.3) was released on 30 January 2017.
This release only contains bugfixes and it should be safe to update from 1.10.x.
#### Major bugfixes in 1.10.3
- Various fixes for crashes, assertions, deadlocks and memory leaks on fuzzed
input files and in other situations (CVE-2016-10198, CVE-2016-10199,
CVE-2017-5837, CVE-2017-5838, CVE-2017-5839, CVE-2017-5840, CVE-2017-5841,
CVE-2017-5842, CVE-2017-5843, CVE-2017-5844, CVE-2017-5845, CVE-2017-5846)
- Regression fixes for souphttpsrc with redirection tracking and retrying
- Regression fix for gst-rtsp-server not handling TCP-only medias anymore
- Various other bugfixes the RTP/RTSP codebase
- Fix for gmodule on 64 bit Android, it was never working before there
- vp8enc works again on 32 bit Windows
- Fixes to Opus PLC handling in the decoder
- Fix for stream corruption in multihandlesink when removing clients
- gst-libav was updated to ffmpeg 3.2.2
- ... and many, many more!
For a full list of bugfixes see [Bugzilla][buglist-1.10.3]. Note that this is
not the full list of changes. For the full list of changes please refer to the
GIT logs or ChangeLogs of the particular modules.
[buglist-1.10.3]: https://bugzilla.gnome.org/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&classification=Platform&limit=0&list_id=187054&order=bug_id&product=GStreamer&query_format=advanced&resolution=FIXED&target_milestone=1.10.3
<a name="1.10.4"></a>
### 1.10.4
The fourth 1.10 bug-fix release (1.10.4) was released on 23 February 2017.
This release only contains bugfixes and it should be safe to update from 1.10.x.
#### Major bugfixes in 1.10.4
- Various fixes for crashes, assertions, deadlocks and memory leaks on fuzzed
input files and in other situations (CVE-2017-5847, CVE-2017-5848)
- More regression fixes for souphttpsrc redirection tracking
- Regression fix for gmodule on 32 bit Android, which was introduced as part
of the 64 bit Android fix in 1.10.3 and broke the androidmedia plugin
- Various bugfixes for regressions and other problems in the V4L2 plugin
- Fix for 5.1, 6.1 and 7.1 channel layouts for Vorbis
- Fixes for timestamp generation of Android video encoder element
- gst-libav was updated to ffmpeg 3.2.4, fixing a couple of CVEs
- ... and many, many more!
For a full list of bugfixes see [Bugzilla][buglist-1.10.4]. Note that this is
not the full list of changes. For the full list of changes please refer to the
GIT logs or ChangeLogs of the particular modules.
[buglist-1.10.4]: https://bugzilla.gnome.org/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&classification=Platform&limit=0&list_id=187054&order=bug_id&product=GStreamer&query_format=advanced&resolution=FIXED&target_milestone=1.10.4
<a name="1.10.5"></a>
### 1.10.5
The fifth 1.10 bug-fix release (1.10.5) was released on 15 June 2017.
This release only contains bugfixes and it should be safe to update from 1.10.x.
This is most likely the last release in the stable 1.10 release series.
#### Major bugfixes in 1.10.5
- Various fixes for crashes, assertions, deadlocks and memory leaks
- Fix for regression in rtpjitterbuffer that caused PTS to be reset to 0 on
- Fix detection of some HLS streams
- Various fixes to the MOV/MP4 muxer and demuxer
gaps in the input
- gst-libav was updated to ffmpeg 3.2.5, fixing a couple of CVEs
- ... and many, many more!
For a full list of bugfixes see [Bugzilla][buglist-1.10.5]. Note that this is
not the full list of changes and also does not include bug reports that were
closed after the 1.12.0 release. For the full list of changes please refer to
the GIT logs or ChangeLogs of the particular modules.
[buglist-1.10.5]: https://bugzilla.gnome.org/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&classification=Platform&limit=0&list_id=187054&order=bug_id&product=GStreamer&query_format=advanced&resolution=FIXED&target_milestone=1.10.5
## Known Issues
- iOS builds with iOS 6 SDK and old C++ STL. You need to select iOS 6 instead
......@@ -1083,11 +1217,6 @@ which is a stable branch.
- Building applications with Android NDK r13 on Windows does not work. Other
platforms and earlier/later versions of the NDK are not affected.
[Bug #772842](https://bugzilla.gnome.org/show_bug.cgi?id=772842)
- The new leaks tracer may deadlock the application (or exhibit other undefined
behaviour) when `SIGUSR` handling is enabled via the `GST_LEAKS_TRACER_SIG`
environment variable. [Bug #770373](https://bugzilla.gnome.org/show_bug.cgi?id=770373)
- vp8enc crashes on 32 bit Windows, but was working fine in 1.6. 64 bit Windows is unaffected.
[Bug #763663](https://bugzilla.gnome.org/show_bug.cgi?id=763663)
## Schedule for 1.12
......@@ -1096,9 +1225,9 @@ development version leading up to the stable 1.12 release. The development
of 1.11/1.12 will happen in the git master branch.
The plan for the 1.12 development cycle is yet to be confirmed, but it is
expected that feature freeze will be around early/mid-January,
expected that feature freeze will be around early/mid-February,
followed by several 1.11 pre-releases and the new 1.12 stable release
in March.
in April.
1.12 will be backwards-compatible to the stable 1.10, 1.8, 1.6, 1.4, 1.2 and
1.0 release series.
......@@ -1111,4 +1240,3 @@ Müller, Reynaldo H. Verdejo Pinochet, Arun Raghavan, Thibault Saunier,
Jan Schmidt, Wim Taymans, Matthew Waters*
*License: [CC BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)*
Release notes for GStreamer RTSP Server Library 1.10.0
Release notes for GStreamer RTSP Server Library 1.10.5
The GStreamer team is pleased to announce the first release of the new stable
1.10 release series. The 1.10 release series is adding new features on top of
the 1.0, 1.2, 1.4, 1.6 and 1.8 series and is part of the API and ABI-stable 1.x
release series of the GStreamer multimedia framework.
The GStreamer team is proud to announce the fifth bugfix release in the stable
1.10 release series of your favourite cross-platform multimedia framework!
Binaries for Android, iOS, Mac OS X and Windows will be provided shortly after
the source release by the GStreamer project during the stable 1.10 release
series.
This release only contains bugfixes and it is safe to update from 1.10.x.
Bugs fixed in this release
* 771983 : Deadlock when closing session and backlog is full.
* 772478 : Missing video stream from SDP
* 773640 : rtspclient unit test failures
See /releases/1.10/ for the full release notes.
==== Download ====
......@@ -54,8 +47,5 @@ subscribe to the gstreamer-devel list.
Contributors to this release
* Göran Jönsson
* Nikita Bobkov
* Tim-Philipp Müller
* Xavier Claessens
 
\ No newline at end of file
common @ 742c09d9
Subproject commit f980fd91c1c1fd01333966041a4a535366e897bd
Subproject commit 742c09d9f13748a32ddf90669204415b88dd976f
......@@ -2,7 +2,7 @@ AC_PREREQ(2.69)
dnl initialize autoconf
dnl when going to/from release please set the nano (fourth number) right !
dnl releases only do Wall, cvs and prerelease does Werror too
AC_INIT([GStreamer RTSP Server Library], [1.10.0],
AC_INIT([GStreamer RTSP Server Library], [1.10.5],
[http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer],
[gst-rtsp-server])
AG_GST_INIT
......@@ -53,7 +53,7 @@ dnl 1.2.5 => 205
dnl 1.10.9 (who knows) => 1009
dnl
dnl sets GST_LT_LDFLAGS
AS_LIBTOOL(GST, 1000, 0, 1000)
AS_LIBTOOL(GST, 1005, 0, 1005)
dnl *** required versions of GStreamer stuff ***
GST_REQ=1.10.0
......
......@@ -30,6 +30,56 @@ RTSP server library based on GStreamer
</GitRepository>
</repository>
<release>
<Version>
<revision>1.10.5</revision>
<branch>1.10</branch>
<name></name>
<created>2017-06-15</created>
<file-release rdf:resource="http://gstreamer.freedesktop.org/src/gst-rtsp-server/gst-rtsp-server-1.10.5.tar.xz" />
</Version>
</release>
<release>
<Version>
<revision>1.10.4</revision>
<branch>1.10</branch>
<name></name>
<created>2017-02-23</created>
<file-release rdf:resource="http://gstreamer.freedesktop.org/src/gst-rtsp-server/gst-rtsp-server-1.10.4.tar.xz" />
</Version>
</release>
<release>
<Version>
<revision>1.10.3</revision>
<branch>1.10</branch>
<name></name>
<created>2017-01-30</created>
<file-release rdf:resource="http://gstreamer.freedesktop.org/src/gst-rtsp-server/gst-rtsp-server-1.10.3.tar.xz" />
</Version>
</release>
<release>
<Version>
<revision>1.10.2</revision>
<branch>1.10</branch>
<name></name>
<created>2016-11-29</created>
<file-release rdf:resource="http://gstreamer.freedesktop.org/src/gst-rtsp-server/gst-rtsp-server-1.10.2.tar.xz" />
</Version>
</release>
<release>
<Version>
<revision>1.10.1</revision>
<branch>1.10</branch>
<name></name>
<created>2016-11-17</created>
<file-release rdf:resource="http://gstreamer.freedesktop.org/src/gst-rtsp-server/gst-rtsp-server-1.10.1.tar.xz" />
</Version>
</release>
<release>
<Version>
<revision>1.10.0</revision>
......
......@@ -985,8 +985,8 @@ handle_get_param_request (GstRTSPClient * client, GstRTSPContext * ctx)
if (res != GST_RTSP_OK)
goto bad_request;
if (size == 0) {
/* no body, keep-alive request */
if (size == 0 || !data || strlen ((char *) data) == 0) {
/* no body (or only '\0'), keep-alive request */
send_generic_response (client, GST_RTSP_STS_OK, ctx);
} else {
/* there is a body, handle the params */
......@@ -1022,8 +1022,8 @@ handle_set_param_request (GstRTSPClient * client, GstRTSPContext * ctx)
if (res != GST_RTSP_OK)
goto bad_request;
if (size == 0) {
/* no body, keep-alive request */
if (size == 0 || !data || strlen ((char *) data) == 0) {
/* no body (or only '\0'), keep-alive request */
send_generic_response (client, GST_RTSP_STS_OK, ctx);
} else {
/* there is a body, handle the params */
......
......@@ -1414,7 +1414,9 @@ default_create_element (GstRTSPMediaFactory * factory, const GstRTSPUrl * url)
goto no_launch;
/* parse the user provided launch line */
element = gst_parse_launch (priv->launch, &error);
element =
gst_parse_launch_full (priv->launch, NULL, GST_PARSE_FLAG_PLACE_IN_BIN,
&error);
if (element == NULL)
goto parse_error;
......@@ -1467,7 +1469,9 @@ default_construct (GstRTSPMediaFactory * factory, const GstRTSPUrl * url)
GST_RTSP_MEDIA_FACTORY_UNLOCK (factory);
/* create a new empty media */
media = g_object_new (media_gtype, "element", element, NULL);
media =
g_object_new (media_gtype, "element", element, "transport-mode",
factory->priv->transport_mode, NULL);
gst_rtsp_media_collect_streams (media);
......
......@@ -3050,6 +3050,10 @@ finish_unprepare (GstRTSPMedia * media)
g_rec_mutex_unlock (&priv->state_lock);
set_state (media, GST_STATE_NULL);
g_rec_mutex_lock (&priv->state_lock);
if (priv->status != GST_RTSP_MEDIA_STATUS_UNPREPARING)
return;
remove_fakesink (priv);
for (i = 0; i < priv->streams->len; i++) {
......@@ -3168,6 +3172,7 @@ gst_rtsp_media_unprepare (GstRTSPMedia * media)
if (klass->unprepare)
success = klass->unprepare (media);
} else {
gst_rtsp_media_set_status (media, GST_RTSP_MEDIA_STATUS_UNPREPARING);
finish_unprepare (media);
}
g_rec_mutex_unlock (&priv->state_lock);
......@@ -3375,7 +3380,7 @@ default_handle_sdp (GstRTSPMedia * media, GstSDPMessage * sdp)
}
for (i = 0; i < medias_len; i++) {
const gchar *proto, *media_type;
const gchar *proto;
const GstSDPMedia *sdp_media = gst_sdp_message_get_media (sdp, i);
GstRTSPStream *stream;
gint j, formats_len;
......@@ -3394,16 +3399,12 @@ default_handle_sdp (GstRTSPMedia * media, GstSDPMessage * sdp)
}
if (g_str_equal (proto, "RTP/AVP")) {
media_type = "application/x-rtp";
profile = GST_RTSP_PROFILE_AVP;
} else if (g_str_equal (proto, "RTP/SAVP")) {
media_type = "application/x-srtp";
profile = GST_RTSP_PROFILE_SAVP;
} else if (g_str_equal (proto, "RTP/AVPF")) {
media_type = "application/x-rtp";
profile = GST_RTSP_PROFILE_AVPF;
} else if (g_str_equal (proto, "RTP/SAVPF")) {
media_type = "application/x-srtp";
profile = GST_RTSP_PROFILE_SAVPF;
} else {
GST_ERROR ("%p: unsupported profile '%s' for stream %d", media, proto, i);
......@@ -3440,7 +3441,7 @@ default_handle_sdp (GstRTSPMedia * media, GstSDPMessage * sdp)
gst_sdp_media_attributes_to_caps (sdp_media, caps);
s = gst_caps_get_structure (caps, 0);
gst_structure_set_name (s, media_type);
gst_structure_set_name (s, "application/x-rtp");
gst_rtsp_stream_set_pt_map (stream, pt, caps);
gst_caps_unref (caps);
......
......@@ -149,7 +149,7 @@ struct _GstRTSPStreamPrivate
gint dscp_qos;
/* stream blocking */
gulong blocked_id;
gulong blocked_id[2];
gboolean blocking;
/* pt->caps map for RECORD streams */
......@@ -1176,6 +1176,9 @@ create_and_configure_udpsources (GstElement * udpsrc_out[2],
g_object_set (G_OBJECT (udpsrc_out[0]), "loop", FALSE, NULL);
g_object_set (G_OBJECT (udpsrc_out[1]), "loop", FALSE, NULL);
g_object_set (G_OBJECT (udpsrc_out[0]), "close-socket", FALSE, NULL);
g_object_set (G_OBJECT (udpsrc_out[1]), "close-socket", FALSE, NULL);
ret = gst_element_set_state (udpsrc_out[0], GST_STATE_READY);
if (ret == GST_STATE_CHANGE_FAILURE)
goto error;
......@@ -1522,15 +1525,20 @@ gst_rtsp_stream_get_server_port (GstRTSPStream * stream,
priv = stream->priv;
g_return_if_fail (priv->joined_bin != NULL);
if (server_port) {
server_port->min = 0;
server_port->max = 0;
}
g_mutex_lock (&priv->lock);
if (family == G_SOCKET_FAMILY_IPV4) {
if (server_port) {
if (server_port && priv->server_addr_v4) {
server_port->min = priv->server_addr_v4->port;
server_port->max =
priv->server_addr_v4->port + priv->server_addr_v4->n_ports - 1;
}
} else {
if (server_port) {
if (server_port && priv->server_addr_v6) {
server_port->min = priv->server_addr_v6->port;
server_port->max =
priv->server_addr_v6->port + priv->server_addr_v6->n_ports - 1;
......@@ -2459,6 +2467,7 @@ create_sender_part (GstRTSPStream * stream, GstBin * bin, GstState state)
}
} else if (is_tcp) {
/* only appsink needed, link it to the session */
gst_bin_add (bin, priv->appsink[i]);
pad = gst_element_get_static_pad (priv->appsink[i], "sink");
gst_pad_link (priv->send_src[i], pad);
gst_object_unref (pad);
......@@ -3686,6 +3695,7 @@ gboolean
gst_rtsp_stream_set_blocked (GstRTSPStream * stream, gboolean blocked)
{
GstRTSPStreamPrivate *priv;
int i;
g_return_val_if_fail (GST_IS_RTSP_STREAM (stream), FALSE);
......@@ -3694,18 +3704,22 @@ gst_rtsp_stream_set_blocked (GstRTSPStream * stream, gboolean blocked)
g_mutex_lock (&priv->lock);
if (blocked) {
priv->blocking = FALSE;
if (priv->blocked_id == 0) {
priv->blocked_id = gst_pad_add_probe (priv->srcpad,
GST_PAD_PROBE_TYPE_BLOCK | GST_PAD_PROBE_TYPE_BUFFER |
GST_PAD_PROBE_TYPE_BUFFER_LIST, pad_blocking,
g_object_ref (stream), g_object_unref);
for (i = 0; i < 2; i++) {
if (priv->blocked_id[i] == 0) {
priv->blocked_id[i] = gst_pad_add_probe (priv->send_src[i],
GST_PAD_PROBE_TYPE_BLOCK | GST_PAD_PROBE_TYPE_BUFFER |
GST_PAD_PROBE_TYPE_BUFFER_LIST, pad_blocking,
g_object_ref (stream), g_object_unref);
}
}
} else {
if (priv->blocked_id != 0) {
gst_pad_remove_probe (priv->srcpad, priv->blocked_id);
priv->blocked_id = 0;
priv->blocking = FALSE;
for (i = 0; i < 2; i++) {
if (priv->blocked_id[i] != 0) {
gst_pad_remove_probe (priv->send_src[i], priv->blocked_id[i]);
priv->blocked_id[i] = 0;
}
}
priv->blocking = FALSE;
}
g_mutex_unlock (&priv->lock);
......
......@@ -1559,8 +1559,10 @@ gst_rtsp_client_sink_cleanup (GstRTSPClientSink * sink)
context->stream = NULL;
}
if (context->srtcpparams)
if (context->srtcpparams) {
gst_caps_unref (context->srtcpparams);
context->srtcpparams = NULL;
}
g_free (context->conninfo.location);
context->conninfo.location = NULL;
}
......
project('gst-rtsp-server', 'c',
version : '1.9.90',
version : '1.10.5',
meson_version : '>= 0.33.0',
default_options : ['warning_level=1', 'buildtype=debugoptimized'])
......
......@@ -191,6 +191,40 @@ start_server (gboolean set_shared_factory)
GST_DEBUG ("rtsp server listening on port %d", test_port);
}
static void
start_tcp_server (void)
{
GstRTSPMountPoints *mounts;
gchar *service;
GstRTSPMediaFactory *factory;
mounts = gst_rtsp_server_get_mount_points (server);
factory = gst_rtsp_media_factory_new ();
gst_rtsp_media_factory_set_protocols (factory, GST_RTSP_LOWER_TRANS_TCP);
gst_rtsp_media_factory_set_launch (factory,
"( " VIDEO_PIPELINE " " AUDIO_PIPELINE " )");
gst_rtsp_mount_points_add_factory (mounts, TEST_MOUNT_POINT, factory);
g_object_unref (mounts);
/* set port to any */
gst_rtsp_server_set_service (server, "0");
/* attach to default main context */
source_id = gst_rtsp_server_attach (server, NULL);
fail_if (source_id == 0);
/* get port */
service = gst_rtsp_server_get_service (server);
test_port = atoi (service);
fail_unless (test_port != 0);
g_free (service);
GST_DEBUG ("rtsp server listening on port %d", test_port);
}
/* start the testing rtsp server for RECORD mode */
static GstRTSPMediaFactory *
start_record_server (const gchar * launch_line)
......@@ -296,6 +330,7 @@ static GstRTSPMessage *
read_response (GstRTSPConnection * conn)
{
GstRTSPMessage *response = NULL;
GstRTSPMsgType type;
if (gst_rtsp_message_new (&response) != GST_RTSP_OK) {
GST_DEBUG ("failed to create response object");
......@@ -306,8 +341,8 @@ read_response (GstRTSPConnection * conn)
gst_rtsp_message_free (response);
return NULL;
}
fail_unless (gst_rtsp_message_get_type (response) ==
GST_RTSP_MESSAGE_RESPONSE);
type = gst_rtsp_message_get_type (response);
fail_unless (type == GST_RTSP_MESSAGE_RESPONSE || type == GST_RTSP_MESSAGE_DATA);
return response;
}
......@@ -325,6 +360,7 @@ do_request_full (GstRTSPConnection * conn, GstRTSPMethod method,
GstRTSPMessage *response;
GstRTSPStatusCode code;
gchar *value;
GstRTSPMsgType msg_type;
/* create request */
request = create_request (conn, method, control);
......@@ -351,6 +387,19 @@ do_request_full (GstRTSPConnection * conn, GstRTSPMethod method,
/* read response */
response = read_response (conn);
fail_unless (response != NULL);
msg_type = gst_rtsp_message_get_type (response);
if (msg_type == GST_RTSP_MESSAGE_DATA) {
do {
gst_rtsp_message_free (response);
response = read_response (conn);
msg_type = gst_rtsp_message_get_type (response);
} while (msg_type == GST_RTSP_MESSAGE_DATA);
}
fail_unless (msg_type == GST_RTSP_MESSAGE_RESPONSE);
/* check status line */
gst_rtsp_message_parse_response (response, &code, NULL, NULL);
......@@ -1105,6 +1154,76 @@ GST_START_TEST (test_play)
GST_END_TEST;
GST_START_TEST (test_play_tcp)
{
GstRTSPConnection *conn;
GstSDPMessage *sdp_message = NULL;
const GstSDPMedia *sdp_media;
const gchar *video_control;
const gchar *audio_control;
GstRTSPRange client_ports = { 0 };
gchar *session = NULL;
GstRTSPTransport *video_transport = NULL;
GstRTSPTransport *audio_transport = NULL;
start_tcp_server ();
conn = connect_to_server (test_port, TEST_MOUNT_POINT);
/* send DESCRIBE request */
sdp_message = do_describe (conn, TEST_MOUNT_POINT);
/* get control strings from DESCRIBE response */
fail_unless (gst_sdp_message_medias_len (sdp_message) == 2);
sdp_media = gst_sdp_message_get_media (sdp_message, 0);
video_control = gst_sdp_media_get_attribute_val (sdp_media, "control");
sdp_media = gst_sdp_message_get_media (sdp_message, 1);
audio_control = gst_sdp_media_get_attribute_val (sdp_media, "control");
get_client_ports (&client_ports);
/* send SETUP request for the first media */
fail_unless (do_setup_full (conn, video_control, GST_RTSP_LOWER_TRANS_TCP,
&client_ports, NULL, &session, &video_transport,
NULL) == GST_RTSP_STS_OK);
/* check response from SETUP */
fail_unless (video_transport->trans == GST_RTSP_TRANS_RTP);
fail_unless (video_transport->profile == GST_RTSP_PROFILE_AVP);
fail_unless (video_transport->lower_transport == GST_RTSP_LOWER_TRANS_TCP);
fail_unless (video_transport->mode_play);
gst_rtsp_transport_free (video_transport);
/* send SETUP request for the second media */
fail_unless (do_setup_full (conn, audio_control, GST_RTSP_LOWER_TRANS_TCP,
&client_ports, NULL, &session, &audio_transport,
NULL) == GST_RTSP_STS_OK);
/* check response from SETUP */
fail_unless (audio_transport->trans == GST_RTSP_TRANS_RTP);
fail_unless (audio_transport->profile == GST_RTSP_PROFILE_AVP);
fail_unless (audio_transport->lower_transport == GST_RTSP_LOWER_TRANS_TCP);
fail_unless (audio_transport->mode_play);
gst_rtsp_transport_free (audio_transport);
/* send PLAY request and check that we get 200 OK */
fail_unless (do_simple_request (conn, GST_RTSP_PLAY,
session)== GST_RTSP_STS_OK);
/* send TEARDOWN request and check that we get 200 OK */
fail_unless (do_simple_request (conn, GST_RTSP_TEARDOWN,
session) == GST_RTSP_STS_OK);
/* clean up and iterate so the clean-up can finish */
g_free (session);
gst_sdp_message_free (sdp_message);
gst_rtsp_connection_free (conn);
stop_server ();
iterate ();
}
GST_END_TEST;
GST_START_TEST (test_play_without_session)
{
GstRTSPConnection *conn;
......@@ -1992,6 +2111,7 @@ rtspserver_suite (void)
tcase_add_test (tc, test_setup_with_require_header);
tcase_add_test (tc, test_setup_non_existing_stream);
tcase_add_test (tc, test_play);
tcase_add_test (tc, test_play_tcp);
tcase_add_test (tc, test_play_without_session);
tcase_add_test (tc, test_bind_already_in_use);
tcase_add_test (tc, test_play_multithreaded);
......
......@@ -385,6 +385,47 @@ GST_START_TEST (test_allocate_udp_ports_client_settings)
GST_END_TEST;
GST_START_TEST (test_tcp_transport)
{
GstPad *srcpad;
GstElement *pay;
GstRTSPStream *stream;
GstBin *bin;
GstElement *rtpbin;
GstRTSPRange server_port;
srcpad = gst_pad_new ("testsrcpad", GST_PAD_SRC);
fail_unless (srcpad != NULL);
gst_pad_set_active (srcpad, TRUE);
pay = gst_element_factory_make ("rtpgstpay", "testpayloader");
fail_unless (pay != NULL);
stream = gst_rtsp_stream_new (0, pay, srcpad);
fail_unless (stream != NULL);
gst_object_unref (pay);
gst_object_unref (srcpad);
rtpbin = gst_element_factory_make ("rtpbin", "testrtpbin");
fail_unless (rtpbin != NULL);
bin = GST_BIN (gst_bin_new ("testbin"));
fail_unless (bin != NULL);
fail_unless (gst_bin_add (bin, rtpbin));
/* TCP transport */
gst_rtsp_stream_set_protocols (stream, GST_RTSP_LOWER_TRANS_TCP);
fail_unless (gst_rtsp_stream_join_bin (stream, bin, rtpbin, GST_STATE_NULL));
/* port that the server will use to receive RTCP makes only sense in the UDP
* case so verify that the received server port is 0 in the TCP case */
gst_rtsp_stream_get_server_port (stream, &server_port, G_SOCKET_FAMILY_IPV4);
fail_unless_equals_int (server_port.min, 0);
fail_unless_equals_int (server_port.max, 0);
fail_unless (gst_rtsp_stream_leave_bin (stream, bin, rtpbin));
gst_object_unref (bin);
gst_object_unref (stream);
}
GST_END_TEST;
static Suite *
rtspstream_suite (void)
{
......@@ -398,6 +439,7 @@ rtspstream_suite (void)
tcase_add_test (tc, test_multicast_address_and_unicast_udp);
tcase_add_test (tc, test_allocate_udp_ports_multicast);
tcase_add_test (tc, test_allocate_udp_ports_client_settings);
tcase_add_test (tc, test_tcp_transport);
return s;
}
......