MP4v2

track_prop.h
1#ifndef MP4V2_TRACK_PROP_H
2#define MP4V2_TRACK_PROP_H
3
4/**************************************************************************/
11/* specific track properties */
12
41MP4V2_EXPORT
42 const char* MP4GetTrackType(
43 MP4FileHandle hFile,
44 MP4TrackId trackId );
45
58MP4V2_EXPORT
59 const char* MP4GetTrackMediaDataName(
60 MP4FileHandle hFile,
61 MP4TrackId trackId );
62
80MP4V2_EXPORT
81 bool MP4GetTrackMediaDataOriginalFormat(
82 MP4FileHandle hFile,
83 MP4TrackId trackId,
84 char* originalFormat,
85 uint32_t buflen );
86
100MP4V2_EXPORT
101MP4Duration MP4GetTrackDuration(
102 MP4FileHandle hFile,
103 MP4TrackId trackId );
104
116MP4V2_EXPORT
117uint32_t MP4GetTrackTimeScale(
118 MP4FileHandle hFile,
119 MP4TrackId trackId );
120
139MP4V2_EXPORT
140 bool MP4SetTrackTimeScale(
141 MP4FileHandle hFile,
142 MP4TrackId trackId,
143 uint32_t value );
144
154MP4V2_EXPORT
155 bool MP4GetTrackLanguage(
156 MP4FileHandle hFile,
157 MP4TrackId trackId,
158 char* code );
159
169MP4V2_EXPORT
170 bool MP4SetTrackLanguage(
171 MP4FileHandle hFile,
172 MP4TrackId trackId,
173 const char* code );
174
188MP4V2_EXPORT
189 bool MP4GetTrackName(
190 MP4FileHandle hFile,
191 MP4TrackId trackId,
192 char** name );
193
205MP4V2_EXPORT
206 bool MP4SetTrackName(
207 MP4FileHandle hFile,
208 MP4TrackId trackId,
209 const char* name );
210
246MP4V2_EXPORT
247uint8_t MP4GetTrackAudioMpeg4Type(
248 MP4FileHandle hFile,
249 MP4TrackId trackId );
250
291MP4V2_EXPORT
292uint8_t MP4GetTrackEsdsObjectTypeId(
293 MP4FileHandle hFile,
294 MP4TrackId trackId );
295
309MP4V2_EXPORT
310MP4Duration MP4GetTrackFixedSampleDuration(
311 MP4FileHandle hFile,
312 MP4TrackId trackId );
313
327MP4V2_EXPORT
328uint32_t MP4GetTrackBitRate(
329 MP4FileHandle hFile,
330 MP4TrackId trackId );
331
332MP4V2_EXPORT
333 bool MP4GetTrackVideoMetadata(
334 MP4FileHandle hFile,
335 MP4TrackId trackId,
336 uint8_t** ppConfig,
337 uint32_t* pConfigSize );
338
365MP4V2_EXPORT
366 bool MP4GetTrackESConfiguration(
367 MP4FileHandle hFile,
368 MP4TrackId trackId,
369 uint8_t** ppConfig,
370 uint32_t* pConfigSize );
371
388MP4V2_EXPORT
389 bool MP4SetTrackESConfiguration(
390 MP4FileHandle hFile,
391 MP4TrackId trackId,
392 const uint8_t* pConfig,
393 uint32_t configSize );
394
395/* h264 information routines */
396
397MP4V2_EXPORT
398 bool MP4GetTrackH264ProfileLevel(
399 MP4FileHandle hFile,
400 MP4TrackId trackId,
401 uint8_t* pProfile,
402 uint8_t* pLevel );
403
404MP4V2_EXPORT
405 bool MP4GetTrackH264SeqPictHeaders(
406 MP4FileHandle hFile,
407 MP4TrackId trackId,
408 uint8_t*** pSeqHeaders,
409 uint32_t** pSeqHeaderSize,
410 uint8_t*** pPictHeader,
411 uint32_t** pPictHeaderSize );
412
434MP4V2_EXPORT
435 void MP4FreeH264SeqPictHeaders(
436 uint8_t** pSeqHeaders,
437 uint32_t* pSeqHeaderSize,
438 uint8_t** pPictHeader,
439 uint32_t* pPictHeaderSize );
440
441MP4V2_EXPORT
442 bool MP4GetTrackH264LengthSize(
443 MP4FileHandle hFile,
444 MP4TrackId trackId,
445 uint32_t* pLength );
446
460MP4V2_EXPORT
461MP4SampleId MP4GetTrackNumberOfSamples(
462 MP4FileHandle hFile,
463 MP4TrackId trackId );
464
488MP4V2_EXPORT
489uint16_t MP4GetTrackVideoWidth(
490 MP4FileHandle hFile,
491 MP4TrackId trackId );
492
516MP4V2_EXPORT
517uint16_t MP4GetTrackVideoHeight(
518 MP4FileHandle hFile,
519 MP4TrackId trackId );
520
534MP4V2_EXPORT
535 double MP4GetTrackVideoFrameRate(
536 MP4FileHandle hFile,
537 MP4TrackId trackId );
538
551MP4V2_EXPORT
552 int MP4GetTrackAudioChannels(
553 MP4FileHandle hFile,
554 MP4TrackId trackId );
555
566MP4V2_EXPORT
567 bool MP4IsIsmaCrypMediaTrack(
568 MP4FileHandle hFile,
569 MP4TrackId trackId );
570
571/* generic track properties */
572
585MP4V2_EXPORT
586 bool MP4HaveTrackAtom(
587 MP4FileHandle hFile,
588 MP4TrackId trackId,
589 const char* atomName );
590
604MP4V2_EXPORT
605 bool MP4GetTrackIntegerProperty(
606 MP4FileHandle hFile,
607 MP4TrackId trackId,
608 const char* propName,
609 uint64_t* retVal );
610
624MP4V2_EXPORT
625 bool MP4GetTrackFloatProperty(
626 MP4FileHandle hFile,
627 MP4TrackId trackId,
628 const char* propName,
629 float* retVal );
630
645MP4V2_EXPORT
646 bool MP4GetTrackStringProperty(
647 MP4FileHandle hFile,
648 MP4TrackId trackId,
649 const char* propName,
650 const char** retVal );
651
670MP4V2_EXPORT
671 bool MP4GetTrackBytesProperty(
672 MP4FileHandle hFile,
673 MP4TrackId trackId,
674 const char* propName,
675 uint8_t** ppValue,
676 uint32_t* pValueSize );
677
691MP4V2_EXPORT
692 bool MP4SetTrackIntegerProperty(
693 MP4FileHandle hFile,
694 MP4TrackId trackId,
695 const char* propName,
696 int64_t value );
697
710MP4V2_EXPORT
711 bool MP4SetTrackFloatProperty(
712 MP4FileHandle hFile,
713 MP4TrackId trackId,
714 const char* propName,
715 float value );
716
730MP4V2_EXPORT
731 bool MP4SetTrackStringProperty(
732 MP4FileHandle hFile,
733 MP4TrackId trackId,
734 const char* propName,
735 const char* value );
736
750MP4V2_EXPORT
751 bool MP4SetTrackBytesProperty(
752 MP4FileHandle hFile,
753 MP4TrackId trackId,
754 const char* propName,
755 const uint8_t* pValue,
756 uint32_t valueSize);
757
760#endif /* MP4V2_TRACK_PROP_H */
MP4SetTrackStringProperty
bool MP4SetTrackStringProperty(MP4FileHandle hFile, MP4TrackId trackId, const char *propName, const char *value)
Set the value of a string property for a track.
MP4GetTrackNumberOfSamples
MP4SampleId MP4GetTrackNumberOfSamples(MP4FileHandle hFile, MP4TrackId trackId)
Get the number of samples in a track.
MP4SetTrackLanguage
bool MP4SetTrackLanguage(MP4FileHandle hFile, MP4TrackId trackId, const char *code)
Set ISO-639-2/T language code of a track.
MP4GetTrackFloatProperty
bool MP4GetTrackFloatProperty(MP4FileHandle hFile, MP4TrackId trackId, const char *propName, float *retVal)
Get the value of a float property for a track.
MP4FreeH264SeqPictHeaders
void MP4FreeH264SeqPictHeaders(uint8_t **pSeqHeaders, uint32_t *pSeqHeaderSize, uint8_t **pPictHeader, uint32_t *pPictHeaderSize)
Frees the memory allocated by MP4GetTrackH264SeqPictHeaders.
MP4HaveTrackAtom
bool MP4HaveTrackAtom(MP4FileHandle hFile, MP4TrackId trackId, const char *atomName)
Check for presence of a track atom.
MP4GetTrackTimeScale
uint32_t MP4GetTrackTimeScale(MP4FileHandle hFile, MP4TrackId trackId)
Get the time scale of a track.
MP4GetTrackMediaDataOriginalFormat
bool MP4GetTrackMediaDataOriginalFormat(MP4FileHandle hFile, MP4TrackId trackId, char *originalFormat, uint32_t buflen)
Get the name of an encrypted track's original media data atom.
MP4GetTrackMediaDataName
const char * MP4GetTrackMediaDataName(MP4FileHandle hFile, MP4TrackId trackId)
Get the name of the track's media data atom.
MP4GetTrackBytesProperty
bool MP4GetTrackBytesProperty(MP4FileHandle hFile, MP4TrackId trackId, const char *propName, uint8_t **ppValue, uint32_t *pValueSize)
Get the value of a bytes property for a track.
MP4GetTrackIntegerProperty
bool MP4GetTrackIntegerProperty(MP4FileHandle hFile, MP4TrackId trackId, const char *propName, uint64_t *retVal)
Get the value of an integer property for a track.
MP4GetTrackLanguage
bool MP4GetTrackLanguage(MP4FileHandle hFile, MP4TrackId trackId, char *code)
Get ISO-639-2/T language code of a track.
MP4GetTrackESConfiguration
bool MP4GetTrackESConfiguration(MP4FileHandle hFile, MP4TrackId trackId, uint8_t **ppConfig, uint32_t *pConfigSize)
Get the elementary stream (ES) configuration of a track.
MP4IsIsmaCrypMediaTrack
bool MP4IsIsmaCrypMediaTrack(MP4FileHandle hFile, MP4TrackId trackId)
Check whether a track is ISMACrypt encrypted.
MP4GetTrackVideoHeight
uint16_t MP4GetTrackVideoHeight(MP4FileHandle hFile, MP4TrackId trackId)
Get the video height in pixels of the specified video track.
MP4SetTrackBytesProperty
bool MP4SetTrackBytesProperty(MP4FileHandle hFile, MP4TrackId trackId, const char *propName, const uint8_t *pValue, uint32_t valueSize)
Set the value of a bytes property for a track.
MP4GetTrackVideoWidth
uint16_t MP4GetTrackVideoWidth(MP4FileHandle hFile, MP4TrackId trackId)
Get the video width in pixels of the specified video track.
MP4GetTrackAudioChannels
int MP4GetTrackAudioChannels(MP4FileHandle hFile, MP4TrackId trackId)
Get the number of channels of the specified audio track.
MP4GetTrackEsdsObjectTypeId
uint8_t MP4GetTrackEsdsObjectTypeId(MP4FileHandle hFile, MP4TrackId trackId)
Get the encoding object type id from a track's esds atom.
MP4GetTrackBitRate
uint32_t MP4GetTrackBitRate(MP4FileHandle hFile, MP4TrackId trackId)
Get the average bit rate in bits per second of the specified track.
MP4GetTrackType
const char * MP4GetTrackType(MP4FileHandle hFile, MP4TrackId trackId)
Get the track type.
MP4GetTrackDuration
MP4Duration MP4GetTrackDuration(MP4FileHandle hFile, MP4TrackId trackId)
Get the duration of a track.
MP4SetTrackTimeScale
bool MP4SetTrackTimeScale(MP4FileHandle hFile, MP4TrackId trackId, uint32_t value)
Set the time scale of a track.
MP4SetTrackESConfiguration
bool MP4SetTrackESConfiguration(MP4FileHandle hFile, MP4TrackId trackId, const uint8_t *pConfig, uint32_t configSize)
Set the elementary stream (ES) configuration of a track.
MP4GetTrackAudioMpeg4Type
uint8_t MP4GetTrackAudioMpeg4Type(MP4FileHandle hFile, MP4TrackId trackId)
Get the encoding type of an MPEG-4 audio track.
MP4SetTrackName
bool MP4SetTrackName(MP4FileHandle hFile, MP4TrackId trackId, const char *name)
Set track name.
MP4GetTrackVideoFrameRate
double MP4GetTrackVideoFrameRate(MP4FileHandle hFile, MP4TrackId trackId)
Get the video frame rate of the specified video track.
MP4GetTrackName
bool MP4GetTrackName(MP4FileHandle hFile, MP4TrackId trackId, char **name)
Get track name.
MP4SetTrackIntegerProperty
bool MP4SetTrackIntegerProperty(MP4FileHandle hFile, MP4TrackId trackId, const char *propName, int64_t value)
Set the value of an integer property for a track.
MP4SetTrackFloatProperty
bool MP4SetTrackFloatProperty(MP4FileHandle hFile, MP4TrackId trackId, const char *propName, float value)
Set the value of a float property for a track.
MP4GetTrackStringProperty
bool MP4GetTrackStringProperty(MP4FileHandle hFile, MP4TrackId trackId, const char *propName, const char **retVal)
Get the value of a string property for a track.
MP4GetTrackFixedSampleDuration
MP4Duration MP4GetTrackFixedSampleDuration(MP4FileHandle hFile, MP4TrackId trackId)
Get the fixed duration of samples in a track.