platform/upstream/gst-rtsp-server.git
2 years ago[rtsp-mediafa-factory] Remove g_strdup of no use and add g_autofree 28/267828/5 accepted/tizen_unified upstream/1.19.2 accepted/tizen/unified/20220105.120648 submit/tizen/20220104.072457
Hyunsoo Park [Fri, 10 Dec 2021 07:25:52 +0000 (16:25 +0900)]
[rtsp-mediafa-factory] Remove g_strdup of no use and add g_autofree

Change-Id: I0aacbccb733da1eeb4a5d56450e22670c7284cfb
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years agortsp-media-factory-wfd: Fix memory leak 42/267242/4 accepted/tizen/unified/20211201.123234 submit/tizen/20211201.031038
Hyunsoo Park [Tue, 30 Nov 2021 07:31:01 +0000 (16:31 +0900)]
rtsp-media-factory-wfd: Fix memory leak

Change-Id: Ibd32fcbec6e86b2e654e8781d6ee7a0c768aacc2
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years ago[rtsp-mediafa-factory] Fix Memory leak 04/262904/3 accepted/tizen/6.5/unified/20211029.013441 accepted/tizen/unified/20210825.065435 submit/tizen/20210825.021829 submit/tizen_6.5/20211028.163401 tizen_6.5.m2_release
Hyunsoo Park [Mon, 23 Aug 2021 08:49:41 +0000 (17:49 +0900)]
[rtsp-mediafa-factory] Fix Memory leak

Change-Id: Idbaeb02957f60a385622a90b7b0f6b5e6612f5ae
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years agoAdd null checking 31/262431/6
Hyunsoo Park [Tue, 10 Aug 2021 09:51:47 +0000 (18:51 +0900)]
Add null checking

Change-Id: Ic8c48a7e5b63190f42079ff784e8c3cb498f649e
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years agoRemove if statement that is always true 86/261686/3
Hyunsoo Park [Thu, 22 Jul 2021 10:20:49 +0000 (19:20 +0900)]
Remove if statement that is always true

Change-Id: I4bfcfd58d883f1a9b5285182c0fff63181141ecb
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years agoRemove msglength of no use 29/259829/2 accepted/tizen/unified/20210618.120712 submit/tizen/20210618.030356
Hyunsoo Park [Tue, 15 Jun 2021 09:26:51 +0000 (18:26 +0900)]
Remove msglength of no use

Change-Id: Id9a03a6c4e4163292c0a72818678f8a97f6c4f37
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years agoFix memory leak 28/259828/2
Hyunsoo Park [Tue, 15 Jun 2021 09:26:18 +0000 (18:26 +0900)]
Fix memory leak

Change-Id: If2fcd7661d05a5837cf912b2540b3ab1f900ed68
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
3 years agoAdd class init apis 89/244189/3 accepted/tizen_6.0_unified_hotfix tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.105610 accepted/tizen/6.0/unified/hotfix/20201102.233526 accepted/tizen/6.0/unified/hotfix/20201103.045810 accepted/tizen/unified/20200916.212711 submit/tizen/20200916.015748 submit/tizen_6.0/20201029.205502 submit/tizen_6.0_hotfix/20201102.192902 submit/tizen_6.0_hotfix/20201103.115102 tizen_6.0.m2_release
Hyunsoo Park [Wed, 16 Sep 2020 00:49:30 +0000 (09:49 +0900)]
Add class init apis

It is opensource difference since gstreamer 1.12.
So I applied it on tizen for diff continuity.

Change-Id: Icc38c8444089a8465eb15685f91b438569af6674
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
3 years ago[rtsp-server] change 'gst_rtsp_media_set_target_state' api scope 37/235037/1 accepted/tizen/unified/20200603.150116 submit/tizen/20200602.085047
Hyunsoo Park [Tue, 2 Jun 2020 02:05:14 +0000 (11:05 +0900)]
[rtsp-server] change 'gst_rtsp_media_set_target_state' api scope

For using other file, change this api's scope.
It is fix up of I7370e4c5d75508aa33e90cd0e8819db7ad0b3ee2.

Change-Id: I02f8d1c0ea8dd9ae6fc2e470b93e12d3b1c0048d
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
3 years ago[rtsp-server] change 'gst_rtsp_media_set_status' api scope 49/234949/2 accepted/tizen/unified/20200602.133155 submit/tizen/20200601.090549
Hyunsoo Park [Mon, 1 Jun 2020 04:47:28 +0000 (13:47 +0900)]
[rtsp-server] change 'gst_rtsp_media_set_status' api scope

For using other file, change this api's scope.
It is fix up of I7370e4c5d75508aa33e90cd0e8819db7ad0b3ee2.

Change-Id: Iab68b3bba892490a4b9c59da969e84a84b9f4a0d
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
3 years ago[rtsp-server] Fix preroll fail 33/234633/4 accepted/tizen/unified/20200529.124123 submit/tizen/20200528.123000
Hyunsoo Park [Wed, 27 May 2020 12:22:56 +0000 (21:22 +0900)]
[rtsp-server] Fix preroll fail

