Commit graph

133 commits

Author SHA1 Message Date
Wim Taymans 26a4b98ab0 client: small cleanup 2012-11-26 16:45:04 +01:00
Wim Taymans 8da4171055 client: remove reference to server
We don't need to keep a ref to the server
2012-11-26 16:39:26 +01:00
Wim Taymans 4fa7502fd9 client: add locking
Also add some g_return_if()
2012-11-26 16:31:43 +01:00
Wim Taymans b21b46ec4d client: log more errors 2012-11-26 13:37:20 +01:00
Wim Taymans f460e7360e client: fix compilation 2012-11-26 13:36:19 +01:00
Wim Taymans 84e72262d0 client: add generic close-after-send support
Add a property to send_response() to close the connection after the response has
been sent to the client.
2012-11-26 13:19:06 +01:00
Wim Taymans 1d53c46d23 MediaMapping -> MountPoints
Describes better what the object manages.
2012-11-26 12:37:55 +01:00
David Svensson Fors 01973c924d rtsp-media: remove bus watch before finalizing
* A GDestroyNotify function is set for the bus watch in gst_rtsp_media_prepare.
* An extra media ref is added for the bus watch. This extra ref is unreffed by
the GDestroyNotify function.
* gst_rtsp_media_unprepare destroys the source so the bus watch is removed.
* GstRTSPClient, which calls gst_rtsp_media_prepare, also calls
gst_rtsp_media_unprepare before unreffing the media.

This way, the bus watch will be removed before the media is finalized.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=688707
2012-11-20 09:46:00 +01:00
Alessandro Decina 65042a9551 client: wait until the TEARDOWN response is sent to close the connection
Responses can be sent async so we need to wait until the TEARDOWN response has
been written before we close the connection to the client. This avoids the risk
of writing/polling closed sockets.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=688535
2012-11-20 09:32:19 +01:00
Tim-Philipp Müller 290968eb8c rtsp-client: fix unused-but-set-variable compiler warning
rtsp-client.c:1260:21: error: variable 'protocols' set but not used
2012-11-17 00:03:42 +00:00
Wim Taymans 26ff5fc073 rtsp: cleanups 2012-11-15 17:11:16 +01:00
Wim Taymans e4ea72ccdf stream: use the address managed by the stream
Use the address managed by the stream for multicast. This allows us to have 1
multicast address for each stream.
Because the address is now managed by the stream we don't have to pass it around
anymore.
Set the address pool on the streams.
2012-11-15 16:18:29 +01:00
Wim Taymans ba21661ce4 rtsp: improve debug 2012-11-15 16:15:20 +01:00
Wim Taymans 2160d6dbd3 client: set blocksize only on stream
Set the blocksize only on the current stream.
2012-11-15 15:29:35 +01:00
Wim Taymans 45b6693b39 rtsp: make address-pool return an address object
Return a boxed GstRTSPAddress from the GstRTSPAddressPool. This allows us to
store more info in the structure and allows us to more easily return the address
to the right pool when no longer needed.
Pass the address to the StreamTransport so that we can return it to the pool
when the stream transport is freed or changed.
2012-11-15 13:25:14 +01:00
Wim Taymans f15ffb521c rtsp: use AddressPool
Remove the multicast_group property.
Use the configured addresspool to allocate multicast addresses.
2012-11-14 17:23:59 +01:00
Wim Taymans c431592976 client: rename method
gst_rtsp_client_create_from_socket -> gst_rtsp_client_use_socket: we
don't really create the client from the socket, we use the socket for the
client.
2012-11-12 15:01:13 +01:00
Wim Taymans a58d404e1f server: rework maincontext handling in clients
Make a separate method to attach a client to a MainContext.

Let the server decide in what GMainContext the client will operate and give this
context to the client in attach. Then the server can later decide to use a
separate thread for each client or just use the mainthread.
2012-11-12 15:01:09 +01:00
Wim Taymans 5b4340067a session: move session header code in session object 2012-11-12 12:40:34 +01:00
Tim-Philipp Müller 4dba434f16 Fix FSF address 2012-11-04 00:14:25 +00:00
Wim Taymans 543aa383e7 rtsp: only create transport when needed
Only create the StreamTransport when configured.
2012-10-28 00:23:57 +02:00
Wim Taymans 66a29c7ed9 client: small cleanup 2012-10-27 23:53:35 +02:00
Wim Taymans fb117a4f75 rtsp: refactor configuration of transport
Move the configuration of the transport to a place where it makes
more sense.
2012-10-27 23:49:24 +02:00
Wim Taymans 8c30d050fa client: refactor transport parsing 2012-10-27 21:26:55 +02:00
Wim Taymans fee8216513 client: refuse to change the MTU on shared media
If we change the MTU of chared media, it changes for all clients.
We don't want to set the MTU to something large for clients that
stream over UDP.
2012-10-27 21:05:03 +02:00
Wim Taymans 6b7ff45ca6 rtsp: fix MTU setting
Fix setting of the MTU. There is no need for a vmethod.
2012-10-26 12:35:20 +02:00
Wim Taymans de7c72dec2 rtsp: massive refactoring
Make GObjects from the remaining simple structures.
Remove GstRTSPSessionStream, it's not needed.
Rename GstRTSPMediaStream -> GstRTSPStream: It is shorter
Rename GstRTSPMediaTrans -> GstRTSPStreamTransport: It describes how
  a GstRTSPStream should be transported to a client.
