SkyWay Linux SDK
読み取り中…
検索中…
一致する文字列を見つけられません
device_manager.hpp
1//
2// device_manager.hpp
3// skyway
4//
5// Created by iorar on 2023/11/01.
6// Copyright © 2023 NTT Communications. All rights reserved.
7//
8
9#ifndef SKYWAY_MEDIA_DEVICE_MANAGER_HPP_
10#define SKYWAY_MEDIA_DEVICE_MANAGER_HPP_
11
12#include <api/create_peerconnection_factory.h>
13#include <api/media_stream_interface.h>
14#include <audio/audio_transport_impl.h>
15#include <common_audio/resampler/include/push_resampler.h>
16#include <modules/audio_device/include/audio_device.h>
17#include <modules/audio_mixer/audio_mixer_impl.h>
18#include <modules/video_capture/video_capture.h>
19#include <pc/local_audio_source.h>
20
21namespace skyway {
22namespace media {
23
26public:
28 struct AudioDevice {
29 int index;
30 std::string name;
31 };
33 struct VideoDevice {
34 int index;
35 std::string name;
36 std::string unique_id;
37 webrtc::VideoCaptureCapability capability;
38 };
40 static std::vector<AudioDevice> GetRecordDevices();
41
43 static std::vector<AudioDevice> GetPlayoutDevices();
44
46 static std::vector<VideoDevice> GetVideoDevices();
47
49 static bool SetRecordingDevice(AudioDevice device);
50
52 static bool SetPlayoutDevice(AudioDevice device);
53
55 static rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> GetPeerConnectionFactory();
56 static rtc::scoped_refptr<webrtc::AudioTrackInterface> CreateAudioTrack();
57 static rtc::scoped_refptr<webrtc::VideoTrackInterface> CreateVideoTrack(
58 rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> source);
60
61private:
62 static rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> peer_connection_factory_;
63 static rtc::scoped_refptr<webrtc::AudioDeviceModule> adm_;
64 static rtc::Thread *signaling_thread_;
65 static rtc::Thread *worker_thread_;
66 static std::unique_ptr<webrtc::TaskQueueFactory> task_queue_factory_;
67};
68
69} // namespace media
70} // namespace skyway
71
72#endif /* SKYWAY_MEDIA_DEVICE_MANAGER_HPP_ */
デバイスの情報を取得するクラス
Definition device_manager.hpp:25
static bool SetPlayoutDevice(AudioDevice device)
利用する音声出力デバイスの設定します。
static std::vector< AudioDevice > GetPlayoutDevices()
利用する音声出力デバイスの一覧を取得します。
static std::vector< AudioDevice > GetRecordDevices()
利用する音声入力デバイスの一覧を取得します。
static bool SetRecordingDevice(AudioDevice device)
利用する音声入力デバイスの設定します。
static std::vector< VideoDevice > GetVideoDevices()
利用する映像入力デバイスの一覧を取得します。
音声デバイス
Definition device_manager.hpp:28
映像デバイス
Definition device_manager.hpp:33