1fa7767c5Sopenharmony_ci/*
2fa7767c5Sopenharmony_ci * Copyright (c) 2021-2021 Huawei Device Co., Ltd.
3fa7767c5Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4fa7767c5Sopenharmony_ci * you may not use this file except in compliance with the License.
5fa7767c5Sopenharmony_ci * You may obtain a copy of the License at
6fa7767c5Sopenharmony_ci *
7fa7767c5Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8fa7767c5Sopenharmony_ci *
9fa7767c5Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10fa7767c5Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11fa7767c5Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12fa7767c5Sopenharmony_ci * See the License for the specific language governing permissions and
13fa7767c5Sopenharmony_ci * limitations under the License.
14fa7767c5Sopenharmony_ci */
15fa7767c5Sopenharmony_ci
16fa7767c5Sopenharmony_ci#ifndef HISTREAMER_UTDEMUXERTEST2_H
17fa7767c5Sopenharmony_ci#define HISTREAMER_UTDEMUXERTEST2_H
18fa7767c5Sopenharmony_ci
19fa7767c5Sopenharmony_ci
20fa7767c5Sopenharmony_ci#include "plugin/interface/demuxer_plugin.h"
21fa7767c5Sopenharmony_ci
22fa7767c5Sopenharmony_cinamespace OHOS {
23fa7767c5Sopenharmony_cinamespace Media {
24fa7767c5Sopenharmony_cinamespace Plugin {
25fa7767c5Sopenharmony_ciclass UtDemuxerTest2 : public DemuxerPlugin {
26fa7767c5Sopenharmony_cipublic:
27fa7767c5Sopenharmony_ci    explicit UtDemuxerTest2(std::string name) : DemuxerPlugin(std::move(name))
28fa7767c5Sopenharmony_ci    {
29fa7767c5Sopenharmony_ci    }
30fa7767c5Sopenharmony_ci
31fa7767c5Sopenharmony_ci    ~UtDemuxerTest2() override = default;
32fa7767c5Sopenharmony_ci
33fa7767c5Sopenharmony_ci    Status SetDataSource(const std::shared_ptr<DataSource> &source) override;
34fa7767c5Sopenharmony_ci
35fa7767c5Sopenharmony_ci    Status GetMediaInfo(MediaInfo &mediaInfo) override;
36fa7767c5Sopenharmony_ci
37fa7767c5Sopenharmony_ci    size_t GetTrackCount() override;
38fa7767c5Sopenharmony_ci
39fa7767c5Sopenharmony_ci    Status SelectTrack(int32_t trackId) override;
40fa7767c5Sopenharmony_ci
41fa7767c5Sopenharmony_ci    Status UnselectTrack(int32_t trackId) override;
42fa7767c5Sopenharmony_ci
43fa7767c5Sopenharmony_ci    Status GetSelectedTracks(std::vector<int32_t> &trackIds) override;
44fa7767c5Sopenharmony_ci
45fa7767c5Sopenharmony_ci    Status ReadFrame(Buffer &buffer, int32_t timeOutMs) override;
46fa7767c5Sopenharmony_ci
47fa7767c5Sopenharmony_ci    Status SeekTo(int32_t trackId, int64_t seekTime, SeekMode mode, int64_t& realSeekTime) override;
48fa7767c5Sopenharmony_ci
49fa7767c5Sopenharmony_ci    std::shared_ptr<Allocator> GetAllocator() override;
50fa7767c5Sopenharmony_ci
51fa7767c5Sopenharmony_ci    Status SetCallback(Callback* cb) override;
52fa7767c5Sopenharmony_ci};
53fa7767c5Sopenharmony_ci} // namespace Plugin
54fa7767c5Sopenharmony_ci} // namespace Media
55fa7767c5Sopenharmony_ci} // namespace OHOS
56fa7767c5Sopenharmony_ci#endif // HISTREAMER_UTDEMUXERTEST2_H
57