~ubuntu-branches/ubuntu/trusty/gst-libav1.0/trusty-proposed

« back to all changes in this revision

Viewing changes to gst-libs/ext/libav/libavformat/movenc.h

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2013-09-24 17:07:00 UTC
  • mfrom: (1.1.17) (7.1.9 experimental)
  • Revision ID: package-import@ubuntu.com-20130924170700-4dg62s3pwl0pdakz
Tags: 1.2.0-1
* New upstream stable release:
  + debian/control:
    - Build depend on GStreamer and gst-plugins-base >= 1.2.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
// avconv -i testinput.avi  -f psp -r 14.985 -s 320x240 -b 768 -ar 24000 -ab 32 M4V00001.MP4
39
39
#define MODE_3G2  0x10
40
40
#define MODE_IPOD 0x20
 
41
#define MODE_ISM  0x40
41
42
 
42
43
typedef struct MOVIentry {
43
44
    uint64_t     pos;
44
45
    int64_t      dts;
45
46
    unsigned int size;
46
 
    unsigned int samplesInChunk;
 
47
    unsigned int samples_in_chunk;
47
48
    unsigned int entries;
48
49
    int          cts;
49
50
#define MOV_SYNC_SAMPLE         0x0001
59
60
    int own_data;
60
61
} HintSample;
61
62
 
62
 
typedef struct {
 
63
typedef struct HintSampleQueue {
63
64
    int size;
64
65
    int len;
65
66
    HintSample *samples;
66
67
} HintSampleQueue;
67
68
 
 
69
typedef struct MOVFragmentInfo {
 
70
    int64_t offset;
 
71
    int64_t time;
 
72
    int64_t duration;
 
73
    int64_t tfrf_offset;
 
74
} MOVFragmentInfo;
 
75
 
68
76
typedef struct MOVIndex {
69
77
    int         mode;
70
78
    int         entry;
71
79
    unsigned    timescale;
72
80
    uint64_t    time;
73
 
    int64_t     trackDuration;
74
 
    long        sampleCount;
75
 
    long        sampleSize;
76
 
    int         hasKeyframes;
 
81
    int64_t     track_duration;
 
82
    long        sample_count;
 
83
    long        sample_size;
 
84
    int         has_keyframes;
77
85
#define MOV_TRACK_CTTS         0x0001
78
86
#define MOV_TRACK_STPS         0x0002
79
87
    uint32_t    flags;
80
88
    int         language;
81
 
    int         trackID;
 
89
    int         track_id;
82
90
    int         tag; ///< stsd fourcc
83
91
    AVCodecContext *enc;
84
92
 
85
 
    int         vosLen;
86
 
    uint8_t     *vosData;
 
93
    int         vos_len;
 
94
    uint8_t     *vos_data;
87
95
    MOVIentry   *cluster;
88
96
    int         audio_vbr;
89
97
    int         height; ///< active picture (w/o VBI) height for D-10/IMX
90
98
    uint32_t    tref_tag;
91
99
    int         tref_id; ///< trackID of the referenced track
 
100
    int64_t     start_dts;
92
101
 
93
102
    int         hint_track;   ///< the track that hints this track, -1 if no hint track is set
94
103
    int         src_track;    ///< the track that this hint track describes
97
106
    int64_t     cur_rtp_ts_unwrapped;
98
107
    uint32_t    max_packet_size;
99
108
 
 
109
    int64_t     default_duration;
 
110
    uint32_t    default_sample_flags;
 
111
    uint32_t    default_size;
 
112
 
100
113
    HintSampleQueue sample_queue;
 
114
 
 
115
    AVIOContext *mdat_buf;
 
116
    int64_t     moof_size_offset;
 
117
    int64_t     data_offset;
 
118
    int64_t     frag_start;
 
119
    int64_t     tfrf_offset;
 
120
 
 
121
    int         nb_frag_info;
 
122
    MOVFragmentInfo *frag_info;
 
123
 
 
124
    struct {
 
125
        int64_t struct_offset;
 
126
        int     first_packet_seq;
 
127
        int     first_packet_entry;
 
128
        int     packet_seq;
 
129
        int     packet_entry;
 
130
        int     slices;
 
131
    } vc1_info;
101
132
} MOVTrack;
102
133
 
103
134
typedef struct MOVMuxContext {
115
146
    int iods_skip;
116
147
    int iods_video_profile;
117
148
    int iods_audio_profile;
 
149
 
 
150
    int fragments;
 
151
    int max_fragment_duration;
 
152
    int min_fragment_duration;
 
153
    int max_fragment_size;
 
154
    int ism_lookahead;
 
155
    AVIOContext *mdat_buf;
118
156
} MOVMuxContext;
119
157
 
120
158
#define FF_MOV_FLAG_RTP_HINT 1
 
159
#define FF_MOV_FLAG_FRAGMENT 2
 
160
#define FF_MOV_FLAG_EMPTY_MOOV 4
 
161
#define FF_MOV_FLAG_FRAG_KEYFRAME 8
 
162
#define FF_MOV_FLAG_SEPARATE_MOOF 16
 
163
#define FF_MOV_FLAG_FRAG_CUSTOM 32
 
164
#define FF_MOV_FLAG_ISML 64
121
165
 
122
166
int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt);
123
167