Commit graph

731 commits

Author SHA1 Message Date
Ognyan Tonchev
3b4894c4f1 media: also do state change in suspended state 2013-11-29 15:50:23 +01:00
Wim Taymans
53859ac34b media: also handle prepare and range in suspended state
When we are suspended, we are already prepared.
We can get the range in the suspended state.
2013-11-29 10:53:08 +01:00
Wim Taymans
421499c102 client: store setup uri and use in PLAY response
Store the uri used when doing the setup and use that in the PLAY
response.

fixes https://bugzilla.gnome.org/show_bug.cgi?id=715168
2013-11-28 17:47:18 +01:00
Wim Taymans
568477d9b5 stream-transport: add method to get/set url 2013-11-28 17:35:45 +01:00
Wim Taymans
b1e8172ef3 client: suspend after SDP and unsuspend before PLAYING
Based on patches by Ognyan Tonchev <ognyan@axis.com>

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=711257
2013-11-28 16:18:40 +01:00
Wim Taymans
2f17369e9d media: add suspend modes
Add support for different suspend modes. The stream is suspended right after
producing the SDP and after PAUSE. Different suspend modes are available that
affect the state of the pipeline. NONE leaves the pipeline state unchanged and
is the current and old behaviour, PAUSE will set the pipeline to the PAUSED
state and RESET will bring the pipeline to the NULL state.
A stream is also unsuspended when it goes back to PLAYING, for RESET streams,
this means that the pipeline needs to be prerolled again.

Base on patches by Ognyan Tonchev <ognyan@axis.com>

See https://bugzilla.gnome.org/show_bug.cgi?id=711257
2013-11-28 16:18:39 +01:00
Wim Taymans
db771c5167 media: start live streams in blocked state
Start live streams in the blocked state and make them preroll using the
messages. This ensure that no data is played by the sink until we explicitly
unblock the stream right before going to PLAYING.

See https://bugzilla.gnome.org/show_bug.cgi?id=711257
2013-11-28 16:18:39 +01:00
Wim Taymans
6ce48c51a2 media: refactor starting and waiting for preroll
Based on patches from Ognyan Tonchev <ognyan@axis.com>

See https://bugzilla.gnome.org/show_bug.cgi?id=711257
2013-11-28 16:18:39 +01:00
Wim Taymans
bdef631218 stream: add API to block streams
Add an API to block on the streams and make it post a message.

Based on patch by Ognyan Tonchev <ognyan@axis.com>

See https://bugzilla.gnome.org/show_bug.cgi?id=711257
2013-11-28 16:18:39 +01:00
Wim Taymans
b3baa2801d media: move default implementations to where they are used 2013-11-26 17:23:04 +01:00
Wim Taymans
b8ae2570d9 media: take the right lock in gst_rtsp_media_set_pipeline_state()
We need to take the state_lock when calling this method.
2013-11-26 16:25:37 +01:00
Wim Taymans
9da7b5eeb5 media: handle add-added on non-bins too
Handle dynamic payloaders that are not bins, as used in the unit-test.
2013-11-26 16:24:35 +01:00
Sebastian Rasmussen
1ebc2c703e rtsp-media/-factory: Fix request pad name comments
These must be escaped for gtk-doc to parse the comments without warnings.
2013-11-22 11:53:04 +01:00
Aleix Conchillo Flaque
b6d4a29d75 rtsp-media: remove transports if media is in error status
* gst/rtsp-server/rtsp-media.c (gst_rtsp_media_set_state): if we are
  trying to change to GST_STATE_NULL and media is in error status, we
  remove all transports.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=712776
2013-11-22 11:25:15 +01:00
Wim Taymans
7b5763179a rtsp-media: use element metadata to find payloader
Use the element metadata to find the payloader instead of checking
for the base class.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=712396
2013-11-22 11:19:35 +01:00
Aleix Conchillo Flaque
e5332535a7 rtsp-stream: add getter for payload type
* gst/rtsp-server/rtsp-stream.c: add new method gst_rtsp_stream_get_pt.

