SkyWay Linux SDK
読み取り中…
検索中…
一致する文字列を見つけられません
stream_base.hpp
1#ifndef SKYWAY_MEDIA_STREAM_ABSTRACT_STREAM_BASE_HPP_
2#define SKYWAY_MEDIA_STREAM_ABSTRACT_STREAM_BASE_HPP_
3
4#include <memory>
5#include <string>
6
7#include "skyway/domain/core_convert_helper.hpp"
8
9namespace skyway {
10namespace media {
11namespace stream {
12namespace abstract {
13
14template <typename InterfaceT, typename CoreInterfaceT, typename CoreT>
15class StreamBase : public InterfaceT {
16public:
18 std::string Id() override { return core_->Id(); }
19
21 domain::Side Side() override {
22 return domain::core_convert_helper::ConvertToPlatformSide(core_->Side());
23 }
24
27 return domain::core_convert_helper::ConvertToPlatformContentType(core_->ContentType());
28 }
29
31 std::shared_ptr<CoreInterfaceT> GetCore() override { return core_; }
33
34protected:
36 explicit StreamBase(std::shared_ptr<CoreT> core) : core_(core) {}
37 std::shared_ptr<CoreT> core_;
39};
40
41} // namespace abstract
42} // namespace stream
43} // namespace media
44} // namespace skyway
45
46#endif // SKYWAY_MEDIA_STREAM_ABSTRACT_STREAM_BASE_HPP_
Definition stream_base.hpp:15
domain::Side Side() override
Side(LocalかRemoteか)を取得します。
Definition stream_base.hpp:21
std::string Id() override
Idを取得します。
Definition stream_base.hpp:18
domain::ContentType ContentType() override
ContentType(VideoかAudioかDataか)を取得します。
Definition stream_base.hpp:26
ContentType
コンテンツの種類
Definition domain.hpp:22
Side
Streamの所在(LocalかRemoteか)
Definition domain.hpp:13