~ubuntu-branches/ubuntu/oneiric/faac/oneiric

« back to all changes in this revision

Viewing changes to common/mp4v2/mp4track.h

  • Committer: Bazaar Package Importer
  • Author(s): Maia Kozheva
  • Date: 2011-06-09 12:00:51 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110609120051-03a45t9zrp0xiu9k
Tags: 1.28-0ubuntu1
* New upstream release. Package based on Debian Multimedia team git.
  (LP: #395902)
* debian/copyright documents all applicable licenses. The package as a whole
  is not LGPL and will stay in multiverse. (LP: #374900)
* Back to using a bundled internal copy of libmp4v2 in the frontend. The
  external libmp4v2 will eventually be removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
        u_int32_t       GetMaxBitrate();        // in bps
94
94
 
95
95
        MP4Duration GetFixedSampleDuration();
96
 
        bool            SetFixedSampleDuration(MP4Duration duration);
 
96
        void            SetFixedSampleDuration(MP4Duration duration);
97
97
 
98
98
        void            GetSampleTimes(MP4SampleId sampleId,
99
99
                                        MP4Timestamp* pStartTime, MP4Duration* pDuration);
125
125
                MP4Timestamp* pStartTime = NULL, 
126
126
                MP4Duration* pDuration = NULL);
127
127
 
128
 
        static const char* NormalizeTrackType(const char* type);
129
 
 
130
128
        // special operation for use during hint track packet assembly
131
129
        void ReadSampleFragment(
132
130
                MP4SampleId sampleId,
170
168
        void UpdateSyncSamples(MP4SampleId sampleId, 
171
169
                bool isSyncSample);
172
170
 
173
 
        MP4Atom* AddAtom(char* parentName, char* childName);
 
171
        MP4Atom* AddAtom(const char* parentName, const char* childName);
174
172
 
175
173
        void UpdateDurations(MP4Duration duration);
176
174
        MP4Duration ToMovieDuration(MP4Duration trackDuration);
179
177
 
180
178
        void WriteChunkBuffer();
181
179
 
 
180
        void CalculateBytesPerSample();
182
181
protected:
183
182
        MP4File*        m_pFile;
184
183
        MP4Atom*        m_pTrakAtom;            // moov.trak[]
205
204
        u_int32_t       m_samplesPerChunk;
206
205
        MP4Duration m_durationPerChunk;
207
206
 
 
207
        u_int32_t       m_bytesPerSample;
 
208
 
208
209
        // controls for AMR chunking
209
210
        int             m_isAmr;
210
211
        u_int8_t        m_curMode;
217
218
 
218
219
        MP4Integer32Property* m_pStszFixedSampleSizeProperty;
219
220
        MP4Integer32Property* m_pStszSampleCountProperty;
220
 
        MP4Integer32Property* m_pStszSampleSizeProperty;
 
221
        
 
222
        void SampleSizePropertyAddValue(uint32_t bytes);
 
223
        uint8_t m_stsz_sample_bits;
 
224
        bool m_have_stz2_4bit_sample;
 
225
        uint8_t m_stz2_4bit_sample_value;
 
226
        MP4IntegerProperty* m_pStszSampleSizeProperty;
221
227
 
222
228
        MP4Integer32Property* m_pStscCountProperty;
223
229
        MP4Integer32Property* m_pStscFirstChunkProperty;
232
238
        MP4Integer32Property* m_pSttsSampleCountProperty;
233
239
        MP4Integer32Property* m_pSttsSampleDeltaProperty;
234
240
 
 
241
        // for improve sequental timestamp index access
 
242
        u_int32_t       m_cachedSttsIndex;
 
243
        MP4SampleId     m_cachedSttsSid;
 
244
        MP4Timestamp    m_cachedSttsElapsed;
 
245
 
235
246
        MP4Integer32Property* m_pCttsCountProperty;
236
247
        MP4Integer32Property* m_pCttsSampleCountProperty;
237
248
        MP4Integer32Property* m_pCttsSampleOffsetProperty;