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 DOCOMO BUSINESS, Inc. 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> CreatePeerConnectionFactory();
56 static void Dispose();
57 static rtc::scoped_refptr<webrtc::AudioTrackInterface> CreateAudioTrack();
58 static rtc::scoped_refptr<webrtc::VideoTrackInterface> CreateVideoTrack(
59 rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> source);
61
62private:
63 static rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> peer_connection_factory_;
64 static rtc::scoped_refptr<webrtc::AudioDeviceModule> adm_;
65 static std::unique_ptr<rtc::Thread> signaling_thread_;
66 static std::unique_ptr<rtc::Thread> worker_thread_;
67 static std::unique_ptr<webrtc::TaskQueueFactory> task_queue_factory_;
68};
69
70} // namespace media
71} // namespace skyway
72
73#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