#include <DVDDemuxUtils.h>
◆ AllocateDemuxPacket() [1/2]
| DemuxPacket * CDVDDemuxUtils::AllocateDemuxPacket |
( |
int | iDataSize = 0 | ) |
|
|
static |
Required number of additionally allocated bytes at the end of the input bitstream for decoding. this is mainly needed because some optimized bitstream readers read 32 or 64 bit at once and could read over the end
Note, if the first 23 bits of the additional bytes are not 0 then damaged MPEG bitstreams could cause overread and segfault
◆ AllocateDemuxPacket() [2/2]
| DemuxPacket * CDVDDemuxUtils::AllocateDemuxPacket |
( |
unsigned int | iDataSize, |
|
|
unsigned int | encryptedSubsampleCount ) |
|
static |
◆ FrameRateFromStatistics()
| double CDVDDemuxUtils::FrameRateFromStatistics |
( |
const std::string & | frames, |
|
|
const std::string & | duration ) |
|
static |
Average rate from Matroska NUMBER_OF_FRAMES and DURATION tags, or 0 if invalid.
◆ FreeDemuxPacket()
- Todo
- : properly handle avpkt side_data. this works around our improper use of the side_data
◆ LoadChapters()
| std::vector< ChapterFFmpeg > CDVDDemuxUtils::LoadChapters |
( |
std::span< AVChapter * > | chapters | ) |
|
|
static |
◆ SnapMsQuantisedFrameRate()
| bool CDVDDemuxUtils::SnapMsQuantisedFrameRate |
( |
int & | fpsRate, |
|
|
int & | fpsScale, |
|
|
double | hintFps ) |
|
static |
Snap a container-declared frame rate that is exactly 1000/N fps (a whole number of milliseconds N per frame) to a standard rate whose millisecond-rounded duration equals N and agrees with the statistics.
- Parameters
-
| [in,out] | fpsRate | frame rate numerator, rewritten on success |
| [in,out] | fpsScale | frame rate denominator, rewritten on success |
| hintFps | measured rate from container statistics (frame count / duration) used to resolve rates that quantise to the same duration (23.976 vs 24). Missing or ambiguous statistics leave the rate unchanged. |
- Returns
- true when the rate was rewritten
◆ StoreSideData()
- Todo
- : properly handle avpkt side_data. this works around our improper use of the side_data
◆ KEYFRAME_OFFSET_LIMIT
| std::chrono::milliseconds CDVDDemuxUtils::KEYFRAME_OFFSET_LIMIT {1000} |
|
staticconstexpr |
How far in a first chapter may start and still count as starting at zero: longer than a keyframe interval, shorter than anything worth seeking to.
The documentation for this class was generated from the following files: