MPEG SDK --> MpegAnalyzer
A Clip is a segment of an MPEG video and can contain Transitions and Events.
A Transition is the join between two video segments. It can be a single frame transition such as a cut, or a multiple frame transition such as a dissolve.
An Event is a segment of video featuring specific charateristics. An Event can be a camera event such as a pan or zoom or relate to the specific content such as a sudden increase in motion caused by a person walking into a room.
Both Transitions and Events are classified by a type field. This allows Transitions and Events of a given type of be retrieved and used.
From the Transitions and Events in the Clip, a list of key frames can be obtained. A Key frame is usually the middle frame of a transition or the start frame or end frame of an Event.
Clip
Clip
~Clip
CallBack
addEvent
addTransition
addVideoSegment
clearEvents
clearTransitions
deleteEvent
deleteTransition
findEvent
findTransition
getEvent
getKeyFrame
getObjectName
getObjectType
getTransition
numEvents
numTransitions
operator =
read
reset
write
public Clip ( ) ;
Default Constructor.
public Clip ( int first_frame ,
int last_frame ) ;
Construct a Clip with the given first and last frames.
public virtual ~ Clip ( ) ;
public typedef int ( * CallBack ) ( void * clientData , int frame ) ;
public int numTransitions ( VSegType type = VSegType :: ANY ) const ;
Returns the number of transitions of the given type.
By default it returns the total number of transitions.
public int numEvents ( VSegType type = VSegType :: ANY ) const ;
Returns the number of events of the given type.
By default it returns the total number of events.
public int getKeyFrame ( int i ) ;
Implement VideoSegment::getKeyFrame(int)
public const Transition * getTransition ( int index ,
VSegType type = VSegType :: ANY ) const ;
Get the index'th transition of the given type.
public int findTransition ( int frame ,
VSegType type = VSegType :: ANY ) const ;
Find the index of the transition containing frame. or -1 if no transition exists containing it.
public const Event * getEvent ( int index ,
VSegType type = VSegType :: ANY ) const ;
Get the index'th Event of the given type.
public int findEvent ( int frame ,
VSegType type = VSegType :: ANY ) const ;
Find the index of the event containing frame of the given type.
public bool addTransition ( int start ,
int end ,
VSegType type ,
float confidence = 1 . 0 ) ;
Add a transition from start to end.
If the new transition covers an existing transition, either within it or overlaps it, then false is returned and the transition is not added.
public bool addVideoSegment ( const VideoSegment & segment ) ;
Add a video segment.
Depending whether the segment is a transition object of an Event object, it will be added as either of these. If it is neither, the default action is to add it as an Event.
public bool addEvent ( int start ,
int end ,
VSegType type ,
float confidence = 1 . 0 ) ;
Add an event with start and endframes.
If either of the start or end frames are outside the start and end frames of the clip, then false is returned.
Events are inserted so that their start frames are in numerical order.
public void deleteTransition ( int frame ) ;
Delete the transition containing frame.
If is not contained within a transition, the function has no effect.
public void deleteEvent ( int frame ,
VSegType type = VSegType :: ANY ) ;
Delete the first event of the given type containing frame.
If is not contained within any event, the function has no effect.
public void reset ( ) ;
Remove all transitions and events.
public void clearEvents ( VSegType type = VSegType :: ANY ) ;
Remove all events of the given type.
public void clearTransitions ( VSegType type = VSegType :: ANY ) ;
Remove all Transitions of the given type.
public Clip & operator = ( const Clip & x ) ;
Assignment operator.
public void write ( std_ostream & b ) const ;
Write clip information to ostream.
public int read ( std_istream & b ) ;
Read clip information from istream
public const ObjType getObjectType ( ) const ;
public const char * getObjectName ( ) const ;
Click here to return to the top of the page.