Replace qsv with videotoolbox for MacOS codec library.

Windows and MacOS is not tested! We need users who test it.
This commit is contained in:
eisneinechse
2019-04-18 16:41:11 -07:00
parent b3f5406db3
commit 19f5fa37f2
2 changed files with 9 additions and 9 deletions

View File

@@ -211,12 +211,12 @@ void FFmpegWriter::SetVideoOptions(bool has_video, string codec, Fraction fps, i
}
}
#elif defined(__APPLE__)
if ( (strcmp(codec.c_str(),"h264_qsv") == 0)) {
if ( (strcmp(codec.c_str(),"h264_videotoolbox") == 0)) {
new_codec = avcodec_find_encoder_by_name(codec.c_str());
hw_en_on = 1;
hw_en_supported = 1;
hw_en_av_pix_fmt = AV_PIX_FMT_QSV;
hw_en_av_device_type = AV_HWDEVICE_TYPE_QSV;
hw_en_av_pix_fmt = AV_PIX_FMT_VIDEOTOOLBOX;
hw_en_av_device_type = AV_HWDEVICE_TYPE_VIDEOTOOLBOX;
}
else {
new_codec = avcodec_find_encoder_by_name(codec.c_str());