Change-Id: I7370e4c5d75508aa33e90cd0e8819db7ad0b3ee2
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
4 years agoModify spec version 59/226659/1 accepted/tizen/unified/20200309.215648 submit/tizen/20200305.014306 submit/tizen/20200309.111314
Hyunsoo Park [Wed, 4 Mar 2020 11:11:27 +0000 (20:11 +0900)]
Modify spec version

Only Release version should be changed.

Change-Id: I1c68c4f712f9a19cf128117be79eb7d9ba08b03a
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
4 years agoSets APIs to GLOBAL 66/226566/1
Hyunsoo Park [Wed, 4 Mar 2020 01:48:22 +0000 (10:48 +0900)]
Sets APIs to GLOBAL

Change-Id: I392c0bbe307a59f321a2ca415bd87774e240c08d
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
4 years agoSets APIs to GLOBAL 71/225671/1 accepted/tizen/unified/20200304.124021 submit/tizen/20200221.064623 submit/tizen/20200302.032418
Hyunsoo Park [Mon, 24 Feb 2020 01:29:06 +0000 (10:29 +0900)]
Sets APIs to GLOBAL

APIs sets LOCAL as default.
For external uses, macro is applied.

Change-Id: Iff1f0488843f3172ef7d6cb87630889860e539e0
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
4 years agoMerge branch 'tizen_gst_1.16.2' into tizen 98/225598/1
Gilbok Lee [Fri, 21 Feb 2020 06:27:40 +0000 (15:27 +0900)]
Merge branch 'tizen_gst_1.16.2' into tizen

Change-Id: Ib7193192a766bd942660a947262e074973465fe3

4 years agoAdd .gbs.conf file 63/225363/1
Jeongmo Yang [Wed, 19 Feb 2020 08:02:45 +0000 (17:02 +0900)]
Add .gbs.conf file

- With this file, diff patches by tizen developers are created and applied when builds package.
- The build result is same against previous one, but, it's better to check difference between tizen version and upstream.
- We can also check the diff patches in pakcage info on OBS.

Change-Id: I23ba4caf8eb05ba6e2be677864c9402198368daa
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
4 years agoMerge branch 'upstream/1.16' into tizen_gst_1.16.2 54/223854/1
Hyunsoo Park [Tue, 4 Feb 2020 09:05:24 +0000 (18:05 +0900)]
Merge branch 'upstream/1.16' into tizen_gst_1.16.2

Change-Id: Icfef251a7d3c9ad452be716086898fdad6325204

4 years agoRelease 1.16.2 upstream/1.16 1.16.2
Tim-Philipp Müller [Tue, 3 Dec 2019 11:16:06 +0000 (11:16 +0000)]
Release 1.16.2

4 years agortsp-media: Use lock in gst_rtsp_media_is_receive_only
Adam x Nilsson [Tue, 17 Sep 2019 11:45:57 +0000 (13:45 +0200)]
rtsp-media: Use lock in gst_rtsp_media_is_receive_only

(cherry picked from commit f1d2a0cae9a791ce07c753faaf82a6cdefecd373)

4 years agortsp-client: RTP Info when completed_sender
Kristofer Bjorkstrom [Mon, 4 Nov 2019 11:56:13 +0000 (12:56 +0100)]
rtsp-client: RTP Info when completed_sender

Change condition that should be fulfilled regarding RTPInfo.
Replace !gst_rtsp_media_is_receive_only with
gst_rtsp_media_has_completed_sender. It is more correct to actually look
for a sender pipeline that is complete. Only then a RTPInfo should
exist.

gst_rtsp_media_is_receive_only gives different answears depending on
state of server.
If Describe is called wth URL+options for backchannel SDP will give only
audio and only backchannel a=sendonly
If Describe is called on URL+options that gives both audio and video
direction from server to client, pipelines are created. Thus
receive_only will return false, even though Setup only would setup
backchannel.

RTP-Info is only for outgoing streams. Thus one should look if outgoing
streams are complete.

4 years agortsp-client: Generate correct URI for MIKEY in ANNOUNCE responses
Muhammet Ilendemli [Thu, 17 Oct 2019 10:15:42 +0000 (12:15 +0200)]
rtsp-client: Generate correct URI for MIKEY in ANNOUNCE responses

Instead of hardcoding the URI, take the actual URI (and especially the correct port)
from the RTSP context.

Fixes #84

4 years agoRelease 1.16.1
Tim-Philipp Müller [Mon, 23 Sep 2019 10:17:41 +0000 (11:17 +0100)]
Release 1.16.1

4 years agortsp-client: RTP Info must exist in PLAY response
Kristofer Björkström [Fri, 30 Aug 2019 12:00:52 +0000 (14:00 +0200)]
rtsp-client: RTP Info must exist in PLAY response

If RTP Info is missing. Then return GST_RTSP_STS_INTERNAL_SERVER_ERROR

Fixes #76

