• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 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 ENUM_MOCK_H
17 #define ENUM_MOCK_H
18 
19 #include <string>
20 #include "nocopyable.h"
21 
22 namespace OHOS {
23 namespace Media {
24 enum MediaDescriptionKeyMock : int32_t {
25     MOCK_MD_KEY_TRACK_INDEX = 0,
26     MOCK_MD_KEY_TRACK_TYPE,
27     MOCK_MD_KEY_CODEC_MIME,
28     MOCK_MD_KEY_DURATION,
29     MOCK_MD_KEY_BITRATE,
30     MOCK_MD_KEY_WIDTH,
31     MOCK_MD_KEY_HEIGHT,
32     MOCK_MD_KEY_PIXEL_FORMAT,
33     MOCK_MD_KEY_FRAME_RATE,
34     MOCK_MD_KEY_CHANNEL_COUNT,
35     MOCK_MD_KEY_SAMPLE_RATE,
36 };
37 
38 enum VideoPixelFormatMock : int32_t {
39     MOCK_YUVI420 = 1,
40     MOCK_NV12,
41     MOCK_NV21,
42     MOCK_SURFACE_FORMAT,
43     MOCK_RGBA,
44 };
45 
46 enum CodecMimeTypeMock : int32_t {
47     VIDEO_H263 = 0,
48     VIDEO_AVC,
49     VIDEO_MPEG2,
50     VIDEO_HEVC,
51     VIDEO_MPEG4,
52     VIDEO_VP8,
53     VIDEO_VP9,
54     AUDIO_AMR_NB,
55     AUDIO_AMR_WB,
56     AUDIO_MPEG,
57     AUDIO_AAC,
58     AUDIO_VORBIS,
59     AUDIO_OPUS,
60     AUDIO_FLAC,
61     AUDIO_RAW,
62 };
63 
64 class EnumMock : public NoCopyable {
65 public:
66     virtual ~EnumMock() = default;
67     virtual std::string GetMediaDescriptionKey(const MediaDescriptionKeyMock &key) const = 0;
68     virtual int32_t GetVideoPixelFormat(const VideoPixelFormatMock &key) const = 0;
69     virtual std::string GetCodecMimeType(const CodecMimeTypeMock &key) const = 0;
70 };
71 } // Media
72 } // OHOS
73 #endif // ENUM_MOCK_H