Skip to content

Commit

Permalink
extend logs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlapa committed Nov 13, 2024
1 parent 1eef623 commit 15eca9b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions crates/libwebrtc-sys/src/cpp/bridge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ std::unique_ptr<VideoTrackSourceInterface> create_device_video_source(
size_t height,
size_t fps,
uint32_t device) {
std::cout << "create_device_video_source #" << device << ", " << width << "x" << height << "x" << fps << "\n";
std::cout << "create_device_video_source #" << device << ", " << width << "x" << height << "x" << fps << std::endl;

#if __APPLE__
auto dvc = signaling_thread.BlockingCall([width, height, fps, device] {
Expand All @@ -98,14 +98,14 @@ std::unique_ptr<VideoTrackSourceInterface> create_device_video_source(
#endif

if (dvc == nullptr) {
std::cout << "create_device_video_source dvc == nullptr" << "\n";
std::cout << "create_device_video_source dvc == nullptr" << std::endl;
return nullptr;
}

auto src = webrtc::CreateVideoTrackSourceProxy(&signaling_thread,
&worker_thread, dvc.get());
if (src == nullptr) {
std::cout << "create_device_video_source src == nullptr" << "\n";
std::cout << "create_device_video_source src == nullptr" << std::endl;
return nullptr;
}

Expand Down
12 changes: 6 additions & 6 deletions crates/libwebrtc-sys/src/cpp/device_video_capturer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ rtc::scoped_refptr<DeviceVideoCapturer> DeviceVideoCapturer::Create(
size_t height,
size_t max_fps,
uint32_t device_index) {
std::cout << "DeviceVideoCapturer::Create" << "\n";
std::cout << "DeviceVideoCapturer::Create" << std::endl;

rtc::scoped_refptr<DeviceVideoCapturer> capturer(
new rtc::RefCountedObject<DeviceVideoCapturer>());

if (!capturer->Init(width, height, max_fps, device_index)) {
std::cout << "capturer->Init() == false" << "\n";
std::cout << "capturer->Init() == false" << std::endl;

RTC_LOG(LS_ERROR) << "Failed to create DeviceVideoCapturer(w = " << width
<< ", h = " << height << ", fps = " << max_fps << ")";
Expand All @@ -44,7 +44,7 @@ bool DeviceVideoCapturer::Init(size_t width,
size_t height,
size_t max_fps,
size_t capture_device_index) {
std::cout << "DeviceVideoCapturer::Init" << "\n";
std::cout << "DeviceVideoCapturer::Init" << std::endl;

std::unique_ptr<webrtc::VideoCaptureModule::DeviceInfo> device_info(
webrtc::VideoCaptureFactory::CreateDeviceInfo());
Expand All @@ -54,14 +54,14 @@ bool DeviceVideoCapturer::Init(size_t width,
if (device_info->GetDeviceName(static_cast<uint32_t>(capture_device_index),
device_name, sizeof(device_name), unique_name,
sizeof(unique_name)) != 0) {
std::cout << "DeviceVideoCapturer::Init GetDeviceName() != 0" << "\n";
std::cout << "DeviceVideoCapturer::Init GetDeviceName() != 0" << std::endl;
Destroy();
return false;
}

vcm_ = webrtc::VideoCaptureFactory::Create(unique_name);
if (!vcm_) {
std::cout << "DeviceVideoCapturer::Init !vcm_" << "\n";
std::cout << "DeviceVideoCapturer::Init !vcm_" << std::endl;
return false;
}
vcm_->RegisterCaptureDataCallback(this);
Expand All @@ -73,7 +73,7 @@ bool DeviceVideoCapturer::Init(size_t width,
capability_.videoType = webrtc::VideoType::kI420;

if (vcm_->StartCapture(capability_) != 0) {
std::cout << "DeviceVideoCapturer::Init vcm_->StartCapture() != 0" << "\n";
std::cout << "DeviceVideoCapturer::Init vcm_->StartCapture() != 0" << std::endl;

Destroy();
return false;
Expand Down

0 comments on commit 15eca9b

Please sign in to comment.