Basic Image AlgorithmS Library 2.8.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes

BIAS::VideoSource_FFmpeg Class Reference

Simple video decoding of video files using FFmpeg library. More...

#include <VideoSource/VideoSource_FFmpeg.hh>

Inheritance diagram for BIAS::VideoSource_FFmpeg:
Collaboration diagram for BIAS::VideoSource_FFmpeg:

List of all members.

Public Member Functions

void AddDebugLevel (const long int lv)
void AddDebugLevel (const std::string &name)
virtual int AutoMode (int, bool)
 Use this to enable/disable any automatic modes addressed via enums.
virtual int CloseDevice ()
 Close video file.
bool DebugLevelIsSet (const long int lv) const
bool DebugLevelIsSet (const std::string &name) const
virtual void EnsureLatestFrame (const bool b)
virtual int GetAllDevices (std::vector< std::string > &devices)
virtual bool GetAutoBrightness ()
virtual bool GetAutoContrast ()
virtual bool GetAutoGain ()
virtual bool GetAutoShutter ()
virtual float GetBrightness ()
virtual void GetBrightnessRange (double &min, double &max)
float GetBytesPerPixel () const
virtual int GetCapabilities (VideoSourceCapabilities &caps)
 Use this method to learn something about the capabilities of the source (only usefull for v4l-sources e.g.
virtual int GetCapabilities (const char *device, VideoSourceCapabilities &caps)
int GetColorChannels ()
BIAS::ImageBase::EColorModel GetColorModel ()
virtual float GetContrast ()
virtual void GetContrastRange (double &min, double &max)
int64_t GetCurrentFrameNumber () const
 Get the number of frames decoded so far.
char * GetDateString ()
 Get a string representation of the timestamp of the video stream.
int GetDebugLevel () const
std::ostream & GetDebugStream () const
void GetDebugStream (std::ostream &os) const
virtual void GetDeviceChannelNames (std::vector< std::string > &names)
 if more than one channel is present names can be returned here.
int64_t GetDuration ()
 Get the duration of the video stream in microseconds.
std::string GetError ()
 Get the last error message.
virtual unsigned int GetFeature (int feature)
 this function is used to query things like shutter, zoom...
float GetFPS ()
 Get the framerate of the video stream.
virtual float GetGain ()
virtual void GetGainRange (double &min, double &max)
int GetHeight ()
int GetID ()
std::string GetIdentifier ()
int64_t GetNumberOfFrames () const
 Get the number of frames in the video stream.
int64_t GetPTS ()
 Get the presentation timestamp of the last decoded frame in microseconds.
virtual float GetShutter ()
virtual void GetShutterRange (double &min, double &max)
int GetTimeBaseDen ()
 Get the timebase denumerator of the video stream.
int GetTimeBaseNum ()
 Get the timebase numerator of the video stream.
int64_t GetTimestamp ()
 Get the timestamp of the video stream in microseconds in Unix time.
virtual int GetWhiteBalance (float &rvalue, float &bvalue)
int GetWidth ()
virtual int GrabSingle (Camera< unsigned char > &image)
 Get the next frame from the video file.
virtual int GrabSingle (BIAS::Camera< float > &image)
virtual int GrabSingle (BIAS::Camera< char > &image)
virtual int GrabSingle (BIAS::Camera< short int > &image)
virtual int GrabSingle (BIAS::Camera< int > &image)
virtual int GrabSingle (BIAS::Camera< unsigned short int > &image)
virtual int GrabSingle (BIAS::Camera< unsigned int > &image)
virtual int GrabSingle (BIAS::Camera< double > &image)
virtual bool HasControlBrightness ()
virtual bool HasControlContrast ()
virtual bool HasControlGain ()
virtual bool HasControlShutter ()
virtual bool HasControlWhiteBalance ()
virtual int InitImage (BIAS::ImageBase &Image)
 Call this only after opening the device successfully.
bool IsActive ()
bool IsControllable ()
 tell if SetShutter, SetGain... would work
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel
virtual int OnePushAuto (int feature)
virtual int OpenDevice (std::string Prefix, std::string Postfix, int DigitCount, int PictureCount, int StartCount=0)
 used in child class VideoSource_Disk
virtual int OpenDevice (int device)
 a device number can be specified here (DCAM) or port number (Net)
virtual int OpenDevice (const char *filename)
 Open video file.
virtual int OpenDevice (const std::vector< std::string > &FileNames)
 used in child class VideoSource_Disk
virtual int OpenDevice ()
 this simplest method to open a device selects the first available device E.g.
virtual int PostGrab ()
 Stop anythig started in PreGrab()
virtual int PreGrab ()
 Do last preparations before grabbing.
void PrintDebugLevel (std::ostream &os=std::cout) const
void RemoveDebugLevel (const std::string &name)
void RemoveDebugLevel (const long int lv)
virtual void ResetPanTiltZoom ()
 Reset digital zoom, pan and tilt to defaults to ensure compliance with calibration.
int SeekFrame (int64_t frame)
 Seek to frame in video stream.
int SeekMs (int ms)
 Seek to time in milliseconds in video stream.
virtual void SetAutoBrightness (bool b)
virtual void SetAutoContrast (bool b)
virtual void SetAutoGain (bool b)
virtual void SetAutoShutter (bool b)
virtual int SetBrightness (float g)
void SetBytesPerPixel (unsigned char bpp)
 Must be used before OpenDevice() !
virtual int SetColorModel (ImageBase::EColorModel mode)
 Set output color model.
virtual int SetContrast (float g)
void SetDebugLevel (const std::string &name)
void SetDebugLevel (const long int lv)
void SetDebugStream (const std::ostream &os)
void SetDeviceChannel (int channel)
 Use channel to select one of many cameras on the same Must be used before OpenDevice() !
int SetDirectToDisk (const std::string &filename)
 this enables the very fast direct-to-disk mode.
virtual void SetExternalTrigger (bool trigger=true)
 specify if there's an external trigger
virtual int SetFeature (int feature, unsigned int value)
 this function is used to control things like shutter, zoom...
void SetFPS (float fps)
 Use channel to select one of many cameras on the same.
virtual int SetGain (float g)
 Set gain to g with g[dB].
virtual int SetShutter (float exptime)
 Set shutter (exposure time) to exptime in seconds.
virtual void SetSize (int w, int h, int bytesperpixel=1)
 These functions are not inline to let other class overload them
But they are implemented for this class Must be used before OpenDevice() !
virtual void SetWaitForNew (bool waitForNew)
 If you want as many images as possbile, and dont care about equal ones call this with "false".
virtual int SetWhiteBalance (float rvalue, float bvalue)
 range is [-1.0 , 1.0)
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels
virtual int SoftwareWhiteBalance ()
 VideoSource_FFmpeg ()
 Standard constructor.
virtual ~VideoSource_FFmpeg ()
 Clean up.

Static Public Member Functions

static long int GetGlobalDebugLevel ()
static void SetGlobalDebugLevel (long int lev)

Protected Member Functions

long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel
char * ExtractDateString_ (std::string str)
 Try to extract date string of format "YYYYMMDD_HHMMSS" from string.
void Init_ ()
 Called by constructor to init variables.
int WriteDirect_ (const unsigned char *data, const BIAS::UUID &uuid, const long int &sec, const long int &usec)

Protected Attributes

long int _liDebugLevel
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class
std::map< std::string, long int > _String2Debuglevel
bool Active_
 active_ is set in PreGrab() und unset in PostGrab()
bool bExternalTrigger_
 external trigger flag
float BytesPerPixel_
 BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5.
int ColorChannels_
BIAS::ImageBase::EColorModel ColorMode_
bool CompleteInitialized_
 Some state variables.
char * dateStr_
 String representation of timestamp_.
const char * DefaultDevice_
int DeviceChannel_
bool DirectToDisk_
char * DtDBuffer_
unsigned int DtDBufferSize_
int DtDFd_
BIAS::VideoStream::VSImageHeaderDtDImageHeader_
char * DtDStartOfImage_
int64_t duration_
 Stream duration in milliseconds, 0 if unknown.
std::string errMsg_
 The last error message.
int64_t frameNumber_
 Number of decoded frames.
float FramesPerSecond_
bool Grabbing_
 grabbing_ is set and unset in Grab*()
int Height_
int ID_
std::string Identifier_
unsigned int ImageSize_
bool IsControllable_
double maxBrightness_
double maxContrast_
double maxGain_
double maxShutter_
double minBrightness_
double minContrast_
double minGain_
double minShutter_
int64_t numFrames_
 Number of frames of the stream, 0 if unknown.
enum PixelFormat outputPixFmt_
 Output frame pixel format.
uint8_t * pBuffer_
 Ouput frame buffer.
AVFormatContext * pFormatCtx_
 Format context for video decoder.
AVFrame * pFrame_
 Video stream frame.
AVFrame * pOutputFrame_
 Output frame.
SwsContext * pSwsCtx_
 Color conversion context.
int64_t pts_
 Presentation timestamp of last decoded frame in microseconds.
int streamIndex_
 Index of the video stream.
int timeBaseDen_
 Stream timebase denumerator.
int timeBaseNum_
 Stream timebase numerator.
int64_t timestamp_
 Stream timestamp.
bool WaitForNew_
int Width_

Static Protected Attributes

static std::ostream _zDebugStream
static long int GlobalDebugLevel = 0

Detailed Description

Simple video decoding of video files using FFmpeg library.

Author:
Carsten Heine <carstenheine@gmx.de>

Definition at line 59 of file VideoSource_FFmpeg.hh.


Constructor & Destructor Documentation

VideoSource_FFmpeg::VideoSource_FFmpeg ( )

Standard constructor.

Definition at line 31 of file VideoSource_FFmpeg.cpp.

References Init_().

VideoSource_FFmpeg::~VideoSource_FFmpeg ( ) [virtual]

Clean up.

Definition at line 37 of file VideoSource_FFmpeg.cpp.

References CloseDevice().


Member Function Documentation

void BIAS::Debug::AddDebugLevel ( const long int  lv) [inline, inherited]
void BIAS::Debug::AddDebugLevel ( const std::string &  name) [inline, inherited]

Definition at line 363 of file Debug.hh.

int VideoSource::AutoMode ( int  a,
bool  b 
) [virtual, inherited]

Use this to enable/disable any automatic modes addressed via enums.

Definition at line 283 of file VideoSource_Base.cpp.

int VideoSource_FFmpeg::CloseDevice ( ) [virtual]
long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( ) [inline, protected, inherited]

returns the next available debuglevel

Author:
woelk 09/2006

Definition at line 522 of file Debug.hh.

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const [inline, inherited]
bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const [inline, inherited]

Definition at line 351 of file Debug.hh.

virtual void BIAS::VideoSource::EnsureLatestFrame ( const bool  b) [inline, virtual, inherited]
char * VideoSource_FFmpeg::ExtractDateString_ ( std::string  str) [protected]

Try to extract date string of format "YYYYMMDD_HHMMSS" from string.

Definition at line 410 of file VideoSource_FFmpeg.cpp.

Referenced by OpenDevice().

int VideoSource::GetAllDevices ( std::vector< std::string > &  devices) [virtual, inherited]

Reimplemented in BIAS::VideoSource_DSHOW, and BIAS::VideoSource_V4L.

Definition at line 197 of file VideoSource_Base.cpp.

Referenced by BIAS::ShowCamWxFrame::OnFindWebcams().

virtual bool BIAS::VideoSource::GetAutoBrightness ( ) [inline, virtual, inherited]
virtual bool BIAS::VideoSource::GetAutoContrast ( ) [inline, virtual, inherited]

Reimplemented in BIAS::VideoSource_DSHOW.

Definition at line 269 of file VideoSource_Base.hh.

virtual bool BIAS::VideoSource::GetAutoGain ( ) [inline, virtual, inherited]
virtual bool BIAS::VideoSource::GetAutoShutter ( ) [inline, virtual, inherited]
virtual float BIAS::VideoSource::GetBrightness ( ) [inline, virtual, inherited]
virtual void BIAS::VideoSource::GetBrightnessRange ( double &  min,
double &  max 
) [inline, virtual, inherited]
float BIAS::VideoSource::GetBytesPerPixel ( ) const [inline, inherited]

Definition at line 199 of file VideoSource_Base.hh.

int VideoSource::GetCapabilities ( VideoSourceCapabilities caps) [virtual, inherited]

Use this method to learn something about the capabilities of the source (only usefull for v4l-sources e.g.

/dev/video0). The output is send to stdout.

Reimplemented in BIAS::VideoSource_DSHOW, BIAS::VideoSource_Kinect, BIAS::VideoSource_Kinect_Base, BIAS::VideoSource_OpenNI, BIAS::VideoSource_SwissRanger, and BIAS::VideoSource_V4L.

Definition at line 203 of file VideoSource_Base.cpp.

Referenced by BIAS::ShowCamWxFrame::OnFindWebcams().

int VideoSource::GetCapabilities ( const char *  device,
VideoSourceCapabilities caps 
) [virtual, inherited]
int BIAS::VideoSource::GetColorChannels ( ) [inline, inherited]
BIAS::ImageBase::EColorModel BIAS::VideoSource::GetColorModel ( ) [inline, inherited]

Definition at line 197 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::SetModeAndFramerate().

virtual float BIAS::VideoSource::GetContrast ( ) [inline, virtual, inherited]

Reimplemented in BIAS::VideoSource_DSHOW, and BIAS::VideoSource_V4L.

Definition at line 265 of file VideoSource_Base.hh.

virtual void BIAS::VideoSource::GetContrastRange ( double &  min,
double &  max 
) [inline, virtual, inherited]
int64_t BIAS::VideoSource_FFmpeg::GetCurrentFrameNumber ( ) const [inline]

Get the number of frames decoded so far.

Definition at line 124 of file VideoSource_FFmpeg.hh.

char* BIAS::VideoSource_FFmpeg::GetDateString ( ) [inline]

Get a string representation of the timestamp of the video stream.

Definition at line 144 of file VideoSource_FFmpeg.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]
void BIAS::Debug::GetDebugStream ( std::ostream &  os) const [inline, inherited]

