Main Page | Class Hierarchy | Compound List | File List | Compound Members

MP7VideoSegment Class Reference

This class represents a view on a temporal video segment of an MPEG-7 document, as used in the DAHL project. More...

#include <MP7VideoSegment.hpp>

Inherits MP7View.

List of all members.

Public Member Functions

 MP7VideoSegment ()
 Default constructor.

 MP7VideoSegment (MP7Doc *doc, MP7ListViewItem *root)
 Constructor.

virtual MP7ListViewItemparent (MP7ListViewItem *root=NULL) const
 Return the root of the parent video segment.

virtual MP7ListViewItemsetRoot (MP7ListViewItem *root, bool searchUp=false)
 Set this view's root.

virtual void setEmpty ()
 Create an empty video segment description.

virtual bool edit ()
 Show a modal top-level widget allowing the user to enter annotation data of this video segment.

MP7Time mediaTime () const
 Return the media time value of this video segment.

bool setMediaTime (const MP7Time &time)
 Set the media time value of this video segment.

bool modifyMediaStartTime (const MP7Time &startTime, bool recursive=false)
 Modify the media start time (time point) of this segment.

bool modifyMediaEndTime (const MP7Time &endTime, bool recursive=false)
 Modify the media duration of this segment from the given end time.

QString title () const
 Return the segment title.

int level () const
 Return the segment level (tree depth) of this segment within the MPEG-7 document.

bool ancestor (MP7VideoSegment &result, int level=-1) const
 Determine an ancestor video segment.

int childSegments (std::vector< MP7VideoSegment > &result) const
 Return the child video segments of this segment.

bool addChildSegment (MP7VideoSegment &result)
 Add a child segment of this segment to the MPEG-7 document.

bool move (MP7VideoSegment *newParent, MP7VideoSegment *newSibling=NULL)
 Move this segment (and all child segments) to a new parent segment, right after the given new sibling segment.

bool split (MP7VideoSegment &result, const MP7Time &time)
 Split this segment at the given media time point into two sibling segments (this and a new one).

bool remove (bool recursive=false)
 Remove this video segment from the MPEG-7 document.

bool searchByMediaTime (MP7VideoSegment &result, const MP7Time &time, int level) const
 Search for the video segment containing the given media time point at the specified maximal segment level.

bool prevGenSibling (MP7VideoSegment &result) const
 Find the previous generalized sibling segment of this segment.

bool nextGenSibling (MP7VideoSegment &result) const
 Find the next generalized sibling segment of this segment.

MP7ListViewItemsetTitleImage (const MP7Time &time)
 Set the TitleImage descriptor of this segment to the given media time point.


Detailed Description

This class represents a view on a temporal video segment of an MPEG-7 document, as used in the DAHL project.

The root of this view is always an MPEG-7 Video or VideoSegment descriptor.

Author:
Mario Taschwer
Version:
Id
MP7VideoSegment.hpp,v 1.6 2004/09/24 13:15:09 mtaschwer Exp


Constructor & Destructor Documentation

MP7VideoSegment::MP7VideoSegment MP7Doc doc,
MP7ListViewItem root
 

Constructor.

The root parameter is copied as-is to this object's state.

See also:
setRoot(MP7ListViewItem *, bool)


Member Function Documentation

bool MP7VideoSegment::addChildSegment MP7VideoSegment result  ) 
 

Add a child segment of this segment to the MPEG-7 document.

The child segment is appended as the last child of this segment.

Parameters:
result output parameter: new child segment.
Returns:
false on error.

bool MP7VideoSegment::ancestor MP7VideoSegment result,
int  level = -1
const
 

Determine an ancestor video segment.

Parameters:
result where to store the result.
level the segment level of the ancestor (0 means nearest to the document root); must be less than the level of this segment. if -1, the parent segment will be returned.
Returns:
false if the ancestor could not be found.
See also:
level()

int MP7VideoSegment::childSegments std::vector< MP7VideoSegment > &  result  )  const
 

Return the child video segments of this segment.

Parameters:
result vector to store the result.
Returns:
the number of child segments returned in result.

virtual bool MP7VideoSegment::edit  )  [virtual]
 

Show a modal top-level widget allowing the user to enter annotation data of this video segment.

See also:
MP7View::edit()

