| 351 | } |
| 352 | |
| 353 | QByteArray decoderDav1d::getRawFrameData() |
| 354 | { |
| 355 | auto s = curPicture.getFrameSize(); |
| 356 | if (s.width <= 0 || s.height <= 0) |
| 357 | { |
| 358 | DEBUG_DAV1D("decoderDav1d::getRawFrameData: Current picture has invalid size."); |
| 359 | return QByteArray(); |
| 360 | } |
| 361 | if (decoderState != DecoderState::RetrieveFrames) |
| 362 | { |
| 363 | DEBUG_DAV1D("decoderDav1d::getRawFrameData: Wrong decoder state."); |
| 364 | return QByteArray(); |
| 365 | } |
| 366 | |
| 367 | if (currentOutputBuffer.isEmpty()) |
| 368 | { |
| 369 | // Put image data into buffer |
| 370 | copyImgToByteArray(curPicture, currentOutputBuffer); |
| 371 | DEBUG_DAV1D("decoderDav1d::getRawFrameData copied frame to buffer"); |
| 372 | |
| 373 | if (this->statisticsEnabled()) |
| 374 | // Get the statistics from the image and put them into the statistics cache |
| 375 | this->cacheStatistics(curPicture); |
| 376 | } |
| 377 | |
| 378 | return currentOutputBuffer; |
| 379 | } |
| 380 | |
| 381 | bool decoderDav1d::pushData(QByteArray &data) |
| 382 | { |
nothing calls this directly
no test coverage detected