Definition at line 415 of file Debug.hh.

std::ostream& BIAS::Debug::GetDebugStream ( ) const [inline, inherited]

Definition at line 406 of file Debug.hh.

virtual void BIAS::VideoSource::GetDeviceChannelNames ( std::vector< std::string > &  names) [inline, virtual, inherited]

if more than one channel is present names can be returned here.

the position in the vector corresponds to the channel number in SetChannel()

Reimplemented in BIAS::VideoSource_V4L.

Definition at line 177 of file VideoSource_Base.hh.

Referenced by BIAS::ShowCamWxFrame::OnFindWebcams().

int64_t BIAS::VideoSource_FFmpeg::GetDuration ( ) [inline]

Get the duration of the video stream in microseconds.

Definition at line 149 of file VideoSource_FFmpeg.hh.

std::string BIAS::VideoSource_FFmpeg::GetError ( ) [inline]

Get the last error message.

Definition at line 159 of file VideoSource_FFmpeg.hh.

unsigned int VideoSource::GetFeature ( int  feature) [virtual, inherited]

this function is used to query things like shutter, zoom...

normaly, feature is an enum

Definition at line 290 of file VideoSource_Base.cpp.

float BIAS::VideoSource_FFmpeg::GetFPS ( ) [inline]

Get the framerate of the video stream.

