Overhaul platform and decoder/renderer detection

This commit is contained in:
Cameron Gutman
2018-07-21 17:00:09 -07:00
parent c816a6198c
commit eb536c2273
4 changed files with 50 additions and 27 deletions

View File

@@ -82,6 +82,7 @@ bool Session::chooseDecoder(StreamingPreferences::VideoDecoderSelection vds,
SDL_Window* window, int videoFormat, int width, int height,
int frameRate, IVideoDecoder*& chosenDecoder)
{
#ifdef HAVE_FFMPEG
chosenDecoder = new FFmpegVideoDecoder();
if (chosenDecoder->initialize(vds, window, videoFormat, width, height, frameRate)) {
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
@@ -94,6 +95,7 @@ bool Session::chooseDecoder(StreamingPreferences::VideoDecoderSelection vds,
delete chosenDecoder;
chosenDecoder = nullptr;
}
#endif
// If we reach this, we didn't initialize any decoders successfully
return false;