• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-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 #ifdef OHOS_LITE
16 #include "test_recorder.hpp"
17 
18 using namespace OHOS::Media;
19 
20 class IRecorderEngine {};
21 
22 namespace OHOS::Media::Test {
23 class TestRecorderImpl : public TestRecorder {
24 public:
TestRecorderImpl(std::unique_ptr<IRecorderEngine> recorder)25     explicit TestRecorderImpl(std::unique_ptr<IRecorderEngine> recorder) {}
26     int32_t Configure(const AudioRecordSource& recordSource) override;
27     int32_t Prepare() override;
28     int32_t Start() override;
29     int32_t Pause() override;
30     int32_t Resume() override;
31     int32_t Stop() override;
32     int32_t GetRecordedFile(std::string& path) override;
33 };
34 
CreateAudioRecorder()35 std::unique_ptr<TestRecorder> TestRecorder::CreateAudioRecorder()
36 {
37     return nullptr;
38 }
39 
GetOutputDir()40 std::string TestRecorder::GetOutputDir()
41 {
42     return "";
43 }
44 
Configure(const AudioRecordSource & recordSource)45 int32_t TestRecorderImpl::Configure(const AudioRecordSource& recordSource)
46 {
47     return -1;
48 }
49 
Prepare()50 int32_t TestRecorderImpl::Prepare()
51 {
52     return -1;
53 }
54 
Start()55 int32_t TestRecorderImpl::Start()
56 {
57     return -1;
58 }
59 
Pause()60 int32_t TestRecorderImpl::Pause()
61 {
62     return -1;
63 }
64 
Resume()65 int32_t TestRecorderImpl::Resume()
66 {
67     return -1;
68 }
69 
Stop()70 int32_t TestRecorderImpl::Stop()
71 {
72     return -1;
73 }
74 
75 // The file in output dir is the latest recorded file.
GetRecordedFile(std::string & path)76 int32_t TestRecorderImpl::GetRecordedFile(std::string& path)
77 {
78     return 0;
79 }
80 }
81 #endif