Definition at line 114 of file VideoSource_FFmpeg.hh.

float VideoSource::GetGain ( ) [virtual, inherited]
virtual void BIAS::VideoSource::GetGainRange ( double &  min,
double &  max 
) [inline, virtual, inherited]

Definition at line 250 of file VideoSource_Base.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 432 of file Debug.hh.

int BIAS::VideoSource::GetHeight ( ) [inline, inherited]
int BIAS::VideoSource::GetID ( ) [inline, inherited]
Examples:
ExampleMDCamToShm.cpp.

Definition at line 215 of file VideoSource_Base.hh.

std::string BIAS::VideoSource::GetIdentifier ( ) [inline, inherited]

Definition at line 295 of file VideoSource_Base.hh.

int64_t BIAS::VideoSource_FFmpeg::GetNumberOfFrames ( ) const [inline]

Get the number of frames in the video stream.

0 if unknown.

Definition at line 119 of file VideoSource_FFmpeg.hh.

int64_t BIAS::VideoSource_FFmpeg::GetPTS ( ) [inline]

Get the presentation timestamp of the last decoded frame in microseconds.

Definition at line 154 of file VideoSource_FFmpeg.hh.

float VideoSource::GetShutter ( ) [virtual, inherited]
virtual void BIAS::VideoSource::GetShutterRange ( double &  min,
double &  max 
) [inline, virtual, inherited]

