Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
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:

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. More...
 
virtual int CloseDevice ()
 Close video file. More...
 
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. More...
 
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. More...
 
char * GetDateString ()
 Get a string representation of the timestamp of the video stream. More...
 
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. More...
 
int64_t GetDuration ()
 Get the duration of the video stream in microseconds. More...
 
std::string GetError ()
 Get the last error message. More...
 
virtual unsigned int GetFeature (int feature)
 this function is used to query things like shutter, zoom... More...
 
float GetFPS ()
 Get the framerate of the video stream. More...
 
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. More...
 
int64_t GetPTS ()
 Get the presentation timestamp of the last decoded frame in microseconds. More...
 
virtual float GetShutter ()
 
virtual void GetShutterRange (double &min, double &max)
 
int GetTimeBaseDen ()
 Get the timebase denumerator of the video stream. More...
 
int GetTimeBaseNum ()
 Get the timebase numerator of the video stream. More...
 
int64_t GetTimestamp ()
 Get the timestamp of the video stream in microseconds in Unix time. More...
 
virtual int GetWhiteBalance (float &rvalue, float &bvalue)
 
int GetWidth ()
 
virtual int GrabSingle (Camera< unsigned char > &image)
 Get the next frame from the video file. More...
 
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. More...
 
bool IsActive ()
 
bool IsControllable ()
 tell if SetShutter, SetGain... would work More...
 
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found More...
 
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel More...
 
virtual int OnePushAuto (int feature)
 
virtual int OpenDevice (const char *filename)
 Open video file. More...
 
virtual int OpenDevice ()
 this simplest method to open a device selects the first available device E.g. More...
 
virtual int OpenDevice (int device)
 a device number can be specified here (DCAM) or port number (Net) More...
 
virtual int OpenDevice (std::string Prefix, std::string Postfix, int DigitCount, int PictureCount, int StartCount=0)
 used in child class VideoSource_Disk More...
 
virtual int OpenDevice (const std::vector< std::string > &FileNames)
 used in child class VideoSource_Disk More...
 
virtual int PostGrab ()
 Stop anythig started in PreGrab() More...
 
virtual int PreGrab ()
 Do last preparations before grabbing. More...
 
void PrintDebugLevel (std::ostream &os=std::cout) const
 
void RemoveDebugLevel (const long int lv)
 
void RemoveDebugLevel (const std::string &name)
 
virtual void ResetPanTiltZoom ()
 Reset digital zoom, pan and tilt to defaults to ensure compliance with calibration. More...
 
int SeekFrame (int64_t frame)
 Seek to frame in video stream. More...
 
int SeekMs (int ms)
 Seek to time in milliseconds in video stream. More...
 
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() ! More...
 
virtual int SetColorModel (ImageBase::EColorModel mode)
 Set output color model. More...
 
virtual int SetContrast (float g)
 
void SetDebugLevel (const long int lv)
 
void SetDebugLevel (const std::string &name)
 
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() ! More...
 
int SetDirectToDisk (const std::string &filename)
 this enables the very fast direct-to-disk mode. More...
 
virtual void SetExternalTrigger (bool trigger=true)
 specify if there's an external trigger More...
 
virtual int SetFeature (int feature, unsigned int value)
 this function is used to control things like shutter, zoom... More...
 
void SetFPS (float fps)
 Use channel to select one of many cameras on the same. More...
 
virtual int SetGain (float g)
 Set gain to g with g[dB]. More...
 
virtual int SetShutter (float exptime)
 Set shutter (exposure time) to exptime in seconds. More...
 
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() ! More...
 
virtual void SetWaitForNew (bool waitForNew)
 If you want as many images as possbile, and dont care about equal ones call this with "false". More...
 
virtual int SetWhiteBalance (float rvalue, float bvalue)
 range is [-1.0 , 1.0) More...
 
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels More...
 
virtual int SoftwareWhiteBalance ()
 
 VideoSource_FFmpeg ()
 Standard constructor. More...
 
virtual ~VideoSource_FFmpeg ()
 Clean up. More...
 

Static Public Member Functions

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

Protected Member Functions

long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel More...
 
char * ExtractDateString_ (std::string str)
 Try to extract date string of format "YYYYMMDD_HHMMSS" from string. More...
 
void Init_ ()
 Called by constructor to init variables. More...
 
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 More...
 
std::map< std::string, long int > _String2Debuglevel
 
bool Active_
 active_ is set in PreGrab() und unset in PostGrab() More...
 
bool bExternalTrigger_
 external trigger flag More...
 
