platform/upstream/gstreamer.git
11 years agoclient: remove reference to server
Wim Taymans [Mon, 26 Nov 2012 15:39:26 +0000 (16:39 +0100)]
client: remove reference to server

We don't need to keep a ref to the server

11 years agoclient: add locking
Wim Taymans [Mon, 26 Nov 2012 15:30:16 +0000 (16:30 +0100)]
client: add locking

Also add some g_return_if()

11 years agoclient: log more errors
Wim Taymans [Mon, 26 Nov 2012 12:37:20 +0000 (13:37 +0100)]
client: log more errors

11 years agoclient: fix compilation
Wim Taymans [Mon, 26 Nov 2012 12:35:48 +0000 (13:35 +0100)]
client: fix compilation

11 years agoclient: add generic close-after-send support
Wim Taymans [Mon, 26 Nov 2012 12:16:59 +0000 (13:16 +0100)]
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.

11 years agoMediaMapping -> MountPoints
Wim Taymans [Mon, 26 Nov 2012 11:34:05 +0000 (12:34 +0100)]
MediaMapping -> MountPoints

Describes better what the object manages.

11 years agoconfigure: bump required version of -base
Wim Taymans [Mon, 26 Nov 2012 08:36:09 +0000 (09:36 +0100)]
configure: bump required version of -base

11 years agomedia: fix seeking
Wim Taymans [Wed, 21 Nov 2012 16:21:28 +0000 (17:21 +0100)]
media: fix seeking

11 years agomedia: support more Range formats
Wim Taymans [Wed, 21 Nov 2012 15:41:56 +0000 (16:41 +0100)]
media: support more Range formats

Use the new -base methods to convert the Range string into a seek start and stop
value.

11 years agoexamples: fix whitespace
Wim Taymans [Wed, 21 Nov 2012 15:41:37 +0000 (16:41 +0100)]
examples: fix whitespace

11 years agotest-auth: add example of how to remove sessions
Wim Taymans [Tue, 20 Nov 2012 12:34:46 +0000 (13:34 +0100)]
test-auth: add example of how to remove sessions

Add an example of the session filter api.

11 years agotest-uri: remove mapping example
Wim Taymans [Tue, 20 Nov 2012 11:47:49 +0000 (12:47 +0100)]
test-uri: remove mapping example

11 years agotest-uri: fix callback signature
Wim Taymans [Tue, 20 Nov 2012 11:47:20 +0000 (12:47 +0100)]
test-uri: fix callback signature

11 years agofactory: keep ref to factory while media active
Wim Taymans [Tue, 20 Nov 2012 11:29:55 +0000 (12:29 +0100)]
factory: keep ref to factory while media active

While the media from a factory is alive, keep a ref to the factory.

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

11 years agofactory-uri: add some debug
Wim Taymans [Tue, 20 Nov 2012 11:29:26 +0000 (12:29 +0100)]
factory-uri: add some debug

11 years agostream: set udp sources to PLAYING
Wim Taymans [Tue, 20 Nov 2012 11:24:13 +0000 (12:24 +0100)]
stream: set udp sources to PLAYING

Set the UDP sources to PLAYING and locked state before we add it to the pipeline
so that it doesn't cause our pipeline to produce ASYNC-DONE.

11 years agofactory-uri: take ref to factory
Wim Taymans [Tue, 20 Nov 2012 11:10:16 +0000 (12:10 +0100)]
factory-uri: take ref to factory

Take a ref to the factory that we place in our list.

11 years agotest: add test for server reuse
Wim Taymans [Tue, 20 Nov 2012 10:30:09 +0000 (11:30 +0100)]
test: add test for server reuse

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

11 years agoserver: start and stop multiple times
David Svensson Fors [Thu, 15 Nov 2012 13:02:37 +0000 (14:02 +0100)]
server: start and stop multiple times

Stop listening on the RTSP port when the GSource is removed, so clients
can't connect and the server can be started again.

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

11 years agoserver: fix small leak
Wim Taymans [Tue, 20 Nov 2012 10:24:35 +0000 (11:24 +0100)]
server: fix small leak

11 years agomedia: unref source in finish_unprepare
Wim Taymans [Tue, 20 Nov 2012 08:42:51 +0000 (09:42 +0100)]
media: unref source in finish_unprepare