Definition at line 241 of file VideoSource_Base.hh.

int BIAS::VideoSource_FFmpeg::GetTimeBaseDen ( ) [inline]

Get the timebase denumerator of the video stream.

Definition at line 134 of file VideoSource_FFmpeg.hh.

int BIAS::VideoSource_FFmpeg::GetTimeBaseNum ( ) [inline]

Get the timebase numerator of the video stream.

Definition at line 129 of file VideoSource_FFmpeg.hh.

int64_t BIAS::VideoSource_FFmpeg::GetTimestamp ( ) [inline]

Get the timestamp of the video stream in microseconds in Unix time.

Definition at line 139 of file VideoSource_FFmpeg.hh.

int VideoSource::GetWhiteBalance ( float &  rvalue,
float &  bvalue 
) [virtual, inherited]

Definition at line 335 of file VideoSource_Base.cpp.

int BIAS::VideoSource::GetWidth ( ) [inline, inherited]
int VideoSource::GrabSingle ( BIAS::Camera< float > &  image) [virtual, inherited]

Reimplemented in BIAS::VideoSource_Disk, and BIAS::VideoSource_Disk_Bayer.

Definition at line 229 of file VideoSource_Base.cpp.

int VideoSource::GrabSingle ( BIAS::Camera< char > &  image) [virtual, inherited]