4 years agoonvif-media: fix "void function returning a value" compiler warning
Tim-Philipp Müller [Tue, 25 Jun 2019 12:19:44 +0000 (13:19 +0100)]
onvif-media: fix "void function returning a value" compiler warning

4 years agortsp-server: Add various missing Since: 1.16 markers
Sebastian Dröge [Tue, 23 Apr 2019 11:38:05 +0000 (14:38 +0300)]
rtsp-server: Add various missing Since: 1.16 markers

4 years agortsp-server: Add various Since: 1.14 markers
Sebastian Dröge [Tue, 23 Apr 2019 12:01:32 +0000 (15:01 +0300)]
rtsp-server: Add various Since: 1.14 markers

4 years agortsp-server: Fix various Since markers
Sebastian Dröge [Tue, 23 Apr 2019 12:09:34 +0000 (15:09 +0300)]
rtsp-server: Fix various Since markers

4 years agoServer side TCP switching step refactorying. 28/210428/11 accepted/tizen/unified/20200207.122442 submit/tizen/20200205.015055
Hyunsoo Park [Fri, 19 Jul 2019 05:01:11 +0000 (14:01 +0900)]
Server side TCP switching step refactorying.

Sock APIs are mixed in use. So i integrate it gio APIs.

Change-Id: Iaf8890e8c31bdd2254785bdc4b72ac7e415c51a8
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
4 years agoSets attributes to their original position. 55/206555/1
Hyunsoo Park [Thu, 4 Apr 2019 06:52:34 +0000 (15:52 +0900)]
Sets attributes to their original position.

max_hres and max_vres have inappropriate value, so it is changed.

Change-Id: I0e569e94bf56c8d2560573233a0a02070291ecfc
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
4 years agoAdd coupling modes to server and TEARDOWN_COUPLING signal 62/205362/4 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/5.5/unified/20191031.004932 accepted/tizen/5.5/unified/mobile/hotfix/20201027.061804 accepted/tizen/5.5/unified/wearable/hotfix/20201027.101942 accepted/tizen/unified/20190508.111112 submit/tizen/20190507.101459 submit/tizen_5.5/20191031.000006 submit/tizen_5.5_mobile_hotfix/20201026.185106 submit/tizen_5.5_wearable_hotfix/20201026.184306 tizen_5.5.m2_release
Hyunsoo Park [Thu, 2 May 2019 12:57:13 +0000 (21:57 +0900)]
Add coupling modes to server and TEARDOWN_COUPLING signal

-It is of no use setting coupled sink information when teardown.
-Add coupling mode process

Change-Id: Ie7fe95676530ef8eb207d98544dc035a0e95f7b1
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
5 years agoci: use template from 1.16 branch
Tim-Philipp Müller [Thu, 2 May 2019 11:35:34 +0000 (12:35 +0100)]
ci: use template from 1.16 branch

5 years agoRelease 1.16.0
Tim-Philipp Müller [Thu, 18 Apr 2019 23:34:54 +0000 (00:34 +0100)]
Release 1.16.0

5 years agortspclientsink: Notify the stream transport about each written message
Sebastian Dröge [Mon, 15 Apr 2019 17:33:01 +0000 (20:33 +0300)]
rtspclientsink: Notify the stream transport about each written message

Otherwise it will never try to send us the next one: it tries to keep
exactly one message in-flight all the time.

In gst-rtsp-server this is done asynchronously via the GstRTSPWatch but
in the client sink we always write data out synchronously.

5 years agortsp_server: Free thread pool before clean transport cache
Göran Jönsson [Tue, 2 Apr 2019 06:05:03 +0000 (08:05 +0200)]
rtsp_server: Free thread pool before clean transport cache

If not waiting for free thread pool before clean transport caches, there
can be a crash if a thread is executing in transport list loop in
function send_tcp_message.

Also add a check if priv->send_pool in on_message_sent to avoid that a
new thread is pushed during wait of free thread pool. This is possible
since when waiting for free thread pool mutex have to be unlocked.

5 years agoRelease 1.15.90
Tim-Philipp Müller [Wed, 10 Apr 2019 23:35:55 +0000 (00:35 +0100)]
Release 1.15.90

5 years agortsp-stream: Add support for GCM (RFC 7714)
Ulf Olsson [Wed, 10 Apr 2019 08:32:53 +0000 (10:32 +0200)]
rtsp-stream: Add support for GCM (RFC 7714)

Follow-up to !198

5 years agoExpand wfd2_audio_codec to meet wfd r2 standard 80/202380/5 accepted/tizen/unified/20190401.224936 submit/tizen/20190401.014745
SeokHoon LEE [Thu, 28 Mar 2019 00:36:35 +0000 (09:36 +0900)]
Expand wfd2_audio_codec to meet wfd r2 standard

- direct_audio_codec changed to wfd2_audio_codec
  to meet wfd2 r2 standard
- able to negotiate with wfd2_audio_codec.

