Nicolas Dufresne
c101452a4a
gi: Use INTROSPECTION_INIT for --add-init-section
...
This new define was added to common. The new init section fixed
compilation warning found in the init line that was spread across
all files.
2015-06-16 18:04:57 -04:00
Nicolas Dufresne
c9a536af47
gi: Fix warnings in GstRtsp
...
* The custom GSource is not boxed (skip for now)
* The comment block has wrong name for _read_socket()
2015-06-16 15:50:13 -04:00
Arun Raghavan
37684b35b6
rtsp: Add a FIXME 2.0 for gst_rtsp_connection_create_from_socket()
...
There's a couple of redundant arguments from the pre-GIO days.
2015-06-12 12:51:22 +05:30
Xavier Claessens
74a4347614
GstRTSPConnection: Add GTlsInteraction support
...
https://bugzilla.gnome.org/show_bug.cgi?id=750471
2015-06-09 19:47:51 -04:00
Sebastian Dröge
2511bca11c
rtsp: Add FIXME 2.0 comment about GstRTSPTransport being an enum instead of flags
2015-05-20 15:41:06 +03:00
Sebastian Dröge
1a1d8a0b61
rtsp: Use glib-mkenums to generate GstRTSPProfile and GstRTSPLowerTrans GTypes
2015-05-20 15:41:06 +03:00
Tim-Philipp Müller
853951b646
rtsp: don't use soon-to-be-deprecated g_cancellable_reset()
...
From the API documentation: "Note that it is generally not
a good idea to reuse an existing cancellable for more
operations after it has been cancelled once, as this
function might tempt you to do. The recommended practice
is to drop the reference to a cancellable after cancelling
it, and let it die with the outstanding async operations.
You should create a fresh cancellable for further async
operations."
https://bugzilla.gnome.org/show_bug.cgi?id=739132
2015-05-19 18:53:01 +01:00
Tim-Philipp Müller
c680e324bc
Remove obsolete Android build cruft
...
This is not needed any longer.
2015-04-26 18:42:34 +01:00
Edward Hervey
3eb35c77cc
introspection: Don't use g-ir-scanner cache at compile time
...
It pollutes user directories and we don't need to cache it
https://bugzilla.gnome.org/show_bug.cgi?id=747095
2015-03-31 11:21:43 +02:00
Tim-Philipp Müller
c53ba4beeb
Fix double semicolons
2015-03-10 09:27:08 +00:00
Tim-Philipp Müller
1b4bd6e451
rtspmessage: map headers we know that are added by string to their enum
...
That way we can look them up by their field enum later as well.
2015-02-09 18:03:43 +00:00
Tim-Philipp Müller
9b4ea3f5dd
rtspmessage: add API to add and get custom headers
...
Add API to add and get custom headers that are not
covered by our header fields enum. This is backwards
compatible in that it will also work for our defined
fields, so if we ever add a new header field to the
enum, get_header_by_name() for the same header string
will still work.
API: gst_rtsp_message_add_header_by_name()
API: gst_rtsp_message_take_header_by_name()
API: gst_rtsp_message_remove_header_by_name()
API: gst_rtsp_message_get_header_by_name()
2015-02-09 17:50:14 +00:00
Göran Jönsson
e3a212e0d4
rtspconnection: No remove child if destroyed.
...
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=740730
2014-12-09 10:32:00 +01:00
Sebastian Dröge
90eb93c2ef
Don't compare booleans for equality to TRUE and FALSE
...
TRUE is 1, but every other non-zero value is also considered true. Comparing
for equality with TRUE would only consider 1 but not the others.
2014-12-01 09:51:12 +01:00
Hyunjun Ko
cb15df15ac
rtspconnection: fix warning on param name mismatch
...
https://bugzilla.gnome.org/show_bug.cgi?id=740013
2014-11-19 13:43:02 -03:00
Tim-Philipp Müller
db89f0dca4
rtsp: use generic marshaller
2014-10-24 10:17:47 +01:00
Aleix Conchillo Flaqué
66abee92b0
rtspconnection: call watch notify before freeing any watch resources
...
This gives control to the notify function allowing it to finish other
watch related functionality.
https://bugzilla.gnome.org/show_bug.cgi?id=737752
2014-10-21 10:03:35 +02:00
Ognyan Tonchev
0ea1b559bf
rtspconnection: ignore timeout in session request header
...
The timeout parameter is only allowed in a session response header
but some clients, like Honeywell VMS applications, send it as part
of the session request header. Ignore everything from the semicolon
to the end of the line when parsing session id.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=736267
2014-09-09 11:37:26 +02:00
Göran Jönsson
acdb7feacf
rtspconnection: Protect readsrc, writesrc and controllsrc with a mutex
...
Fixes a crash when controlsrc, readsrc or writesrc are modified from
gst_rtsp_source_dispatch_read/write and gst_rtsp_watch_reset at the
same time.
https://bugzilla.gnome.org/show_bug.cgi?id=735569
2014-08-29 11:28:13 +03:00
Evan Nemerson
7b791749a0
docs: Assorted documentation and introspection fixes for new 1.4 API
...
https://bugzilla.gnome.org/show_bug.cgi?id=732595
2014-07-02 09:09:44 +02:00
Wim Taymans
0425f1cf4d
rtspconnection: also allow POST before GET
...
Don't only allow GET and then POST request to setup tunneling over HTTP
but also allow POST and then GET.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732459
2014-07-01 16:30:25 +02:00
Wim Taymans
9a20920aa4
rtsp-transport: clarify port usage
...
Comment in the docs what the client_port and server_port fields are used
for in TCP mode (if the application wants to set those values).
2014-05-20 16:01:08 +02:00
Göran Jönsson
d8a1dc5ea8
rtspconnection: Add read source on write socket.
...
Add a read source on write socket when lost tunnel.
To be able to detect when clint closes get channel.
This is already done in gst_rtsp_source_dispatch_write but
only when the queue is empty.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=730368
2014-05-20 12:02:13 +02:00
Edward Hervey
1ca576c240
rtspconnection: Don't use argument for local storage
...
By re-using the uri argument for storing local data, we could end up in
a situation where we would free uri ... which would actually be the
string passed in argument.
Instead explicitely use a local variable. Fixes double-free issues.
CID #1212176
2014-05-13 11:53:41 +02:00
Göran Jönsson
446f9bf6bd
rtspconnection: Reset control_stream.
...
Reset control_stream when gst_rtsp_connection_close.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=729632
2014-05-09 11:49:04 +02:00
Руслан Ижбулатов
151d156126
rtsp: Link to ws2_32 on Windows
...
Needed for getsockname and setsockopt
https://bugzilla.gnome.org/show_bug.cgi?id=729514
2014-05-05 09:04:28 +02:00
Tim-Philipp Müller
b163f111c8
rtspdefs: remove outdated comments
2014-05-02 19:36:34 +01:00
Göran Jönsson
9685e7a583
rtspconnection: Empty queue when flush.
...
Empty the watchs queue when calling
gst_rtsp_watch_set_flushing with flushing variabel is TRUE.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=728772
2014-04-30 16:37:17 +02:00
Tim-Philipp Müller
bcb8068e27
docs: remove outdated and pointless 'Last reviewed' lines from docs
...
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-26 23:28:57 +01:00
Wim Taymans
8d439edd7a
rtspconnection: add flush method
...
Add a method to set/unset the flushing state that makes _wait_backlog()
unlock.
See https://bugzilla.gnome.org/show_bug.cgi?id=725898
2014-03-28 09:34:33 +01:00
Wim Taymans
183e441d88
rtsptransport: UDP is also default for SAVP and AVPF
2014-03-25 11:07:34 +01:00
Ognyan Tonchev
d7857325c5
rtspconnection: Fix minor memory leaks in error handling
...
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=726642
2014-03-24 12:45:14 +01:00
Ognyan Tonchev
e0af857445
rtspconnection: Fix connection_poll()
...
* Only check for conditions we are interested in.
* Makes no sense to specify G_IO_ERR and G_IO_HUP in condition, they
will always be reported if they are true.
* Do not create timed source if timeout is NULL.
* Correctly wait for sources to be dispatched, context_iteration() is
not guaranteed to always block even if set to do so.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=726641
2014-03-24 12:43:38 +01:00
Руслан Ижбулатов
d6bd37460a
rtspconnection: Silence a compiler warning
...
Cast the argument into (const char *) on W32, as winsock2 expects it.
https://bugzilla.gnome.org/show_bug.cgi?id=726433
2014-03-16 11:22:04 +01:00
Göran Jönsson
0b30fdbfbe
rtspconnection: gst_rtsp_watch_wait_backlog
...
New method that wait until there is room in backlog queue.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725898
2014-03-10 17:28:40 +01:00
David Svensson Fors
6cd0d10d30
rtspconnection: GstRTSPWatch func for tunnel GET response
...
Add a callback in GstRTSPWatch where the response to HTTP GET for
tunneled connections can be modified.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725878
2014-03-10 10:43:03 +01:00
Wim Taymans
4898c30537
rtspdefs: add RFC 4567 headers and status code
...
This new Header and status code is used for SRTP
2014-03-10 10:33:28 +01:00
Ognyan Tonchev
4220442441
rtspconnection: Call closed() when GET is closed in tunneled mode
...
This patch adds read source on the write socket in tunneled
mode and we get a callback when client disconnects the GET
channel.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725313
2014-03-03 10:34:56 +01:00
Sebastian Rasmussen
35bb1b3328
docs: Add annotations for return values
...
Rephrase and clarify some return value descriptions
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725521
2014-03-02 23:41:18 +00:00
Sebastian Rasmussen
5b4f2ba20b
docs: Fix argument and annotation typos
...
* colorbalance: Fix misspelled annotation
* rtsp: Replace incorrectly documented function argument
* sdp: Escape @ character to avoid gtk-doc warning
* video-*: Add missing annotation colon
* videodecoder/video-color: Fix function argument typos
* videoutils: Remove unknown annotation field
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725521
2014-03-02 23:22:51 +00:00
Tim-Philipp Müller
14b82bbc9a
rtsp: fix build with older GLib versions
...
The gio/gnetworking.h header is only available since glib 2.36
https://bugzilla.gnome.org/show_bug.cgi?id=725206
2014-02-26 11:44:18 +00:00
Ognyan Tonchev
5445682c6a
rtspconnection: Add missing include
...
https://bugzilla.gnome.org/show_bug.cgi?id=725206
2014-02-26 11:25:13 +00:00
Ognyan Tonchev
ebe3530f51
rtspconnection: Remove read child source when POST is disconnected
...
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=724720
2014-02-21 16:21:45 +01:00
Aleix Conchillo Flaqué
0a115bd31f
rtspconnection: allow specifying a certificate database
...
Two new functions have been added,
gst_rtsp_connection_set_tls_database() and
gst_rtsp_connection_get_tls_database(). The certificate database will be
used when a certificate can't be verified with the default database.
https://bugzilla.gnome.org/show_bug.cgi?id=724393
2014-02-19 21:48:13 +01:00
Aleix Conchillo Flaqué
9121b16aa0
rtspconnection: get rid of superfluous whitespaces
2014-02-19 21:22:30 +01:00
Wim Taymans
594dd4287b
rtsptransport: calculate default lower transport
...
Add an internal method to calculate the default lower transport whan it
is missing.
2014-01-07 14:51:46 +01:00
Wim Taymans
124cf22d5d
rtsptransport: add method to get media-type from transport
...
Add a method to make a media-type from the transport. Deprecate the old
method that only used the mode.
Based on patch from Aleix Conchillo Flaqué <aleix@oblong.com>
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=720219
2014-01-07 14:51:37 +01:00
Wim Taymans
5b13c5b464
rtsptransport: add GType for Profile
...
See https://bugzilla.gnome.org/show_bug.cgi?id=720696
2014-01-07 11:52:27 +01:00
Wim Taymans
01c7fb11ba
rtsptransport: add more profiles
...
Add support for Feedback profiles
2013-12-26 17:41:00 +01:00
Tim-Philipp Müller
4af1e064fe
docs: cosmetic since marker fixes
2013-11-16 16:10:06 +00:00
Sebastian Dröge
b0aad9dd84
rtspconnection: Fix indention in header
2013-11-01 16:43:56 +01:00
Aleix Conchillo Flaque
53c7ad0c87
rtspconnection: allow setting tls certificate validation
...
Added new functions gst_rtsp_connection_set_tls_validation_flags() to
allow setting the TLS certificate validation flags when establishing a
TLS connection.
A getter is also available, gst_rtsp_connection_get_tls_validation_flags().
https://bugzilla.gnome.org/show_bug.cgi?id=711231
2013-11-01 16:42:34 +01:00
Hans Månsson
6bb58eec8a
rtspconnection: Connect to proxy if specified
...
Reference: https://bugzilla.gnome.org/show_bug.cgi?id=708880
2013-10-04 07:27:12 +02:00
Ognyan Tonchev
02ac18b699
rtspconnection: Unset input/output_stream after freeing the GIOStream
...
watch->input_stream and watch->output_stream are owned by the GIOStream
and should be unset after freeing the stream.
https://bugzilla.gnome.org/show_bug.cgi?id=708689
2013-09-24 18:35:14 +02:00
Ognyan Tonchev
8ba90931ae
rtspconnection: Only create writesrc when it is actually needed
...
Creating a GSource and not attaching it to a context will cause
a leak of it's child sources. That is why we create writesrc right
before attaching it to a context.
https://bugzilla.gnome.org/show_bug.cgi?id=708667
2013-09-24 12:10:00 +02:00
Tim-Philipp Müller
c449ae6343
rtsp: fix direct includes
...
https://bugzilla.gnome.org/show_bug.cgi?id=695889
2013-08-16 14:14:22 +01:00
Sebastian Dröge
c6f8220920
rtspconnection: Create a new write GSource after removing it
...
After removal, a GSource is destroyed and can never be attached
again to a main context. We need to create a new one instead.
https://bugzilla.gnome.org/show_bug.cgi?id=704198
2013-07-14 18:11:59 +02:00
Wim Taymans
32a1deb404
rtsp: make read uncancelable when reading a message
...
When we start to read a message, we need to continue reading until the end of
the message or else we lose track and cause parse errors. Use a variable
may_cancel to avoid cancelation after we read the first byte until we have
the complete message.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=703088
2013-06-26 15:06:00 +02:00
Wim Taymans
bcc5ac5298
rtsp: dispatch when initial buffer has data
...
When we have data in the inital buffer, dispath the read function to read it
even if the socket has no data to read.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=702652
2013-06-21 11:50:33 +02:00
Wim Taymans
ad6c16fdfc
rtsp: manage writer child source better
...
Only add the write child source when we have something to write or else
we will dispatch forever without doing anything.
2013-06-20 17:28:46 +02:00
Sebastian Dröge
567be29db2
rtspconnection: Make sure to set a sensible default port for the GSocketConnection
...
Otherwise it will connect to port 0 if no port is given in the URI.
https://bugzilla.gnome.org/show_bug.cgi?id=701798
2013-06-10 15:31:38 +02:00
Brendan Long
63961242df
rtspconnection: remove functions added in GLib 2.34
...
g_pollable_stream_read and g_pollable_stream_write were added in GLib 2.34,
but Ubuntu 12.04 and Debian Wheezy still use GLib 2.32.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=701316
2013-05-31 14:12:10 +02:00
Wim Taymans
0b933ff87b
rtsp: add method to get the TLS connection
2013-05-30 17:31:13 +02:00
Wim Taymans
c0f13c2513
rtsp: let the sockets be reffed by the connection
...
Don't add an extra ref to the sockets but use that of the connection.
Keep the connection around as an IOStream.
2013-05-30 13:14:46 +02:00
Wim Taymans
2fc85d3980
rtsp: Cleanup the error path
...
Make sure the watch is removed when we close the read socket because of
an error.
2013-05-30 10:50:42 +02:00
Wim Taymans
ad5632586a
rtsp: cleanup the watch reset function
2013-05-30 10:45:42 +02:00
Wim Taymans
07babdd68a
rtsp: check if the streams are still active
...
Don't try to read/write from an inactive stream. When we, for example,
transfer the second connection in tunneling mode, we are not interested anymore
on read/write activity on the old connection.
2013-05-30 10:30:09 +02:00
Wim Taymans
d09028b4c3
rtsp: use child sources instead of using the sockets
...
Use the source of the pollable input/output streams instead of
accessing the sockets directly.
2013-05-30 07:36:52 +02:00
Wim Taymans
4ada677095
rtsp: fix input/output streams for tunneling
2013-05-30 07:35:18 +02:00
Wim Taymans
4f660c388c
rtsp: don't use sockets for blocking
...
Use the blocking and non-blocking API of the input/output streams instead
of polling the sockets directly. This also allows us to simplify some
code.
2013-05-30 07:35:18 +02:00
Wim Taymans
909e119a23
rtsp: add TLS support
...
Add flag to select TLS in the transport.
Enable TLS on the socketclient when we use a TLS uri.
2013-05-30 07:35:14 +02:00
Wim Taymans
057bbae6c5
rtspconnection: use the input/output stream of clientconnection
...
Don't use the raw sockets for RTSP communication but use the IOStream.
This is needed if we are going to use TLS later.
2013-05-30 07:20:51 +02:00
Wim Taymans
2d41ee370c
rtsp: set sockets non-blocking
2013-05-30 07:20:51 +02:00
Wim Taymans
a42a7be5df
rtsp: use GSocketClient for making connections
...
Use the GSocketClient API for making connections with the server. This removes a
bit of code and gives us the ability to do TLS later.
2013-05-30 07:20:51 +02:00
Wim Taymans
15f3c995aa
Revert "rtspconnection: Use a GSocketAddressNumerator to resolve the addresses"
...
This reverts commit 15a0bb0a10
.
We should be using GSocketClient
2013-05-30 07:20:51 +02:00
Sebastian Dröge
15a0bb0a10
rtspconnection: Use a GSocketAddressNumerator to resolve the addresses
...
Instead of just trying the first possible resolution we're trying all
resolutions until one works.
2013-05-27 14:53:48 +02:00
Thomas Scheuermann
9a78542ded
rtsp: Don't use / as path if no path was provided
...
RTSP does not mandate that a non-zero-length path is used and
some devices (e.g. IQinVision IQeye 1080p) requires that a
zero-length path is used.
2013-04-08 09:09:33 +02:00
Wim Taymans
a4e44df6b9
rtsp: make local_ip and remote_ip variables
...
Separate local_ip and remote_ip into separate variables for clarity.
2013-04-04 12:32:24 +02:00
Wim Taymans
4826ec4e4d
rtsp: calculate the local ip address in accept
...
Calculate the local IP address in the accept call. We need to place this IP
address in the GET reply in the X-Server-IP-Address header so that the client
knows where to send the POST to in case of tunneled RTSP. Before this patch
it used the client IP address, which would make the client send the POST request
to itself and fail.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=697092
2013-04-04 12:16:47 +02:00
David Svensson Fors
5ef9921bcd
rtsprange: use gst_util_gdouble_to_guint64 in get_seconds
...
https://bugzilla.gnome.org/show_bug.cgi?id=696818
2013-04-02 14:33:51 -04:00
Emanuele Aina
f05a95ea3c
build: Link libgstrtsp-1.0.so to libm for pow()
...
https://bugzilla.gnome.org/show_bug.cgi?id=695658
2013-03-11 19:30:13 -04:00
Olivier Crête
17d5dbd337
rtsprange: Add function to convert a range between formats
...
Also add unit tests.
2013-03-11 10:41:31 +01:00
Olivier Crête
0353e608f8
rtsprange: Make _to_string() be more in line with RFC 2326
...
Fix various nits to make it more in line with the RFC, also add unit tests.
2013-03-11 10:41:25 +01:00
Olivier Crête
3cfec4de73
rtsprange: Avoid going through fractions for large numbers
...
If the number of seconds exceeds 2^31, then it will be truncated if the
conversion is done using fractions, so multiply it directly.
2013-03-11 10:41:17 +01:00
Olivier Crête
203c27b42b
rtsprange: Fix conversion from UTC to GstClockTime
...
Do the difference in the right direction.
2013-03-11 10:41:09 +01:00
Olivier Crête
aef8de337c
rtspconnection: Add API to disable session ID caching in the connection
...
This is necessary to allow having more than one session in the same connection.
API: gst_rtsp_connection_set_remember_session_id()
API: gst_rtsp_connection_get_remember_session_id()
2013-03-11 10:41:00 +01:00
Tim-Philipp Müller
664adc6e19
gst-libs: use GST_*_1_0 environment variables everywhere
...
The _1_0 suffixed environment variables override the
non-suffixed ones, so if we're in an environment that
sets the _1_0 suffixed ones, such as jhbuild, we need
to set those to make sure ours actually always get
used.
2013-01-16 10:16:27 +00:00
Wim Taymans
65c5ecd270
rtspconnection: add limit to queued messages
...
Add a limit to the amount of queued bytes or messages we allow on the watch.
API: GstRTSPConnection::gst_rtsp_watch_set_send_backlog()
API: GstRTSPConnection::gst_rtsp_watch_get_send_backlog()
2012-12-14 11:36:58 +01:00
Sebastian Dröge
3f82e919dd
libs: Use foo/foo.h as single-include header consistently everywhere
...
https://bugzilla.gnome.org/show_bug.cgi?id=688785
2012-12-12 17:13:10 +00:00
Sebastian Rasmussen
d4b6f3c1a0
rtspmessage: Add several missing g-i annotations
...
https://bugzilla.gnome.org/show_bug.cgi?id=689873
2012-12-10 10:58:12 +01:00
Wim Taymans
b511f938d4
rtsp: add method to parse options list
2012-11-27 11:15:34 +01:00
Wim Taymans
ce904ec551
rtsprange: add string conversion for new formats
2012-11-21 16:25:24 +01:00
Wim Taymans
fdf904db32
rtsprange: add method to convert ranges to GstClockTime
...
Add a method to convert the values of GstRTSPRange to GstClockTime.
Add unit tests for the conversions.
API: gst_rtsp_range_get_times()
2012-11-21 15:35:46 +01:00
Wim Taymans
f1669d7d9c
range: don't overwrite unit field
2012-11-21 15:29:05 +01:00
Wim Taymans
0bf50cd3d8
range: add g_return_if check
2012-11-21 15:29:05 +01:00
Evan Nemerson
4d77fba46c
libs: Add missing single include headers and use them in GIRs
2012-11-21 11:01:24 +01:00
Wim Taymans
a87cd40f49
rtsprange: improve docs
2012-11-21 10:25:51 +01:00
Wim Taymans
b785c66098
rtsp: avoid ABI break
...
Move new fields into structures appended at the end of the GstRTSPRange
to avoid ABI break.
2012-11-20 11:13:01 +01:00
Wim Taymans
41d36b2584
rtsp: fix format string
2012-11-19 17:08:38 +01:00
Wim Taymans
fe4b415f98
rtsp: parse UTC ranges
2012-11-19 16:59:48 +01:00