# MediaWare Solutions MPEG SDK

    MPEG SDK --> MpegAnalyzer

class Clip
extends VideoSegment as public

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.

Source:
  Clip.h:47

##

Clip
  [public] Default Constructor.
Clip
  [public] Construct a Clip with the given first and last frames.
~Clip
  [public]

##

CallBack
  [public]

##

addEvent
  [public] Add an event with start and endframes.
addTransition
  [public] Add a transition from start to end.
addVideoSegment
  [public] Add a video segment.
clearEvents
  [public] Remove all events of the given type.
clearTransitions
  [public] Remove all Transitions of the given type.
deleteEvent
  [public] Delete the first event of the given type containing frame.
deleteTransition
  [public] Delete the transition containing frame.
findEvent
  [public] Find the index of the event containing frame of the given type.
findTransition
  [public] Find the index of the transition containing frame. or -1 if no transition exists containing it.
getEvent
  [public] Get the index'th Event of the given type.
getKeyFrame
  [public] Implement VideoSegment::getKeyFrame(int)
getObjectName
  [public]
getObjectType
  [public]
getTransition
  [public] Get the index'th transition of the given type.
numEvents
  [public] Returns the number of events of the given type.
numTransitions
  [public] Returns the number of transitions of the given type.
operator =
  [public] Assignment operator.
read
  [public] Read clip information from istream
reset
  [public] Remove all transitions and events.
write
  [public] Write clip information to ostream.

##

Clip

    public Clip ( ) ;

Default Constructor.

Clip

    public Clip ( int first_frame ,
                  int last_frame ) ;

Construct a Clip with the given first and last frames.

Clip

    public virtual ~ Clip ( ) ;

##

CallBack

    public typedef int ( * CallBack ) ( void * clientData , int frame ) ;

##

numTransitions

    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.

numEvents

    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.

getKeyFrame

    public int getKeyFrame ( int i ) ;

Implement VideoSegment::getKeyFrame(int)

getTransition

    public const Transition * getTransition ( int index ,
                                              VSegType type = VSegType :: ANY ) const ;

Get the index'th transition of the given type.

findTransition

    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.

getEvent

    public const Event * getEvent ( int index ,
                                    VSegType type = VSegType :: ANY ) const ;

Get the index'th Event of the given type.

findEvent

    public int findEvent ( int frame ,
                           VSegType type = VSegType :: ANY ) const ;

Find the index of the event containing frame of the given type.

addTransition

    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.

addVideoSegment

    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.

addEvent

    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.

deleteTransition

    public void deleteTransition ( int frame ) ;

Delete the transition containing frame.

If is not contained within a transition, the function has no effect.

deleteEvent

    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.

reset

    public void reset ( ) ;

Remove all transitions and events.

clearEvents

    public void clearEvents ( VSegType type = VSegType :: ANY ) ;

Remove all events of the given type.

clearTransitions

    public void clearTransitions ( VSegType type = VSegType :: ANY ) ;

Remove all Transitions of the given type.

operator =

    public Clip & operator = ( const Clip & x ) ;

Assignment operator.

write

    public void write ( std_ostream & b ) const ;

Write clip information to ostream.

read

    public int read ( std_istream & b ) ;

Read clip information from istream

getObjectType

    public const ObjType getObjectType ( ) const ;

getObjectName

    public const char * getObjectName ( ) const ;

Copyright © 2000 Mediaware Solutions Pty Ltd
All rights reserved

Click here to return to the top of the page.