1 /* 2 * Copyright (c) 2024 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 CAMERA_DEMUXER_FUZZER_H 17 #define CAMERA_DEMUXER_FUZZER_H 18 19 #include "demuxer.h" 20 21 namespace OHOS { 22 namespace CameraStandard { 23 using namespace DeferredProcessing; 24 class CameraDemuxerFuzzer { 25 public: 26 static std::shared_ptr<Demuxer> fuzz_; 27 28 class AVSourceTest : public AVSource { 29 public: GetSourceFormat(OHOS::Media::Format & format)30 int32_t GetSourceFormat(OHOS::Media::Format &format) override 31 { 32 return 0; 33 } GetTrackFormat(OHOS::Media::Format & format,uint32_t trackIndex)34 int32_t GetTrackFormat(OHOS::Media::Format &format, uint32_t trackIndex) override 35 { 36 return 0; 37 } GetUserMeta(OHOS::Media::Format & format)38 int32_t GetUserMeta(OHOS::Media::Format &format) override 39 { 40 return 0; 41 } 42 }; 43 44 static void CameraDemuxerFuzzTest(); 45 }; 46 47 } //CameraStandard 48 } //OHOS 49 #endif //CAMERA_DEMUXER_FUZZER_H