Definition at line 252 of file VideoSource_Base.cpp.

int VideoSource::GrabSingle ( BIAS::Camera< short int > &  image) [virtual, inherited]

Definition at line 260 of file VideoSource_Base.cpp.

int VideoSource::GrabSingle ( BIAS::Camera< int > &  image) [virtual, inherited]

Definition at line 268 of file VideoSource_Base.cpp.

int VideoSource_FFmpeg::GrabSingle ( Camera< unsigned char > &  image) [virtual]

Get the next frame from the video file.

The number of the frame #[num] and presentation time in microseconds #[pts] are stored in the metadata of the image for later use.

Returns:
0 on success, -1 on error

Reimplemented from BIAS::VideoSource.

Definition at line 234 of file VideoSource_FFmpeg.cpp.

References BIAS::VideoSource::Active_, BIAS::MetaData::Add(), errMsg_, frameNumber_, BIAS::UUID::GenerateUUID(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetMetaData(), BIAS::VideoSource::Grabbing_, BIAS::ImageBase::InvalidateUID(), BIAS::ImageBase::IsEmpty(), outputPixFmt_, pFormatCtx_, pFrame_, pOutputFrame_, pSwsCtx_, pts_, BIAS::ImageBase::SetMetaData(), BIAS::ImageBase::SetUID(), and streamIndex_.

int VideoSource::GrabSingle ( BIAS::Camera< unsigned short int > &  image) [virtual, inherited]

Reimplemented in BIAS::VideoSource_Disk, and BIAS::VideoSource_Disk_Bayer.

Definition at line 236 of file VideoSource_Base.cpp.

int VideoSource::GrabSingle ( BIAS::Camera< unsigned int > &  image) [virtual, inherited]

Definition at line 244 of file VideoSource_Base.cpp.

int VideoSource::GrabSingle ( BIAS::Camera< double > &  image) [virtual, inherited]

Definition at line 276 of file VideoSource_Base.cpp.

virtual bool BIAS::VideoSource::HasControlBrightness ( ) [inline, virtual, inherited]
virtual bool BIAS::VideoSource::HasControlContrast ( ) [inline, virtual, inherited]

Reimplemented in BIAS::VideoSource_DSHOW, and BIAS::VideoSource_V4L.

Definition at line 263 of file VideoSource_Base.hh.

virtual bool BIAS::VideoSource::HasControlGain ( ) [inline, virtual, inherited]
virtual bool BIAS::VideoSource::HasControlShutter ( ) [inline, virtual, inherited]
virtual bool BIAS::VideoSource::HasControlWhiteBalance ( ) [inline, virtual, inherited]

Reimplemented in BIAS::VideoSource_DCAM, and BIAS::VideoSource_V4L.

Definition at line 273 of file VideoSource_Base.hh.

void VideoSource_FFmpeg::Init_ ( ) [protected]
int VideoSource::InitImage ( BIAS::ImageBase Image) [virtual, inherited]
bool BIAS::VideoSource::IsActive ( ) [inline, inherited]

Definition at line 217 of file VideoSource_Base.hh.

bool BIAS::VideoSource::IsControllable ( ) [inline, inherited]

tell if SetShutter, SetGain... would work

Definition at line 221 of file VideoSource_Base.hh.

long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const [inline, inherited]

looks up a debuglevel in the internal map, returns 0 if not found

Author:
woelk 09/2006

Definition at line 455 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name) [inline, inherited]
int VideoSource::OnePushAuto ( int  feature) [virtual, inherited]

