|
OpenShot Library | libopenshot
0.1.1
|
This class takes any reader and generates a special type of video file, built with chunks of small video and audio data. More...
#include <ChunkWriter.h>
Public Member Functions | |
| ChunkWriter (string path, ReaderBase *reader) throw (InvalidFile, InvalidFormat, InvalidCodec, InvalidOptions, OutOfMemory) | |
| Constructor for ChunkWriter. Throws one of the following exceptions. More... | |
| void | Close () |
| Close the writer. More... | |
| int | GetChunkSize () |
| Get the chunk size (number of frames to write in each chunk) More... | |
| bool | IsOpen () |
| Determine if writer is open or closed. More... | |
| void | Open () throw (InvalidFile, InvalidCodec) |
| Open writer. More... | |
| void | SetChunkSize (int new_size) |
| Set the chunk size (number of frames to write in each chunk) More... | |
| void | WriteFrame (tr1::shared_ptr< Frame > frame) throw (WriterClosed) |
| Add a frame to the stack waiting to be encoded. More... | |
| void | WriteFrame (int start, int length) throw (WriterClosed) |
| Write a block of frames from a reader. More... | |
| void | WriteFrame (ReaderBase *reader, int start, int length) throw (WriterClosed) |
| Write a block of frames from a reader. More... | |
Public Member Functions inherited from openshot::WriterBase | |
| void | CopyReaderInfo (ReaderBase *reader) |
| This method copy's the info struct of a reader, and sets the writer with the same info. More... | |
| void | DisplayInfo () |
| Display file information in the standard output stream (stdout) More... | |
| string | Json () |
| Get and Set JSON methods. More... | |
| Json::Value | JsonValue () |
| Generate Json::JsonValue for this object. More... | |
| void | SetJson (string value) throw (InvalidJSON) |
| Load JSON string into this object. More... | |
| void | SetJsonValue (Json::Value root) |
| Load Json::JsonValue into this object. More... | |
| virtual void | WriteFrame (ReaderBase *reader, long int start, long int length)=0 throw (ErrorEncodingVideo, WriterClosed) |
| This method is required for all derived classes of WriterBase. Write a block of frames from a reader. More... | |
| WriterBase () | |
| Constructor for WriterBase class, many things are initialized here. More... | |
Additional Inherited Members | |
Public Attributes inherited from openshot::WriterBase | |
| bool | debug |
| WriterInfo | info |
| Information about the current media file. More... | |
Protected Member Functions inherited from openshot::WriterBase | |
| 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... | |
This class takes any reader and generates a special type of video file, built with chunks of small video and audio data.
These chunks can easily be passed around in a distributed computing environment, without needing to share the entire video file. They also allow a chunk to be frame accurate, since seeking inaccuracies are removed.
Definition at line 80 of file ChunkWriter.h.
| ChunkWriter::ChunkWriter | ( | string | path, |
| ReaderBase * | reader | ||
| ) | |||
| throw | ( | InvalidFile, | |
| InvalidFormat, | |||
| InvalidCodec, | |||
| InvalidOptions, | |||
| OutOfMemory | |||
| ) | |||
Constructor for ChunkWriter. Throws one of the following exceptions.
| path | The folder path of the chunk file to be created |
| reader | The initial reader to base this chunk file's meta data on (such as fps, height, width, etc...) |
Definition at line 32 of file ChunkWriter.cpp.
| void ChunkWriter::Close | ( | ) |
Close the writer.
Definition at line 224 of file ChunkWriter.cpp.
|
inline |
Get the chunk size (number of frames to write in each chunk)
Definition at line 122 of file ChunkWriter.h.
|
inlinevirtual |
Determine if writer is open or closed.
Implements openshot::WriterBase.
Definition at line 125 of file ChunkWriter.h.
|
virtual | |||||||||||||||||
|
inline |
Set the chunk size (number of frames to write in each chunk)
| new_size | The number of frames to write in this chunk file |
Definition at line 132 of file ChunkWriter.h.
|
virtual | ||||||||||||||
Add a frame to the stack waiting to be encoded.
| frame | The openshot::Frame object that needs to be written to this chunk file. |
Implements openshot::WriterBase.
Definition at line 77 of file ChunkWriter.cpp.
| void ChunkWriter::WriteFrame | ( | int | start, |
| int | length | ||
| ) | |||
| throw | ( | WriterClosed | |
| ) | |||
Write a block of frames from a reader.
| start | The starting frame number to write (of the reader passed into the constructor) |
| length | The number of frames to write (of the reader passed into the constructor) |
Definition at line 210 of file ChunkWriter.cpp.
| void ChunkWriter::WriteFrame | ( | ReaderBase * | reader, |
| int | start, | ||
| int | length | ||
| ) | |||
| throw | ( | WriterClosed | |
| ) | |||
Write a block of frames from a reader.
| reader | The reader containing the frames you need |
| start | The starting frame number to write |
| length | The number of frames to write |
Definition at line 196 of file ChunkWriter.cpp.
1.8.6