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  · 

MediaController Class Reference
(Phonon::MediaController)
[Phonon module]

The MediaController class controls optional features of a media file/device. More...

 #include <Phonon/MediaController>

This class is not part of the Qt GUI Framework Edition.

Inherits QObject.

This class was introduced in Qt 4.4.


Public Types

enum Feature { Angles, Chapters, Titles }
flags Features

Public Functions

MediaController ( MediaObject * parent )
~MediaController ()
bool autoplayTitles () const
int availableAngles () const
int availableChapters () const
int availableTitles () const
int currentAngle () const
int currentChapter () const
int currentTitle () const
Features supportedFeatures () const
  • 29 public functions inherited from QObject

Public Slots

void nextTitle ()
void previousTitle ()
void setAutoplayTitles ( bool enable )
void setCurrentAngle ( int angleNumber )
void setCurrentChapter ( int chapterNumber )
void setCurrentTitle ( int titleNumber )
  • 1 public slot inherited from QObject

Signals

void angleChanged ( int angleNumber )
void availableAnglesChanged ( int availableAngles )
void availableChaptersChanged ( int availableChapters )
void availableTitlesChanged ( int availableTitles )
void chapterChanged ( int chapterNumber )
void titleChanged ( int titleNumber )

Additional Inherited Members

  • 1 property inherited from QObject
  • 5 static public members inherited from QObject
  • 7 protected functions inherited from QObject

Detailed Description

The MediaController class controls optional features of a media file/device.

Some media sources have content that the MediaObject does not provide control over, for instance, chapters in a DVD file. The functionality the media controller offers is dependent on the type of media source that is played back. Commonly, the media controller allows you to:

  • Navigate between chapters.
  • Navigate between titles.
  • Select between angles.

The Feature enum explains these terms in more detail, and their context in playback of CD and DVD.

The media controller keeps a MediaObject, of which media source is played back. You can still call the media object's functions, e.g., stop(); this is all handled correctly by the media controller. You have the option of letting the media controller play all titles of a source in sequence by setting the autoplay titles option.

To start a playback using a media object, you call play() on the media object. To play a specific title, use setCurrentTitle() and then call play().

Warning: The Phonon::MediaController class is not yet supported by Qt backends.

See also Phonon Module.


Member Type Documentation

enum MediaController::Feature
flags MediaController::Features

The values of this enum are interpreted differently depending on the type of media source, e.g., DVD or CD. We give examples for these sources.

ConstantValueDescription
Phonon::MediaController::Angles1In the VOB (DVD) format, it is possible to to give several video streams of the same scene, each of which displays the scene from a different angle. The DVD viewer can then change between these angles.
Phonon::MediaController::Chapters2In the VOB format, chapters are points in a single video stream that can be played and seeked to separately.
Phonon::MediaController::Titles4On a CD, a title is a separate sound track. On DVD, a title is a separate VOB file.

The Features type is a typedef for QFlags<Feature>. It stores an OR combination of Feature values.


Member Function Documentation

MediaController::MediaController ( MediaObject * parent )

Constructs a new MediaController with the media object (parent) to be used by the media controller.

See also MediaObject and Feature.

MediaController::~MediaController ()

void MediaController::angleChanged ( int angleNumber )   [signal]

This signal is emitted whenever the current angle changes. The new angle number is given by angleNumber.

See also Feature.

bool MediaController::autoplayTitles () const

Returns true if titles will automatically be played when the media is played; otherwise returns false.

The media controller will play the titles of the media source in sequence when the media object's play() function is called. If the autoplay option is disabled, the media object will play the MediaController::currentTitle(){current title} and then finish the playback.

See also setAutoplayTitles() and currentTitle().

int MediaController::availableAngles () const

Returns the available angles that is available for the current media source.

See also Feature.

void MediaController::availableAnglesChanged ( int availableAngles )   [signal]

This signal is emitted whenever the number of available angles changes. The new number of available angles is given by availableAngles.

See also Feature.

int MediaController::availableChapters () const

Returns the number of chapters the current media source contains.

See also Feature.

void MediaController::availableChaptersChanged ( int availableChapters )   [signal]

This signal is emitted whenever the number of available chapters changes. The new number of available chapters is given by availableChapters.

See also Feature.

int MediaController::availableTitles () const

Returns the number of titles that the current media source contains.

See also Feature.

void MediaController::availableTitlesChanged ( int availableTitles )   [signal]

This signal is emitted whenever the number of available titles changes. The new number of available titles is given by availableTitles.

See also Feature.

void MediaController::chapterChanged ( int chapterNumber )   [signal]

This signal is emitted whenever the current chapter changes. The new chapter number is given by chapterNumber.

See also Feature.

int MediaController::currentAngle () const

Returns the angle that is currently used.

See also setCurrentAngle() and Feature.

int MediaController::currentChapter () const

Returns the chapter that is currently being played back.

See also setCurrentChapter() and Feature.

int MediaController::currentTitle () const

Returns the title that is currently played back.

The current title is 0 (the first) by default.

See also setCurrentTitle() and Feature.

void MediaController::nextTitle ()   [slot]

Skips to the next title.

If it was playing before the title change it will start playback on the next title if autoplayTitles is enabled.

See also Feature.

void MediaController::previousTitle ()   [slot]

Skips to the previous title.

If it was playing before the title change it will start playback on the previous title if autoplayTitles is enabled.

See also Feature.

void MediaController::setAutoplayTitles ( bool enable )   [slot]

Sets the titles to play automatically when the media is played if enable is true; otherwise disables this option.

The media controller will play the titles of the media source in sequence when the media object's play() function is called. If the autoplay option is disabled, the media object will play the MediaController::currentTitle(){current title} and then finish the playback.

See also autoplayTitles() and currentTitle().

void MediaController::setCurrentAngle ( int angleNumber )   [slot]

Sets the current angle to the given angleNumber if the media file or device supports navigation by angle number.

See also currentAngle() and Feature.

void MediaController::setCurrentChapter ( int chapterNumber )   [slot]

Sets the current chapter to the given chapterNumber if the media file or device supports navigation by chapter number.

See also currentChapter() and Feature.

void MediaController::setCurrentTitle ( int titleNumber )   [slot]

Skips to the given title titleNumber.

If it was playing before the title change it will start playback on the new title if autoplayTitles is enabled.

See also currentTitle() and Feature.

Features MediaController::supportedFeatures () const

void MediaController::titleChanged ( int titleNumber )   [signal]

This signal is emitted whenever the current title changes. The new title number is given by titleNumber.

See also Feature.

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 79
  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. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. 2017 : un quinquennat pour une nouvelle version du C++ ? Possible, selon Herb Sutter 6
Page suivante

Le Qt Developer Network au hasard

Logo

Les bases

Le Qt Developer Network est un réseau de développeurs Qt anglophone, où ils peuvent partager leur expérience sur le framework. 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 4.6
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