Implements MP7View.

int MP7VideoSegment::level  )  const
 

Return the segment level (tree depth) of this segment within the MPEG-7 document.

The top-level segment is assigned level 0.

bool MP7VideoSegment::modifyMediaEndTime const MP7Time endTime,
bool  recursive = false
 

Modify the media duration of this segment from the given end time.

The media start time (time point) remains constant.

Parameters:
endTime only the time point value will be used.
recursive if true, this function will be applied to the last child segment recursively.
Returns:
false on error.

bool MP7VideoSegment::modifyMediaStartTime const MP7Time startTime,
bool  recursive = false
 

Modify the media start time (time point) of this segment.

The duration value will be updated such that the segment end time remains constant.

Parameters:
startTime only the time point value will be used.
recursive if true, this function will be applied to the first child segment recursively.
Returns:
false on error.

bool MP7VideoSegment::move MP7VideoSegment newParent,
MP7VideoSegment newSibling = NULL
 

Move this segment (and all child segments) to a new parent segment, right after the given new sibling segment.

If newSibling is NULL or is invalid, this segment will be inserted as first child of newParent.

Returns:
false on error.
See also:
MP7View::isValid()

bool MP7VideoSegment::nextGenSibling MP7VideoSegment result  )  const
 

Find the next generalized sibling segment of this segment.

This is the segment of the same depth with minimal media time greater than that of this segment.

Parameters:
result where to store the result.
Returns:
false if no such sibling exists.

virtual MP7ListViewItem* MP7VideoSegment::parent MP7ListViewItem root = NULL  )  const [virtual]
 

Return the root of the parent video segment.

See also:
MP7View::parent()

Reimplemented from MP7View.

bool MP7VideoSegment::prevGenSibling MP7VideoSegment result  )  const
 

Find the previous generalized sibling segment of this segment.

This is the segment of the same depth with maximal media time less than that of this segment.

Parameters:
result where to store the result.
Returns:
false if no such sibling exists.

bool MP7VideoSegment::remove bool  recursive = false  ) 
 

Remove this video segment from the MPEG-7 document.

When a segment with a sibling is removed, the sibling's media time is increased to include the removed segment. The top-level segment of an MPEG-7 document cannot be removed (an error status is returned).

Parameters:
recursive if false, child segments are re-parented to a sibling (if exists) or to this segment's parent; if true, all child segments will be removed recursively.
Returns:
false on error.

bool MP7VideoSegment::searchByMediaTime MP7VideoSegment result,
const MP7Time time,
int  level
const
 

Search for the video segment containing the given media time point at the specified maximal segment level.

Only the segment tree below this segment is searched.

Parameters:
result output parameter: the segment searched for.
time the media time point to search for.
level the maximal segment level of the result.
Returns:
false on error.
See also:
level()

virtual void MP7VideoSegment::setEmpty  )  [virtual]
 

Create an empty video segment description.

See also:
MP7View::setEmpty()

Implements MP7View.

bool MP7VideoSegment::setMediaTime const MP7Time time  ) 
 

Set the media time value of this video segment.

The time point will be set only if it is valid. The duration will be set only if it is not 0.

See also:
MP7Time::timePointIsValid()

MP7Time::durationIsNull()

Returns:
false on error.

virtual MP7ListViewItem* MP7VideoSegment::setRoot MP7ListViewItem root,
bool  searchUp = false
[virtual]
 

Set this view's root.

See also:
MP7View::setRoot(MP7ListViewItem *, bool)

Implements MP7View.

MP7ListViewItem* MP7VideoSegment::setTitleImage const MP7Time time  ) 
 

Set the TitleImage descriptor of this segment to the given media time point.

Returns:
the MP7ListViewItem corresponding to the created TitleImage/MediaTimePoint descriptor, or NULL on error.

bool MP7VideoSegment::split MP7VideoSegment result,
const MP7Time time
 

Split this segment at the given media time point into two sibling segments (this and a new one).

This segment will keep its time point, but its duration will be shortened. A root segment cannot be split.

Parameters:
result output parameter: the new sibling segment.
time split time point.
Returns:
false on error.


The documentation for this class was generated from the following file:
Generated on Mon Sep 27 09:12:05 2004 for Muvino by doxygen 1.3.2