OpenShot Library | libopenshot
0.2.5
|
Go to the documentation of this file.
31 #ifndef OPENSHOT_FRAMEMAPPER_H
32 #define OPENSHOT_FRAMEMAPPER_H
80 Field(int64_t frame,
bool isodd)
152 void AddField(int64_t frame);
153 void AddField(
Field field);
156 std::shared_ptr<Frame> GetOrCreateFrame(int64_t number);
193 std::shared_ptr<Frame>
GetFrame(int64_t requested_frame);
199 std::string
Name() {
return "FrameMapper"; };
202 std::string
Json()
const override;
203 void SetJson(
const std::string value);
void ChangeMapping(Fraction target_fps, PulldownType pulldown, int target_sample_rate, int target_channels, ChannelLayout target_channel_layout)
Change frame rate or audio mapping details.
std::vector< Field > fields
Header file for FFmpegUtilities.
void ResampleMappedAudio(std::shared_ptr< Frame > frame, int64_t original_frame_number)
Resample audio and map channels (if needed)
bool IsOpen()
Determine if reader is open or closed.
std::string Name()
Return the type name of the class.
Header file for Fraction class.
Field(int64_t frame, bool isodd)
std::shared_ptr< Frame > GetFrame(int64_t requested_frame)
This method is required for all derived classes of ReaderBase, and return the openshot::Frame object,...
This namespace is the default namespace for all code in the openshot library.
This class represents a fraction.
void SetJson(const std::string value)
Load JSON string into this object.
void Reader(ReaderBase *new_reader)
Set the current reader.
This struct holds a single field (half a frame).
void PrintMapping()
Print all of the original frames and which new frames they map to.
This class represents a single frame of video (i.e. image & audio data)
std::string Json() const override
Get and Set JSON methods.
Header file for the Keyframe class.
virtual ~FrameMapper()
Destructor.
std::vector< MappedFrame > frames
This class is a memory-based cache manager for Frame objects.
Header file for CacheMemory class.
FrameMapper(ReaderBase *reader, Fraction target_fps, PulldownType target_pulldown, int target_sample_rate, int target_channels, ChannelLayout target_channel_layout)
Default constructor for openshot::FrameMapper class.
This struct holds two fields which together make up a complete video frame.
This struct holds a the range of samples needed by this frame.
Header file for Frame class.
This class creates a mapping between 2 different frame rates, applying a specific pull-down technique...
Json::Value JsonValue() const override
Generate Json::Value for this object.
@ PULLDOWN_ADVANCED
Advanced 2:3:3:2 pull-down (minimal dirty frames)
Header file for ReaderBase class.
void SetJsonValue(const Json::Value root)
Load Json::Value into this object.
MappedFrame GetMappedFrame(int64_t TargetFrameNumber)
Get a frame based on the target frame rate and the new frame number of a frame.
Header file for OpenMPUtilities (set some common macros)
This abstract class is the base class, used by all readers in libopenshot.
PulldownType
This enumeration determines how frame rates are increased or decreased.
void Open()
Open the internal reader.
ChannelLayout
This enumeration determines the audio channel layout (such as stereo, mono, 5 point surround,...
CacheMemory * GetCache()
Get the cache object used by this reader.
void Close()
Close the openshot::FrameMapper and internal reader.
ReaderBase * Reader()
Get the current reader.
@ PULLDOWN_NONE
Do not apply pull-down techniques, just repeat or skip entire frames.
Header file for all Exception classes.
@ PULLDOWN_CLASSIC
Classic 2:3:2:3 pull-down.