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  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

Multimedia Overview

Overview

Features

Qt Multimedia offers APIs for doing many multimedia related tasks:

  • Accessing raw audio devices for input and output
  • Play low latency sound effects
  • Play media files in playlists (like compressed audio, or video files)
  • Record audio and compress it
  • Tune and listen to radio stations, and receive radio program information
  • Use a camera, including viewfinder, image capture, and movie recording
  • Play 3D positional audio with QtAudioEngine
  • Decode audio media files into memory for processing
  • Accessing video frames or audio buffers as they are played or recorded

Multimedia Components

All of these tasks can be broadly broken down into four main areas. More information (including background information and class references) are available here:

Multimedia recipes

For some quick recipes for specific tasks, look at the overviews above and consult this table:

Use caseExamplesQML ClassesC++ Classes
Playing a sound effectTBDSoundEffectQSoundEffect
Playing low latency audioaudiooutput, spectrumQAudioOutput
Playing encoded audio (MP3, AAC etc)playerAudio, MediaPlayerQMediaPlayer
Accessing raw audio input dataspectrum, audioinputQAudioInput
Recording encoded audio dataaudiorecorderQAudioRecorder
Discovering raw audio devicesaudiodevicesQAudioDeviceInfo
Video Playbackplayer, qmlvideo, qmlvideofxMediaPlayer, VideoOutput, VideoQMediaPlayer, QVideoWidget, QGraphicsVideoItem
Video ProcessingqmlvideofxMediaPlayer, VideoOutputQMediaPlayer, QAbstractVideoSurface, QVideoFrame
Listening to the radiodeclarative-radioRadio, RadioDataQRadioTuner, QRadioData
Accessing camera viewfindercamera, declarative-cameraCamera, VideoOutputQCamera, QVideoWidget, QGraphicsVideoItem
Viewfinder processingCamera, VideoOutputQCamera, QAbstractVideoSurface, QVideoFrame
Capturing photoscamera, declarative-cameraCameraQCamera, QCameraImageCapture
Capturing moviescamera, declarative-cameraCameraQCamera, QMediaRecorder
3D sound sourcesAudio EngineAudioEngine, Sound

Limitations

In many cases the Qt Multimedia APIs build upon the multimedia framework of the underlying system. This can mean that support for various codec or containers can vary between machines, depending on what the end user has installed.

Advanced Usage

For developers wishing to access some platform specific settings, or to port the Qt Multimedia APIs to a new platform or technology, see Multimedia Backend Development.

Changes from previous versions

If you've previously used Qt Multimedia in Qt 4.x, or used Qt Multimedia Kit in Qt Mobility, please see Changes in Qt Multimedia for more information on what has changed, and what you might need to change when porting code.

Reference Documentation

QML Types

The following types are accessed by using:

 import QtMultimedia 5.0

QtMultimedia5::Audio

The Audio type allows you to add audio playback to a scene.

QtMultimedia5::Camera

The Camera type allows you to access viewfinder frames, and take photos and movies.

QtMultimedia5::CameraCapture

The CameraCapture type provides an interface for capturing camera images

QtMultimedia5::CameraExposure

The CameraExposure type provides interface for exposure related camera settings.

QtMultimedia5::CameraFlash

The CameraFlash type provides interface for flash related camera settings.

QtMultimedia5::CameraFocus

The CameraFocus type provides interface for focus related camera settings.

QtMultimedia5::CameraImageProcessing

The CameraImageProcessing type provides an interface for camera capture related settings

QtMultimedia5::CameraRecorder

The CameraRecorder type controls video recording with the Camera.

QtMultimedia5::MediaPlayer

The MediaPlayer type allows you to add media playback to a scene.

QtMultimedia5::Radio

The Radio type allows you to access radio functionality from a QML application.

QtMultimedia5::RadioData

The RadioData type allows you to access RDS data from a QML application.

QtMultimedia5::SoundEffect

The SoundEffect type provides a way to play sound effects in QML.

QtMultimedia5::Torch

The Torch type provides simple control over torch functionality

Video

A convenience type for showing a specified video

QtMultimedia5::VideoOutput

The VideoOutput type allows you to render video or camera viewfinder.

The following types are accessed by using QtAudioEngine:

 import QtAudioEngine 1.0

AttenuationModelInverse

Defines a non-linear attenuation curve for a Sound.

QtAudioEngine1::AttenuationModelLinear

Defines a linear attenuation curve for a Sound.

QtAudioEngine1::AudioCategory

Control all active sound instances by group.

QtAudioEngine1::AudioEngine

The AudioEngine type allows you to organize all your 3d audio content in one place.

QtAudioEngine1::AudioListener

The AudioListener type allows you to control global listener parameters.

QtAudioEngine1::AudioSample

The AudioSample type allows you to load audio samples, mostly wav file.

QtAudioEngine1::PlayVariation

The PlayVariation type allows you to define a playback variation for sounds. So each time the playback of the same sound can be a slightly different even with the same AudioSample.