The source is created in prepare, unref it in finish_unprepare.

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

11 years agortsp-media: remove bus watch before finalizing
David Svensson Fors [Mon, 19 Nov 2012 14:47:08 +0000 (15:47 +0100)]
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

11 years agoclient: wait until the TEARDOWN response is sent to close the connection
Alessandro Decina [Sat, 17 Nov 2012 13:51:52 +0000 (14:51 +0100)]
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

11 years agortsp-stream: plug socket leak
David Svensson Fors [Mon, 19 Nov 2012 14:44:27 +0000 (15:44 +0100)]
rtsp-stream: plug socket leak

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

11 years agoAutomatic update of common submodule
Tim-Philipp Müller [Mon, 19 Nov 2012 11:31:12 +0000 (11:31 +0000)]
Automatic update of common submodule

From 6bb6951 to a72faea

11 years agortsp-server: don't use deprecated API
Tim-Philipp Müller [Sat, 17 Nov 2012 00:11:27 +0000 (00:11 +0000)]
rtsp-server: don't use deprecated API

11 years agortsp-client: fix unused-but-set-variable compiler warning
Tim-Philipp Müller [Sat, 17 Nov 2012 00:03:42 +0000 (00:03 +0000)]
rtsp-client: fix unused-but-set-variable compiler warning

rtsp-client.c:1260:21: error: variable 'protocols' set but not used

12 years agortsp: cleanups
Wim Taymans [Thu, 15 Nov 2012 16:11:16 +0000 (17:11 +0100)]
rtsp: cleanups

12 years agoexamples: add another multicast example
Wim Taymans [Thu, 15 Nov 2012 15:52:42 +0000 (16:52 +0100)]
examples: add another multicast example

Add an example for how to configure separate multicast ranges for each media
stream.

12 years agotest: set shared
Wim Taymans [Thu, 15 Nov 2012 15:21:51 +0000 (16:21 +0100)]
test: set shared

12 years agostream: use the address managed by the stream
Wim Taymans [Thu, 15 Nov 2012 15:18:29 +0000 (16:18 +0100)]
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.

12 years agortsp: improve debug
Wim Taymans [Thu, 15 Nov 2012 15:15:20 +0000 (16:15 +0100)]
rtsp: improve debug

12 years agomedia: add signal for new streams
Wim Taymans [Thu, 15 Nov 2012 14:41:42 +0000 (15:41 +0100)]
media: add signal for new streams

This allows applications to listen for new streams and configure properties on
them, like the address pool.

12 years agomedia: configure address pool in new streams
Wim Taymans [Thu, 15 Nov 2012 14:41:19 +0000 (15:41 +0100)]
media: configure address pool in new streams

12 years agostream: add methods to deal with address pool
Wim Taymans [Thu, 15 Nov 2012 14:36:21 +0000 (15:36 +0100)]
stream: add methods to deal with address pool

Add methods to get and set the address pool for the stream
Add method to allocate and get the multicast addresses for this stream.

12 years agomedia: remove MTU property
Wim Taymans [Thu, 15 Nov 2012 14:32:43 +0000 (15:32 +0100)]
media: remove MTU property

It is a stream property

12 years agoclient: set blocksize only on stream
Wim Taymans [Thu, 15 Nov 2012 14:29:35 +0000 (15:29 +0100)]
client: set blocksize only on stream

Set the blocksize only on the current stream.

12 years agostream: share src and sink sockets
Wim Taymans [Thu, 15 Nov 2012 12:52:07 +0000 (13:52 +0100)]
stream: share src and sink sockets

the allocated socket is in the used-socket property, not socket.

12 years agortsp: make address-pool return an address object
Wim Taymans [Thu, 15 Nov 2012 12:25:14 +0000 (13:25 +0100)]
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.

12 years agoexamples: add multicast example
Wim Taymans [Thu, 15 Nov 2012 12:22:54 +0000 (13:22 +0100)]
examples: add multicast example

Show how to set up the multicast address pool so that media can be
server with multicast.

12 years agortsp: use AddressPool
Wim Taymans [Wed, 14 Nov 2012 16:23:59 +0000 (17:23 +0100)]
rtsp: use AddressPool