Definition at line 326 of file VideoSource_Base.cpp.

int VideoSource_FFmpeg::OpenDevice ( const char *  filename) [virtual]
int VideoSource::OpenDevice ( int  device) [virtual, inherited]
int VideoSource::OpenDevice ( std::string  Prefix,
std::string  Postfix,
int  DigitCount,
int  PictureCount,
int  StartCount = 0 
) [virtual, inherited]

used in child class VideoSource_Disk

Reimplemented in BIAS::VideoSource_Disk.

Definition at line 185 of file VideoSource_Base.cpp.

int VideoSource::OpenDevice ( const std::vector< std::string > &  FileNames) [virtual, inherited]
int VideoSource::OpenDevice ( ) [virtual, inherited]
int VideoSource::PostGrab ( ) [virtual, inherited]
int VideoSource::PreGrab ( ) [virtual, inherited]
void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const [inline, inherited]

Definition at line 384 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const long int  lv) [inline, inherited]

Definition at line 370 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name) [inline, inherited]

Definition at line 377 of file Debug.hh.

virtual void BIAS::VideoSource::ResetPanTiltZoom ( void  ) [inline, virtual, inherited]

Reset digital zoom, pan and tilt to defaults to ensure compliance with calibration.

Reimplemented in BIAS::VideoSource_DSHOW, and BIAS::VideoSource_V4L.

Definition at line 277 of file VideoSource_Base.hh.

int VideoSource_FFmpeg::SeekFrame ( int64_t  frame)

Seek to frame in video stream.

Returns:
0 on success, -1 on error

Definition at line 314 of file VideoSource_FFmpeg.cpp.

References errMsg_, BIAS::VideoSource::FramesPerSecond_, pFormatCtx_, and streamIndex_.

int VideoSource_FFmpeg::SeekMs ( int  ms)

Seek to time in milliseconds in video stream.

Returns:
0 on success, -1 on error

Definition at line 338 of file VideoSource_FFmpeg.cpp.

References errMsg_, pFormatCtx_, and streamIndex_.

virtual void BIAS::VideoSource::SetAutoBrightness ( bool  b) [inline, virtual, inherited]
virtual void BIAS::VideoSource::SetAutoContrast ( bool  b) [inline, virtual, inherited]

Reimplemented in BIAS::VideoSource_DSHOW.

Definition at line 268 of file VideoSource_Base.hh.

virtual void BIAS::VideoSource::SetAutoGain ( bool  b) [inline, virtual, inherited]
virtual void BIAS::VideoSource::SetAutoShutter ( bool  b) [inline, virtual, inherited]
virtual int BIAS::VideoSource::SetBrightness ( float  g) [inline, virtual, inherited]
void BIAS::VideoSource::SetBytesPerPixel ( unsigned char  bpp) [inline, inherited]

Must be used before OpenDevice() !

Definition at line 189 of file VideoSource_Base.hh.

int VideoSource_FFmpeg::SetColorModel ( ImageBase::EColorModel  mode) [virtual]
virtual int BIAS::VideoSource::SetContrast ( float  g) [inline, virtual, inherited]

Reimplemented in BIAS::VideoSource_DSHOW, and BIAS::VideoSource_V4L.

Definition at line 267 of file VideoSource_Base.hh.

void BIAS::Debug::SetDebugLevel ( const long int  lv) [inline, inherited]
void BIAS::Debug::SetDebugLevel ( const std::string &  name) [inline, inherited]

Definition at line 326 of file Debug.hh.

void BIAS::Debug::SetDebugStream ( const std::ostream &  os) [inline, inherited]

Definition at line 399 of file Debug.hh.

void BIAS::VideoSource::SetDeviceChannel ( int  channel) [inline, inherited]

Use channel to select one of many cameras on the same Must be used before OpenDevice() !

Definition at line 171 of file VideoSource_Base.hh.

Referenced by BIAS::ShowCamWxFrame::OnFindWebcams().

