mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
Add global hardware acceleration codec switch
This commit is contained in:
@@ -7,11 +7,11 @@ VideoDecoderFactory::VideoDecoderFactory() {}
|
||||
|
||||
VideoDecoderFactory::~VideoDecoderFactory() {}
|
||||
|
||||
VideoDecoder *VideoDecoderFactory::CreateVideoDecoder(
|
||||
std::unique_ptr<VideoDecoder> VideoDecoderFactory::CreateVideoDecoder(
|
||||
bool hardware_acceleration) {
|
||||
if (hardware_acceleration) {
|
||||
return new NvidiaVideoDecoder();
|
||||
return std::make_unique<NvidiaVideoDecoder>(NvidiaVideoDecoder());
|
||||
} else {
|
||||
return new FfmpegVideoDecoder();
|
||||
return std::make_unique<FfmpegVideoDecoder>(FfmpegVideoDecoder());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user