]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtsp.h
avidec: make print_tag() a macro and remove related ifdefs
[ffmpeg] / libavformat / rtsp.h
index fbe9e1a6898eded7d6f35f422c088f9247b9b048..62bd3a2eccc9957ddd925e86115c3806e82f882c 100644 (file)
@@ -165,10 +165,6 @@ typedef struct RTSPMessageHeader {
      * returned
      */
     char reason[256];
-
-    /** The "Content-Base:" field.
-     */
-    char content_base[4096];
 } RTSPMessageHeader;
 
 /**
@@ -252,6 +248,9 @@ typedef struct RTSPState {
      * of RTSPMessageHeader->real_challenge */
     enum RTSPServerType server_type;
 
+    /** the "RealChallenge1:" field from the server */
+    char real_challenge[64];
+
     /** plaintext authorization line (username:password) */
     char auth[128];
 
@@ -313,6 +312,20 @@ typedef struct RTSPState {
 
     /** Reusable buffer for receiving packets */
     uint8_t* recvbuf;
+
+    /** Filter incoming UDP packets - receive packets only from the right
+     * source address and port. */
+    int filter_source;
+
+    /**
+     * A mask with all requested transport methods
+     */
+    int lower_transport_mask;
+
+    /**
+     * The number of returned packets
+     */
+    uint64_t packets;
 } RTSPState;
 
 /**
@@ -353,7 +366,7 @@ typedef struct RTSPStream {
 } RTSPStream;
 
 void ff_rtsp_parse_line(RTSPMessageHeader *reply, const char *buf,
-                        RTSPState *rt);
+                        RTSPState *rt, const char *method);
 
 extern int rtsp_rtp_port_min;
 extern int rtsp_rtp_port_max;
@@ -504,4 +517,17 @@ int ff_rtsp_tcp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
  */
 int ff_rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt);
 
+/**
+ * Do the SETUP requests for each stream for the chosen
+ * lower transport mode.
+ */
+int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port,
+                               int lower_transport, const char *real_challenge);
+
+/**
+ * Undo the effect of ff_rtsp_make_setup_request, close the
+ * transport_priv and rtp_handle fields.
+ */
+void ff_rtsp_undo_setup(AVFormatContext *s);
+
 #endif /* AVFORMAT_RTSP_H */