Gst::MessageDuration Class Reference

A duration message. More...

#include <message.h>

Inheritance diagram for Gst::MessageDuration:

Gst::Message Gst::MiniObject

List of all members.

Public Member Functions

 MessageDuration (GstMessage* castitem)
void parse (Format& format, gint64& position)
 Extracts the duration and format from the duration message.
gint64 parse ()
 Extracts and returns the duration from the duration message.
Format parse_format ()
 Extracts and returns the format from the duration message.

Static Public Member Functions

static Glib::RefPtr<Gst::Messagecreate (const Glib::RefPtr<Gst::Object>& src, Format format, gint64 position)
 Create a new duration message.


Detailed Description

A duration message.

See create() for more details.


Constructor& Destructor Documentation

Gst::MessageDuration::MessageDuration ( GstMessage *  castitem  )  [explicit]


Member Function Documentation

static Glib::RefPtr<Gst::Message> Gst::MessageDuration::create ( const Glib::RefPtr<Gst::Object>&  src,
Format  format,
gint64  position 
) [static]

Create a new duration message.

This message is posted by elements that know the duration of a stream in a specific format. This message is received by bins and is used to calculate the total duration of a pipeline. Elements may post a duration message with a duration of Gst::CLOCK_TIME_NONE to indicate that the duration has changed and the cached duration should be discarded. The new duration can then be retrieved via a query.

Parameters:
src The object originating the message.
format The format of the duration.
duration The new duration.
Returns:
The new duration message. MT safe.

gint64 Gst::MessageDuration::parse (  ) 

Extracts and returns the duration from the duration message.

The duration might be Gst::CLOCK_TIME_NONE, which indicates that the duration has changed. Applications should always use a query to retrieve the duration of a pipeline.

MT safe.

Returns:
The position.

void Gst::MessageDuration::parse ( Format format,
gint64 &  position 
)

Extracts the duration and format from the duration message.

The duration might be Gst::CLOCK_TIME_NONE, which indicates that the duration has changed. Applications should always use a query to retrieve the duration of a pipeline.

MT safe.

Parameters:
format Result location for the format.
position Result location for the position.

Format Gst::MessageDuration::parse_format (  ) 

Extracts and returns the format from the duration message.

Applications should always use a query to retrieve the duration of a pipeline.

MT safe.

Returns:
The format.


The documentation for this class was generated from the following file:

Generated on Thu Jan 15 09:33:13 2009 for gstreamermm by  doxygen 1.5.7.1