summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.h
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2009-01-07 14:53:04 +0000
committerRonald S. Bultje <rsbultje@gmail.com>2009-01-07 14:53:04 +0000
commit74272b1c0cb4b90da324eec78c7dbe74e3993a77 (patch)
treeb81b0e87e09d3609e96042e68df5cdb1bf412bca /libavformat/rtsp.h
parentb0d75d6036d8762a0019a9a976e913b9ac9bf7f8 (diff)
Export RTSPState and RTSPStream from rtsp.c into rtsp.h. This allows future
access to these structures in functions that will be located in rtp_asf.c. See "[PATCH] RTSP-MS 2/15: export RTSPState and RTSPStream" mailinglist thread. Originally committed as revision 16471 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtsp.h')
-rw-r--r--libavformat/rtsp.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/libavformat/rtsp.h b/libavformat/rtsp.h
index 611f5c3aae..36297e98c0 100644
--- a/libavformat/rtsp.h
+++ b/libavformat/rtsp.h
@@ -24,6 +24,8 @@
#include <stdint.h>
#include "avformat.h"
#include "rtspcodes.h"
+#include "rtp.h"
+#include "network.h"
enum RTSPLowerTransport {
RTSP_LOWER_TRANSPORT_UDP = 0,
@@ -66,6 +68,64 @@ typedef struct RTSPHeader {
char real_challenge[64]; /**< the RealChallenge1 field from the server */
} RTSPHeader;
+enum RTSPClientState {
+ RTSP_STATE_IDLE,
+ RTSP_STATE_PLAYING,
+ RTSP_STATE_PAUSED,
+};
+
+enum RTSPServerType {
+ RTSP_SERVER_RTP, /*< Standard-compliant RTP-server */
+ RTSP_SERVER_REAL, /*< Realmedia-style server */
+ RTSP_SERVER_LAST
+};
+
+enum RTSPTransport {
+ RTSP_TRANSPORT_RTP,
+ RTSP_TRANSPORT_RDT,
+ RTSP_TRANSPORT_LAST
+};
+
+typedef struct RTSPState {
+ URLContext *rtsp_hd; /* RTSP TCP connexion handle */
+ int nb_rtsp_streams;
+ struct RTSPStream **rtsp_streams;
+
+ enum RTSPClientState state;
+ int64_t seek_timestamp;
+
+ /* XXX: currently we use unbuffered input */
+ // ByteIOContext rtsp_gb;
+ int seq; /* RTSP command sequence number */
+ char session_id[512];
+ enum RTSPTransport transport;
+ enum RTSPLowerTransport lower_transport;
+ enum RTSPServerType server_type;
+ char last_reply[2048]; /* XXX: allocate ? */
+ void *cur_tx;
+ int need_subscription;
+ enum AVDiscard real_setup_cache[MAX_STREAMS];
+ char last_subscription[1024];
+} RTSPState;
+
+typedef struct RTSPStream {
+ URLContext *rtp_handle; /* RTP stream handle */
+ void *tx_ctx; /* RTP/RDT parse context */
+
+ int stream_index; /* corresponding stream index, if any. -1 if none (MPEG2TS case) */
+ int interleaved_min, interleaved_max; /* interleave ids, if TCP transport */
+ char control_url[1024]; /* url for this stream (from SDP) */
+
+ int sdp_port; /* port (from SDP content - not used in RTSP) */
+ struct in_addr sdp_ip; /* IP address (from SDP content - not used in RTSP) */
+ int sdp_ttl; /* IP TTL (from SDP content - not used in RTSP) */
+ int sdp_payload_type; /* payload type - only used in SDP */
+ RTPPayloadData rtp_payload_data; /* rtp payload parsing infos from SDP */
+
+ RTPDynamicProtocolHandler *dynamic_handler; ///< Only valid if it's a dynamic protocol. (This is the handler structure)
+ PayloadContext *dynamic_protocol_context; ///< Only valid if it's a dynamic protocol. (This is any private data associated with the dynamic protocol)
+} RTSPStream;
+
/** the callback can be used to extend the connection setup/teardown step */
enum RTSPCallbackAction {
RTSP_ACTION_SERVER_SETUP,