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  · 

QVideoProbe Class

The QVideoProbe class allows you to monitor video frames being played or recorded. More...

 #include <QVideoProbe>

Inherits: QObject.

Public Functions

QVideoProbe(QObject * parent = 0)
~QVideoProbe()
bool isActive() const
bool setSource(QMediaObject * source)
bool setSource(QMediaRecorder * mediaRecorder)
  • 31 public functions inherited from QObject

Signals

void flush()
void videoFrameProbed(const QVideoFrame & frame)

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 11 static public members inherited from QObject
  • 9 protected functions inherited from QObject

Detailed Description

The QVideoProbe class allows you to monitor video frames being played or recorded.

 QMediaPlayer *player = new QMediaPlayer();
 QVideoProbe *probe = new QVideoProbe;

 connect(probe, SIGNAL(videoFrameProbed(QVideoFrame)), this, SLOT(processFrame(QVideoFrame)));

 probe->setSource(player); // Returns true, hopefully.

 player->setVideoOutput(myVideoSurface);
 player->setMedia(QUrl::fromLocalFile("observation.mp4"));
 player->play(); // Start receving frames as they get presented to myVideoSurface

This same approach works with the QCamera object as well, to receive viewfinder or video frames as they are captured.

See also QAudioProbe, QMediaPlayer, and QCamera.

Member Function Documentation

QVideoProbe::QVideoProbe(QObject * parent = 0)

Creates a new QVideoProbe class with parent. After setting the source to monitor with setSource(), the videoFrameProbed() signal will be emitted when video frames are flowing in the source media object.

QVideoProbe::~QVideoProbe()

Destroys this probe and disconnects from any media object.

void QVideoProbe::flush() [signal]

This signal should be emitted when it is required to release all frames. Application must release all outstanding references to video frames.

bool QVideoProbe::isActive() const

Returns true if this probe is monitoring something, or false otherwise.

The source being monitored does not need to be active.

bool QVideoProbe::setSource(QMediaObject * source)

Sets the media object to monitor to source.

If source is zero, this probe will be deactivated and this function wil return true.

If the media object does not support monitoring video, this function will return false.

Any previously monitored objects will no longer be monitored. Passing in the same object will be ignored, but monitoring will continue.

bool QVideoProbe::setSource(QMediaRecorder * mediaRecorder)

Starts monitoring the given mediaRecorder.

If there is no mediaObject associated with mediaRecorder, or if it is zero, this probe will be deactivated and this function wil return true.

If the media recorder instance does not support monitoring video, this function will return false.

Any previously monitored objects will no longer be monitored. Passing in the same object will be ignored, but monitoring will continue.

void QVideoProbe::videoFrameProbed(const QVideoFrame & frame) [signal]

This signal should be emitted when a video frame is processed in the media service.

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