* gst/rtsp-server/rtsp-media.c (pad_added_cb): find real payloader
  element and create the stream with this one instead of the dynpay%d
  element.

  https://bugzilla.gnome.org/show_bug.cgi?id=712396
2013-11-22 11:19:35 +01:00
Sebastian Rasmussen
08160e0913 rtsp-*: Refer to NULL as a constant in comments
Plus one typo fix.

https://bugzilla.gnome.org/show_bug.cgi?id=714988
2013-11-22 09:13:14 +00:00
Sebastian Rasmussen
d1a2853659 rtsp-*: Fix type name typos in comments
* rtsp-auth: Refer to GstRTSPToken, not GstRTSPtoken
  * rtsp-auth: Refer to part of constant name as text
  * rtsp-auth/-permissions/-token: Refer to Permissions not Permission
  * rtsp-session-media: Fix GstRTSPSessionMedia typo
  * rtsp-stream: Fix typo when refering to GstBin

https://bugzilla.gnome.org/show_bug.cgi?id=714988
2013-11-22 09:13:08 +00:00
Tim-Philipp Müller
33c4bdfa01 rtsp-server: sprinkle some allow-none annotations for g-i 2013-11-18 10:47:04 +00:00
Wim Taymans
a106950f70 stream: add method to filter transports
Add a method to safely iterate and collect the stream transports

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=711664
2013-11-18 11:18:15 +01:00
Wim Taymans
b0f609ce7f rtsp: allow NULL func in filters
Passing a null function make the filters return a list of
refcounted objects.
2013-11-15 16:35:05 +01:00
Wim Taymans
b2bc84cdbf address-pool: fix address increment
Use a guint instead of guint8 to increment the address. It's still not
completely correct because a guint might not be able to hold the complete
address range, but that's an enhacement for later.
Add unit test to test improved behaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=708237
2013-11-12 16:54:59 +01:00
Patricia Muscalu
adc02db975 client: allow absolute path in requests
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=711689
2013-11-12 12:21:50 +01:00
Patricia Muscalu
8ce453d97d client: make make_path_from_uri a vmethod 2013-11-12 12:08:06 +01:00
Wim Taymans
8d5ce0d4ee stream: Add functions to get rtp and rtcp sockets
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=710100
2013-11-12 12:04:55 +01:00
Wim Taymans
d443f8546b context: defing a GType for the context
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=710018
2013-11-12 11:21:55 +01:00
Sebastian Pölsterl
e756324490 Fixed several GIR warnings 2013-11-12 11:15:58 +01:00
Wim Taymans
533d237754 auth: small typos 2013-11-12 11:15:46 +01:00
Sebastian Rasmussen
e4509ed92c token: Validate args for gst_rtsp_token_is_allowed
See https://bugzilla.gnome.org/show_bug.cgi?id=710520
2013-11-12 10:38:37 +01:00
Sebastian Rasmussen
c9025a58e1 token: Fix bug when creating empty token
We always want to have a valid GstStructure in the token.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=710520
2013-11-12 10:37:45 +01:00
Wim Taymans
c4ae13dbb5 thread-pool: avoid race in shutdown
If we call g_main_loop_quit before the thread has entered g_main_loop_run, we
don't actually stop the mainloop ever. Solve this race by adding an idle source
to the mainloop that calls the _quit. This way we immediately exit the mainloop
if quit was called before we started it.
2013-11-12 10:28:55 +01:00
Sebastian Rasmussen
4036f210af permissions: Fix refcounting when adding/removing roles
Previously a role that was removed was unreffed twice, and when
replacing an existing role the replaced role was freed while still being
referenced. Both bugs are now fixed.

