Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BIAS::DShowVideo Class Reference

Die Klasse ReadAvi ist zentraler Bestandteil der Infrastruktur zum Dekodieren von AVI-Videocontainern. Weitere Bestandteile sind: SampleGrabberCallback. More...

#include <VideoSource/DShowVideo.hh>

+ Collaboration diagram for BIAS::DShowVideo:

Public Member Functions

void Close ()
 
 DShowVideo (SampleGrabberCallback *sgcb)
 
void EnableReliableFrameRead (const bool enabled)
 If grabber is in realibale mode and frame grabbing failed for some reason the reader retrys to read the current frame. More...
 
bool GetImageSize (unsigned &width, unsigned &height, unsigned &channel_count)
 returns the image size contained in the stream, only meaningfull results after call to Open() function More...
 
SampleGrabberCallbackGetSampleGrabberCallback ()
 
void GotoFrame (unsigned long long frameNo)
 
bool Open (const std::string &filename)
 open file, if not possible throw exception More...
 
void Pause ()
 
void PlayContinously ()
 
void PlaySingleFrame ()
 
 ~DShowVideo ()
 

Protected Member Functions

bool Init_ ()
 

Protected Attributes

unsigned ChannelCount_
 
DShowStuff * DShowStuff_
 
bool FastNLazy_
 
unsigned long long FrameNum_
 
unsigned Height_
 
bool Initialised_
 
bool IsPaused_
 
bool IsRunning_
 
bool Open_
 
SampleGrabberCallbackSGCB_
 
unsigned Width_
 

Detailed Description

Die Klasse ReadAvi ist zentraler Bestandteil der Infrastruktur zum Dekodieren von AVI-Videocontainern. Weitere Bestandteile sind: SampleGrabberCallback.

Test:
tested with TestDShowVideo.cpp

ReadAvi baut einen DShow-Graphen auf aus drei Filtern: pSrcFilter_ zum oeffnen und dekodieren des Videos, pSampleGrabber um einzelne Samples abzugreifen und pNullRenderer umd die Vollstaendigkeit des Graphs mit einer Senke zu gewaehrleisten. Die Filter werden ueber ihre jeweiligen In und Out-Pins verbunden. Die Klasse SampleGrabberCallback muss dem Konstruktor von ReadAvi mitgegeben werden. Fuer jedes Frame wird dann von DShow die Methode SampleGrabberCallback::SampleCB(..) aufgerufen. Diese kann dann die Bilddaten herausgeben.

Um im Code der Klassen die ReadAvi u.a. benutzen keine #ifdef ...DSHOW... einbauen zu muessen, sollen die Klassen und alle Interfaces immer mitkompiliert werden. Falls DShow nicht zur Verfuegung steht, sind die Methoden der Klassen ReadAvi und SampleGrabberCallback eben leer.

Author
Max Hollmann

Definition at line 57 of file DShowVideo.hh.

Constructor & Destructor Documentation

DShowVideo::DShowVideo ( SampleGrabberCallback sgcb)

Definition at line 59 of file DShowVideo.cpp.

DShowVideo::~DShowVideo ( )

Definition at line 74 of file DShowVideo.cpp.

Member Function Documentation

void DShowVideo::Close ( )

Definition at line 418 of file DShowVideo.cpp.

void BIAS::DShowVideo::EnableReliableFrameRead ( const bool  enabled)
inline

If grabber is in realibale mode and frame grabbing failed for some reason the reader retrys to read the current frame.

This mode can slow down frame reading so don't use it for realtime playback.

Definition at line 86 of file DShowVideo.hh.

bool DShowVideo::GetImageSize ( unsigned &  width,
unsigned &  height,
unsigned &  channel_count 
)

returns the image size contained in the stream, only meaningfull results after call to Open() function

Definition at line 493 of file DShowVideo.cpp.

SampleGrabberCallback* BIAS::DShowVideo::GetSampleGrabberCallback ( )
inline

Definition at line 78 of file DShowVideo.hh.

void DShowVideo::GotoFrame ( unsigned long long  frameNo)

Definition at line 396 of file DShowVideo.cpp.

bool DShowVideo::Init_ ( )
protected

Definition at line 85 of file DShowVideo.cpp.

bool DShowVideo::Open ( const std::string &  filename)

open file, if not possible throw exception

Definition at line 176 of file DShowVideo.cpp.

void DShowVideo::Pause ( )

Definition at line 374 of file DShowVideo.cpp.

void DShowVideo::PlayContinously ( )

Definition at line 355 of file DShowVideo.cpp.

void DShowVideo::PlaySingleFrame ( )

Definition at line 294 of file DShowVideo.cpp.

Member Data Documentation

unsigned BIAS::DShowVideo::ChannelCount_
protected

Definition at line 107 of file DShowVideo.hh.

DShowStuff* BIAS::DShowVideo::DShowStuff_
protected

Definition at line 103 of file DShowVideo.hh.

bool BIAS::DShowVideo::FastNLazy_
protected

Definition at line 106 of file DShowVideo.hh.

unsigned long long BIAS::DShowVideo::FrameNum_
protected

Definition at line 100 of file DShowVideo.hh.

unsigned BIAS::DShowVideo::Height_
protected

Definition at line 107 of file DShowVideo.hh.

bool BIAS::DShowVideo::Initialised_
protected

Definition at line 104 of file DShowVideo.hh.

bool BIAS::DShowVideo::IsPaused_
protected

Definition at line 98 of file DShowVideo.hh.

bool BIAS::DShowVideo::IsRunning_
protected

Definition at line 97 of file DShowVideo.hh.

bool BIAS::DShowVideo::Open_
protected

Definition at line 105 of file DShowVideo.hh.

SampleGrabberCallback* BIAS::DShowVideo::SGCB_
protected

Definition at line 101 of file DShowVideo.hh.

unsigned BIAS::DShowVideo::Width_
protected

Definition at line 107 of file DShowVideo.hh.


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