SkyWay Linux SDK
読み取り中…
検索中…
一致する文字列を見つけられません
device_manager.hpp
1//
2// © NTT DOCOMO BUSINESS, Inc. All Rights Reserved.
3//
4
5#ifndef SKYWAY_MEDIA_DEVICE_MANAGER_HPP_
6#define SKYWAY_MEDIA_DEVICE_MANAGER_HPP_
7
8#include <api/create_peerconnection_factory.h>
9#include <api/media_stream_interface.h>
10#include <audio/audio_transport_impl.h>
11#include <common_audio/resampler/include/push_resampler.h>
12#include <modules/audio_device/include/audio_device.h>
13#include <modules/audio_mixer/audio_mixer_impl.h>
14#include <modules/video_capture/video_capture.h>
15#include <pc/local_audio_source.h>
16
17#include "skyway/global/logger.hpp"
18
19namespace skyway {
20namespace media {
21
23enum class AudioBackendType {
25 kPulseAudio,
27 kNone,
28};
29
32public:
34 struct AudioDevice {
35 int index;
36 std::string name;
37 };
39 struct VideoDevice {
40 int index;
41 std::string name;
42 std::string unique_id;
43 webrtc::VideoCaptureCapability capability;
44 };
46 static std::vector<AudioDevice> GetRecordDevices();
47
49 static std::vector<AudioDevice> GetPlayoutDevices();
50
52 static std::vector<VideoDevice> GetVideoDevices();
53
55 static bool SetRecordingDevice(AudioDevice device);
56
58 static bool SetPlayoutDevice(AudioDevice device);
59
61 static void Init(AudioBackendType audio_backend, skyway::global::Logger *logger);
62 static rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> GetPeerConnectionFactory();
63 static void Dispose();
64 static rtc::scoped_refptr<webrtc::AudioTrackInterface> CreateAudioTrack();
65 static rtc::scoped_refptr<webrtc::AudioTrackInterface> CreateAudioTrack(
66 rtc::scoped_refptr<webrtc::AudioSourceInterface> source);
67 static rtc::scoped_refptr<webrtc::VideoTrackInterface> CreateVideoTrack(
68 rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> source);
69 static AudioBackendType GetAudioBackend();
71
72private:
73 static rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> peer_connection_factory_;
74 static rtc::scoped_refptr<webrtc::AudioDeviceModule> adm_;
75 static std::unique_ptr<rtc::Thread> signaling_thread_;
76 static std::unique_ptr<rtc::Thread> worker_thread_;
77 static std::unique_ptr<webrtc::TaskQueueFactory> task_queue_factory_;
78 static AudioBackendType audio_backend_;
79};
80
81} // namespace media
82} // namespace skyway
83
84#endif /* SKYWAY_MEDIA_DEVICE_MANAGER_HPP_ */
SkyWayのログを出力するクラス
Definition logger.hpp:18
デバイスの情報を取得するクラス
Definition device_manager.hpp:31
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:34
映像デバイス
Definition device_manager.hpp:39