MPEG SDK --> MpegEditor
The abstract MpegEditor class defines the parameters for controlling the type of output for any editor.
An edit starts with the user calling pasteCut() one or more times to compose clips onto the timeline. A single call to generate() then generates the output.
Example:
MpegEditor* editor = new FrmAccurateEditor(PROGRAM);
editor->pasteCut("file1.mpg", "00:00:01:00", "00:00:10:10");
editor->pasteCut("file2.mpg", "123", "456");
editor->pasteCut("file3.mpg", "123.4s", "456.7s");
editor->pasteCut("file4.mpg", "123.4mps", "456.7mps");
editor->generate("out.mpg");
The semantics of the paste function depends on the concrete classes derived from MpegEditor. For example, FrmAccurateEditor::pasteCut() is frame-accurate while GOPAccurateEditor::pasteCut() is only GOP-accurate (but fast).
The two derived classes also have extended paste functions. For example, FrmAccurateEditor allows the video track and audio track to be composed separately using pasteVideoCut() and pasteAudioCut(). It also supports simple special effects. GOPAccurateEditor, on the other hand, has a pasteMux() that allows a full video to be multiplexed with a full audio easily.
The Src IN and Src OUT time can be specified in a number of formats:
MpegEditor
~MpegEditor
_internal_info
editorLog
generate
loadEDL
pasteCut
prePaste
setAudioPESId
setIgnoreSrcTimeOffset
setMuxRate
setRecTimeOffset
setSectorSize
setTransParams
setVideoPESId
public MpegEditor ( ) ;
Construct a Editor for the given filename where format is the packetization format (see Basic.h).
public virtual ~ MpegEditor ( ) ;
protected void * _internal_info
native code id of Editor information structure.
protected void * prePaste ( const TimeCode & tc ) ;
public void setMuxRate ( double mux_rate ) ;
Set output mux rate.
public void setSectorSize ( int sector_size ) ;
Set output sector size when applicable.
public void setVideoPESId ( int video_pes_id ) ;
Set output video PES Id. Default=0xE0.
public void setAudioPESId ( int audio_pes_id ) ;
Set output audio PES Id. Default=0xC0.
public void setRecTimeOffset ( const string & tc ) ;
Set time code of the first GOP in the output stream. If rec_in is "auto", Src IN of the first clip will be used.
public void setTransParams ( int program_number = 0x01, ,
int pmt_pid = 0x10, ,
int pcr_pid = 0x11, ,
int video_pid = 0x11, ,
int audio_pid = 0x12) ) ;
Set the transport stream parameters for the editor.
public void setIgnoreSrcTimeOffset ( bool val = true ) ;
Set the ignoreSrcTimeOffset flag. If this is set, then GOP TimeCodes are ignored for all subsequent Video and audio sources pasted into the edit list. If true, then the the first frame of the video is assumed to start at "00:00:00:00", otherwise the actual GOP timecodes are used.
public virtual void pasteCut ( const string & file ,
const string & in_time ,
const string & out_time ) = 0 ;
Paste both the video and audio of a file to the timeline.
public void loadEDL ( const string & edl_file ) ;
Load an EDL from a file.
public void generate ( const string & outfile ,
CallBack cb = 0 ) ;
Generate the output MPEG file from all the pasted clips.
public string editorLog ( ) const ;
Output editor log.
This documentation was generated automatically by the ccdoc tool (version 0.7a).
Click here to submit a bug report or feature request.
Click here to return to the top of the page.