You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Major refactor to the cache object (again)! It now uses bytes to determine how many frames to keep.
This commit is contained in:
@@ -358,6 +358,19 @@ int Frame::GetAudioSamplesRate()
|
||||
return sample_rate;
|
||||
}
|
||||
|
||||
// Get the size in bytes of this frame (rough estimate)
|
||||
int64 Frame::GetBytes()
|
||||
{
|
||||
int64 total_bytes = 0;
|
||||
if (image)
|
||||
total_bytes += image->fileSize();
|
||||
if (audio)
|
||||
total_bytes += (audio->getNumSamples() * audio->getNumChannels() * sizeof(float));
|
||||
|
||||
// return size of this frame
|
||||
return total_bytes;
|
||||
}
|
||||
|
||||
// Get pixel data (as packets)
|
||||
const Magick::PixelPacket* Frame::GetPixels()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user