Remove the multicast_group property.
Use the configured addresspool to allocate multicast addresses.

12 years agoaddress-pool: add clear method
Wim Taymans [Wed, 14 Nov 2012 15:17:33 +0000 (16:17 +0100)]
address-pool: add clear method

12 years agoaddress-pool: small cleanups
Wim Taymans [Wed, 14 Nov 2012 15:10:45 +0000 (16:10 +0100)]
address-pool: small cleanups

12 years agotests: add addresspool unit test
Wim Taymans [Wed, 14 Nov 2012 14:50:42 +0000 (15:50 +0100)]
tests: add addresspool unit test

12 years agoaddress-pool: add object to manage multicast addresses
Wim Taymans [Wed, 14 Nov 2012 14:49:06 +0000 (15:49 +0100)]
address-pool: add object to manage multicast addresses

Make an object that can manage a rage of multicast addresses and ports.

12 years agoserver: set default max-threads property
Wim Taymans [Tue, 13 Nov 2012 11:05:42 +0000 (12:05 +0100)]
server: set default max-threads property

12 years agomedia: wait for concurrent _prepare
Wim Taymans [Tue, 13 Nov 2012 10:54:17 +0000 (11:54 +0100)]
media: wait for concurrent _prepare

If a prepare is busy, wait for the result.

12 years agomedia: add lock around message handler
Wim Taymans [Tue, 13 Nov 2012 10:49:08 +0000 (11:49 +0100)]
media: add lock around message handler

We don't want to dispatch messages while we are still processing the result of
the state change.

12 years agomedia: add lock to protect state changes
Wim Taymans [Tue, 13 Nov 2012 10:15:35 +0000 (11:15 +0100)]
media: add lock to protect state changes

12 years agostream: add locking
Wim Taymans [Tue, 13 Nov 2012 10:14:49 +0000 (11:14 +0100)]
stream: add locking

12 years agostream-transport: add keep-alive method
Wim Taymans [Mon, 12 Nov 2012 16:11:18 +0000 (17:11 +0100)]
stream-transport: add keep-alive method

12 years agostream-transport: add method to handle RTP/RTCP
Wim Taymans [Mon, 12 Nov 2012 16:06:42 +0000 (17:06 +0100)]
stream-transport: add method to handle RTP/RTCP

Call new methods instead of poking into the structures directly.

12 years agosession-media: add locking
Wim Taymans [Mon, 12 Nov 2012 15:51:03 +0000 (16:51 +0100)]
session-media: add locking

12 years agosession: add locking
Wim Taymans [Mon, 12 Nov 2012 15:42:37 +0000 (16:42 +0100)]
session: add locking

12 years agoserver: free old socket
Wim Taymans [Mon, 12 Nov 2012 15:30:16 +0000 (16:30 +0100)]
server: free old socket

12 years agomapping: add locking
Wim Taymans [Mon, 12 Nov 2012 15:18:57 +0000 (16:18 +0100)]
mapping: add locking

12 years agomedia-factory: add locking
Wim Taymans [Mon, 12 Nov 2012 15:14:19 +0000 (16:14 +0100)]
media-factory: add locking

12 years agoauth: add locking
Wim Taymans [Mon, 12 Nov 2012 15:03:21 +0000 (16:03 +0100)]
auth: add locking

12 years agoserver: add max-thread property
Wim Taymans [Mon, 12 Nov 2012 14:53:28 +0000 (15:53 +0100)]
server: add max-thread property

12 years agoserver: use a threadpool for the mainloops
Wim Taymans [Mon, 12 Nov 2012 14:29:39 +0000 (15:29 +0100)]
server: use a threadpool for the mainloops

12 years agoclient: rename method
Wim Taymans [Mon, 12 Nov 2012 13:30:43 +0000 (14:30 +0100)]
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.

12 years agoserver: rework maincontext handling in clients
Wim Taymans [Mon, 12 Nov 2012 13:09:09 +0000 (14:09 +0100)]
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.

12 years agosession: move session header code in session object
Wim Taymans [Mon, 12 Nov 2012 11:40:34 +0000 (12:40 +0100)]
session: move session header code in session object