Change-Id: Ic91bd0a085cb2a1255d7891b71db03437216fee7
Signed-off-by: SeokHoon LEE <andy.shlee@samsung.com>
5 years agosession pool: fix missing klass-> in klass->create_session
Erlend Eriksen [Wed, 27 Mar 2019 23:27:37 +0000 (00:27 +0100)]
session pool: fix missing klass-> in klass->create_session

5 years agog-i: pass --quiet to g-ir-scanner
Tim-Philipp Müller [Sat, 23 Mar 2019 19:16:17 +0000 (19:16 +0000)]
g-i: pass --quiet to g-ir-scanner

This suppresses the annoying 'g-ir-scanner: link: cc ..' output
that we get even if everything works just fine.

We still get g-ir-scanner warnings and compiler warnings if
we pass this option.

5 years agog-i: silence 'nested extern' compiler warnings when building scanner binary
Tim-Philipp Müller [Sat, 23 Mar 2019 19:15:48 +0000 (19:15 +0000)]
g-i: silence 'nested extern' compiler warnings when building scanner binary

We need a nested extern in our init section for the scanner binary
so we can call gst_init to make sure GStreamer types are initialised
(they are not all lazy init via get_type functions, but some are in
exported variables). There doesn't seem to be any other mechanism to
achieve this, so just remove that warning, it's not important at all.

5 years agoMake R2 features message configurable. 36/201936/6 accepted/tizen/unified/20190325.070841 submit/tizen/20190322.063910
Hyunsoo Park [Thu, 21 Mar 2019 04:57:10 +0000 (13:57 +0900)]
Make R2 features message configurable.

R2 is not fully supported yet.
So these setting is needed to be configurable.
> wfd2-audio-codecs
> wfd2-video-formats

Change-Id: I595c6c9557e2ed82c89dfbda99da253ea139060a
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
5 years agomeson: pass -Wno-unused to compiler if gstreamer debug system is disabled
Tim-Philipp Müller [Thu, 21 Mar 2019 11:49:10 +0000 (11:49 +0000)]
meson: pass -Wno-unused to compiler if gstreamer debug system is disabled

5 years agortsp-media: Handle set state when preparing.
Göran Jönsson [Thu, 14 Mar 2019 06:37:26 +0000 (07:37 +0100)]
rtsp-media: Handle set state when preparing.

Handle the situation when  a call to gst_rtsp_media_set_state is done
when media status is preparing.

Also add unit test for this scenario.

The unit test simulate on a media level when two clients share a (live)
media.
Both clients have done SETUP and got responses. Now client 1 is doing
play and client 2 is just closing the connection.

Then without patch there are a problem when
client1 is calling gst_rtsp_media_unsuspend in handle_play_request.
And client2 is doing closing connection we can end up in a call
to gst_rtsp_media_set_state when
priv->status == GST_RTSP_MEDIA_STATUS_PREPARING and all the logic for
shut down media is jumped over .

With this patch and this scenario we wait until
priv->status == GST_RTSP_MEDIA_STATUS_PREPARED and then continue to
execute after that and now we will execute the logic for
shut down media.

5 years agoBack to development
Tim-Philipp Müller [Mon, 4 Mar 2019 09:13:30 +0000 (09:13 +0000)]
Back to development

5 years agoRelease 1.15.2
Tim-Philipp Müller [Tue, 26 Feb 2019 11:58:53 +0000 (11:58 +0000)]
Release 1.15.2

5 years agortsp-media: Fix multicast use case with common media
Göran Jönsson [Tue, 19 Feb 2019 08:45:08 +0000 (09:45 +0100)]
rtsp-media: Fix multicast use case with common media

Use case
client 1: SETUP
client 1: PLAY
client 2: SETUP
client 1: TEARDOWN
client 2: PLAY
client 2: TEARDOWN

5 years agortsp-server: remove recursive behavior
Göran Jönsson [Wed, 16 Jan 2019 11:59:11 +0000 (12:59 +0100)]
rtsp-server: remove recursive behavior

Introduce a threadpool to send rtp and rtcp to avoid recursive behavior.

5 years agortsp-client: Only allow to set either a send_func or send_messages_func but not both
Sebastian Dröge [Fri, 25 Jan 2019 12:22:42 +0000 (14:22 +0200)]
rtsp-client: Only allow to set either a send_func or send_messages_func but not both

And route all messages through the send_func if no send_messages_func
was provided.

We otherwise break backwards compatibility.

5 years agortsp-client: Add support for sending buffer lists directly
Sebastian Dröge [Mon, 17 Sep 2018 19:18:46 +0000 (22:18 +0300)]
rtsp-client: Add support for sending buffer lists directly

Fixes https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/issues/29

5 years agortsp-server: Add support for buffer lists
Sebastian Dröge [Wed, 27 Jun 2018 10:17:07 +0000 (12:17 +0200)]
rtsp-server: Add support for buffer lists

This adds new functions for passing buffer lists through the different
layers without breaking API/ABI, and enables the appsink to actually
provide buffer lists.

This should already reduce CPU usage and potentially context switches a
bit by passing a whole buffer list from the appsink instead of
individual buffers. As a next step it would be necessary to
  a) Add support for a vector of data for the GstRTSPMessage body
  b) Add support for sending multiple messages at once to the
    GstRTSPWatch and let it be handled internally
  c) Adding API to GOutputStream that works like writev()

