Refactor parameter passing to decoders and split backend/decode-only and frontend renderers

This commit is contained in:
Cameron Gutman
2019-04-11 22:27:20 -07:00
parent 9dcd770df2
commit 25e5175c54
16 changed files with 173 additions and 168 deletions

View File

@@ -32,17 +32,15 @@ SLVideoDecoder::getDecoderCapabilities()
}
bool
SLVideoDecoder::initialize(StreamingPreferences::VideoDecoderSelection vds,
SDL_Window*,
int videoFormat, int, int, int frameRate, bool, bool)
SLVideoDecoder::initialize(PDECODER_PARAMETERS params)
{
// SLVideo only supports hardware decoding
if (vds == StreamingPreferences::VDS_FORCE_SOFTWARE) {
if (params->vds == StreamingPreferences::VDS_FORCE_SOFTWARE) {
return false;
}
// SLVideo only supports H.264
if (videoFormat != VIDEO_FORMAT_H264) {
if (params->videoFormat != VIDEO_FORMAT_H264) {
return false;
}
@@ -61,7 +59,7 @@ SLVideoDecoder::initialize(StreamingPreferences::VideoDecoderSelection vds,
return false;
}
SLVideo_SetStreamTargetFramerate(m_VideoStream, frameRate, 1);
SLVideo_SetStreamTargetFramerate(m_VideoStream, params->frameRate, 1);
return true;
}