• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
19 extern "C" {
20 #endif
21 // only for demo
22 struct AudioTrackParam {
23     const char *fileName;
24     const char *mimeType;
25     int sampleRate;
26     int channels;
27     int frameSize;
28 };
29 
30 struct VideoTrackParam {
31     const char *fileName;
32     const char *mimeType;
33     int width;
34     int height;
35     double frameRate;
36     int videoDelay;
37 };
38 
39 struct FdListStr {
40     int start[0];
41     int outputFd;
42     int inAudioFd;
43     int inVideoFd;
44     int inCoverFd;
45 };
46 
47 extern struct AudioTrackParam g_audioMpegPar;
48 extern struct AudioTrackParam g_audioAacPar;
49 extern struct VideoTrackParam g_videoH264Par;
50 extern struct VideoTrackParam g_videoMpeg4Par;
51 extern struct VideoTrackParam g_videoH265Par;
52 extern struct VideoTrackParam g_jpegCoverPar;
53 extern struct VideoTrackParam g_pngCoverPar;
54 extern struct VideoTrackParam g_bmpCoverPar;
55 extern const char *RUN_NORMAL;
56 extern const char *RUN_MUL_THREAD;
57 
58 long long GetTimestamp(void);
59 #ifdef __cplusplus
60 }
61 #endif
62 #endif