Fixes https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/issues/29

5 years agoclient: Fix crash in close handler
Benjamin Berg [Tue, 4 Dec 2018 13:12:04 +0000 (14:12 +0100)]
client: Fix crash in close handler

The close handler could trigger a crash because it invalidated the
watch_context while still leaving a source attached to it which would be
cleaned up at a later point.

5 years agortsp-stream: Use cached address when allocating sockets
Edward Hervey [Tue, 29 Jan 2019 13:42:35 +0000 (14:42 +0100)]
rtsp-stream: Use cached address when allocating sockets

If an address/port was previously decided upon (ex: multicast in the
SDP), then use that instead of re-creating another one

Fixes https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/issues/57

5 years agortsp-media: Fix race codition in finish_unprepare
Lars Wiréen [Thu, 27 Dec 2018 10:28:17 +0000 (11:28 +0100)]
rtsp-media: Fix race codition in finish_unprepare

The previous fix for race condition around finish_unprepare where the
function could be called twice assumed that the status wouldn't change
during execution of the function. This assumption is incorrect as the
state may change, for example if an error message arrives from the
pipeline bus.

Instead a flag keeping track on whether the finish_unprepare function
is currently executing is introduced and checked.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/issues/59

5 years agoFix misordered parameter, Height <-> Width 04/198104/3 accepted/tizen/unified/20190128.061547 submit/tizen/20190123.011938
SeokHoon LEE [Mon, 21 Jan 2019 01:58:19 +0000 (10:58 +0900)]
Fix misordered parameter, Height <-> Width

- Change mis ordered parameter.
- Add failure log for getsockopt

Change-Id: I75806d83e44142430dc58a1ae0ee36bd4d45b141
Signed-off-by: SeokHoon LEE <andy.shlee@samsung.com>
5 years agoRelease 1.15.1
Tim-Philipp Müller [Thu, 17 Jan 2019 02:26:48 +0000 (02:26 +0000)]
Release 1.15.1

5 years agoAdd caps unref to avoid mem leak 21/196121/2 accepted/tizen/unified/20190103.030338 submit/tizen/20190102.011605
SeokHoon LEE [Mon, 24 Dec 2018 01:29:15 +0000 (10:29 +0900)]
Add caps unref to avoid mem leak

Change-Id: I705b12e4576ac6501d17dd46e2abbeb446ea2e6c
Signed-off-by: SeokHoon LEE <andy.shlee@samsung.com>
5 years agoChange attribute name 'wfd2_tcp_port' to 'wfd2_transport_switch'. 87/195287/4
Hyunsoo Park [Wed, 12 Dec 2018 08:30:19 +0000 (17:30 +0900)]
Change attribute name 'wfd2_tcp_port' to 'wfd2_transport_switch'.

Following Wi-Fi Display R2 spec, i changed it.

Change-Id: I6164321c5e288536ce21eea6faeac8b82c062636
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
5 years agoAdd source elements to the pipeline before activation
Patricia Muscalu [Wed, 5 Dec 2018 14:07:25 +0000 (15:07 +0100)]
Add source elements to the pipeline before activation

In plug_src we changed the element state before adding it to
the owner container. This prevented the pipeline from intercepting
a GST_STREAM_STATUS_TYPE_CREATE message from the pad in order
to assign a custom task pool.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/issues/53

5 years agoAutomatic update of common submodule
Thibault Saunier [Wed, 5 Dec 2018 20:24:59 +0000 (17:24 -0300)]
Automatic update of common submodule

From ed78bee to 59cb678

5 years agoexamples: test-appsrc: fix coding style error
Ingo Randolf [Tue, 20 Nov 2018 18:12:09 +0000 (19:12 +0100)]
examples: test-appsrc: fix coding style error

5 years agoexamples: test-appsrc: fix buffer leak
Ingo Randolf [Tue, 20 Nov 2018 10:07:48 +0000 (11:07 +0100)]
examples: test-appsrc: fix buffer leak

5 years agortsp-media: Update priv->blocked when linked streams are unblocked.
Patricia Muscalu [Sat, 17 Nov 2018 18:19:54 +0000 (19:19 +0100)]
rtsp-media: Update priv->blocked when linked streams are unblocked.

Media is considered to be blocked when all streams that belong to
that media are blocked.
This patch solves the problem of inconsistent updates of
priv->blocked that are not synchronized with the media state.

5 years agortsp-media: Don't block streams before seeking
Patricia Muscalu [Sat, 17 Nov 2018 17:18:27 +0000 (18:18 +0100)]
rtsp-media: Don't block streams before seeking

Before the seek operation is performed on media, it's required that
its pipeline is prepared <=> the pipeline is in the PAUSED state.
At this stage, all transport parts (transport sinks) have been successfully
added to the pipeline and there is no need for blocking the streams.

