Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QMediaResource Class Reference

The QMediaResource class provides a description of a media resource. More...

    #include <QMediaResource>

This class is under development and is subject to change.


Public Functions

QMediaResource ()
QMediaResource ( const QUrl & uri, const QString & mimeType = QString() )
QMediaResource ( const QMediaResource & other )
~QMediaResource ()
int audioBitRate () const
QString audioCodec () const
int channels () const
qint64 duration () const
int frequency () const
bool isNull () const
QString language () const
QString mimeType () const
QSize resolution () const
int sampleSize () const
void setAudioBitRate ( int rate )
void setAudioCodec ( const QString & codec )
void setChannels ( int channels )
void setDuration ( qint64 duration )
void setFrequency ( int frequency )
void setLanguage ( const QString & language )
void setResolution ( const QSize & resolution )
void setResolution ( int width, int height )
void setSampleSize ( int size )
void setSize ( const qint64 size )
void setVideoBitRate ( int rate )
void setVideoCodec ( const QString & codec )
qint64 size () const
QUrl uri () const
int videoBitRate () const
QString videoCodec () const
bool operator!= ( const QMediaResource & other ) const
QMediaResource & operator= ( const QMediaResource & other )
bool operator== ( const QMediaResource & other ) const

Detailed Description

The QMediaResource class provides a description of a media resource.

A media resource is composed of a URI containing the location of the resource and a set of properties that describe the format of the resource. The properties provide a means to assess a resource without first attempting to load it, and in situations where media be represented by multiple alternative representations provide a means to select the appropriate resource.

Media made available by a remote services can often be available in multiple encodings or quality levels, this allows a client to select an appropriate resource based on considerations such as codecs supported, network bandwidth, and display constraints. QMediaResource includes information such as the MIME type, audio and video codecs, audio and video bit rates, and resolution so these constraints and others can be evaluated.

The only mandatory property of a QMediaResource is the uri().

See also QMediaContent.


Member Function Documentation

QMediaResource::QMediaResource ()

Constructs a null media resource.

QMediaResource::QMediaResource ( const QUrl & uri, const QString & mimeType = QString() )

Constructs a media resource with the given mimeType from a uri.

QMediaResource::QMediaResource ( const QMediaResource & other )

Constructs a copy of a media resource other.

QMediaResource::~QMediaResource ()

Destroys a media resource.

int QMediaResource::audioBitRate () const

Returns the bit rate in bits per second of a media resource's audio stream.

This may be zero if the bit rate is unknown, or the resource contains no audio stream.

See also setAudioBitRate().

QString QMediaResource::audioCodec () const

Returns the audio codec of a media resource.

This may be null if the media resource does not contain an audio stream, or the codec is unknown.

See also setAudioCodec().

int QMediaResource::channels () const

Returns the number of audio channels in a media resource.

This may be zero if the sample size is unknown, or the resource contains no audio stream.

See also setChannels().

qint64 QMediaResource::duration () const

Returns the duration in milliseconds of a media resource.

This may be zero if the duration is unknown, or the resource has no explicit duration (i.e. the resource is an image, or a live stream).

See also setDuration().

int QMediaResource::frequency () const

Returns the audio sample frequency of a media resource.

This may be zero if the sample size is unknown, or the resource contains no audio stream.

See also setFrequency().

bool QMediaResource::isNull () const

Identifies if a media resource is null.

Returns true if the resource is null, and false otherwise.

QString QMediaResource::language () const

Returns the language of a media resource as an ISO 639-2 code.

This may be null if the language is unknown.

See also setLanguage().

QString QMediaResource::mimeType () const

Returns the MIME type of a media resource.

This may be null if the MIME type is unknown.

QSize QMediaResource::resolution () const

Returns the resolution in pixels of a media resource.

This may be null is the resolution is unknown, or the resource contains no pixel data (i.e. the resource is an audio stream.

See also setResolution().

int QMediaResource::sampleSize () const

Returns the audio sample size in bits per sample of a media resource.

This may return zero if the sample size is unknown, or the resource contains no audio stream.

See also setSampleSize().

void QMediaResource::setAudioBitRate ( int rate )

Sets the bit rate in bits per second of a media resource's video stream.

See also audioBitRate().

void QMediaResource::setAudioCodec ( const QString & codec )

Sets the audio codec of a media resource.

See also audioCodec().

void QMediaResource::setChannels ( int channels )

Sets the number of audio channels in a media resource.

See also channels().

void QMediaResource::setDuration ( qint64 duration )

Sets the duration in milliseconds of a media resource.

See also duration().

void QMediaResource::setFrequency ( int frequency )

Sets the audio sample frequency of a media resource.

See also frequency().

void QMediaResource::setLanguage ( const QString & language )

Sets the language of a media resource.

See also language().

void QMediaResource::setResolution ( const QSize & resolution )

Sets the resolution in pixels of a media resource.

See also resolution().

void QMediaResource::setResolution ( int width, int height )

Sets the width and height in pixels of a media resource.

void QMediaResource::setSampleSize ( int size )

Sets the audio sample size of a media resource.

See also sampleSize().

void QMediaResource::setSize ( const qint64 size )

Sets the size in bytes of a media resource.

See also size().

void QMediaResource::setVideoBitRate ( int rate )

Sets the bit rate in bits per second of a media resource's video stream.

See also videoBitRate().

void QMediaResource::setVideoCodec ( const QString & codec )

Sets the video codec of media resource.

See also videoCodec().

qint64 QMediaResource::size () const

Returns the size in bytes of a media resource.

This may be zero if the size is unknown.

See also setSize().

QUrl QMediaResource::uri () const

Returns the URI of a media resource.

int QMediaResource::videoBitRate () const

Returns the bit rate in bits per second of a media resource's video stream.

This may be zero if the bit rate is unknown, or the resource contains no video stream.

See also setVideoBitRate().

QString QMediaResource::videoCodec () const

Returns the video codec of a media resource.

This may be null if the media resource does not contain a video stream, or the codec is unknonwn.

See also setVideoCodec().

bool QMediaResource::operator!= ( const QMediaResource & other ) const

Compares a media resource to other.

Returns true if they are different, and false otherwise.

QMediaResource & QMediaResource::operator= ( const QMediaResource & other )

Assigns the value of other to a media resource.

bool QMediaResource::operator== ( const QMediaResource & other ) const

Compares a media resource to other.

Returns true if the resources are identical, and false otherwise.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtmobility-1.0-tp
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web