12 years agoFix FSF address
Tim-Philipp Müller [Sun, 4 Nov 2012 00:14:25 +0000 (00:14 +0000)]
Fix FSF address

12 years agortsp-server: added annotations to indicate type of ownership transfer of return values
Sebastian Pölsterl [Sun, 28 Oct 2012 12:48:44 +0000 (13:48 +0100)]
rtsp-server: added annotations to indicate type of ownership transfer of return values

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

12 years agoNo need to define GST_USE_UNSTABLE_API any more, 1.0 is stable now
Tim-Philipp Müller [Sun, 28 Oct 2012 15:37:51 +0000 (15:37 +0000)]
No need to define GST_USE_UNSTABLE_API any more, 1.0 is stable now

12 years agobindings: remove vala bindings
Tim-Philipp Müller [Sun, 28 Oct 2012 15:09:04 +0000 (15:09 +0000)]
bindings: remove vala bindings

They'll be reunited with the other GStreamer bindings

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

12 years agortsp: only create transport when needed
Wim Taymans [Sat, 27 Oct 2012 22:23:57 +0000 (00:23 +0200)]
rtsp: only create transport when needed

Only create the StreamTransport when configured.

12 years agoclient: small cleanup
Wim Taymans [Sat, 27 Oct 2012 21:53:35 +0000 (23:53 +0200)]
client: small cleanup

12 years agortsp: refactor configuration of transport
Wim Taymans [Sat, 27 Oct 2012 21:49:24 +0000 (23:49 +0200)]
rtsp: refactor configuration of transport

Move the configuration of the transport to a place where it makes
more sense.

12 years agoclient: refactor transport parsing
Wim Taymans [Sat, 27 Oct 2012 19:26:55 +0000 (21:26 +0200)]
client: refactor transport parsing

12 years agoclient: refuse to change the MTU on shared media
Wim Taymans [Sat, 27 Oct 2012 19:05:03 +0000 (21:05 +0200)]
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.

12 years agosmall fixes to docs and debug
Wim Taymans [Sat, 27 Oct 2012 09:53:51 +0000 (11:53 +0200)]
small fixes to docs and debug

12 years agostream: transports must already have been removed
Wim Taymans [Fri, 26 Oct 2012 15:29:30 +0000 (17:29 +0200)]
stream: transports must already have been removed

12 years agostream: improve join and leave of the pipeline
Wim Taymans [Fri, 26 Oct 2012 15:28:10 +0000 (17:28 +0200)]
stream: improve join and leave of the pipeline

simplify code
Do the cleanup properly
Add some docs

12 years agomedia: move unprepare below default implementation
Wim Taymans [Fri, 26 Oct 2012 13:23:16 +0000 (15:23 +0200)]
media: move unprepare below default implementation

Makes it easier to find the default implementation

12 years agomedia: signal unprepared when we actually finish
Wim Taymans [Fri, 26 Oct 2012 13:21:50 +0000 (15:21 +0200)]
media: signal unprepared when we actually finish

12 years agomedia: no need to unlock, unprepare does that when needed
Wim Taymans [Fri, 26 Oct 2012 13:19:23 +0000 (15:19 +0200)]
media: no need to unlock, unprepare does that when needed

12 years agodocs: update docs
Wim Taymans [Fri, 26 Oct 2012 10:33:21 +0000 (12:33 +0200)]
docs: update docs

12 years agortsp: fix MTU setting
Wim Taymans [Fri, 26 Oct 2012 10:04:02 +0000 (12:04 +0200)]
rtsp: fix MTU setting

Fix setting of the MTU. There is no need for a vmethod.

12 years agodocs: update docs
Wim Taymans [Fri, 26 Oct 2012 09:02:43 +0000 (11:02 +0200)]
docs: update docs

12 years agoconfigure: bump version number after refactoring
Tim-Philipp Müller [Fri, 26 Oct 2012 10:24:55 +0000 (11:24 +0100)]
configure: bump version number after refactoring

12 years agortsp: massive refactoring
Wim Taymans [Thu, 25 Oct 2012 19:29:58 +0000 (21:29 +0200)]
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.

12 years agortsp-client: Unref server address clients connected to
Sebastian Rasmussen [Tue, 23 Oct 2012 20:11:17 +0000 (22:11 +0200)]
rtsp-client: Unref server address clients connected to

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

