yading@11: /* yading@11: * Copyright (c) 2011 Justin Ruggles yading@11: * yading@11: * This file is part of Libav. yading@11: * yading@11: * Libav is free software; you can redistribute it and/or yading@11: * modify it under the terms of the GNU Lesser General Public yading@11: * License as published by the Free Software Foundation; either yading@11: * version 2.1 of the License, or (at your option) any later version. yading@11: * yading@11: * Libav is distributed in the hope that it will be useful, yading@11: * but WITHOUT ANY WARRANTY; without even the implied warranty of yading@11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU yading@11: * Lesser General Public License for more details. yading@11: * yading@11: * You should have received a copy of the GNU Lesser General Public yading@11: * License along with Libav; if not, write to the Free Software yading@11: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA yading@11: */ yading@11: yading@11: /** yading@11: * mov 'chan' tag reading/writing. yading@11: * @author Justin Ruggles yading@11: */ yading@11: yading@11: #ifndef AVFORMAT_MOV_CHAN_H yading@11: #define AVFORMAT_MOV_CHAN_H yading@11: yading@11: #include yading@11: yading@11: #include "libavcodec/avcodec.h" yading@11: #include "avformat.h" yading@11: yading@11: /** yading@11: * Get the channel layout for the specified channel layout tag. yading@11: * yading@11: * @param[in] tag channel layout tag yading@11: * @param[out] bitmap channel bitmap (only used if needed) yading@11: * @return channel layout yading@11: */ yading@11: uint64_t ff_mov_get_channel_layout(uint32_t tag, uint32_t bitmap); yading@11: yading@11: /** yading@11: * Get the channel layout tag for the specified codec id and channel layout. yading@11: * If the layout tag was not found, use a channel bitmap if possible. yading@11: * yading@11: * @param[in] codec_id codec id yading@11: * @param[in] channel_layout channel layout yading@11: * @param[out] bitmap channel bitmap yading@11: * @return channel layout tag yading@11: */ yading@11: uint32_t ff_mov_get_channel_layout_tag(enum AVCodecID codec_id, yading@11: uint64_t channel_layout, yading@11: uint32_t *bitmap); yading@11: yading@11: /** yading@11: * Read 'chan' tag from the input stream. yading@11: * yading@11: * @param s AVFormatContext yading@11: * @param pb AVIOContext yading@11: * @param st The stream to set codec values for yading@11: * @param size Remaining size in the 'chan' tag yading@11: * @return 0 if ok, or negative AVERROR code on failure yading@11: */ yading@11: int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st, yading@11: int64_t size); yading@11: yading@11: #endif /* AVFORMAT_MOV_CHAN_H */