1cabdff1aSopenharmony_ci/* 2cabdff1aSopenharmony_ci * Copyright (c) 2016 Google Inc. 3cabdff1aSopenharmony_ci * Copyright (c) 2016 KongQun Yang (kqyang@google.com) 4cabdff1aSopenharmony_ci * 5cabdff1aSopenharmony_ci * This file is part of FFmpeg. 6cabdff1aSopenharmony_ci * 7cabdff1aSopenharmony_ci * FFmpeg is free software; you can redistribute it and/or 8cabdff1aSopenharmony_ci * modify it under the terms of the GNU Lesser General Public 9cabdff1aSopenharmony_ci * License as published by the Free Software Foundation; either 10cabdff1aSopenharmony_ci * version 2.1 of the License, or (at your option) any later version. 11cabdff1aSopenharmony_ci * 12cabdff1aSopenharmony_ci * FFmpeg is distributed in the hope that it will be useful, 13cabdff1aSopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of 14cabdff1aSopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15cabdff1aSopenharmony_ci * Lesser General Public License for more details. 16cabdff1aSopenharmony_ci * 17cabdff1aSopenharmony_ci * You should have received a copy of the GNU Lesser General Public 18cabdff1aSopenharmony_ci * License along with FFmpeg; if not, write to the Free Software 19cabdff1aSopenharmony_ci * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20cabdff1aSopenharmony_ci */ 21cabdff1aSopenharmony_ci 22cabdff1aSopenharmony_ci/** 23cabdff1aSopenharmony_ci * @file 24cabdff1aSopenharmony_ci * internal header for VPx codec configuration utilities. 25cabdff1aSopenharmony_ci */ 26cabdff1aSopenharmony_ci 27cabdff1aSopenharmony_ci#ifndef AVFORMAT_VPCC_H 28cabdff1aSopenharmony_ci#define AVFORMAT_VPCC_H 29cabdff1aSopenharmony_ci 30cabdff1aSopenharmony_ci#include "libavutil/rational.h" 31cabdff1aSopenharmony_ci#include "libavcodec/codec_par.h" 32cabdff1aSopenharmony_ci#include "avio.h" 33cabdff1aSopenharmony_ci#include "avformat.h" 34cabdff1aSopenharmony_ci 35cabdff1aSopenharmony_citypedef struct VPCC { 36cabdff1aSopenharmony_ci int profile; 37cabdff1aSopenharmony_ci int level; 38cabdff1aSopenharmony_ci int bitdepth; 39cabdff1aSopenharmony_ci int chroma_subsampling; 40cabdff1aSopenharmony_ci int full_range_flag; 41cabdff1aSopenharmony_ci} VPCC; 42cabdff1aSopenharmony_ci 43cabdff1aSopenharmony_ci/** 44cabdff1aSopenharmony_ci * Writes VP codec configuration to the provided AVIOContext. 45cabdff1aSopenharmony_ci * 46cabdff1aSopenharmony_ci * @param s address of the AVFormatContext for the logging context. 47cabdff1aSopenharmony_ci * @param pb address of the AVIOContext where the vpcC shall be written. 48cabdff1aSopenharmony_ci * @param par address of the AVCodecParameters which contains codec information. 49cabdff1aSopenharmony_ci * @return >=0 in case of success, a negative value corresponding to an AVERROR 50cabdff1aSopenharmony_ci * code in case of failure 51cabdff1aSopenharmony_ci */ 52cabdff1aSopenharmony_ciint ff_isom_write_vpcc(AVFormatContext *s, AVIOContext *pb, 53cabdff1aSopenharmony_ci AVCodecParameters *par); 54cabdff1aSopenharmony_ci 55cabdff1aSopenharmony_ciint ff_isom_get_vpcc_features(AVFormatContext *s, AVCodecParameters *par, 56cabdff1aSopenharmony_ci AVRational *frame_rate, VPCC *vpcc); 57cabdff1aSopenharmony_ci 58cabdff1aSopenharmony_ci#endif /* AVFORMAT_VPCC_H */ 59