1 /** 2 * Copyright (C) 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef BINARYFORMAT_H_INCLUDED 18 #define BINARYFORMAT_H_INCLUDED 19 20 #include <stdint.h> 21 22 enum eBinaryFormat 23 { 24 BINARY_FORMAT_BASE16 = 0, // mpeg4 25 BINARY_FORMAT_BASE32, // not used 26 BINARY_FORMAT_BASE64, // avc/hevc 27 BINARY_FORMAT_MAX 28 }; // RFC 3548 29 30 class ImsMediaBinaryFormat 31 { 32 public: 33 static bool BinaryToBase00(char* pszDst, uint32_t nDstBuffSize, uint8_t* pbSrc, 34 uint32_t nSrcSize, uint32_t eFormat); 35 static bool Base00ToBinary(uint8_t* pbDst, uint32_t* pnDstSize, uint32_t nDstBuffSize, 36 char* pszSrc, uint32_t eFormat); 37 }; 38 39 #endif // BINARYFORMAT_H_INCLUDED 40