See https://bugzilla.gnome.org/show_bug.cgi?id=710202
2013-11-12 09:54:04 +01:00
Ognyan Tonchev
7b34d1e915 rtsp-server: Fix socket leak
https://bugzilla.gnome.org/show_bug.cgi?id=710088
2013-11-04 20:08:06 +01:00
Sebastian Dröge
935e8f852d rtsp-session-pool: Make sure session IDs are properly URI-escaped
https://bugzilla.gnome.org/show_bug.cgi?id=643812
2013-10-30 22:16:54 +01:00
Ognyan Tonchev
78e5a9148e thread-pool: Fix thread leak when reusing threads
https://bugzilla.gnome.org/show_bug.cgi?id=709730
2013-10-30 19:01:48 +01:00
Patricia Muscalu
de7be1c9b2 tests: fixed racy behavior in rtspserver tests
https://bugzilla.gnome.org/show_bug.cgi?id=710078
2013-10-15 11:28:27 +02:00
Wim Taymans
d4b8a8249c client: append query string in PAUSE/PLAY/TEARDOWN as well 2013-10-04 06:29:30 +02:00
Jonas Holmberg
1742399e23 client: Add query to control path
If the SETUP url contains a query it must be appended to the control
path so that it matches any already created stream in the media. The
query will also be appended to the session media path.
2013-10-04 06:14:32 +02:00
Wim Taymans
59b53c90c3 rtsp-media: remove old line 2013-10-04 05:48:52 +02:00
Jonas Holmberg
fcf51d3485 stream: Correct control comparison
https://bugzilla.gnome.org/show_bug.cgi?id=709176
2013-10-02 11:57:06 +02:00
Youness Alaoui
917bbfcc20 media: Check dynamically if the pipeline supports seeking
We should not depend on whether or not the pipeline state change
returned NO_PREROLL or not. A media could dynamically change its
element and switch from seekable to non seekable so it's best to test
the seekable nature of the pipeline dynamically when we try to do a seek.
2013-10-02 06:00:10 +02:00
Youness Alaoui
33dc78209c media: Return FALSE if seeking is not supported 2013-10-02 05:57:15 +02:00
Wim Taymans
d138f79da0 rtsp-media: don't seek accurate by default
Accurate seeking is perhaps a little overkill in the most common situation and
causes some formats (mp3) over slow media to seek extremely slowly.
2013-10-01 17:16:11 +02:00
Jonas Holmberg
0cd24e2257 client: Reply 400 if media cannot be constructed
Reply 400 Bad Request instead of 503 Service Unavailable if media
cannot be constructed in SETUP.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=708821
2013-09-26 14:32:43 +02:00
Jonas Holmberg
74b8da9396 client: Send setup reply once only
If find_media() failed in handle_setup_request() two replies was sent.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=708819
2013-09-26 14:25:36 +02:00
Jonas Holmberg
eb03b5c172 server: Emit client-connected signal earlier
Emit client-connected before the client ref is given to a GSource,
otherwise client-connected can be emitted after the client object has
been freed.
2013-09-24 17:36:07 +02:00
Patrick Radizi
7b0ad7c25f addresspool: return reason of failure
Let gst_rtsp_address_pool_reserve_address() return the reason why
the address could not be reserved.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=708229
2013-09-24 17:30:18 +02:00
Jonas Holmberg
e88b71aee4 client: Do not read beyond end of path string
If the setup was done without a control url, make sure we don't try to read the
non-existing control string and crash.
2013-09-19 15:44:26 +02:00
Wim Taymans
b41422bad7 client: Fix RTPInfo header
Refactor the method to make the content_base.
Use the content-base and the control url to construct the RTPInfo
url.
2013-09-17 14:39:44 +02:00
Wim Taymans
4d6c038fc7 client: map url to path only in describe
Only map the request url to a path in the DESCRIBE method. The SDP then
contains the base and control urls that should be used to SETUP/PAUSE/
PLAY/TEARDOWN the media.
2013-09-17 12:21:02 +02:00
Wim Taymans
fe3f63de7c Revert "client: map URL to path in requests"
This reverts commit e3fded2cec.

