Gnash  0.8.11dev
Public Member Functions | List of all members
gnash::media::VideoInput Class Referenceabstract

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

Public Member Functions

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

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

§ VideoInput()

DSOEXPORT gnash::media::VideoInput::VideoInput ( )
inline

§ ~VideoInput()

virtual gnash::media::VideoInput::~VideoInput ( )
inlinevirtual

Member Function Documentation

§ activityLevel()

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.

Referenced by ~VideoInput().

§ bandwidth()

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.

Referenced by ~VideoInput().

§ currentFPS()

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.

Referenced by ~VideoInput().

§ fps()

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.

Referenced by ~VideoInput().

§ height()

virtual size_t gnash::media::VideoInput::height ( ) const
pure virtual

Return the height of the webcam's frame.

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

Referenced by ~VideoInput().

§ index()

virtual size_t gnash::media::VideoInput::index ( ) const
pure virtual

§ motionLevel()

virtual int gnash::media::VideoInput::motionLevel ( ) const
pure virtual

Return the current motionLevel setting.

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

Referenced by ~VideoInput().

§ motionTimeout()

virtual int gnash::media::VideoInput::motionTimeout ( ) const
pure virtual

Return the current motionTimeout setting.

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

Referenced by ~VideoInput().

§ mute()

virtual void gnash::media::VideoInput::mute ( bool  m)
pure virtual

§ muted()

virtual bool gnash::media::VideoInput::muted ( ) const
pure virtual

§ name()

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.

Referenced by ~VideoInput().

§ quality()

virtual int gnash::media::VideoInput::quality ( ) const
pure virtual

Return the current quality of the webcam.

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

Referenced by ~VideoInput().

§ requestMode()

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.

Referenced by ~VideoInput().

§ setBandwidth()

virtual void gnash::media::VideoInput::setBandwidth ( size_t  bandwidth)
pure virtual

Set the bandwidth for outgoing connections.

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

Referenced by ~VideoInput().

§ setMotionLevel()

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.

Referenced by ~VideoInput().

§ setMotionTimeout()

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.

Referenced by ~VideoInput().

§ setQuality()

virtual void gnash::media::VideoInput::setQuality ( int  q)
pure virtual

§ width()

virtual size_t gnash::media::VideoInput::width ( ) const
pure virtual

Return the width of the webcam's frame.

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

Referenced by ~VideoInput().


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