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