5 years agotests: rtspserver: Add shared media test case for TCP
Patricia Muscalu [Sat, 17 Nov 2018 15:11:53 +0000 (16:11 +0100)]
tests: rtspserver: Add shared media test case for TCP

5 years agortsp-stream: Use seqnum-offset for rtpinfo
Linus Svensson [Tue, 6 Nov 2018 17:21:54 +0000 (18:21 +0100)]
rtsp-stream: Use seqnum-offset for rtpinfo

The sequence number in the rtpinfo is supposed to be the first RTP
sequence number. The "seqnum" property on a payloader is supposed to be
the number from the last processed RTP packet. The sequence number for
payloaders that inherit gstrtpbasepayload will not be correct in case of
buffer lists. In order to fix the seqnum property on the payloaders
gst-rtsp-server must get the sequence number for rtpinfo elsewhere and
"seqnum-offset" from the "stats" property contains the value of the
very first RTP packet in a stream. The server will, however, try to look
at the last simple in the sink element and only use properties on the
payloader in case there no sink elements yet, and by looking at the last
sample of the sink gives the server full control of which RTP packet it
looks at. If the payloader does not have the "stats" property, "seqnum"
is still used since "seqnum-offset" is only present in as part of
"stats" and this is still an issue not solved with this patch.

Needed for gst-plugins-base!17

5 years agortsp-stream: Plug memory leak
Linus Svensson [Tue, 6 Nov 2018 17:10:56 +0000 (18:10 +0100)]
rtsp-stream: Plug memory leak

Attaching a GSource to a context will increase the refcount. The idle
source will never be free'd since the initial reference is never
dropped.

5 years agoAdd Gitlab CI configuration
Jordan Petridis [Mon, 12 Nov 2018 14:06:39 +0000 (16:06 +0200)]
Add Gitlab CI configuration

This commit adds a .gitlab-ci.yml file, which uses a feature
to fetch the config from a centralized repository. The intent is
to have all the gstreamer modules use the same configuration.

The configuration is currently hosted at the gst-ci repository
under the gitlab/ci_template.yml path.

Part of https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/29

5 years agoUpdate git locations to gitlab
Matthew Waters [Mon, 5 Nov 2018 05:56:35 +0000 (05:56 +0000)]
Update git locations to gitlab

5 years agomeson: add new onvif types
Mathieu Duponchelle [Thu, 1 Nov 2018 13:20:16 +0000 (14:20 +0100)]
meson: add new onvif types

5 years agoAdd ONVIF subclass headers to the installed headers in meson.build too
Sebastian Dröge [Thu, 1 Nov 2018 10:49:51 +0000 (12:49 +0200)]
Add ONVIF subclass headers to the installed headers in meson.build too

5 years agortsp-server: Declare GstRTSPServer struct before anything else
Sebastian Dröge [Thu, 1 Nov 2018 09:29:01 +0000 (11:29 +0200)]
rtsp-server: Declare GstRTSPServer struct before anything else

It's needed by all kinds of other headers, including the ones that are
required for defining the GstRTSPServer struct itself and its API.

5 years agoMark all ONVIF-specific subclasses as Since 1.14
Sebastian Dröge [Thu, 1 Nov 2018 08:23:02 +0000 (10:23 +0200)]
Mark all ONVIF-specific subclasses as Since 1.14

5 years agoInclude ONVIF types from single-include rtsp-server.h
Sebastian Dröge [Thu, 1 Nov 2018 08:18:22 +0000 (10:18 +0200)]
Include ONVIF types from single-include rtsp-server.h

... by actually making it a single-include header and moving everything
related to the GstRTSPServer type to rtsp-server-object.h instead.
Otherwise there are too many circular includes.

https://bugzilla.gnome.org/show_bug.cgi?id=797361

5 years agortsp-stream: use idle source in on_message_sent
Göran Jönsson [Thu, 18 Oct 2018 05:25:05 +0000 (07:25 +0200)]
rtsp-stream: use idle source in on_message_sent

When the underlying layers are running on_message_sent, this sometimes
causes the underlying layer to send more data, which will cause the
underlying layer to run callback on_message_sent again. This can go on
and on.

To break this chain, we introduce an idle source that takes care of
sending data if there are more to send when running callback

https://bugzilla.gnome.org/show_bug.cgi?id=797289

5 years agortsp-client: Remove timeout GSource on cleanup
Edward Hervey [Sat, 20 Oct 2018 14:14:53 +0000 (16:14 +0200)]
rtsp-client: Remove timeout GSource on cleanup

Avoids ending up with races where a timeout would still be around
*after* a client was gone. This could happen rather easily in
RTSP-over-HTTP mode on a local connection, where each RTSP message
would be sent as a different HTTP connection with the same tunnelid.

If not properly removed, that timeout would then try to free again
a client (and its contents).

5 years agoautotools: fix distcheck
Tim-Philipp Müller [Thu, 4 Oct 2018 13:31:59 +0000 (14:31 +0100)]
autotools: fix distcheck

5 years agoonvif: encapsulate onvif part into a bin
Ognyan Tonchev [Wed, 12 Sep 2018 09:55:15 +0000 (11:55 +0200)]
onvif: encapsulate onvif part into a bin

...and thus do not let onvif affect pipelines latency

https://bugzilla.gnome.org/show_bug.cgi?id=797174

5 years agotests: client: Avoid bind() failures in tests
Patricia Muscalu [Thu, 27 Sep 2018 17:57:13 +0000 (19:57 +0200)]
tests: client: Avoid bind() failures in tests

https://bugzilla.gnome.org/show_bug.cgi?id=797059

5 years agoNew property for socket binding to mcast addresses
Patricia Muscalu [Thu, 6 Sep 2018 14:17:33 +0000 (16:17 +0200)]
New property for socket binding to mcast addresses

By default the multicast sockets are bound to INADDR_ANY,
as it's not allowed to bind sockets to multicast addresses
in Windows. This default behaviour can be changed by setting
bind-mcast-address property on the media-factory object.

https://bugzilla.gnome.org/show_bug.cgi?id=797059

5 years agolibs: fix API export/import and 'inconsistent linkage' on MSVC
Tim-Philipp Müller [Mon, 24 Sep 2018 08:36:21 +0000 (09:36 +0100)]
libs: fix API export/import and 'inconsistent linkage' on MSVC

Export rtsp-server library API in headers when we're building the
library itself, otherwise import the API from the headers.

This fixes linker warnings on Windows when building with MSVC.

Fix up some missing config.h includes when building the lib which
is needed to get the export api define from config.h

https://bugzilla.gnome.org/show_bug.cgi?id=797185

5 years agortsp-media-factory: Add missing break statements
Edward Hervey [Wed, 19 Sep 2018 12:31:56 +0000 (14:31 +0200)]
rtsp-media-factory: Add missing break statements

This resulted in warnings/assertions whenever one accessed the
max-mcast-ttl property.

CID #1439515
CID #1439523

5 years agomeson: add gobject-cast-checks, glib-asserts, glib-checks options
Tim-Philipp Müller [Wed, 19 Sep 2018 11:21:30 +0000 (12:21 +0100)]
meson: add gobject-cast-checks, glib-asserts, glib-checks options

5 years agomeson: add option to disable build of rtspclientsink plugin
Tim-Philipp Müller [Wed, 19 Sep 2018 11:17:57 +0000 (12:17 +0100)]
meson: add option to disable build of rtspclientsink plugin

5 years agomeson: re-arrange options
Tim-Philipp Müller [Wed, 19 Sep 2018 11:10:14 +0000 (12:10 +0100)]
meson: re-arrange options

5 years agomeson: Use feature option for tests option
Nirbheek Chauhan [Sat, 1 Sep 2018 05:51:15 +0000 (11:21 +0530)]
meson: Use feature option for tests option

This was somehow missed the last time around.

5 years agomeson: Maintain macOS ABI through dylib versioning
Nirbheek Chauhan [Fri, 31 Aug 2018 09:12:15 +0000 (14:42 +0530)]
meson: Maintain macOS ABI through dylib versioning

Requires Meson 0.48, but the feature will be ignored on older versions
so it's safe to add it without bumping the requirement.

Documentation:
https://github.com/mesonbuild/meson/blob/master/docs/markdown/Reference-manual.md#shared_library

5 years agomeson: add pkg-config file for the rtspclientsink plugin
Matthew Waters [Fri, 31 Aug 2018 07:20:47 +0000 (17:20 +1000)]
meson: add pkg-config file for the rtspclientsink plugin

5 years agortsp-client: Avoid reuse of channel numbers for interleaved
David Svensson Fors [Fri, 17 Aug 2018 07:54:27 +0000 (09:54 +0200)]
rtsp-client: Avoid reuse of channel numbers for interleaved

If a (strange) client would reuse interleaved channel numbers in
multiple SETUP requests, we should not accept them. The channel
numbers are used for looking up stream transports in the
priv->transports hash table, and transports disappear from the table
if channel numbers are reused.

RFC 7826 (RTSP 2.0), Section 18.54, clarifies that it is OK for the
server to change the channel numbers suggested by the client.

https://bugzilla.gnome.org/show_bug.cgi?id=796988

5 years agortsp-client: Add unit test of SETUP for RTSP/RTP/TCP
David Svensson Fors [Fri, 17 Aug 2018 07:54:27 +0000 (09:54 +0200)]
rtsp-client: Add unit test of SETUP for RTSP/RTP/TCP

Allow regex for matching transport header against expected pattern.

https://bugzilla.gnome.org/show_bug.cgi?id=796988

5 years agomeson: There is no gstreamer-plugins-good-1.0.pc
Nirbheek Chauhan [Wed, 15 Aug 2018 13:27:27 +0000 (18:57 +0530)]
meson: There is no gstreamer-plugins-good-1.0.pc

There is no installed version of that, only an uninstalled version.

5 years agoFix indentation again
Sebastian Dröge [Tue, 14 Aug 2018 11:31:55 +0000 (14:31 +0300)]
Fix indentation again

