#include <vidl2_dshow_live_istream.h>
Inheritance diagram for vidl2_dshow_live_istream< ParamsObject >:

This is still in an experimental stage, but should be usable. It should be able to open avi and wmv files as long as the system has the available decoder, in the case of compressed video.
DirectShow is very flexible and complex. Therefore we have taken the approach to throw an exception or abort in the case where something that is not supported fails, rather than try to parse through every error and provide an alternative. However, we welcome any feedback on desired features to make vidl2_dshow_file_istream more usable in the VXL context.
Definition at line 83 of file vidl2_dshow_live_istream.h.
Public Member Functions | |
| vidl2_dshow_live_istream () | |
| Constructor - default. | |
| vidl2_dshow_live_istream (const vcl_string &device_name) | |
| Constructor - from a string containing a device name. | |
| vidl2_dshow_live_istream (const ParamsObject ¶ms) | |
| Constructor - from a parameter object. | |
| virtual | ~vidl2_dshow_live_istream () |
| Destructor. | |
| virtual bool | is_open () const |
| Return true if the stream is open for reading. | |
| virtual bool | is_valid () const |
| Return true if the stream is in a valid state. | |
| virtual bool | is_seekable () const |
| Return true if the stream support seeking. | |
| virtual int | num_frames () const |
| Return the number of frames if known. | |
| virtual unsigned int | frame_number () const |
| Return the current frame number. | |
| virtual unsigned int | width () const |
| Return the width of each frame. | |
| virtual unsigned int | height () const |
| Return the height of each frame. | |
| virtual vidl2_pixel_format | format () const |
| Return the pixel format. | |
| virtual double | frame_rate () const |
| Return the frame rate (FPS, 0.0 if unspecified). | |
| virtual void | close () |
| Close the stream. | |
| virtual bool | advance () |
| Advance to the next frame (but don't acquire an image). | |
| virtual vidl2_frame_sptr | read_frame () |
| Read the next frame from the stream (advance and acquire). | |
| virtual vidl2_frame_sptr | current_frame () |
| Return the current frame in the stream. | |
| virtual bool | seek_frame (unsigned int frame_number) |
| Seek to the given frame number. | |
| void | run (void) |
| void | pause (void) |
| void | stop (void) |
| void | ref () |
| Increment reference count. | |
| void | unref () |
| Decrement reference count. | |
| int | ref_count () const |
| Number of objects referring to this data. | |
Private Member Functions | |
| vidl2_dshow_live_istream (const vidl2_dshow_live_istream &) | |
| vidl2_dshow_live_istream & | operator= (const vidl2_dshow_live_istream &) |
| void | connect (void) |
| Connect to a device using its FriendlyName (in params_ object). | |
| void | wait_for_state_change (HRESULT hr) |
| If hr == S_FALSE, wait for the state change to complete. | |
| bool | advance_wait () |
| Initiate advance and wait for completion; synchronous advance. | |
| bool | advance_start () |
| Initiate advance and return immediately; asynchronous advance. | |
| bool | is_frame_available () const |
| Advance to the next frame (but don't acquire an image). | |
Private Attributes | |
| ParamsObject | params_ |
| Parameters that define the input stream process. | |
| sample_grabber_cb | sample_grabber_callback_ |
| ***** Callback method. | |
| CComPtr< IFilterGraph2 > | filter_graph_ |
| CComPtr< IMoniker > | moniker_ |
| CComPtr< IMediaControl > | media_control_ |
| vidl2_frame_sptr | buffer_ |
| unsigned int | buffer_width_ |
| unsigned int | buffer_height_ |
| vidl2_pixel_format | buffer_pixel_format_ |
| bool | is_valid_ |
| DWORD | register_ |
| ID in Running Object Table (ROT), for debugging with GraphEdit. | |
| vidl2_dshow_live_istream< ParamsObject >::vidl2_dshow_live_istream | ( | ) |
| vidl2_dshow_live_istream< ParamsObject >::vidl2_dshow_live_istream | ( | const vcl_string & | device_name | ) |
Constructor - from a string containing a device name.
Definition at line 131 of file vidl2_dshow_live_istream.cxx.
| vidl2_dshow_live_istream< ParamsObject >::vidl2_dshow_live_istream | ( | const ParamsObject & | params | ) |
| virtual vidl2_dshow_live_istream< ParamsObject >::~vidl2_dshow_live_istream | ( | ) | [inline, virtual] |
| vidl2_dshow_live_istream< ParamsObject >::vidl2_dshow_live_istream | ( | const vidl2_dshow_live_istream< ParamsObject > & | ) | [private] |
| virtual bool vidl2_dshow_live_istream< ParamsObject >::is_open | ( | ) | const [inline, virtual] |
Return true if the stream is open for reading.
***** if closed, should return false
Implements vidl2_istream.
Definition at line 100 of file vidl2_dshow_live_istream.h.
| virtual bool vidl2_dshow_live_istream< ParamsObject >::is_valid | ( | ) | const [inline, virtual] |
Return true if the stream is in a valid state.
Implements vidl2_istream.
Definition at line 103 of file vidl2_dshow_live_istream.h.
| virtual bool vidl2_dshow_live_istream< ParamsObject >::is_seekable | ( | ) | const [inline, virtual] |
Return true if the stream support seeking.
Implements vidl2_istream.
Definition at line 106 of file vidl2_dshow_live_istream.h.
| virtual int vidl2_dshow_live_istream< ParamsObject >::num_frames | ( | ) | const [inline, virtual] |
Return the number of frames if known.
returns -1 for non-seekable streams
Implements vidl2_istream.
Definition at line 110 of file vidl2_dshow_live_istream.h.
| virtual unsigned int vidl2_dshow_live_istream< ParamsObject >::frame_number | ( | ) | const [inline, virtual] |
Return the current frame number.
***** through exception ??
Implements vidl2_istream.
Definition at line 114 of file vidl2_dshow_live_istream.h.
| virtual unsigned int vidl2_dshow_live_istream< ParamsObject >::width | ( | ) | const [inline, virtual] |
Return the width of each frame.
Implements vidl2_istream.
Definition at line 117 of file vidl2_dshow_live_istream.h.
| virtual unsigned int vidl2_dshow_live_istream< ParamsObject >::height | ( | ) | const [inline, virtual] |
Return the height of each frame.
Implements vidl2_istream.
Definition at line 120 of file vidl2_dshow_live_istream.h.
| virtual vidl2_pixel_format vidl2_dshow_live_istream< ParamsObject >::format | ( | ) | const [inline, virtual] |
Return the pixel format.
Implements vidl2_istream.
Definition at line 123 of file vidl2_dshow_live_istream.h.
| virtual double vidl2_dshow_live_istream< ParamsObject >::frame_rate | ( | ) | const [inline, virtual] |
Return the frame rate (FPS, 0.0 if unspecified).
Implements vidl2_istream.
Definition at line 127 of file vidl2_dshow_live_istream.h.
| void vidl2_dshow_live_istream< ParamsObject >::close | ( | ) | [inline, virtual] |
Close the stream.
Implements vidl2_istream.
Definition at line 312 of file vidl2_dshow_live_istream.cxx.
| virtual bool vidl2_dshow_live_istream< ParamsObject >::advance | ( | void | ) | [inline, virtual] |
Advance to the next frame (but don't acquire an image).
Implements vidl2_istream.
Definition at line 135 of file vidl2_dshow_live_istream.h.
| vidl2_frame_sptr vidl2_dshow_live_istream< ParamsObject >::read_frame | ( | ) | [inline, virtual] |
Read the next frame from the stream (advance and acquire).
Implements vidl2_istream.
Definition at line 357 of file vidl2_dshow_live_istream.cxx.
| vidl2_frame_sptr vidl2_dshow_live_istream< ParamsObject >::current_frame | ( | ) | [inline, virtual] |
Return the current frame in the stream.
Implements vidl2_istream.
Definition at line 366 of file vidl2_dshow_live_istream.cxx.
| virtual bool vidl2_dshow_live_istream< ParamsObject >::seek_frame | ( | unsigned int | frame_number | ) | [inline, virtual] |
Seek to the given frame number.
***** throw exception ??
Implements vidl2_istream.
Definition at line 145 of file vidl2_dshow_live_istream.h.
| void vidl2_dshow_live_istream< ParamsObject >::run | ( | void | ) | [inline] |
Definition at line 394 of file vidl2_dshow_live_istream.cxx.
| void vidl2_dshow_live_istream< ParamsObject >::pause | ( | void | ) | [inline] |
Definition at line 400 of file vidl2_dshow_live_istream.cxx.
| void vidl2_dshow_live_istream< ParamsObject >::stop | ( | void | ) | [inline] |
Definition at line 406 of file vidl2_dshow_live_istream.cxx.
| vidl2_dshow_live_istream& vidl2_dshow_live_istream< ParamsObject >::operator= | ( | const vidl2_dshow_live_istream< ParamsObject > & | ) | [private] |
| void vidl2_dshow_live_istream< ParamsObject >::connect | ( | void | ) | [private] |
Connect to a device using its FriendlyName (in params_ object).
Definition at line 158 of file vidl2_dshow_live_istream.cxx.
| void vidl2_dshow_live_istream< ParamsObject >::wait_for_state_change | ( | HRESULT | hr | ) | [inline, private] |
If hr == S_FALSE, wait for the state change to complete.
Definition at line 384 of file vidl2_dshow_live_istream.cxx.
| bool vidl2_dshow_live_istream< ParamsObject >::advance_wait | ( | ) | [inline, private] |
Initiate advance and wait for completion; synchronous advance.
Definition at line 331 of file vidl2_dshow_live_istream.cxx.
| bool vidl2_dshow_live_istream< ParamsObject >::advance_start | ( | ) | [inline, private] |
Initiate advance and return immediately; asynchronous advance.
Definition at line 340 of file vidl2_dshow_live_istream.cxx.
| bool vidl2_dshow_live_istream< ParamsObject >::is_frame_available | ( | ) | const [inline, private] |
Advance to the next frame (but don't acquire an image).
Definition at line 349 of file vidl2_dshow_live_istream.cxx.
| void vidl2_istream::ref | ( | ) | [inline, inherited] |
| void vidl2_istream::unref | ( | ) | [inline, inherited] |
| int vidl2_istream::ref_count | ( | ) | const [inline, inherited] |
ParamsObject vidl2_dshow_live_istream< ParamsObject >::params_ [private] |
Parameters that define the input stream process.
Definition at line 157 of file vidl2_dshow_live_istream.h.
sample_grabber_cb vidl2_dshow_live_istream< ParamsObject >::sample_grabber_callback_ [private] |
CComPtr<IFilterGraph2> vidl2_dshow_live_istream< ParamsObject >::filter_graph_ [private] |
Definition at line 169 of file vidl2_dshow_live_istream.h.
CComPtr<IMoniker> vidl2_dshow_live_istream< ParamsObject >::moniker_ [private] |
Definition at line 170 of file vidl2_dshow_live_istream.h.
CComPtr<IMediaControl> vidl2_dshow_live_istream< ParamsObject >::media_control_ [private] |
Definition at line 171 of file vidl2_dshow_live_istream.h.
vidl2_frame_sptr vidl2_dshow_live_istream< ParamsObject >::buffer_ [private] |
Definition at line 174 of file vidl2_dshow_live_istream.h.
unsigned int vidl2_dshow_live_istream< ParamsObject >::buffer_width_ [private] |
Definition at line 175 of file vidl2_dshow_live_istream.h.
unsigned int vidl2_dshow_live_istream< ParamsObject >::buffer_height_ [private] |
Definition at line 176 of file vidl2_dshow_live_istream.h.
vidl2_pixel_format vidl2_dshow_live_istream< ParamsObject >::buffer_pixel_format_ [private] |
Definition at line 177 of file vidl2_dshow_live_istream.h.
bool vidl2_dshow_live_istream< ParamsObject >::is_valid_ [private] |
Definition at line 180 of file vidl2_dshow_live_istream.h.
DWORD vidl2_dshow_live_istream< ParamsObject >::register_ [private] |
ID in Running Object Table (ROT), for debugging with GraphEdit.
Definition at line 183 of file vidl2_dshow_live_istream.h.
1.5.1