QtAudioEngine1::Sound

The Sound type allows you to define a variety of samples and parameters to be used for SoundInstance.

QtAudioEngine1::SoundInstance

The SoundInstance type allows you to play 3d audio content.

Multimedia Classes

QAbstractVideoBuffer

Abstraction for video data

QAbstractVideoSurface

Base class for video presentation surfaces

QAudio

Contains enums used by the audio classes

QAudioBuffer

Represents a collection of audio samples with a specific format and sample rate

QAudioDecoder

Allows decoding audio

QAudioDecoderControl

Access to the audio decoding functionality of a QMediaService

QAudioDeviceInfo

Interface to query audio devices and their functionality

QAudioEncoderControl

Access to the settings of a media service that performs audio encoding

QAudioEncoderSettings

Set of audio encoder settings

QAudioEndpointSelector

Audio endpoint selector media control

QAudioFormat

Stores audio stream parameter information

QAudioInput

Interface for receiving audio data from an audio input device

QAudioOutput

Interface for sending audio data to an audio output device

QAudioProbe

Allows you to monitor audio being played or recorded

QAudioRecorder

Used for the recording of audio

QCamera

Interface for system camera devices

QCameraCaptureBufferFormatControl

Control for setting the capture buffer format

QCameraCaptureDestinationControl

Control for setting capture destination

QCameraControl

Abstract base class for classes that control still cameras or video cameras

QCameraExposure

Interface for exposure related camera settings

QCameraExposureControl

Allows controlling camera exposure parameters

QCameraFeedbackControl

Allows controlling feedback (sounds etc) during camera operation

QCameraFlashControl

Allows controlling a camera's flash

QCameraFocusControl

Supplies control for focusing related camera parameters

QCameraFocusZone

Information on zones used for autofocusing a camera

QCameraImageCapture

Used for the recording of media content

QCameraImageCaptureControl

Control interface for image capture services

QCameraImageProcessing

Interface for image processing related camera settings

QCameraImageProcessingControl

Abstract class for controlling image processing parameters, like white balance, contrast, saturation, sharpening and denoising

QCameraLocksControl

Abstract base class for classes that control still cameras or video cameras

QCameraViewfinderSettingsControl

Abstract class for controlling camera viewfinder parameters

QCameraZoomControl

Supplies control for optical and digital camera zoom

QGraphicsEffect

The base class for all graphics effects

QGraphicsVideoItem

Graphics item which display video produced by a QMediaObject

QImageEncoderControl

Access to the settings of a media service that performs image encoding

QMediaAudioProbeControl

Allows control over probing audio data in media objects

QMediaAvailabilityControl

Supplies a control for reporting availability of a service

QMediaBindableInterface

The base class for objects extending media objects functionality

QMediaContainerControl

Access to the output container format of a QMediaService

QMediaContent

Access to the resources relating to a media content

QMediaControl

Base interface for media service controls

QMediaGaplessPlaybackControl

Access to the gapless playback related control of a QMediaService

QMediaNetworkAccessControl

Allows the setting of the Network Access Point for media related activities

QMediaObject

Common base for multimedia objects

QMediaPlayer

Allows the playing of a media source

QMediaPlayerControl

Access to the media playing functionality of a QMediaService

QMediaPlaylist

List of media content to play

QMediaRecorder

Used for the recording of media content

QMediaRecorderControl

Access to the recording functionality of a QMediaService

QMediaResource

Description of a media resource

QMediaService

Common base class for media service implementations

QMediaStreamsControl

Media stream selection control

QMediaTimeInterval

Represents a time interval with integer precision

QMediaTimeRange

Represents a set of zero or more disjoint time intervals

QMediaVideoProbeControl

Allows control over probing video frames in media objects

QMetaDataReaderControl

Read access to the meta-data of a QMediaService's media

QMetaDataWriterControl

Write access to the meta-data of a QMediaService's media

QRadioData

Interfaces to the RDS functionality of the system radio

QRadioDataControl

Access to the RDS functionality of the radio in the QMediaService

QRadioTuner

Interface to the systems analog radio device

QRadioTunerControl

Access to the radio tuning functionality of a QMediaService

QSound

Method to play .wav sound files

QSoundEffect

Way to play low latency sound effects

QStaticText

Enables optimized drawing of text when the text and its layout is updated rarely

QVideoDeviceControl

Video device selector media control

QVideoEncoderControl

Access to the settings of a media service that performs video encoding

QVideoFrame

Represents a frame of video data

QVideoProbe

Allows you to monitor video frames being played or recorded

QVideoRendererControl

QVideoSurfaceFormat

Specifies the stream format of a video presentation surface

QVideoWidget

Widget which presents video produced by a media object

QtMultimedia

Contains miscellaneous identifiers used throughout the Qt Multimedia library

QAudioBuffer::StereoSample

Simple wrapper for a stereo audio sample

Phonon::VideoWidget

Widget that is used to display video

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 5.0-snapshot
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