Rename GstRTSPMediaFactory::get_element -> create_element because that
  more accurately describes what it does.
Make nice methods instead of poking in the structures.
Move some methods inside the relevant object source code.
Use GPtrArray to store objects instead of plain arrays, it is more
  natural and allows us to more easily clean up.
Move the allocation of udp ports to the Stream object. The Stream object
  contains the elements needed to stream the media to a client.
Improve the prepare and unprepare methods. Unprepare should now undo
  everything prepare did. Improve also async unprepare when doing EOS on
  shutdown. Make sure we always unprepare correctly.
2012-10-25 21:29:58 +02:00
Sebastian Rasmussen 0de6262dc4 rtsp-client: Unref server address clients connected to
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=686725
2012-10-23 23:05:45 +01:00
Sebastian Pölsterl e11e855ac8 rtsp-server: fixed comments and GIR annotations
https://bugzilla.gnome.org/show_bug.cgi?id=680777
2012-10-18 19:17:01 +01:00
Ognyan Tonchev d581b7bd4e client: Use client transport settings for multicast if allowed.
This patch makes it possible for the client to send transport settings for
multicast (destination && ttl). Client settings must be explicitly allowed or
the server will use its own settings.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=685561
2012-10-10 11:07:59 +02:00
Patricia Muscalu 870b8db279 rtsp-client: do not destroy the rtsp watch
Don't destroy the client watch while dispatching.  The rtsp watch is
automatically destroyed after the rtsp watch function closed() has
been called.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=685220
2012-10-05 11:44:32 +02:00
Wim Taymans 3e55e0e467 client: use more GIO
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=681593
2012-09-07 17:14:30 +02:00
Aleix Conchillo Flaque bef57648b8 rtsp-client: add signals for rtsp requests (fixes #683287) 2012-09-07 16:41:29 +02:00
Aleix Conchillo Flaque ebc4ce4de1 add new-session signal to rtsp-client (fixes #683058) 2012-08-30 22:00:30 +02:00
Patricia Muscalu 228e2ccc2d rtsp-client: make create_sdp virtual method
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=680173
2012-07-24 12:52:53 +02:00
Wim Taymans f305020636 client: fix docs 2012-07-10 11:39:58 +02:00
Ognyan Tonchev ed66f974dd rtsp-server: use an existing socket to establish HTTP tunnel
Make it possible to transfer a socket from an HTTP server to be used as
an RTSP over HTTP tunnel.
2012-07-10 11:38:05 +02:00
Ognyan Tonchev 86e53af34a rtsp: Handle the blocksize parameter
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=679325
2012-07-10 11:26:01 +02:00
Wim Taymans 853128e1c7 client: don't leak transports 2012-06-14 10:14:06 +02:00
David Svensson Fors 3f49c2d8f4 rtsp-client: free transport on no_stream in SETUP handler 2012-06-14 10:14:06 +02:00
David Svensson Fors 8f5d82be6d rtsp-client: changed session media iteration
In client_unlink_session: now don't iterate in session->medias
list where items are removed by gst_rtsp_session_release_media.
Instead, repeatedly remove the first item.
2012-06-14 10:14:06 +02:00
David Svensson Fors dc796bf075 rtsp-client: don't use g_object_unref on GstRTSPSessionMedia
GstRTSPSessionMedia is not a GObject type. When the
GstRTSPSession is freed, it will free the media.
2012-06-14 10:14:06 +02:00
David Svensson Fors 7b145aeeab client: fix GSocketAddress leak in gst_rtsp_client_accept
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=677463
2012-06-06 14:49:40 +02:00
David Svensson Fors ffa3166fbd rtsp: fix compiler warnings
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=676500
2012-05-22 15:37:25 +02:00
Wim Taymans 6cc2fb9bfc rtsp-server: port to new thread API 2012-05-11 09:42:47 +02:00
Sebastian Dröge e2f10f5ba5 rtsp-server: Fix compilation and compiler warnings 2012-04-13 15:27:22 +02:00
Wim Taymans 4c59e211e2 rtsp-server: port to GIO
Port to GIO
2012-03-07 15:04:29 +01:00
Tim-Philipp Müller e67a1c664c rtsp-client: update for new map API 2012-02-13 11:06:33 +00:00
Wim Taymans fde25cd9c3 rtsp-server: port some more to 0.11
Fix caps.
Remove bufferlist stuff
Update for new API.
Add queue before appsink now that preroll-queue-len is gone.
Update for request pad changes.
2011-12-09 10:53:30 +01:00
Wim Taymans 6fa73b2552 client: use method to access property 2011-08-16 16:07:04 +02:00