Skip to content
Snippets Groups Projects
Commit c6ab78a0 authored by Pierre Lespagnol's avatar Pierre Lespagnol Committed by Adrien Béraud
Browse files

accel: filter accel APIs by platform

Use ffmpeg flags

Change-Id: I86246e86d3c7038825fc4416789d7b62a2f260a4
parent 18751c3c
Branches
Tags
No related merge requests found
......@@ -350,6 +350,9 @@ HardwareAccel::getCompatibleAccel(AVCodecID id, int width, int height, CodecType
for (auto api : *list) {
const auto& it = std::find(api.supportedCodecs.begin(), api.supportedCodecs.end(), id);
if (it != api.supportedCodecs.end()) {
auto hwtype = AV_HWDEVICE_TYPE_NONE;
while ((hwtype = av_hwdevice_iterate_types(hwtype)) != AV_HWDEVICE_TYPE_NONE) {
if (hwtype == api.hwType) {
auto accel = HardwareAccel(id, api.name, api.hwType, api.format, api.swFormat, type);
accel.height_ = height;
accel.width_ = width;
......@@ -357,6 +360,8 @@ HardwareAccel::getCompatibleAccel(AVCodecID id, int width, int height, CodecType
l.emplace_back(std::move(accel));
}
}
}
}
return l;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment