diff options
author | James Almer <jamrial@gmail.com> | 2017-10-26 14:50:36 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-10-26 15:21:59 -0300 |
commit | 4bb09bf5a04af7a76f8bb514edf7e755066b81cd (patch) | |
tree | 8b575bb470557d05f7b7e50e123bfb5a033bc8cd /libavformat/isom.h | |
parent | 4576ee100b9e645ff3a63e36c500ea4b3001a198 (diff) | |
parent | 604fbb3132e88727e496c96c92cfe02748c25a1a (diff) | |
download | ffmpeg-4bb09bf5a04af7a76f8bb514edf7e755066b81cd.tar.gz |
Merge commit '604fbb3132e88727e496c96c92cfe02748c25a1a'
* commit '604fbb3132e88727e496c96c92cfe02748c25a1a':
mov: Move code shared with CAF to a separate file
Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/isom.h')
-rw-r--r-- | libavformat/isom.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/libavformat/isom.h b/libavformat/isom.h index 395d20d25c..ff08f5d090 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -336,7 +336,6 @@ void ff_mp4_parse_es_descr(AVIOContext *pb, int *es_id); int ff_mov_read_esds(AVFormatContext *fc, AVIOContext *pb); -enum AVCodecID ff_mov_get_lpcm_codec_id(int bps, int flags); int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries); void ff_mov_write_chan(AVIOContext *pb, int64_t channel_layout); @@ -345,4 +344,18 @@ void ff_mov_write_chan(AVIOContext *pb, int64_t channel_layout); #define FF_MOV_FLAG_MFRA_DTS 1 #define FF_MOV_FLAG_MFRA_PTS 2 +/** + * Compute codec id for 'lpcm' tag. + * See CoreAudioTypes and AudioStreamBasicDescription at Apple. + */ +static inline enum AVCodecID ff_mov_get_lpcm_codec_id(int bps, int flags) +{ + /* lpcm flags: + * 0x1 = float + * 0x2 = big-endian + * 0x4 = signed + */ + return ff_get_pcm_codec_id(bps, flags & 1, flags & 2, flags & 4 ? -1 : 0); +} + #endif /* AVFORMAT_ISOM_H */ |