|
OpenShot Library | libopenshot
0.1.1
|
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... | |
| Cache * | GetCache () |
| Get the cache object used by this reader. More... | |
| tr1::shared_ptr< Frame > | GetFrame (long int requested_frame) throw (ReaderClosed) |
| 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 (long int TargetFrameNumber) throw (OutOfBoundsFrame) |
| 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 () throw (InvalidFile) |
| Open the internal reader. More... | |
| void | PrintMapping () |
| Print all of the original frames and which new frames they map to. More... | |
| void | ResampleMappedAudio (tr1::shared_ptr< Frame > frame, long int original_frame_number) |
| Resample audio and map channels (if needed) More... | |
| void | SetJson (string value) throw (InvalidJSON) |
| Load JSON string into this object. More... | |
| void | SetJsonValue (Json::Value root) throw (InvalidFile) |
| 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... | |
| void | DrawFrameOnScene (string path, long _graphics_scene_address) |
| Test method to draw a bitmap on a Qt QGraphicsScene. More... | |
| ReaderBase () | |
| Constructor for the base reader, where many things are initialized. More... | |
Public Attributes | |
| vector< Field > | fields |
| vector< MappedFrame > | frames |
Public Attributes inherited from openshot::ReaderBase | |
| bool | debug |
| ReaderInfo | info |
| Information about the current media file. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from openshot::ReaderBase | |
| void | AppendDebugMethod (string method_name, string arg1_name, float arg1_value, string arg2_name, float arg2_value, string arg3_name, float arg3_value, string arg4_name, float arg4_value, string arg5_name, float arg5_value, string arg6_name, float arg6_value) |
| Append debug information as JSON. More... | |
Protected Attributes inherited from openshot::ReaderBase | |
| CriticalSection | getFrameCriticalSection |
| Section lock for multiple threads. 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 60 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 640 of file FrameMapper.cpp.
|
virtual |
Close the openshot::FrameMapper and internal reader.
Implements openshot::ReaderBase.
Definition at line 562 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 358 of file FrameMapper.cpp.
| MappedFrame FrameMapper::GetMappedFrame | ( | long int | TargetFrameNumber | ) | |
| throw | ( | OutOfBoundsFrame | |||
| ) | |||||
Get a frame based on the target frame rate and the new frame number of a frame.
Definition at line 298 of file FrameMapper.cpp.
|
virtual |
Determine if reader is open or closed.
Implements openshot::ReaderBase.
Definition at line 537 of file FrameMapper.cpp.
|
virtual |
Get and Set JSON methods.
Generate JSON string of this object
Implements openshot::ReaderBase.
Definition at line 585 of file FrameMapper.cpp.
|
virtual |
Generate Json::JsonValue for this object.
Implements openshot::ReaderBase.
Definition at line 592 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 546 of file FrameMapper.cpp.
| void FrameMapper::PrintMapping | ( | ) |
Print all of the original frames and which new frames they map to.
Definition at line 508 of file FrameMapper.cpp.
| void FrameMapper::ResampleMappedAudio | ( | tr1::shared_ptr< Frame > | frame, |
| long int | original_frame_number | ||
| ) |
Resample audio and map channels (if needed)
Definition at line 666 of file FrameMapper.cpp.
|
virtual | ||||||||||||||
Load JSON string into this object.
Implements openshot::ReaderBase.
Definition at line 603 of file FrameMapper.cpp.
|
virtual | ||||||||||||||
Load Json::JsonValue into this object.
Implements openshot::ReaderBase.
Definition at line 626 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.6