Skip to content

Commit d9c0003

Browse files
committed
add more logs print for hw codec init.
1 parent 2fec778 commit d9c0003

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

webrtc-sys/src/nvidia/cuda_context.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@ bool CudaContext::Initialize() {
6363
// Initialize CUDA context
6464

6565
bool success = load_cuda_modules();
66-
if (!success)
66+
if (!success) {
67+
std::cout << "Failed to load CUDA modules. maybe the NVIDIA driver is not installed?" << std::endl;
6768
return false;
69+
}
6870

6971
int numDevices = 0;
7072
CUdevice cu_device = 0;

webrtc-sys/src/nvidia/nvidia_encoder_factory.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ bool NvidiaVideoEncoderFactory::IsSupported() {
3232
// Check if the CUDA context can be initialized.
3333
auto cu_context = std::make_unique<livekit::CudaContext>();
3434
if (!cu_context->Initialize()) {
35-
RTC_LOG(LS_ERROR) << "Failed to initialize CUDA context.";
35+
std::cout << "Failed to initialize CUDA context." << std::endl;
3636
return false;
3737
}
38+
39+
std::cout << "Nvidia Codec is supported." << std::endl;
3840
return true;
3941
}
4042

webrtc-sys/src/vaapi/vaapi_display_drm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ namespace livekit {
110110
bool VaapiDisplayDrm::Open() {
111111
va_display_ = va_open_display_drm(&drm_fd_);
112112
if (!va_display_) {
113-
fprintf(stderr, "Failed to open VA display\n");
113+
std::cout << "Failed to open VA display. Maybe the AMD video driver or libva-dev/libdrm-dev is not installed?" << std::endl;
114114
return false;
115115
}
116116
return true;

0 commit comments

Comments
 (0)