| 491 | } |
| 492 | |
| 493 | bool FrameHandler::setFormatFromString(QString format) |
| 494 | { |
| 495 | auto split = format.split(";"); |
| 496 | if (split.length() != 2) |
| 497 | return false; |
| 498 | |
| 499 | bool ok; |
| 500 | auto newWidth = unsigned(split[0].toInt(&ok)); |
| 501 | if (!ok) |
| 502 | return false; |
| 503 | |
| 504 | auto newHeight = unsigned(split[1].toInt(&ok)); |
| 505 | if (!ok) |
| 506 | return false; |
| 507 | |
| 508 | this->setFrameSize(Size(newWidth, newHeight)); |
| 509 | return true; |
| 510 | } |
| 511 | |
| 512 | } // namespace video |
no test coverage detected