Gnash  0.8.10
Public Member Functions
gnash::media::VideoInput Class Reference

This is the interface for video input devices. More...

#include <VideoInput.h>

Inheritance diagram for gnash::media::VideoInput:
gnash::media::ffmpeg::VideoInputFfmpeg gnash::media::gst::VideoInputGst gnash::media::haiku::VideoInputHaiku

List of all members.

Public Member Functions

DSOEXPORT VideoInput ()
virtual ~VideoInput ()
virtual double activityLevel () const =0
 Return the current activity level of the webcam.
virtual size_t bandwidth () const =0
 The maximum available bandwidth for outgoing connections.
virtual void setBandwidth (size_t bandwidth)=0
 Set the bandwidth for outgoing connections.
virtual double currentFPS () const =0
 The current frame rate of the webcam.
virtual double fps () const =0
 The maximum FPS rate of the webcam.
virtual size_t height () const =0
 Return the height of the webcam's frame.
virtual size_t width () const =0
 Return the width of the webcam's frame.
virtual size_t index () const =0
 The index of the camera.
virtual void requestMode (size_t width, size_t height, double fps, bool favorArea)=0
 Request a native mode most closely matching the passed variables.
virtual void setMotionLevel (int m)=0
 Set the amount of motion required before notifying the core.
virtual int motionLevel () const =0
 Return the current motionLevel setting.
virtual void setMotionTimeout (int m)=0
 Set time without motion in milliseconds before core is notified.
virtual int motionTimeout () const =0
 Return the current motionTimeout setting.
virtual void mute (bool m)=0
virtual bool muted () const =0
virtual const std::string & name () const =0
 Return the name of this webcam.
virtual void setQuality (int q)=0
 Set the quality of the webcam.
virtual int quality () const =0
 Return the current quality of the webcam.

Detailed Description

This is the interface for video input devices.

Each VideoInput should represent exactly one webcam (or similar device). The interface for querying the camera is provisionally done, but needs more testing of how it actually works. Most of the values are faked. TODO: separate the process of finding cameras from this class. It could be implemented as a static method. The available cameras and all created VideoInput objects should be stored in a MediaHandler, mapped by an index for retrieval by ActionScript. TODO: design a useful interface for starting, stopping and attaching the video data. VideoInputGst has some functionality here, but it is not generic enough, relying on too many gst-specific implementation details.


Constructor & Destructor Documentation

DSOEXPORT gnash::media::VideoInput::VideoInput ( ) [inline]
virtual gnash::media::VideoInput::~VideoInput ( ) [inline, virtual]

Member Function Documentation

virtual double gnash::media::VideoInput::activityLevel ( ) const [pure virtual]

Return the current activity level of the webcam.

Returns:
A double specifying the amount of motion currently detected by the camera.

Implemented in gnash::media::gst::VideoInputGst, gnash::media::ffmpeg::VideoInputFfmpeg, and gnash::media::haiku::VideoInputHaiku.

virtual size_t gnash::media::VideoInput::bandwidth ( ) const [pure virtual]

The maximum available bandwidth for outgoing connections.

TODO: see if this should really be here.

Implemented in gnash::media::gst::VideoInputGst, gnash::media::ffmpeg::VideoInputFfmpeg, and gnash::media::haiku::VideoInputHaiku.

virtual double gnash::media::VideoInput::currentFPS ( ) const [pure virtual]

The current frame rate of the webcam.

Returns:
A double specifying the webcam's current FPS

Implemented in gnash::media::gst::VideoInputGst, gnash::media::ffmpeg::VideoInputFfmpeg, and gnash::media::haiku::VideoInputHaiku.

virtual double gnash::media::VideoInput::fps ( ) const [pure virtual]

The maximum FPS rate of the webcam.

Returns:
A double specifying the webcam's maximum FPS

Implemented in gnash::media::gst::VideoInputGst, gnash::media::ffmpeg::VideoInputFfmpeg, and gnash::media::haiku::VideoInputHaiku.

virtual size_t gnash::media::VideoInput::height ( ) const [pure virtual]
virtual size_t gnash::media::VideoInput::index ( ) const [pure virtual]
virtual int gnash::media::VideoInput::motionLevel ( ) const [pure virtual]
virtual int gnash::media::VideoInput::motionTimeout ( ) const [pure virtual]
virtual void gnash::media::VideoInput::mute ( bool  m) [pure virtual]
virtual bool gnash::media::VideoInput::muted ( ) const [pure virtual]
virtual const std::string& gnash::media::VideoInput::name ( ) const [pure virtual]

Return the name of this webcam.

Returns:
a string specifying the name of the webcam.

Implemented in gnash::media::gst::VideoInputGst, gnash::media::ffmpeg::VideoInputFfmpeg, and gnash::media::haiku::VideoInputHaiku.

virtual int gnash::media::VideoInput::quality ( ) const [pure virtual]
virtual void gnash::media::VideoInput::requestMode ( size_t  width,
size_t  height,
double  fps,
bool  favorArea 
) [pure virtual]

Request a native mode most closely matching the passed variables.

Parameters:
widthThe required width
heightThe required height
fpsThe required frame rate
favorAreaHow to match the requested mode.

Implemented in gnash::media::gst::VideoInputGst, gnash::media::ffmpeg::VideoInputFfmpeg, and gnash::media::haiku::VideoInputHaiku.

virtual void gnash::media::VideoInput::setBandwidth ( size_t  bandwidth) [pure virtual]
virtual void gnash::media::VideoInput::setMotionLevel ( int  m) [pure virtual]

Set the amount of motion required before notifying the core.

Implemented in gnash::media::gst::VideoInputGst, gnash::media::ffmpeg::VideoInputFfmpeg, and gnash::media::haiku::VideoInputHaiku.

virtual void gnash::media::VideoInput::setMotionTimeout ( int  m) [pure virtual]

Set time without motion in milliseconds before core is notified.

Implemented in gnash::media::gst::VideoInputGst, gnash::media::ffmpeg::VideoInputFfmpeg, and gnash::media::haiku::VideoInputHaiku.

virtual void gnash::media::VideoInput::setQuality ( int  q) [pure virtual]
virtual size_t gnash::media::VideoInput::width ( ) const [pure virtual]

The documentation for this class was generated from the following file: