1/* 2 * Copyright (C) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16#ifndef AVMUXER_DEMO_COMMON_H 17#define AVMUXER_DEMO_COMMON_H 18#ifdef __cplusplus 19extern "C" { 20#endif 21// only for demo 22struct AudioTrackParam { 23 const char *fileName; 24 const char *mimeType; 25 int sampleRate; 26 int channels; 27 int frameSize; 28}; 29 30struct VideoTrackParam { 31 const char *fileName; 32 const char *mimeType; 33 int width; 34 int height; 35 double frameRate; 36 int videoDelay; 37 int colorPrimaries; 38 int colorTransfer; 39 int colorMatrixCoeff; 40 int colorRange; 41 int isHdrVivid; 42}; 43 44struct FdListStr { 45 int start[0]; 46 int outputFd; 47 int inAudioFd; 48 int inVideoFd; 49 int inCoverFd; 50}; 51 52extern struct AudioTrackParam g_audioMpegPar; 53extern struct AudioTrackParam g_audioAacPar; 54extern struct AudioTrackParam g_audioAmrNbPar; 55extern struct AudioTrackParam g_audioAmrWbPar; 56extern struct AudioTrackParam g_audioG711MUPar; 57extern struct AudioTrackParam g_audioRawPar; 58extern struct VideoTrackParam g_videoH264Par; 59extern struct VideoTrackParam g_videoMpeg4Par; 60extern struct VideoTrackParam g_videoH265Par; 61extern struct VideoTrackParam g_videoHdrPar; 62extern struct VideoTrackParam g_jpegCoverPar; 63extern struct VideoTrackParam g_pngCoverPar; 64extern struct VideoTrackParam g_bmpCoverPar; 65extern const char *RUN_NORMAL; 66extern const char *RUN_MUL_THREAD; 67 68long long GetTimestamp(void); 69#ifdef __cplusplus 70} 71#endif 72#endif