summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.h
diff options
context:
space:
mode:
authorJordi Ortiz <nenjordi@gmail.com>2012-07-10 19:36:11 +0200
committerMartin Storsjö <martin@martin.st>2012-07-10 22:00:28 +0300
commita8ad6ffafe89e3a83f343f69249338e8245816f7 (patch)
treef44065d2b5f5974336a80b5f6b933cf067255838 /libavformat/rtsp.h
parent6e71c1202bbdca0a95680e07507b39c55bb04f12 (diff)
rtsp: Add listen mode
This makes the RTSP demuxer act as a server, listening for an incoming connection. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtsp.h')
-rw-r--r--libavformat/rtsp.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavformat/rtsp.h b/libavformat/rtsp.h
index 41bf8bbb8a..a738a3d434 100644
--- a/libavformat/rtsp.h
+++ b/libavformat/rtsp.h
@@ -372,11 +372,17 @@ typedef struct RTSPState {
* Minimum and maximum local UDP ports.
*/
int rtp_port_min, rtp_port_max;
+
+ /**
+ * Timeout to wait for incoming connections.
+ */
+ int initial_timeout;
} RTSPState;
#define RTSP_FLAG_FILTER_SRC 0x1 /**< Filter incoming UDP packets -
receive packets only from the right
source address and port. */
+#define RTSP_FLAG_LISTEN 0x2 /**< Wait for incoming connections. */
/**
* Describe a single stream, as identified by a single m= line block in the
@@ -529,6 +535,12 @@ int ff_rtsp_setup_input_streams(AVFormatContext *s, RTSPMessageHeader *reply);
int ff_rtsp_setup_output_streams(AVFormatContext *s, const char *addr);
/**
+ * Parse RTSP commands (OPTIONS, PAUSE and TEARDOWN) during streaming in
+ * listen mode.
+ */
+int ff_rtsp_parse_streaming_commands(AVFormatContext *s);
+
+/**
* Parse an SDP description of streams by populating an RTSPState struct
* within the AVFormatContext; also allocate the RTP streams and the
* pollfd array used for UDP streams.