int VideoSource::SetDirectToDisk ( const std::string &  filename) [inherited]
virtual void BIAS::VideoSource::SetExternalTrigger ( bool  trigger = true) [inline, virtual, inherited]

specify if there's an external trigger

Parameters:
triggertrue if external trigger should be acticated, false if deactivated

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 186 of file VideoSource_Base.hh.

int VideoSource::SetFeature ( int  feature,
unsigned int  value 
) [virtual, inherited]

this function is used to control things like shutter, zoom...

normaly, feature is an enum

Definition at line 296 of file VideoSource_Base.cpp.

void BIAS::VideoSource::SetFPS ( float  fps) [inline, inherited]

Use channel to select one of many cameras on the same.

Must be used before OpenDevice() !

Reimplemented in BIAS::VideoSource_uEye.

Examples:
ExampleDirectToDisk.cpp.

Definition at line 181 of file VideoSource_Base.hh.

Referenced by BIAS::VideoSource_DCAM::SetModeAndFramerate().

int VideoSource::SetGain ( float  g) [virtual, inherited]
static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev) [inline, static, inherited]

Definition at line 425 of file Debug.hh.

int VideoSource::SetShutter ( float  exptime) [virtual, inherited]

Set shutter (exposure time) to exptime in seconds.

Reimplemented in BIAS::VideoSource_DCAM, BIAS::VideoSource_DcamPMD, BIAS::VideoSource_DSHOW, BIAS::VideoSource_uEye, and BIAS::VideoSource_V4L.

Definition at line 303 of file VideoSource_Base.cpp.

void VideoSource::SetSize ( int  w,
int  h,
int  bytesperpixel = 1 
) [virtual, inherited]
virtual void BIAS::VideoSource::SetWaitForNew ( bool  waitForNew) [inline, virtual, inherited]

If you want as many images as possbile, and dont care about equal ones call this with "false".

Default is that GrabSingle blocks until a new frame arrives from the camera. Only used in V4L and DSHOW

Author:
grest, Oct. 2005

Reimplemented in BIAS::VideoSource_DSHOW.

Definition at line 301 of file VideoSource_Base.hh.

int VideoSource::SetWhiteBalance ( float  rvalue,
float  bvalue 
) [virtual, inherited]

range is [-1.0 , 1.0)

Reimplemented in BIAS::VideoSource_DCAM.

Definition at line 330 of file VideoSource_Base.cpp.

Referenced by BIAS::VideoSource::SoftwareWhiteBalance().

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const [inline, inherited]

prints all internally known debuglevels

Author:
woelk 09/2006

Definition at line 497 of file Debug.hh.

int VideoSource::SoftwareWhiteBalance ( ) [virtual, inherited]
int VideoSource::WriteDirect_ ( const unsigned char *  data,
const BIAS::UUID uuid,
const long int &  sec,
const long int &  usec 
) [protected, inherited]

Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 511 of file Debug.hh.

Referenced by BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

long int BIAS::Debug::_liNextDebugLevel [protected, inherited]

new concept, debuglevel are managed here in the debug class

Definition at line 517 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel [protected, inherited]

Definition at line 518 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 512 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

bool BIAS::VideoSource::Active_ [protected, inherited]
bool BIAS::VideoSource::bExternalTrigger_ [protected, inherited]
float BIAS::VideoSource::BytesPerPixel_ [protected, inherited]
int BIAS::VideoSource::ColorChannels_ [protected, inherited]
bool BIAS::VideoSource::CompleteInitialized_ [protected, inherited]

String representation of timestamp_.

Definition at line 185 of file VideoSource_FFmpeg.hh.

Referenced by Init_(), and OpenDevice().

const char* BIAS::VideoSource::DefaultDevice_ [protected, inherited]
int BIAS::VideoSource::DeviceChannel_ [protected, inherited]
bool BIAS::VideoSource::DirectToDisk_ [protected, inherited]
char* BIAS::VideoSource::DtDBuffer_ [protected, inherited]
unsigned int BIAS::VideoSource::DtDBufferSize_ [protected, inherited]
int BIAS::VideoSource::DtDFd_ [protected, inherited]
char* BIAS::VideoSource::DtDStartOfImage_ [protected, inherited]

Stream duration in milliseconds, 0 if unknown.

Definition at line 186 of file VideoSource_FFmpeg.hh.