5 years agostream: Added a list of multicast client addresses
Patricia Muscalu [Thu, 26 Jul 2018 10:01:16 +0000 (12:01 +0200)]
stream: Added a list of multicast client addresses

When media is shared, the same media stream can be sent
to multiple multicast groups. Currently, there is no API
to retrieve multicast addresses from the stream.
When calling gst_rtsp_stream_get_multicast_address() function,
only the first multicast address is returned.
With this patch, each multicast destination requested in SETUP
will be stored in an internal list (call to
gst_rtsp_stream_add_multicast_client_address()).
The list of multicast groups requested by the clients can be
retrieved by calling gst_rtsp_stream_get_multicast_client_addresses().
There still exist some problems with the current implementation
in the multicast case:
1) The receiving part is currently only configured with
regard to the first multicast client (see
https://bugzilla.gnome.org/show_bug.cgi?id=796917).
2) Secondly, of security reasons, some constraints should be
put on the requested multicast destinations (see
https://bugzilla.gnome.org/show_bug.cgi?id=796916).

Change-Id: I6b060746e472a0734cc2fd828ffe4ea2956733ea

https://bugzilla.gnome.org/show_bug.cgi?id=793441

5 years agostream: Choose the maximum ttl value provided by multicast clients
Patricia Muscalu [Wed, 25 Jul 2018 13:33:18 +0000 (15:33 +0200)]
stream: Choose the maximum ttl value provided by multicast clients

The maximum ttl value provided so far by the multicast clients
will be chosen and reported in the response to the current
client request.

Change-Id: I5408646e3b5a0a224d907ae215bdea60c4f1905f

https://bugzilla.gnome.org/show_bug.cgi?id=793441

5 years agortsp-stream: Don't require address pool in the transport specific case
Patricia Muscalu [Fri, 23 Feb 2018 13:34:32 +0000 (14:34 +0100)]
rtsp-stream: Don't require address pool in the transport specific case

If "transport.client-settings" parameter is set to true, the client is
allowed to specify destination, ports and ttl.
There is no need for pre-configured address pool.

Change-Id: I6ae578fb5164d78e8ec1e2ee82dc4eaacd0912d1

https://bugzilla.gnome.org/show_bug.cgi?id=793441

5 years agoclient: Don't reserve multicast address in the client setting case
Patricia Muscalu [Tue, 24 Jul 2018 12:02:40 +0000 (14:02 +0200)]
client: Don't reserve multicast address in the client setting case

When two multicast clients request specific transport
configurations, and "transport.client-settings" parameter is
set to true, it's wrong to actually require that these two
clients request the same multicast group.
Removed test_client_multicast_invalid_transport_specific test
cases as they wrongly require that the requested destination
address is supposed to be present in the address pool, also in
the case when "transport.client-settings" parameter is set to true.

Change-Id: I4580182ef35996caf644686d6139f72ec599c9fa

https://bugzilla.gnome.org/show_bug.cgi?id=793441

5 years agoAdd new API for setting/getting maximum multicast ttl value
Patricia Muscalu [Tue, 24 Jul 2018 07:35:46 +0000 (09:35 +0200)]
Add new API for setting/getting maximum multicast ttl value

Change-Id: I5ef4758188c14785e17fb8fbf42a3dc0cb054233

https://bugzilla.gnome.org/show_bug.cgi?id=793441

5 years agortsp-stream: avoid duplicating the first multicast client
Mathieu Duponchelle [Tue, 31 Jul 2018 19:17:41 +0000 (21:17 +0200)]
rtsp-stream: avoid duplicating the first multicast client

In dcb4533fedae3ac62bc25a916eb95927b7d69aec , we made it so
clients were dynamically added and removed to the multicast
udp sinks, as such we should no longer add a first client in
set_multicast_socket_for_udpsink

https://bugzilla.gnome.org/show_bug.cgi?id=793441

5 years agoRevert "rtsp-stream: avoid duplicating the first multicast client"
Sebastian Dröge [Tue, 14 Aug 2018 11:25:53 +0000 (14:25 +0300)]
Revert "rtsp-stream: avoid duplicating the first multicast client"

This reverts commit 33570944401747f44d8ebfec535350651413fb92.

Commits where accidentially squashed together

5 years agoRevert "Add new API for setting/getting maximum multicast ttl value"
Sebastian Dröge [Tue, 14 Aug 2018 11:25:42 +0000 (14:25 +0300)]
Revert "Add new API for setting/getting maximum multicast ttl value"

This reverts commit 7f0ae77e400fb8a0462a76a5dd2e63e12c4a2e52.

Commits where accidentially squashed together

5 years agoRevert "rtsp-stream: Don't require address pool in the transport specific case"
Sebastian Dröge [Tue, 14 Aug 2018 11:25:37 +0000 (14:25 +0300)]
Revert "rtsp-stream: Don't require address pool in the transport specific case"

This reverts commit a9db3e7f092cfeb5475e9aa24b1e91906c141d52.

Commits where accidentially squashed together