12 years agortsp-server: don't ref server socket if it is NULL
Ognyan Tonchev [Mon, 22 Oct 2012 14:09:24 +0000 (16:09 +0200)]
rtsp-server: don't ref server socket if it is NULL

Fixes test_bind_already_in_use unit test again after commit 6a497440.

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

12 years agotests: Add libgio link dependency
Sebastian Rasmussen [Mon, 22 Oct 2012 14:29:09 +0000 (16:29 +0200)]
tests: Add libgio link dependency

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

12 years agortsp-media-mapping: rename find_media vfunc to find_factory
Sebastian Pölsterl [Mon, 1 Oct 2012 18:03:43 +0000 (20:03 +0200)]
rtsp-media-mapping: rename find_media vfunc to find_factory

The virtual method and class method should have the same name
so it is correctly represented in GIR file

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

12 years agortsp-server: fixed comments and GIR annotations
Sebastian Pölsterl [Mon, 1 Oct 2012 17:46:15 +0000 (19:46 +0200)]
rtsp-server: fixed comments and GIR annotations

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

12 years agomedia-mapping: fix transfer mode for gst_rtsp_media_mapping_add_factory
Alessandro Decina [Fri, 12 Oct 2012 05:18:19 +0000 (07:18 +0200)]
media-mapping: fix transfer mode for gst_rtsp_media_mapping_add_factory

12 years agortsp-server: allow binding on port 0 (binds on a random port)
Alessandro Decina [Fri, 12 Oct 2012 05:08:57 +0000 (07:08 +0200)]
rtsp-server: allow binding on port 0 (binds on a random port)

12 years agortsp-server: add bound-port property
Alessandro Decina [Fri, 12 Oct 2012 04:21:24 +0000 (06:21 +0200)]
rtsp-server: add bound-port property

bound-port can be used to retrieve the port number when the server is bound on
port 0, which binds on a random port.

12 years agortsp-media-factory: make ::get_element overridable by GI bindings
Alessandro Decina [Fri, 12 Oct 2012 04:11:36 +0000 (06:11 +0200)]
rtsp-media-factory: make ::get_element overridable by GI bindings

The way to annotate vfuncs with GI seems to be to create an invoker (GI term)
for them and to annotate the invoker. Add gst_rtsp_media_factory_get_element()
as the invoker for ::get_element(), making it overridable by GI generated
bindings.

12 years agortsp-media-factory-uri: don't autoplug parsers in a loop
Alessandro Decina [Fri, 12 Oct 2012 04:07:07 +0000 (06:07 +0200)]
rtsp-media-factory-uri: don't autoplug parsers in a loop

Stop autoplugging parsers if caps have parsed=true set. Fixes autoplugging
h264parse forever.

12 years agoExplicitly link against gio. Fix link error on mac.
Alessandro Decina [Sat, 6 Oct 2012 13:49:07 +0000 (15:49 +0200)]
Explicitly link against gio. Fix link error on mac.

12 years agosession: add ttl to the transport header in SETUP
Ognyan Tonchev [Wed, 10 Oct 2012 09:13:10 +0000 (11:13 +0200)]
session: add ttl to the transport header in SETUP

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

12 years agoclient: Use client transport settings for multicast if allowed.
Ognyan Tonchev [Wed, 10 Oct 2012 09:06:02 +0000 (11:06 +0200)]
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

12 years agoAutomatic update of common submodule
Tim-Philipp Müller [Sat, 6 Oct 2012 14:02:27 +0000 (15:02 +0100)]
Automatic update of common submodule

From 6c0b52c to 6bb6951

12 years agortsp-client: do not destroy the rtsp watch
Patricia Muscalu [Mon, 1 Oct 2012 14:13:50 +0000 (16:13 +0200)]
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

12 years agoAutomatic update of common submodule
Tim-Philipp Müller [Sat, 22 Sep 2012 15:11:48 +0000 (16:11 +0100)]
Automatic update of common submodule

From 4f962f7 to 6c0b52c

12 years agomedia: fix check for seekability
Ognyan Tonchev [Mon, 10 Sep 2012 14:25:57 +0000 (16:25 +0200)]
media: fix check for seekability