Referenced by Init_(), and OpenDevice().

std::string BIAS::VideoSource_FFmpeg::errMsg_ [protected]

The last error message.

Definition at line 188 of file VideoSource_FFmpeg.hh.

Referenced by GrabSingle(), Init_(), OpenDevice(), SeekFrame(), SeekMs(), and SetColorModel().

Number of decoded frames.

Definition at line 181 of file VideoSource_FFmpeg.hh.

Referenced by GrabSingle(), and Init_().

float BIAS::VideoSource::FramesPerSecond_ [protected, inherited]
long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 514 of file Debug.hh.

bool BIAS::VideoSource::Grabbing_ [protected, inherited]
int BIAS::VideoSource::Height_ [protected, inherited]
int BIAS::VideoSource::ID_ [protected, inherited]
std::string BIAS::VideoSource::Identifier_ [protected, inherited]
unsigned int BIAS::VideoSource::ImageSize_ [protected, inherited]
bool BIAS::VideoSource::IsControllable_ [protected, inherited]
double BIAS::VideoSource::maxBrightness_ [protected, inherited]
double BIAS::VideoSource::maxContrast_ [protected, inherited]
double BIAS::VideoSource::maxGain_ [protected, inherited]
double BIAS::VideoSource::maxShutter_ [protected, inherited]
double BIAS::VideoSource::minBrightness_ [protected, inherited]
double BIAS::VideoSource::minContrast_ [protected, inherited]
double BIAS::VideoSource::minGain_ [protected, inherited]
double BIAS::VideoSource::minShutter_ [protected, inherited]

Number of frames of the stream, 0 if unknown.

Definition at line 180 of file VideoSource_FFmpeg.hh.

Referenced by Init_(), and OpenDevice().

enum PixelFormat BIAS::VideoSource_FFmpeg::outputPixFmt_ [protected]

Output frame pixel format.

Definition at line 178 of file VideoSource_FFmpeg.hh.

Referenced by GrabSingle(), Init_(), OpenDevice(), and SetColorModel().

uint8_t* BIAS::VideoSource_FFmpeg::pBuffer_ [protected]

Ouput frame buffer.

Definition at line 177 of file VideoSource_FFmpeg.hh.

Referenced by CloseDevice(), Init_(), and OpenDevice().

AVFormatContext* BIAS::VideoSource_FFmpeg::pFormatCtx_ [protected]

Format context for video decoder.

Definition at line 173 of file VideoSource_FFmpeg.hh.

Referenced by CloseDevice(), GrabSingle(), Init_(), OpenDevice(), SeekFrame(), and SeekMs().

AVFrame* BIAS::VideoSource_FFmpeg::pFrame_ [protected]

Video stream frame.

Definition at line 175 of file VideoSource_FFmpeg.hh.

Referenced by CloseDevice(), GrabSingle(), Init_(), and OpenDevice().

Output frame.

Definition at line 176 of file VideoSource_FFmpeg.hh.

Referenced by CloseDevice(), GrabSingle(), Init_(), and OpenDevice().

SwsContext* BIAS::VideoSource_FFmpeg::pSwsCtx_ [protected]

Color conversion context.

Definition at line 179 of file VideoSource_FFmpeg.hh.

Referenced by GrabSingle(), and Init_().

int64_t BIAS::VideoSource_FFmpeg::pts_ [protected]

Presentation timestamp of last decoded frame in microseconds.

Definition at line 187 of file VideoSource_FFmpeg.hh.

Referenced by GrabSingle(), and Init_().

Index of the video stream.

Definition at line 174 of file VideoSource_FFmpeg.hh.

Referenced by CloseDevice(), GrabSingle(), Init_(), OpenDevice(), SeekFrame(), and SeekMs().

Stream timebase denumerator.

Definition at line 183 of file VideoSource_FFmpeg.hh.

Referenced by Init_(), and OpenDevice().

Stream timebase numerator.

Definition at line 182 of file VideoSource_FFmpeg.hh.

Referenced by Init_(), and OpenDevice().

Stream timestamp.

Definition at line 184 of file VideoSource_FFmpeg.hh.

Referenced by Init_(), and OpenDevice().

bool BIAS::VideoSource::WaitForNew_ [protected, inherited]
int BIAS::VideoSource::Width_ [protected, inherited]

The documentation for this class was generated from the following files:
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends