Statistics
| Branch: | Revision:

ffmpeg / libavformat / rtpenc.h @ 8b889b34

History | View | Annotate | Download (2.35 KB)

1 302879cb Luca Abeni
/*
2
 * RTP muxer definitions
3
 * Copyright (c) 2002 Fabrice Bellard
4
 *
5
 * This file is part of FFmpeg.
6
 *
7
 * FFmpeg is free software; you can redistribute it and/or
8
 * modify it under the terms of the GNU Lesser General Public
9
 * License as published by the Free Software Foundation; either
10
 * version 2.1 of the License, or (at your option) any later version.
11
 *
12
 * FFmpeg is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
 * Lesser General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU Lesser General Public
18
 * License along with FFmpeg; if not, write to the Free Software
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
 */
21
#ifndef AVFORMAT_RTPENC_H
22
#define AVFORMAT_RTPENC_H
23
24
#include "avformat.h"
25
#include "rtp.h"
26
27
struct RTPMuxContext {
28
    AVFormatContext *ic;
29
    AVStream *st;
30
    int payload_type;
31
    uint32_t ssrc;
32
    uint16_t seq;
33
    uint32_t timestamp;
34
    uint32_t base_timestamp;
35
    uint32_t cur_timestamp;
36
    int max_payload_size;
37
    int num_frames;
38
39
    /* rtcp sender statistics receive */
40
    int64_t last_rtcp_ntp_time;    // TODO: move into statistics
41
    int64_t first_rtcp_ntp_time;   // TODO: move into statistics
42
43
    /* rtcp sender statistics */
44
    unsigned int packet_count;     // TODO: move into statistics (outgoing)
45
    unsigned int octet_count;      // TODO: move into statistics (outgoing)
46
    unsigned int last_octet_count; // TODO: move into statistics (outgoing)
47
    int first_packet;
48
    /* buffer for output */
49 d3536678 Luca Abeni
    uint8_t *buf;
50 302879cb Luca Abeni
    uint8_t *buf_ptr;
51
52
    int max_frames_per_packet;
53 8b889b34 Luca Abeni
54
    /**
55
     * Number of bytes used for H.264 NAL length, if the MP4 syntax is used
56
     * (1, 2 or 4)
57
     */
58
    int nal_length_size;
59 302879cb Luca Abeni
};
60
61
typedef struct RTPMuxContext RTPMuxContext;
62
63
void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m);
64
65
void ff_rtp_send_h264(AVFormatContext *s1, const uint8_t *buf1, int size);
66 9edfaf3c Martin Storsjö
void ff_rtp_send_h263(AVFormatContext *s1, const uint8_t *buf1, int size);
67 17a5894a Luca Abeni
void ff_rtp_send_aac(AVFormatContext *s1, const uint8_t *buff, int size);
68 08e696c0 Martin Storsjö
void ff_rtp_send_amr(AVFormatContext *s1, const uint8_t *buff, int size);
69 17a5894a Luca Abeni
void ff_rtp_send_mpegvideo(AVFormatContext *s1, const uint8_t *buf1, int size);
70 302879cb Luca Abeni
71
#endif /* AVFORMAT_RTPENC_H */