This is not correct, we only remap the URL to a path in DESCRIBE, the SDP then
contains the base and control urls which are used in the SETUP, PLAY,
PAUSE and TEARDOWN requests.
2013-09-17 11:41:57 +02:00
Wim Taymans
e3fded2cec client: map URL to path in requests 2013-09-16 17:17:35 +02:00
Wim Taymans
952aa309dc mount-points: make vmethod to make path from uri
Make a vmethod to transform an url into a path. The path is then used to lookup
the factory. This makes it possible to also use other bits of the url, such as
the query parameters, to locate the factory.
2013-09-16 17:17:34 +02:00
Ognyan Tonchev
258f63b8ac thread-pool: Add cleanup to wait for the threadpool to finish
Also fix race condition if two threads are asking for the first
thread from the thread pool at once. This would case two internal
GThreadPools to be created.

https://bugzilla.gnome.org/show_bug.cgi?id=707753
2013-09-09 14:36:12 +02:00
Jonas Holmberg
23b3f21595 client: free threadpool
https://bugzilla.gnome.org/show_bug.cgi?id=707638
2013-09-06 20:44:10 +01:00
Jonas Holmberg
19178a413c auth, media, media-factory: unref permissions
https://bugzilla.gnome.org/show_bug.cgi?id=707638
2013-09-06 18:57:55 +01:00
Patricia Muscalu
ff10d24130 rtsp-client: remove query part from content-base string
Make sure that after the control url has been resolved, it's
not a part of the query-string.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=706568
2013-08-23 12:23:06 +02:00
Wim Taymans
1287b5f772 client: don't check url in response
There is no url or method in the response to check
2013-08-23 10:38:43 +02:00
Youness Alaoui
1f84618725 Add handle-response signal for when we receive a GET_PARAMETER response 2013-08-23 10:32:33 +02:00
Youness Alaoui
76cbc7c86c Fix gst_rtsp_server_client_filter, using wrong variable type 2013-08-23 10:29:21 +02:00
Tim-Philipp Müller
3766914a18 rtsp-media-factory-uri: check AAC properly for whether it's parsed or not
For AAC we need to check for framed=true instead of parsed=true.

