#include <vidl2_dshow_file_istream.h>
Inheritance diagram for vidl2_dshow_file_istream:

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 50 of file vidl2_dshow_file_istream.h.
Public Member Functions | |
| vidl2_dshow_file_istream (const vcl_string &name) | |
| Constructor - from a string containing the file name. | |
| virtual | ~vidl2_dshow_file_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 supports 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 bool | advance_wait () |
| Initiate advance and wait for completion; synchronous advance. | |
| virtual bool | advance_start () |
| Initiate advance and return immediately; asynchronous advance. | |
| virtual bool | is_frame_available () const |
| Returns true if the advance has finished and a frame is available. | |
| 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 | 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_file_istream (const vidl2_dshow_file_istream &) | |
| vidl2_dshow_file_istream & | operator= (const vidl2_dshow_file_istream &) |
| void | open (const vcl_string &filename) |
| Open a video file. | |
Private Attributes | |
| CComPtr< IFilterGraph2 > | filter_graph_ |
| CComPtr< IMediaControl > | media_control_ |
| CComPtr< IMediaSeeking > | media_seeking_ |
| CComPtr< IMediaEventEx > | media_event_ |
| CComPtr< ISampleGrabber > | sample_grabber_ |
| vcl_vector< unsigned char > | buffer_ [2] |
| double | buffer_time_ [2] |
| unsigned char | buffer_index_ |
| unsigned int | buffer_width_ |
| unsigned int | buffer_height_ |
| vidl2_pixel_format | buffer_pixel_format_ |
| unsigned int | frame_index_ |
| REFERENCE_TIME | end_position_ |
| bool | is_time_format_frame_ |
| bool | is_valid_ |
| DWORD | register_ |
| ID in Running Object Table (ROT), for debugging with GraphEdit. | |
|
|
Constructor - from a string containing the file name.
Definition at line 19 of file vidl2_dshow_file_istream.cxx. |
|
|
Destructor.
Definition at line 34 of file vidl2_dshow_file_istream.cxx. |
|
|
|
|
|
Advance to the next frame (but don't acquire an image).
Implements vidl2_istream. Definition at line 78 of file vidl2_dshow_file_istream.h. |
|
|
Initiate advance and return immediately; asynchronous advance.
Definition at line 197 of file vidl2_dshow_file_istream.cxx. |
|
|
Initiate advance and wait for completion; synchronous advance.
Definition at line 186 of file vidl2_dshow_file_istream.cxx. |
|
|
Close the stream.
Implements vidl2_istream. Definition at line 164 of file vidl2_dshow_file_istream.cxx. |
|
|
Return the current frame in the stream.
Implements vidl2_istream. Definition at line 247 of file vidl2_dshow_file_istream.cxx. |
|
|
Return the current frame number.
Implements vidl2_istream. Definition at line 70 of file vidl2_dshow_file_istream.h. |
|
|
Returns true if the advance has finished and a frame is available. ***** Apparently it is asynchronous after all... Definition at line 232 of file vidl2_dshow_file_istream.cxx. |
|
|
Return true if the stream is open for reading. ***** if closed, should return false Implements vidl2_istream. Definition at line 61 of file vidl2_dshow_file_istream.h. |
|
|
Return true if the stream supports seeking.
Implements vidl2_istream. Definition at line 67 of file vidl2_dshow_file_istream.h. |
|
|
Return true if the stream is in a valid state.
Implements vidl2_istream. Definition at line 64 of file vidl2_dshow_file_istream.h. |
|
|
Open a video file.
Definition at line 40 of file vidl2_dshow_file_istream.cxx. |
|
|
|
|
|
Read the next frame from the stream (advance and acquire).
Implements vidl2_istream. Definition at line 240 of file vidl2_dshow_file_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. |
|
|
Seek to the given frame number.
Implements vidl2_istream. Definition at line 280 of file vidl2_dshow_file_istream.cxx. |
|
|
Decrement reference count.
Definition at line 66 of file vidl2_istream.h. |
|
|
Definition at line 115 of file vidl2_dshow_file_istream.h. |
|
|
Definition at line 119 of file vidl2_dshow_file_istream.h. |
|
|
Definition at line 117 of file vidl2_dshow_file_istream.h. |
|
|
Definition at line 120 of file vidl2_dshow_file_istream.h. |
|
|
Definition at line 116 of file vidl2_dshow_file_istream.h. |
|
|
Definition at line 118 of file vidl2_dshow_file_istream.h. |
|
|
Definition at line 124 of file vidl2_dshow_file_istream.h. |
|
|
Definition at line 108 of file vidl2_dshow_file_istream.h. |
|
|
Definition at line 123 of file vidl2_dshow_file_istream.h. |
|
|
Definition at line 125 of file vidl2_dshow_file_istream.h. |
|
|
Definition at line 126 of file vidl2_dshow_file_istream.h. |
|
|
Definition at line 109 of file vidl2_dshow_file_istream.h. |
|
|
Definition at line 111 of file vidl2_dshow_file_istream.h. |
|
|
Definition at line 110 of file vidl2_dshow_file_istream.h. |
|
|
ID in Running Object Table (ROT), for debugging with GraphEdit.
Definition at line 129 of file vidl2_dshow_file_istream.h. |
|
|
Definition at line 112 of file vidl2_dshow_file_istream.h. |
1.4.4