Mercurial > libavformat.hg
comparison movenc.h @ 6013:332ad5f30c0e libavformat
Add initial support for RTP hinting in the mov muxer
author | mstorsjo |
---|---|
date | Tue, 18 May 2010 19:47:24 +0000 |
parents | 8298cc054242 |
children | b66058698117 |
comparison
equal
deleted
inserted
replaced
6012:8298cc054242 | 6013:332ad5f30c0e |
---|---|
26 | 26 |
27 #include "avformat.h" | 27 #include "avformat.h" |
28 | 28 |
29 #define MOV_INDEX_CLUSTER_SIZE 16384 | 29 #define MOV_INDEX_CLUSTER_SIZE 16384 |
30 #define MOV_TIMESCALE 1000 | 30 #define MOV_TIMESCALE 1000 |
31 | |
32 #define RTP_MAX_PACKET_SIZE 1450 | |
31 | 33 |
32 #define MODE_MP4 0x01 | 34 #define MODE_MP4 0x01 |
33 #define MODE_MOV 0x02 | 35 #define MODE_MOV 0x02 |
34 #define MODE_3GP 0x04 | 36 #define MODE_3GP 0x04 |
35 #define MODE_PSP 0x08 // example working PSP command line: | 37 #define MODE_PSP 0x08 // example working PSP command line: |
71 MOVIentry *cluster; | 73 MOVIentry *cluster; |
72 int audio_vbr; | 74 int audio_vbr; |
73 int height; ///< active picture (w/o VBI) height for D-10/IMX | 75 int height; ///< active picture (w/o VBI) height for D-10/IMX |
74 uint32_t tref_tag; | 76 uint32_t tref_tag; |
75 int tref_id; ///< trackID of the referenced track | 77 int tref_id; ///< trackID of the referenced track |
78 | |
79 int hint_track; ///< the track that hints this track, -1 if no hint track is set | |
80 int src_track; ///< the track that this hint track describes | |
81 AVFormatContext *rtp_ctx; ///< the format context for the hinting rtp muxer | |
82 uint32_t prev_rtp_ts; | |
83 int64_t cur_rtp_ts_unwrapped; | |
84 uint32_t max_packet_size; | |
76 } MOVTrack; | 85 } MOVTrack; |
77 | 86 |
78 typedef struct MOVMuxContext { | 87 typedef struct MOVMuxContext { |
79 int mode; | 88 int mode; |
80 int64_t time; | 89 int64_t time; |
85 MOVTrack *tracks; | 94 MOVTrack *tracks; |
86 } MOVMuxContext; | 95 } MOVMuxContext; |
87 | 96 |
88 int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt); | 97 int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt); |
89 | 98 |
99 int ff_mov_init_hinting(AVFormatContext *s, int index, int src_index); | |
100 int ff_mov_add_hinted_packet(AVFormatContext *s, AVPacket *pkt, | |
101 int track_index, int sample); | |
102 void ff_mov_close_hinting(MOVTrack *track); | |
103 | |
90 #endif /* AVFORMAT_MOVENC_H */ | 104 #endif /* AVFORMAT_MOVENC_H */ |