-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS では USB で接続されたカメラも取得する #44
Conversation
src/mac/mac_capturer.mm
Outdated
@@ -91,9 +91,24 @@ - (void)capturer:(RTCVideoCapturer*)capturer | |||
return rtc::make_ref_counted<MacCapturer>(c); | |||
} | |||
|
|||
NSArray<AVCaptureDevice*>* captureDevices() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@melpon
EnumVideoDevice のように MacCapturer のプライベート・メソッドとして定義しようとしたのですが、その場合ヘッダーファイルの修正が必要でした (NSArray を利用しているためです)。
ヘッダーファイルの修正を避けるために captureDevices をこのように定義していますが、問題があれば教えてください。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
このままだとグローバルに定義されちゃうので、static 関数として定義して下さい
src/mac/mac_capturer.mm
Outdated
@@ -91,9 +91,24 @@ - (void)capturer:(RTCVideoCapturer*)capturer | |||
return rtc::make_ref_counted<MacCapturer>(c); | |||
} | |||
|
|||
NSArray<AVCaptureDevice*>* captureDevices() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
このままだとグローバルに定義されちゃうので、static 関数として定義して下さい
src/mac/mac_capturer.mm
Outdated
// return session.devices; | ||
return [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]; | ||
#else | ||
return [RTCCameraVideoCapturer captureDevices]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これ macOS 以外は RTCCameraVideoCapturer に渡してますけど、libwebrtc のデバイス列挙の処理が変わったらまた問題起きるかもなので、iOS の場合も自作した方が良さそうな気がします
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
レビューありがとうございます
修正しました
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
よさそう
確認ありがとうございました、マージします。 |
ローカルの CPP SDK を参照してビルドするためのオプションを追加する
No description provided.