• 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 AVMETADATAHELPER_DEMO_H
17 #define AVMETADATAHELPER_DEMO_H
18 
19 #include <queue>
20 #include <string_view>
21 #include "nocopyable.h"
22 #include "avmetadatahelper.h"
23 
24 namespace OHOS {
25 namespace Media {
26 class AVMetadataHelperDemo : public NoCopyable {
27 public:
28     AVMetadataHelperDemo() = default;
29     ~AVMetadataHelperDemo() = default;
30     void RunCase(const std::string &pathOuter);
31 
32 private:
33     int32_t SetSource(const std::string &pathOuter);
34     void GetMetadata(std::queue<std::string_view> &options);
35     void FetchFrame(std::queue<std::string_view> &options);
36     void FetchArtPicture(std::queue<std::string_view> &option);
37     void DoFetchFrame(int64_t timeUs, int32_t queryOption, const PixelMapParams &param);
38     void DoNext();
39     std::shared_ptr<AVMetadataHelper> avMetadataHelper_;
40 };
41 } // namespace Media
42 } // namespace OHOS
43 #endif // AVMETADATAHELPER_DEMO_H
44