float BytesPerPixel_
 BytesPerPixel cannot be int, becaus of e.g. YUV420p: 1.5. More...
 
int ColorChannels_
 
BIAS::ImageBase::EColorModel ColorMode_
 
bool CompleteInitialized_
 Some state variables. More...
 
char * dateStr_
 String representation of timestamp_. More...
 
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. More...
 
std::string errMsg_
 The last error message. More...
 
int64_t frameNumber_
 Number of decoded frames. More...
 
float FramesPerSecond_
 
bool Grabbing_
 grabbing_ is set and unset in Grab*() More...
 
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. More...
 
enum PixelFormat outputPixFmt_
 Output frame pixel format. More...
 
uint8_t * pBuffer_
 Ouput frame buffer. More...
 
AVFormatContext * pFormatCtx_
 Format context for video decoder. More...
 
AVFrame * pFrame_
 Video stream frame. More...
 
AVFrame * pOutputFrame_
 Output frame. More...
 
SwsContext * pSwsCtx_
 Color conversion context. More...
 
int64_t pts_
 Presentation timestamp of last decoded frame in microseconds. More...
 
int streamIndex_
 Index of the video stream. More...
 
int timeBaseDen_
 Stream timebase denumerator. More...
 
int timeBaseNum_
 Stream timebase numerator. More...
 
int64_t timestamp_
 Stream timestamp. More...
 
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 carst.nosp@m.enhe.nosp@m.ine@g.nosp@m.mx.d.nosp@m.e

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)
inlineinherited
void BIAS::Debug::AddDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 362 of file Debug.hh.

int VideoSource::AutoMode ( int  a,
bool  b 
)
virtualinherited

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_ ( )
inlineprotectedinherited

returns the next available debuglevel

Author
woelk 09/2006

Definition at line 521 of file Debug.hh.

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const
inlineinherited
bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const
inlineinherited

Definition at line 350 of file Debug.hh.

virtual void BIAS::VideoSource::EnsureLatestFrame ( const bool  b)
inlinevirtualinherited
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)
virtualinherited

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 ( )
inlinevirtualinherited
virtual bool BIAS::VideoSource::GetAutoContrast ( )
inlinevirtualinherited

Reimplemented in BIAS::VideoSource_DSHOW.

Definition at line 269 of file VideoSource_Base.hh.

virtual bool BIAS::VideoSource::GetAutoGain ( )
inlinevirtualinherited
virtual bool BIAS::VideoSource::GetAutoShutter ( )
inlinevirtualinherited
virtual float BIAS::VideoSource::GetBrightness ( )
inlinevirtualinherited
virtual void BIAS::VideoSource::GetBrightnessRange ( double &  min,
double &  max 
)
inlinevirtualinherited
float BIAS::VideoSource::GetBytesPerPixel ( ) const
inlineinherited

Definition at line 199 of file VideoSource_Base.hh.

int VideoSource::GetCapabilities ( VideoSourceCapabilities caps)
virtualinherited

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_OpenNI, BIAS::VideoSource_Kinect_Base, 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 
)
virtualinherited
int BIAS::VideoSource::GetColorChannels ( )
inlineinherited
BIAS::ImageBase::EColorModel BIAS::VideoSource::GetColorModel ( )
inlineinherited

Definition at line 197 of file VideoSource_Base.hh.

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

virtual float BIAS::VideoSource::GetContrast ( )
inlinevirtualinherited

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 
)
inlinevirtualinherited
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
inlineinherited
std::ostream& BIAS::Debug::GetDebugStream ( ) const
inlineinherited

Definition at line 405 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const
inlineinherited

Definition at line 414 of file Debug.hh.

virtual void BIAS::VideoSource::GetDeviceChannelNames ( std::vector< std::string > &  names)
inlinevirtualinherited

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)
virtualinherited

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 ( )
virtualinherited
virtual void BIAS::VideoSource::GetGainRange ( double &  min,
double &  max 
)
inlinevirtualinherited

Definition at line 250 of file VideoSource_Base.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( )
inlinestaticinherited

Definition at line 431 of file Debug.hh.

int BIAS::VideoSource::GetHeight ( )
inlineinherited
int BIAS::VideoSource::GetID ( )
inlineinherited
Examples:
ExampleMDCamToShm.cpp.

Definition at line 215 of file VideoSource_Base.hh.

std::string BIAS::VideoSource::GetIdentifier ( )
inlineinherited

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 ( )
virtualinherited
virtual void BIAS::VideoSource::GetShutterRange ( double &  min,
double &  max 
)
inlinevirtualinherited

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 
)
virtualinherited

Definition at line 335 of file VideoSource_Base.cpp.

