SkyWay Linux SDK
読み取り中…
検索中…
一致する文字列を見つけられません
device_manager.hpp
1#ifndef SKYWAY_MEDIA_DEVICE_MANAGER_HPP_
2#define SKYWAY_MEDIA_DEVICE_MANAGER_HPP_
3
4#include <api/create_peerconnection_factory.h>
5#include <api/media_stream_interface.h>
6#include <audio/audio_transport_impl.h>
7#include <common_audio/resampler/include/push_resampler.h>
8#include <modules/audio_device/include/audio_device.h>
9#include <modules/audio_mixer/audio_mixer_impl.h>
10#include <modules/video_capture/video_capture.h>
11#include <pc/local_audio_source.h>
12
13#include "skyway/global/logger.hpp"
15
16namespace skyway {
17namespace media {
18
21public:
23 struct AudioDevice {
24 int index;
25 std::string name;
26 };
28 struct VideoDevice {
29 int index;
30 std::string name;
31 std::string unique_id;
37 [[deprecated(
38 "This field is not used for actual capture. "
39 "Use StreamFactory::CaptureOptions when specifying capture settings.")]] webrtc::
40 VideoCaptureCapability capability;
41 };
43 static std::vector<AudioDevice> GetRecordDevices();
44
46 static std::vector<AudioDevice> GetPlayoutDevices();
47
49 static std::vector<VideoDevice> GetVideoDevices();
50
52 static bool SetRecordingDevice(AudioDevice device);
53
55 static bool SetPlayoutDevice(AudioDevice device);
56
58 static void Init(AudioBackendType audio_backend,
59 const AudioProcessingOptions &audio_processing_options,
61 static rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> GetPeerConnectionFactory();
62 static void Dispose();
63 static rtc::scoped_refptr<webrtc::AudioTrackInterface> CreateAudioTrack();
64 static rtc::scoped_refptr<webrtc::AudioTrackInterface> CreateAudioTrack(
65 rtc::scoped_refptr<webrtc::AudioSourceInterface> source);
66 static rtc::scoped_refptr<webrtc::VideoTrackInterface> CreateVideoTrack(
67 rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> source);
68 static AudioBackendType GetAudioBackend();
70
71private:
72 static rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> peer_connection_factory_;
73 static rtc::scoped_refptr<webrtc::AudioDeviceModule> adm_;
74 static std::unique_ptr<rtc::Thread> signaling_thread_;
75 static std::unique_ptr<rtc::Thread> worker_thread_;
76 static std::unique_ptr<webrtc::TaskQueueFactory> task_queue_factory_;
77 static AudioBackendType audio_backend_;
78};
79
80} // namespace media
81} // namespace skyway
82
83#endif /* SKYWAY_MEDIA_DEVICE_MANAGER_HPP_ */
SkyWayのログを出力するクラス
Definition logger.hpp:16
デバイスの情報を取得するクラス
Definition device_manager.hpp:20
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()
利用する映像入力デバイスの一覧を取得します。
メディアに関する型を定義するヘッダーファイル
AudioBackendType
オーディオバックエンドの種類
Definition types.hpp:11
音声処理に関する設定
Definition types.hpp:19
音声デバイス
Definition device_manager.hpp:23
映像デバイス
Definition device_manager.hpp:28
webrtc::VideoCaptureCapability capability
映像入力デバイスの列挙時に取得した先頭の設定候補です。
Definition device_manager.hpp:40