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>

Public Functions

QMediaResource ()
QMediaResource ( const QUrl & url, const QString & mimeType = QString() )
QMediaResource ( const QNetworkRequest & request, const QString & mimeType = QString() )
QMediaResource ( const QMediaResource & other )
~QMediaResource ()
int audioBitRate () const
QString audioCodec () const
int channelCount () const
qint64 dataSize () const
bool isNull () const
QString language () const
QString mimeType () const
QNetworkRequest request () const
QSize resolution () const
int sampleRate () const
void setAudioBitRate ( int rate )
void setAudioCodec ( const QString & codec )
void setChannelCount ( int channels )
void setDataSize ( const qint64 size )
void setLanguage ( const QString & language )
void setResolution ( const QSize & resolution )
void setResolution ( int width, int height )
void setSampleRate ( int sampleRate )
void setVideoBitRate ( int rate )
void setVideoCodec ( const QString & codec )
QUrl url () 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 URL 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 url().

See also QMediaContent.

Member Function Documentation

QMediaResource::QMediaResource ()

Constructs a null media resource.

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

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

QMediaResource::QMediaResource ( const QNetworkRequest & request, const QString & mimeType = QString() )

Constructs a media resource with the given mimeType from a network request.

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::channelCount () 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 setChannelCount().

qint64 QMediaResource::dataSize () const

Returns the size in bytes of a media resource.

This may be zero if the size is unknown.

See also setDataSize().

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.

QNetworkRequest QMediaResource::request () const

Returns the network request associated with this media resource.

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::sampleRate () const

Returns the audio sample rate of a media resource.

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

See also setSampleRate().

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::setChannelCount ( int channels )

Sets the number of audio channels in a media resource.

See also channelCount().

void QMediaResource::setDataSize ( const qint64 size )

Sets the size in bytes of a media resource.

See also dataSize().

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::setSampleRate ( int sampleRate )

Sets the audio sampleRate of a media resource.

See also sampleRate().

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().

QUrl QMediaResource::url () const

Returns the URL 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.

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.

[0]; s.parentNode.insertBefore(ga, s); })();
Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 94
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 45
  4. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  5. Les développeurs détestent-ils les antivirus ? Un programmeur manifeste sa haine envers ces solutions de sécurité 6
  6. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  7. Qt Commercial : Digia organise un webinar gratuit le 27 mars sur la conception d'interfaces utilisateur et d'applications avec le framework 0
Page suivante

Le Qt Quarterly au hasard

Logo

Conserver la réactivité de l'IHM

Qt Quarterly est la revue trimestrielle proposée par Nokia et à destination des développeurs Qt. Ces articles d'une grande qualité technique sont rédigés par des experts Qt. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

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.1
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