MCPcopy Create free account
hub / github.com/IENT/YUView / setFormatFromFileName

Method setFormatFromFileName

YUViewLib/src/playlistitem/playlistItemRawFile.cpp:424–442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

422}
423
424void playlistItemRawFile::setFormatFromFileName()
425{
426 auto fileFormat = this->dataSource.guessFormatFromFilename();
427 if (fileFormat.frameSize.isValid())
428 {
429 this->video->setFrameSize(fileFormat.frameSize);
430
431 // We were able to extract width and height from the file name using
432 // regular expressions. Try to get the pixel format by checking with the file size.
433 this->video->setFormatFromSizeAndName(fileFormat.frameSize,
434 fileFormat.bitDepth,
435 fileFormat.packed ? video::DataLayout::Packed
436 : video::DataLayout::Planar,
437 dataSource.getFileSize(),
438 dataSource.getFileInfo());
439 if (fileFormat.frameRate != -1)
440 this->prop.frameRate = fileFormat.frameRate;
441 }
442}
443
444void playlistItemRawFile::createPropertiesWidget()
445{

Callers

nothing calls this directly

Calls 6

getFileSizeMethod · 0.80
getFileInfoMethod · 0.80
isValidMethod · 0.45
setFrameSizeMethod · 0.45

Tested by

no test coverage detected