|
OpenShot Library | libopenshot
0.2.2
|
This class creates a mapping between 2 different frame rates, applying a specific pull-down technique. More...
#include <FrameMapper.h>
Public Member Functions | |
| 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. More... | |
| void | Close () |
| Close the openshot::FrameMapper and internal reader. More... | |
| 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. More... | |
| CacheMemory * | GetCache () |
| Get the cache object used by this reader. More... | |
| 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, which contains the image and audio information for that frame of video. More... | |
| MappedFrame | GetMappedFrame (int64_t TargetFrameNumber) |
| Get a frame based on the target frame rate and the new frame number of a frame. More... | |
| bool | IsOpen () |
| Determine if reader is open or closed. More... | |
| string | Json () |
| Get and Set JSON methods. More... | |
| Json::Value | JsonValue () |
| Generate Json::JsonValue for this object. More... | |
| string | Name () |
| Return the type name of the class. More... | |
| void | Open () |
| Open the internal reader. More... | |
| void | PrintMapping () |
| Print all of the original frames and which new frames they map to. More... | |
| ReaderBase * | Reader () |
| Get the current reader. More... | |
| void | ResampleMappedAudio (std::shared_ptr< Frame > frame, int64_t original_frame_number) |
| Resample audio and map channels (if needed) More... | |
| void | SetJson (string value) |
| Load JSON string into this object. More... | |
| void | SetJsonValue (Json::Value root) |
| Load Json::JsonValue into this object. More... | |
| ~FrameMapper () | |
| Destructor. More... | |
Public Member Functions inherited from openshot::ReaderBase | |
| void | DisplayInfo () |
| Display file information in the standard output stream (stdout) More... | |
| ReaderBase () | |
| Constructor for the base reader, where many things are initialized. More... | |
| void | SetMaxSize (int width, int height) |
| Set Max Image Size (used for performance optimization) More... | |
Public Attributes | |
| vector< Field > | fields |
| vector< MappedFrame > | frames |
Public Attributes inherited from openshot::ReaderBase | |
| ReaderInfo | info |
| Information about the current media file. More... | |
Additional Inherited Members | |
Protected Attributes inherited from openshot::ReaderBase | |
| CriticalSection | getFrameCriticalSection |
| Section lock for multiple threads. More... | |
| int | max_height |
| The maximium image height needed by this clip (used for optimizations) More... | |
| int | max_width |
| The maximum image width needed by this clip (used for optimizations) More... | |
| CriticalSection | processingCriticalSection |
This class creates a mapping between 2 different frame rates, applying a specific pull-down technique.
This class creates a mapping between 2 different video files, and supports many pull-down techniques, such as 2:3:2:3 or 2:3:3:2, and also supports inverse telecine. Pull-down techniques are only needed to remove artificial fields added when converting between 24 fps (film) and television fps (29.97 fps NTSC or 25 fps PAL).
The following graphic displays a how frame rates are mapped, and how time remapping affects the order of frames returned from the FrameMapper.
Please see the following Example Code:
Definition at line 139 of file FrameMapper.h.
| FrameMapper::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.
Definition at line 33 of file FrameMapper.cpp.
| FrameMapper::~FrameMapper | ( | ) |
Destructor.
Definition at line 63 of file FrameMapper.cpp.
| void FrameMapper::ChangeMapping | ( | Fraction | target_fps, |
| PulldownType | pulldown, | ||
| int | target_sample_rate, | ||
| int | target_channels, | ||
| ChannelLayout | target_channel_layout | ||
| ) |
Change frame rate or audio mapping details.
Definition at line 718 of file FrameMapper.cpp.
|
virtual |
Close the openshot::FrameMapper and internal reader.
Implements openshot::ReaderBase.
Definition at line 640 of file FrameMapper.cpp.
|
inlinevirtual |
Get the cache object used by this reader.
Implements openshot::ReaderBase.
Definition at line 185 of file FrameMapper.h.
|
virtual |
This method is required for all derived classes of ReaderBase, and return the openshot::Frame object, which contains the image and audio information for that frame of video.
| requested_frame | The frame number that is requested. |
Implements openshot::ReaderBase.
Definition at line 384 of file FrameMapper.cpp.
| MappedFrame FrameMapper::GetMappedFrame | ( | int64_t | TargetFrameNumber | ) |
Get a frame based on the target frame rate and the new frame number of a frame.
Definition at line 311 of file FrameMapper.cpp.
|
virtual |
Determine if reader is open or closed.
Implements openshot::ReaderBase.
Definition at line 619 of file FrameMapper.cpp.
|
virtual |
Get and Set JSON methods.
Generate JSON string of this object
Implements openshot::ReaderBase.
Definition at line 663 of file FrameMapper.cpp.
|
virtual |
Generate Json::JsonValue for this object.
Implements openshot::ReaderBase.
Definition at line 670 of file FrameMapper.cpp.
|
inlinevirtual |
Return the type name of the class.
Implements openshot::ReaderBase.
Definition at line 199 of file FrameMapper.h.
|
virtual |
Open the internal reader.
Implements openshot::ReaderBase.
Definition at line 628 of file FrameMapper.cpp.
| void FrameMapper::PrintMapping | ( | ) |
Print all of the original frames and which new frames they map to.
Definition at line 585 of file FrameMapper.cpp.
| ReaderBase * FrameMapper::Reader | ( | ) |
Get the current reader.
Definition at line 70 of file FrameMapper.cpp.
| void FrameMapper::ResampleMappedAudio | ( | std::shared_ptr< Frame > | frame, |
| int64_t | original_frame_number | ||
| ) |
Resample audio and map channels (if needed)
Definition at line 755 of file FrameMapper.cpp.
|
virtual |
Load JSON string into this object.
Implements openshot::ReaderBase.
Definition at line 681 of file FrameMapper.cpp.
|
virtual |
Load Json::JsonValue into this object.
Implements openshot::ReaderBase.
Definition at line 704 of file FrameMapper.cpp.
| vector<Field> openshot::FrameMapper::fields |
Definition at line 166 of file FrameMapper.h.
| vector<MappedFrame> openshot::FrameMapper::frames |
Definition at line 167 of file FrameMapper.h.
1.8.13