• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 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 I_AVMUXER_SERVICE_H
17 #define I_AVMUXER_SERVICE_H
18 
19 #include <string>
20 #include <vector>
21 #include <memory>
22 #include "avsharedmemory.h"
23 #include "avcontainer_common.h"
24 #include "media_description.h"
25 
26 namespace OHOS {
27 namespace Media {
28 class IAVMuxerService {
29 public:
30     virtual ~IAVMuxerService() = default;
31 
32     virtual std::vector<std::string> GetAVMuxerFormatList() = 0;
33     virtual int32_t SetOutput(int32_t fd, const std::string &format) = 0;
34     virtual int32_t SetLocation(float latitude, float longtitude) = 0;
35     virtual int32_t SetRotation(int32_t rotation) = 0;
36     virtual int32_t AddTrack(const MediaDescription &trackDesc, int32_t &trackIdx) = 0;
37     virtual int32_t Start() = 0;
38     virtual int32_t WriteTrackSample(std::shared_ptr<AVSharedMemory> sampleData, const TrackSampleInfo &sampleInfo) = 0;
39     virtual int32_t Stop() = 0;
40     virtual void Release() = 0;
41 };
42 } // namespace Media
43 } // namespace OHOS
44 #endif // I_AVMUXER_SERVICE_H