#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 unsigned int | frame_number () const |
| Return the current frame number. | |
| 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. | |
|
|||||||||
|
Constructor - default.
Definition at line 110 of file vidl2_dshow_live_istream.cxx. |
|
||||||||||
|
Constructor - from a string containing a device name.
Definition at line 131 of file vidl2_dshow_live_istream.cxx. |
|
||||||||||
|
Constructor - from a parameter object.
Definition at line 141 of file vidl2_dshow_live_istream.cxx. |
|
|||||||||
|
Destructor.
Definition at line 96 of file vidl2_dshow_live_istream.h. |
|
||||||||||
|
|
|
||||||||||
|
Advance to the next frame (but don't acquire an image).
Implements vidl2_istream. Definition at line 118 of file vidl2_dshow_live_istream.h. |
|
|||||||||
|
Initiate advance and return immediately; asynchronous advance.
Definition at line 340 of file vidl2_dshow_live_istream.cxx. |
|
|||||||||
|
Initiate advance and wait for completion; synchronous advance.
Definition at line 331 of file vidl2_dshow_live_istream.cxx. |
|
|||||||||
|
Close the stream.
Implements vidl2_istream. Definition at line 312 of file vidl2_dshow_live_istream.cxx. |
|
||||||||||
|
Connect to a device using its FriendlyName (in params_ object).
Definition at line 158 of file vidl2_dshow_live_istream.cxx. |
|
|||||||||
|
Return the current frame in the stream.
Implements vidl2_istream. Definition at line 366 of file vidl2_dshow_live_istream.cxx. |
|
|||||||||
|
Return the current frame number. ***** through exception ?? Implements vidl2_istream. Definition at line 110 of file vidl2_dshow_live_istream.h. |
|
|||||||||
|
Advance to the next frame (but don't acquire an image).
Definition at line 349 of file vidl2_dshow_live_istream.cxx. |
|
|||||||||
|
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. |
|
|||||||||
|
Return true if the stream support seeking.
Implements vidl2_istream. Definition at line 106 of file vidl2_dshow_live_istream.h. |
|
|||||||||
|
Return true if the stream is in a valid state.
Implements vidl2_istream. Definition at line 103 of file vidl2_dshow_live_istream.h. |
|
||||||||||
|
|
|
||||||||||
|
Definition at line 400 of file vidl2_dshow_live_istream.cxx. |
|
|||||||||
|
Read the next frame from the stream (advance and acquire).
Implements vidl2_istream. Definition at line 357 of file vidl2_dshow_live_istream.cxx. |
|
|
Increment reference count.
Definition at line 63 of file vidl2_istream.h. |
|
|
Number of objects referring to this data.
Definition at line 69 of file vidl2_istream.h. |
|
||||||||||
|
Definition at line 394 of file vidl2_dshow_live_istream.cxx. |
|
||||||||||
|
Seek to the given frame number. ***** throw exception ?? Implements vidl2_istream. Definition at line 128 of file vidl2_dshow_live_istream.h. |
|
||||||||||
|
Definition at line 406 of file vidl2_dshow_live_istream.cxx. |
|
|
Decrement reference count.
Definition at line 66 of file vidl2_istream.h. |
|
||||||||||
|
If hr == S_FALSE, wait for the state change to complete.
Definition at line 384 of file vidl2_dshow_live_istream.cxx. |
|
|||||
|
Definition at line 157 of file vidl2_dshow_live_istream.h. |
|
|||||
|
Definition at line 159 of file vidl2_dshow_live_istream.h. |
|
|||||
|
Definition at line 160 of file vidl2_dshow_live_istream.h. |
|
|||||
|
Definition at line 158 of file vidl2_dshow_live_istream.h. |
|
|||||
|
Definition at line 152 of file vidl2_dshow_live_istream.h. |
|
|||||
|
Definition at line 163 of file vidl2_dshow_live_istream.h. |
|
|||||
|
Definition at line 154 of file vidl2_dshow_live_istream.h. |
|
|||||
|
Definition at line 153 of file vidl2_dshow_live_istream.h. |
|
|||||
|
Parameters that define the input stream process.
Definition at line 140 of file vidl2_dshow_live_istream.h. |
|
|||||
|
ID in Running Object Table (ROT), for debugging with GraphEdit.
Definition at line 166 of file vidl2_dshow_live_istream.h. |
|
|||||
|
***** Callback method. .. Definition at line 149 of file vidl2_dshow_live_istream.h. |
1.4.4