Improve debugging messages

This commit is contained in:
Cameron Gutman 2018-07-28 16:06:26 -07:00
parent e39b5a6a72
commit df26f731eb
6 changed files with 27 additions and 0 deletions

View File

@ -142,6 +142,10 @@ int Session::sdlAudioInit(int /* audioConfiguration */,
s_SampleIndex = 0;
s_PendingDrops = s_PendingHardDrops = 0;
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
"Audio stream has %d channels",
opusConfig->channelCount);
return 0;
}

View File

@ -153,6 +153,9 @@ int Session::drSetup(int videoFormat, int width, int height, int frameRate, void
// don't have to hide and show the SDL window (which seems to
// cause pointer hiding to break on Windows).
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Video stream is %dx%dx%d (format 0x%x)",
width, height, frameRate, videoFormat);
return 0;
}
@ -254,6 +257,7 @@ Session::Session(NvComputer* computer, NvApp& app)
switch (m_Preferences.audioConfig)
{
case StreamingPreferences::AC_AUTO:
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Autodetecting audio configuration");
m_StreamConfig.audioConfiguration = sdlDetermineAudioConfiguration();
break;
case StreamingPreferences::AC_FORCE_STEREO:
@ -264,6 +268,10 @@ Session::Session(NvComputer* computer, NvApp& app)
break;
}
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
"Audio configuration: %d",
m_StreamConfig.audioConfiguration);
switch (m_Preferences.videoCodecConfig)
{
case StreamingPreferences::VCC_AUTO:

View File

@ -87,6 +87,9 @@ bool DXVA2Renderer::prepareDecoderContext(AVCodecContext* context)
return false;
}
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
"Using DXVA2 accelerated renderer");
return true;
}

View File

@ -23,6 +23,10 @@ SdlRenderer::~SdlRenderer()
bool SdlRenderer::prepareDecoderContext(AVCodecContext*)
{
/* Nothing to do */
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
"Using SDL software renderer");
return true;
}

View File

@ -88,6 +88,10 @@ bool
VAAPIRenderer::prepareDecoderContext(AVCodecContext* context)
{
context->hw_device_ctx = av_buffer_ref(m_HwContext);
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
"Using VAAPI accelerated renderer");
return true;
}

View File

@ -253,6 +253,10 @@ public:
virtual bool prepareDecoderContext(AVCodecContext* context) override
{
context->hw_device_ctx = av_buffer_ref(m_HwContext);
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
"Using VideoToolbox accelerated renderer");
return true;
}