- }
-
- if (xml.hasAttribute("force_aspect_ratio")) {
- double aspect = xml.attribute("force_aspect_ratio").toDouble();
- if (aspect > 0) producer->set("force_aspect_ratio", aspect);
- }
-
- if (xml.hasAttribute("force_aspect_num") && xml.hasAttribute("force_aspect_den")) {
- int width = xml.attribute("frame_size").section('x', 0, 0).toInt();
- int height = xml.attribute("frame_size").section('x', 1, 1).toInt();
- int aspectNumerator = xml.attribute("force_aspect_num").toInt();
- int aspectDenominator = xml.attribute("force_aspect_den").toInt();
- if (aspectDenominator != 0 && width != 0)
- producer->set("force_aspect_ratio", double(height) * aspectNumerator / aspectDenominator / width);
- }
-
- if (xml.hasAttribute("force_fps")) {
- double fps = xml.attribute("force_fps").toDouble();
- if (fps > 0) producer->set("force_fps", fps);
- }
-
- if (xml.hasAttribute("force_progressive")) {
- bool ok;
- int progressive = xml.attribute("force_progressive").toInt(&ok);
- if (ok) producer->set("force_progressive", progressive);
- }
- if (xml.hasAttribute("force_tff")) {
- bool ok;
- int fieldOrder = xml.attribute("force_tff").toInt(&ok);
- if (ok) producer->set("force_tff", fieldOrder);
- }
- if (xml.hasAttribute("threads")) {
- int threads = xml.attribute("threads").toInt();
- if (threads != 1) producer->set("threads", threads);
- }
- if (xml.hasAttribute("video_index")) {
- int vindex = xml.attribute("video_index").toInt();
- if (vindex != 0) producer->set("video_index", vindex);
- }
- if (xml.hasAttribute("audio_index")) {
- int aindex = xml.attribute("audio_index").toInt();
- if (aindex != 0) producer->set("audio_index", aindex);
- }
- if (xml.hasAttribute("force_colorspace")) {
- int colorspace = xml.attribute("force_colorspace").toInt();
- if (colorspace != 0) producer->set("force_colorspace", colorspace);
- }
- if (xml.hasAttribute("full_luma")) {
- int full_luma = xml.attribute("full_luma").toInt();
- if (full_luma != 0) producer->set("set.force_full_luma", full_luma);
- }