int BIAS::VideoSource::GetWidth ( )
inlineinherited
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< float > &  image)
virtualinherited

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)
virtualinherited

Definition at line 252 of file VideoSource_Base.cpp.

int VideoSource::GrabSingle ( BIAS::Camera< short int > &  image)
virtualinherited

Definition at line 260 of file VideoSource_Base.cpp.

int VideoSource::GrabSingle ( BIAS::Camera< int > &  image)
virtualinherited

Definition at line 268 of file VideoSource_Base.cpp.

int VideoSource::GrabSingle ( BIAS::Camera< unsigned short int > &  image)
virtualinherited

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)
virtualinherited

Definition at line 244 of file VideoSource_Base.cpp.

int VideoSource::GrabSingle ( BIAS::Camera< double > &  image)
virtualinherited

Definition at line 276 of file VideoSource_Base.cpp.

virtual bool BIAS::VideoSource::HasControlBrightness ( )
inlinevirtualinherited
virtual bool BIAS::VideoSource::HasControlContrast ( )
inlinevirtualinherited

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

Definition at line 263 of file VideoSource_Base.hh.

virtual bool BIAS::VideoSource::HasControlGain ( )
inlinevirtualinherited
virtual bool BIAS::VideoSource::HasControlShutter ( )
inlinevirtualinherited
virtual bool BIAS::VideoSource::HasControlWhiteBalance ( )
inlinevirtualinherited

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

Definition at line 273 of file VideoSource_Base.hh.

void VideoSource_FFmpeg::Init_ ( )
protected
int VideoSource::InitImage ( BIAS::ImageBase Image)
virtualinherited
bool BIAS::VideoSource::IsActive ( )
inlineinherited

Definition at line 217 of file VideoSource_Base.hh.

bool BIAS::VideoSource::IsControllable ( )
inlineinherited

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
inlineinherited

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

Author
woelk 09/2006

Definition at line 454 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name)
inlineinherited
int VideoSource::OnePushAuto ( int  feature)
virtualinherited

Definition at line 326 of file VideoSource_Base.cpp.

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

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)
virtualinherited
int VideoSource::PostGrab ( )
virtualinherited
int VideoSource::PreGrab ( )
virtualinherited
void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

Definition at line 383 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const long int  lv)
inlineinherited

Definition at line 369 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 376 of file Debug.hh.

virtual void BIAS::VideoSource::ResetPanTiltZoom ( void  )
inlinevirtualinherited

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)
inlinevirtualinherited
virtual void BIAS::VideoSource::SetAutoContrast ( bool  b)
inlinevirtualinherited

Reimplemented in BIAS::VideoSource_DSHOW.

Definition at line 268 of file VideoSource_Base.hh.

virtual void BIAS::VideoSource::SetAutoGain ( bool  b)
inlinevirtualinherited
virtual void BIAS::VideoSource::SetAutoShutter ( bool  b)
inlinevirtualinherited
virtual int BIAS::VideoSource::SetBrightness ( float  g)
inlinevirtualinherited
void BIAS::VideoSource::SetBytesPerPixel ( unsigned char  bpp)
inlineinherited

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)
inlinevirtualinherited

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)
inlineinherited
void BIAS::Debug::SetDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 325 of file Debug.hh.

void BIAS::Debug::SetDebugStream ( const std::ostream &  os)
inlineinherited

Definition at line 398 of file Debug.hh.

void BIAS::VideoSource::SetDeviceChannel ( int  channel)
inlineinherited

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)
inlinevirtualinherited

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.

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

int VideoSource::SetFeature ( int  feature,
unsigned int  value 
)
virtualinherited

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)
inlineinherited

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

Must be used before OpenDevice() !

Examples:
ExampleDirectToDisk.cpp.

Definition at line 181 of file VideoSource_Base.hh.

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

int VideoSource::SetGain ( float  g)
virtualinherited
static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev)
inlinestaticinherited

Definition at line 424 of file Debug.hh.

int VideoSource::SetShutter ( float  exptime)
virtualinherited

Set shutter (exposure time) to exptime in seconds.

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

Definition at line 303 of file VideoSource_Base.cpp.

void VideoSource::SetSize ( int  w,
int  h,
int  bytesperpixel = 1 
)
virtualinherited
virtual void BIAS::VideoSource::SetWaitForNew ( bool  waitForNew)
inlinevirtualinherited

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 
)
virtualinherited

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
inlineinherited

prints all internally known debuglevels

Author
woelk 09/2006

Definition at line 496 of file Debug.hh.

int VideoSource::SoftwareWhiteBalance ( )
virtualinherited
int VideoSource::WriteDirect_ ( const unsigned char *  data,
const BIAS::UUID uuid,
const long int &  sec,
const long int &  usec 
)
protectedinherited

Member Data Documentation

long int BIAS::Debug::_liDebugLevel
protectedinherited

Definition at line 510 of file Debug.hh.

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

long int BIAS::Debug::_liNextDebugLevel
protectedinherited

new concept, debuglevel are managed here in the debug class

Definition at line 516 of file Debug.hh.

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

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel
protectedinherited

Definition at line 517 of file Debug.hh.

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

std::ostream BIAS::Debug::_zDebugStream
staticprotectedinherited

Definition at line 511 of file Debug.hh.

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

bool BIAS::VideoSource::Active_
protectedinherited
bool BIAS::VideoSource::bExternalTrigger_
protectedinherited
float BIAS::VideoSource::BytesPerPixel_
protectedinherited
int BIAS::VideoSource::ColorChannels_
protectedinherited
BIAS::ImageBase::EColorModel BIAS::VideoSource::ColorMode_
protectedinherited
bool BIAS::VideoSource::CompleteInitialized_
protectedinherited
char* BIAS::VideoSource_FFmpeg::dateStr_
protected

String representation of timestamp_.

Definition at line 185 of file VideoSource_FFmpeg.hh.

Referenced by Init_(), and OpenDevice().

const char* BIAS::VideoSource::DefaultDevice_
protectedinherited
int BIAS::VideoSource::DeviceChannel_
protectedinherited
bool BIAS::VideoSource::DirectToDisk_
protectedinherited
char* BIAS::VideoSource::DtDBuffer_
protectedinherited
unsigned int BIAS::VideoSource::DtDBufferSize_
protectedinherited
int BIAS::VideoSource::DtDFd_
protectedinherited
BIAS::VideoStream::VSImageHeader* BIAS::VideoSource::DtDImageHeader_
protectedinherited
char* BIAS::VideoSource::DtDStartOfImage_
protectedinherited
int64_t BIAS::VideoSource_FFmpeg::duration_
protected

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().

int64_t BIAS::VideoSource_FFmpeg::frameNumber_
protected

Number of decoded frames.

Definition at line 181 of file VideoSource_FFmpeg.hh.

Referenced by GrabSingle(), and Init_().

float BIAS::VideoSource::FramesPerSecond_
protectedinherited
long int BIAS::Debug::GlobalDebugLevel = 0
staticprotectedinherited

Definition at line 513 of file Debug.hh.

bool BIAS::VideoSource::Grabbing_
protectedinherited
int BIAS::VideoSource::Height_
protectedinherited
int BIAS::VideoSource::ID_
protectedinherited
std::string BIAS::VideoSource::Identifier_
protectedinherited
unsigned int BIAS::VideoSource::ImageSize_
protectedinherited
bool BIAS::VideoSource::IsControllable_
protectedinherited
double BIAS::VideoSource::maxBrightness_
protectedinherited
double BIAS::VideoSource::maxContrast_
protectedinherited
double BIAS::VideoSource::maxGain_
protectedinherited
double BIAS::VideoSource::maxShutter_
protectedinherited
double BIAS::VideoSource::minBrightness_
protectedinherited
double BIAS::VideoSource::minContrast_
protectedinherited
double BIAS::VideoSource::minGain_
protectedinherited
double BIAS::VideoSource::minShutter_
protectedinherited
int64_t BIAS::VideoSource_FFmpeg::numFrames_
protected

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().

AVFrame* BIAS::VideoSource_FFmpeg::pOutputFrame_
protected

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_().

int BIAS::VideoSource_FFmpeg::streamIndex_
protected

Index of the video stream.

Definition at line 174 of file VideoSource_FFmpeg.hh.

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

int BIAS::VideoSource_FFmpeg::timeBaseDen_
protected

Stream timebase denumerator.

Definition at line 183 of file VideoSource_FFmpeg.hh.

Referenced by Init_(), and OpenDevice().

int BIAS::VideoSource_FFmpeg::timeBaseNum_
protected

Stream timebase numerator.

Definition at line 182 of file VideoSource_FFmpeg.hh.

Referenced by Init_(), and OpenDevice().

int64_t BIAS::VideoSource_FFmpeg::timestamp_
protected

Stream timestamp.

Definition at line 184 of file VideoSource_FFmpeg.hh.

Referenced by Init_(), and OpenDevice().

bool BIAS::VideoSource::WaitForNew_
protectedinherited
int BIAS::VideoSource::Width_
protectedinherited

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