https://bugzilla.gnome.org/show_bug.cgi?id=701384
2013-08-22 18:39:59 +01:00
Wim Taymans
d74cbf2911 stream: optimize pipeline for protocols
When TCP is not an allowed protocol for the stream, avoid creating the
appsrc/appsink/queue and tee elements.
2013-08-16 17:05:24 +02:00
Wim Taymans
f094256add media: set protocols on streams 2013-08-16 16:34:56 +02:00
Wim Taymans
1a838d6179 client: use protocols supported by stream 2013-08-16 16:20:00 +02:00
Wim Taymans
04d2da4d03 media-factory: allow all protocols 2013-08-16 16:19:27 +02:00
Wim Taymans
cf96774e6d media: configure protocols in new streams 2013-08-16 16:10:43 +02:00
Wim Taymans
a84b71c0f0 stream: add protocols property 2013-08-16 16:08:43 +02:00
Youness Alaoui
cdbb6bcc15 rtsp-media: send state in "new-state" signal
https://bugzilla.gnome.org/show_bug.cgi?id=705110
2013-08-13 16:41:53 +01:00
Wim Taymans
f124d11298 server: add method to iterate clients of server 2013-08-02 17:19:42 +02:00
Youness Alaoui
a95ab4b29e Add vmethod for rtsp-media subclass to access rtpbin 2013-08-02 16:59:04 +02:00
Youness Alaoui
081e6d3204 small documentation fix 2013-08-02 16:58:24 +02:00
Youness Alaoui
7618800088 Do not take range header if range is invalid 2013-08-02 16:58:20 +02:00
Wim Taymans
6ac547cc34 media: add docs for new method 2013-08-02 16:57:26 +02:00
Youness Alaoui
050b16ad84 Add API to rtsp-media set the pipeline's state 2013-08-02 16:53:07 +02:00
Youness Alaoui
5e642c7ef1 Update current position/duration when gst_rtsp_media_get_range_string is called 2013-08-02 16:51:15 +02:00
Wim Taymans
f78a65379c ClientState -> Context
Rename the clientstate to context and put the code in a separate file.
2013-07-22 14:25:04 +02:00
Wim Taymans
25547176be auth: add support for default token
The default token is used when the user is not authenticated and can be used to
give minimal permissions.
2013-07-18 12:27:33 +02:00
Wim Taymans
1a307c707d auth: use defines when possible 2013-07-18 12:27:33 +02:00
Wim Taymans
3dc34af5aa address-pool: improve docs 2013-07-18 12:27:33 +02:00
Wim Taymans
472010666c permissions: add the role to the copy 2013-07-18 12:27:33 +02:00
Olivier Crête
db74d5c559 permissions: Also copy the roles 2013-07-17 19:35:33 -04:00
Olivier Crête
91a32754e3 permissions: Make it build 2013-07-17 19:32:09 -04:00
Wim Taymans
81745b43b4 docs: small fixes 2013-07-16 12:36:56 +02:00
Wim Taymans
041b1b79a1 docs: improve docs 2013-07-16 12:32:51 +02:00
Wim Taymans
d3d7df5a1e address-pool: cleanups
Remove redundant method, improve docs.
2013-07-16 12:32:00 +02:00
Wim Taymans
0a8f5c8892 docs: improve docs 2013-07-15 17:31:35 +02:00
Wim Taymans
fbe0cefae1 permissions: implement _remove_role 2013-07-15 17:12:57 +02:00
Wim Taymans
5e297ea093 permissions: update docs 2013-07-15 17:12:43 +02:00
Wim Taymans
f18f2619e1 auth: add default authorizations
When no auth module is specified, use our table of defaults to look up the
default value of the check instead of always allowing everything. This was
we can disallow client settings by default.
2013-07-15 16:47:07 +02:00
Wim Taymans
7064b9fda7 thread-pool: add more docs 2013-07-15 15:25:00 +02:00
Wim Taymans
0ce4d4d5c7 thread-pool: fix race in thread reuse
If we try to reuse a thread right after we made it stop, we end up using a
stopped thread. Catch this case and only reuse threads that are not stopping.
2013-07-15 14:50:38 +02:00
Wim Taymans
3fe1096fd1 server: add small debug 2013-07-15 14:50:26 +02:00
Wim Taymans
38d91a2bf8 client: support pushed context in handle_request
If we already have a pushed state, reuse it and add our own things. This makes
it easier to write tests.
2013-07-15 11:57:49 +02:00
Wim Taymans
7db2f9f3cf auth: don't auth on methods
Don't authorize on methods anymore but on the resources that we
try to access, this is more flexible.
Move the authorization checks to where they are needed and let the
check return the response on error.
2013-07-15 11:56:06 +02:00
Wim Taymans
692cbc1364 mount-points: add some debug 2013-07-15 11:51:34 +02:00
Wim Taymans
9fe107a96a auth: let the auth module check client_settings
Let the auth module decide if client settings are allowed for the
current client.
2013-07-12 17:07:53 +02:00
Wim Taymans
c4db302559 token: add method to check boolean permission 2013-07-12 17:06:37 +02:00
Wim Taymans
b8c5aa3a6b token: simplify token constructor
Use variable arguments to make easier API.
2013-07-12 16:36:05 +02:00
Wim Taymans
67d0fbc048 media-factory: add convenience API for factory 2013-07-12 16:17:57 +02:00
Wim Taymans
facc91a942 permissions: simplify API a little
Avoid passing GstStructure in the add_role method, use varargs instead
to construct the structure behind the scenes. We can then also use the
structure name as the role and simplify some more logic.
2013-07-12 16:17:15 +02:00
Wim Taymans
a6a8293595 auth: fix typo 2013-07-12 16:01:14 +02:00
Wim Taymans
5cf75e64af auth: handle unauthorized response
Move handling of the unauthorized response to the auth module, it can add
the appropriate headers to request authorization for the required method
much better than the client.
2013-07-12 15:19:29 +02:00
Wim Taymans
7532de687a client: allow for sending any message, not only requests
Change the _send_request() method to _send_message() so that we
can both send requests and replies.
2013-07-12 15:13:48 +02:00
Wim Taymans
9a09d98e6d docs: fix docs 2013-07-12 14:10:13 +02:00
Wim Taymans
4b2e6d88b3 auth: move TLS handling to auth module
Remove the TLS settings on the server and move it to the auth module because
that is where security related bits go.
2013-07-12 12:41:52 +02:00
Wim Taymans
a1e96c2269 client: add state push/pop 2013-07-12 12:38:54 +02:00
Wim Taymans
e1628a0515 client: add connection to state 2013-07-12 12:37:25 +02:00
Wim Taymans
f6674d5c10 mount-points: fix debug 2013-07-11 20:45:11 +02:00
Wim Taymans
7f8fdbc453 thread-pool: we don't require a state 2013-07-11 17:28:04 +02:00
Wim Taymans
c2d4b79b69 server: let context ref the server
So that we don't risk losing the server object early anc crash.
2013-07-11 17:18:58 +02:00
Wim Taymans
0b3644a21b docs: improve docs 2013-07-11 16:57:14 +02:00
Wim Taymans
8b4c9570fa session-pool: make vmethod to create a session
Make a vmethod to create a sessions so that subclasses can create
custom session objects
2013-07-11 16:28:09 +02:00
Wim Taymans
d357fc55af docs: more updates 2013-07-11 12:24:33 +02:00
Wim Taymans
ccceb1de11 docs: update docs 2013-07-11 12:18:26 +02:00
Wim Taymans
6f5a82aed3 thread-pool: fix vmethod invocation 2013-07-10 20:48:47 +02:00
Wim Taymans
8cec0f8a46 thread-pool: store thread type in thread 2013-07-10 20:48:18 +02:00
Wim Taymans
4e9c4d8bb7 client: pass thread from pool to media _prepare
Get a thread from the configured threadpool and pass it to the prepare method of
the media.
2013-07-10 17:09:27 +02:00
Wim Taymans
d1e4baab6c media: Accept a thread in _prepare
Remove out own threadpool handling and use the provided thread and
maincontext for the bus messages and the state changes.
2013-07-10 17:08:14 +02:00
Wim Taymans
01b921e8a6 server: configure client thread pool 2013-07-10 17:07:13 +02:00
Wim Taymans
00997d956f client: add method to configure thread pool 2013-07-10 17:06:36 +02:00
Wim Taymans
27917f4ef3 server: use thread pool
Use the thread pool instead of doing our own thing.
2013-07-10 17:02:58 +02:00
Wim Taymans
25269c7b1a thread-pool: add object to manage threads
Add an object to manage the client and media threads.
2013-07-10 16:47:43 +02:00
Wim Taymans
1a0c7051aa auth: debug authorization check 2013-07-10 15:28:35 +02:00
Wim Taymans
c4c9c873b8 media: start media pipeline in context
Start the media pipeline in the provided context (or our default one
when NULL). This makes sure that we run the bus thread in this context and that
all media threads are children of this context.
2013-07-09 20:44:51 +02:00
Wim Taymans
ca28a46600 factory: pass permissions to media by default 2013-07-09 16:38:39 +02:00
Wim Taymans
d7dec33328 auth: simplify auth checks
Remove client from methods, it's now in the state
Perform the check specified by the string, use the information from the
thread local context.
2013-07-09 16:04:35 +02:00
Wim Taymans
c9d6455ad3 client: add state to current thread
Add the client to the ClientState object.
Place the ClientState on the current thread.
2013-07-09 16:01:29 +02:00
Wim Taymans
0499a1ec7d media: make it possible to set permissions
Make it possible to set permissions on media and media factory objects
2013-07-09 14:33:43 +02:00
Wim Taymans
8f008807ad permissions: add permissions object
Add a mini object to store permissions based on a role.
2013-07-09 14:31:15 +02:00
Wim Taymans
a63f4a2a4c auth: add auth checks
Add an enum with auth checks and implement the checks in the auth object.
Perform the checks from the client.
2013-07-08 16:29:01 +02:00
Wim Taymans
fb7c9b8122 auth: use the token after authentication
After we authenticated a user, keep the Token around in the state.
2013-07-08 11:10:20 +02:00
Wim Taymans
12583e819c media: add optional context for bus messages
Add an optional mainloop to _prepare that will handle the bus messages instead
of always using the shared mainloop.
2013-07-08 11:10:20 +02:00
Wim Taymans
48ff096a25 token: add authorization token
Add a simply miniobject that contains the authorizations. The object contains a
GstStructure that hold all authorization fields. When a user is authenticated,
the auth module will create a Token for the user. The token is then used to
check what operations the user is allowed to do and various other configuration
values.
2013-07-05 20:53:19 +02:00
Wim Taymans
19cffc7999 auth: remove auth from media and factory
Remove the auth object from media and factory. We want to have the RTSPClient
authenticate and authorize resources, there is no need to place another auth
manager on the media/factory.
2013-07-05 20:53:19 +02:00
Wim Taymans
78bc979690 auth: add support for multiple basic auth tokens
Make it possible to add multiple basic authorisation tokens to one authorization
object. Associate with each token an authorization group that will define what
capabilities are allowed.
2013-07-04 14:33:59 +02:00
Wim Taymans
a1e5bde58d client: error out on non-aggregate control
We require aggregate control (for now) for PLAY, PAUSE and TEARDOWN.
2013-07-03 16:15:04 +02:00
Wim Taymans
9182263532 client: rework setup request a little
Cache the media in DESCRIBE based on the longest matching path with the uri
that we can find in the mount points.

