SkyWay Linux SDK
読み取り中…
検索中…
一致する文字列を見つけられません
v4l2_capturer_video_source.hpp
1//
2// capturer_video_source.hpp
3// skyway
4//
5// Created by iorar on 2023/11/15.
6// Copyright © 2023 NTT Communications. All rights reserved.
7//
8
9#ifndef SKYWAY_MEDIA_V4L2_CAPTURER_VIDEO_SOURCE_HPP_
10#define SKYWAY_MEDIA_V4L2_CAPTURER_VIDEO_SOURCE_HPP_
11
12#include "skyway/media/interface/capturer_video_source.hpp"
13
14namespace skyway {
15namespace media {
16
18class V4l2CapturerVideoSource : public interface::InternalCapturerVideoSource {
19public:
20 ~V4l2CapturerVideoSource();
21
22 static rtc::scoped_refptr<V4l2CapturerVideoSource> Create(
23 const std::string& device_unique_id, webrtc::VideoCaptureCapability device_capability);
24
25 // rtc::VideoSourceInterface
26 bool is_screencast() const override;
27 absl::optional<bool> needs_denoising() const override;
28 webrtc::MediaSourceInterface::SourceState state() const override;
29 bool remote() const override;
30
31 // rtc::VideoSinkInterface
32 void OnFrame(const webrtc::VideoFrame& frame) override;
33
34protected:
35 V4l2CapturerVideoSource();
36
37private:
38 bool Init(const std::string& device_unique_id,
39 webrtc::VideoCaptureCapability device_capability);
40 void Destroy();
41 rtc::scoped_refptr<webrtc::VideoCaptureModule> vcm_;
42};
44
45} // namespace media
46} // namespace skyway
47
48#endif /* SKYWAY_MEDIA_CAPTURER_VIDEO_SOURCE_ */