~ubuntu-branches/ubuntu/jaunty/xvidcap/jaunty-proposed

« back to all changes in this revision

Viewing changes to ffmpeg/libavformat/rtsp.h

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc, Andrew Starr-Bochicchio, Lionel Le Folgoc
  • Date: 2008-12-26 00:10:06 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20081226001006-2040ls9680bd1blt
Tags: 1.1.7-0.2ubuntu1
[ Andrew Starr-Bochicchio ]
* Merge from debian-multimedia (LP: #298547), Ubuntu Changes:
 - For ffmpeg-related build-deps, fix versionized dependencies
   as the ubuntu versioning is different than debian-multimedia's.

[ Lionel Le Folgoc ]
* LP: #311412 is fixed since the 1.1.7~rc1-0.1 revision.
* debian/patches/03_ffmpeg.diff: updated to fix FTBFS due to libswscale API
  change (cherry-pick from Gentoo #234383).

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * License along with FFmpeg; if not, write to the Free Software
19
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
20
 */
21
 
#ifndef RTSP_H
22
 
#define RTSP_H
 
21
#ifndef FFMPEG_RTSP_H
 
22
#define FFMPEG_RTSP_H
23
23
 
24
 
/* RTSP handling */
25
 
enum RTSPStatusCode {
26
 
#define DEF(n, c, s) c = n,
 
24
#include <stdint.h>
 
25
#include "avformat.h"
27
26
#include "rtspcodes.h"
28
 
#undef DEF
29
 
};
30
27
 
31
28
enum RTSPProtocol {
32
29
    RTSP_PROTOCOL_RTP_UDP = 0,
33
30
    RTSP_PROTOCOL_RTP_TCP = 1,
34
31
    RTSP_PROTOCOL_RTP_UDP_MULTICAST = 2,
 
32
    /**
 
33
     * This is not part of public API and shouldn't be used outside of ffmpeg.
 
34
     */
 
35
    RTSP_PROTOCOL_RTP_LAST
35
36
};
36
37
 
37
38
#define RTSP_DEFAULT_PORT   554
43
44
#define RTSP_RTP_PORT_MAX 10000
44
45
 
45
46
typedef struct RTSPTransportField {
46
 
    int interleaved_min, interleaved_max;  /* interleave ids, if TCP transport */
47
 
    int port_min, port_max; /* RTP ports */
48
 
    int client_port_min, client_port_max; /* RTP ports */
49
 
    int server_port_min, server_port_max; /* RTP ports */
50
 
    int ttl; /* ttl value */
51
 
    uint32_t destination; /* destination IP address */
 
47
    int interleaved_min, interleaved_max;  /**< interleave ids, if TCP transport */
 
48
    int port_min, port_max; /**< RTP ports */
 
49
    int client_port_min, client_port_max; /**< RTP ports */
 
50
    int server_port_min, server_port_max; /**< RTP ports */
 
51
    int ttl; /**< ttl value */
 
52
    uint32_t destination; /**< destination IP address */
52
53
    enum RTSPProtocol protocol;
53
54
} RTSPTransportField;
54
55
 
55
56
typedef struct RTSPHeader {
56
57
    int content_length;
57
 
    enum RTSPStatusCode status_code; /* response code from server */
 
58
    enum RTSPStatusCode status_code; /**< response code from server */
58
59
    int nb_transports;
59
 
    /* in AV_TIME_BASE unit, AV_NOPTS_VALUE if not used */
 
60
    /** in AV_TIME_BASE unit, AV_NOPTS_VALUE if not used */
60
61
    int64_t range_start, range_end;
61
62
    RTSPTransportField transports[RTSP_MAX_TRANSPORTS];
62
 
    int seq; /* sequence number */
 
63
    int seq; /**< sequence number */
63
64
    char session_id[512];
64
65
} RTSPHeader;
65
66
 
66
 
/* the callback can be used to extend the connection setup/teardown step */
 
67
/** the callback can be used to extend the connection setup/teardown step */
67
68
enum RTSPCallbackAction {
68
69
    RTSP_ACTION_SERVER_SETUP,
69
70
    RTSP_ACTION_SERVER_TEARDOWN,
81
82
                           char *buf, int buf_size,
82
83
                           void *arg);
83
84
 
84
 
void rtsp_set_callback(FFRTSPCallback *rtsp_cb);
85
 
 
86
85
int rtsp_init(void);
87
86
void rtsp_parse_line(RTSPHeader *reply, const char *buf);
88
87
 
 
88
#if LIBAVFORMAT_VERSION_INT < (53 << 16)
89
89
extern int rtsp_default_protocols;
 
90
#endif
90
91
extern int rtsp_rtp_port_min;
91
92
extern int rtsp_rtp_port_max;
92
 
extern FFRTSPCallback *ff_rtsp_callback;
93
 
extern AVInputFormat rtsp_demuxer;
94
93
 
95
94
int rtsp_pause(AVFormatContext *s);
96
95
int rtsp_resume(AVFormatContext *s);
97
96
 
98
 
#endif /* RTSP_H */
 
97
#endif /* FFMPEG_RTSP_H */