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
No related tags found
No related merge requests found
...@@ -350,11 +350,16 @@ HardwareAccel::getCompatibleAccel(AVCodecID id, int width, int height, CodecType ...@@ -350,11 +350,16 @@ HardwareAccel::getCompatibleAccel(AVCodecID id, int width, int height, CodecType
for (auto api : *list) { for (auto api : *list) {
const auto& it = std::find(api.supportedCodecs.begin(), api.supportedCodecs.end(), id); const auto& it = std::find(api.supportedCodecs.begin(), api.supportedCodecs.end(), id);
if (it != api.supportedCodecs.end()) { if (it != api.supportedCodecs.end()) {
auto accel = HardwareAccel(id, api.name, api.hwType, api.format, api.swFormat, type); auto hwtype = AV_HWDEVICE_TYPE_NONE;
accel.height_ = height; while ((hwtype = av_hwdevice_iterate_types(hwtype)) != AV_HWDEVICE_TYPE_NONE) {
accel.width_ = width; if (hwtype == api.hwType) {
accel.possible_devices_= api.possible_devices; auto accel = HardwareAccel(id, api.name, api.hwType, api.format, api.swFormat, type);
l.emplace_back(std::move(accel)); accel.height_ = height;
accel.width_ = width;
accel.possible_devices_= api.possible_devices;
l.emplace_back(std::move(accel));
}
}
} }
} }
return l; return l;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment