    MPEG SDK --> MpegEditor

class 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:

timecode
  SMPTE timecode in hh:mm:ss:ff. This is relative to the timecode recorded in the first GOP of the source video and the first frame is not necessarily 00:00:00:00. Whether drop-frame is used also depends on the source video.
frame number
  An integer frame number. The first frame is frame 0.
seconds
  A floating point number followed by an `s'. The first frame is at time 0.0s.
mps
  A floating point number followed by the letters `mps'. This is the time reported by Microsoft MediaPlayer's currentPosition function.

Source:
  MpegEditor.h:79

See Also:
  FrmAccurateEditor, GOPAccurateEditor

##

MpegEditor
  [public] Construct a Editor for the given filename where format is the packetization format (see Basic.h).
~MpegEditor
  [public]

##

_internal_info
  [protected] native code id of Editor information structure.

##

editorLog
  [public] Output editor log.
generate
  [public] Generate the output MPEG file from all the pasted clips.
loadEDL
  [public] Load an EDL from a file.
pasteCut
  [public] Paste both the video and audio of a file to the timeline.
prePaste
  [protected]
setAudioPESId
  [public] Set output audio PES Id. Default=0xC0.
setIgnoreSrcTimeOffset
  [public] 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.
setMuxRate
  [public] Set output mux rate.
setRecTimeOffset
  [public] 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.
setSectorSize
  [public] Set output sector size when applicable.
setTransParams
  [public] Set the transport stream parameters for the editor.
setVideoPESId
  [public] Set output video PES Id. Default=0xE0.

##

MpegEditor

    public MpegEditor ( ) ;

Construct a Editor for the given filename where format is the packetization format (see Basic.h).

MpegEditor

    public virtual ~ MpegEditor ( ) ;

##

_internal_info

    protected void * _internal_info

native code id of Editor information structure.

##

prePaste

    protected void * prePaste ( const TimeCode & tc ) ;

setMuxRate

    public void setMuxRate ( double mux_rate ) ;

Set output mux rate.

setSectorSize

    public void setSectorSize ( int sector_size ) ;

Set output sector size when applicable.

setVideoPESId

    public void setVideoPESId ( int video_pes_id ) ;

Set output video PES Id. Default=0xE0.

setAudioPESId

    public void setAudioPESId ( int audio_pes_id ) ;

Set output audio PES Id. Default=0xC0.

setRecTimeOffset

    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.

setTransParams

    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.

setIgnoreSrcTimeOffset

    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.

pasteCut

    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.

loadEDL

    public void loadEDL ( const string & edl_file ) ;

Load an EDL from a file.

generate

    public void generate ( const string & outfile ,
                           CallBack cb = 0 ) ;

Generate the output MPEG file from all the pasted clips.

editorLog

    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.