Rework the setup request a little to get the media from the session or from
the longest matching path, this way we can derive the control string as
everything after the path instead of hardcoding it.

Find the stream based on the control string and only open a session when all
this can be done.
2013-07-03 15:55:38 +02:00
Wim Taymans
3999bd4e4e media: add method to find a stream by control url 2013-07-03 15:14:39 +02:00
Wim Taymans
d4e8d800c9 stream: add method to check control url of stream 2013-07-03 15:13:45 +02:00
Wim Taymans
5a833f503e session: use path matching for session media
Use a path string instead of a uri to lookup session media in the sessions. Also
use path matching to find the largest possible path that matches.
2013-07-03 12:37:48 +02:00
Wim Taymans
8f79daef5e mount-points: remove useless vmethod
Making lookups in the mount points should not be done with a URL, if there is a
mapping to be done from URL to mount points, we'll need to do it somewhere
else.
2013-07-03 11:10:27 +02:00
Wim Taymans
df08a2dd9e mount-points: improve mount point searching
Use a GSequence to keep track of the mount points.
Match a URL to the longest matching registered mount point. This should be the
URL to perform aggreagate control and the remainder is the stream specific
control part.
Add some unit tests for this.
2013-07-03 10:45:51 +02:00
Sebastian Dröge
a22889ac08 rtsp-server: Allow building of static library 2013-07-03 10:40:48 +02:00
Wim Taymans
714e84d891 sdp: get control string from stream
Use the control string as configured in the stream.
2013-07-02 15:54:43 +02:00
Wim Taymans
2ffb0f69d2 stream: add methods and property to set control string 2013-07-02 14:50:30 +02:00
Wim Taymans
0248775c74 client: cleanups
Rename variables for clarity
Keep media in state when we can
2013-07-02 11:58:02 +02:00
Wim Taymans
a7fe63298c stream: add more support for IPv6
Rename _get_address to _get_multicast_address in GstRTSPStream to
make it clear that this function only deals with multicast.
Make it possible to have both an IPv4 and IPv6 multicast address on
a stream. Give the client an IPv4 or IPv6 address depending on the
address it used to connect to the server.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=702002
2013-07-01 16:46:39 +02:00
Wim Taymans
13016309b1 client: fix comment 2013-07-01 15:18:43 +02:00
Wim Taymans
82812988a6 stream: handle failed port allocation
Allow for ipv4 or ipv6 socket allocations to fail. Only report failure if we
can't allocate any family at all. Also keep track of what port families we
allocated.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=703175
2013-07-01 14:47:33 +02:00
Wim Taymans
284a0a5cd1 stream: improve docs 2013-07-01 12:20:50 +02:00