Ocean
|
This class implements a DirectShow file recorder. More...
#include <DSFileRecorder.h>
Public Member Functions | |
bool | setFilename (const std::string &filename) override |
Sets the filename of this recorder. | |
bool | isRecording () const override |
Returns whether this recorder is currently recording. | |
bool | start () override |
Sets the recorder. | |
bool | stop () override |
Stops the recorder. | |
![]() | |
Type | type () const |
Returns the type of this recorder. | |
![]() | |
const std::string & | filename () const |
Returns the filename of this recorder. | |
bool | filenameSuffixed () const |
Returns whether the filename of this recorder will be suffixed with date and time. | |
virtual bool | setFilenameSuffixed (const bool suffixed) |
Sets whether the filename will be suffixed with date and time. | |
Protected Member Functions | |
DSFileRecorder ()=default | |
Creates a new DirectShow file recorder. | |
~DSFileRecorder () override | |
Destructs a DirectShow file recorder. | |
virtual bool | insertFileWriterFilter (IPin *outputPin) |
Inserts an AVI MUX and file writer filter to the filter graph. | |
void | releaseFileWriterFilter () |
Releases the filter writer filter. | |
![]() | |
DSRecorder () | |
Creates a new DirectShow recorder. | |
~DSRecorder () override | |
Destructs a DirectShow recorder. | |
![]() | |
DSGraphObject ()=default | |
Creates a new DSGraphObject element. | |
virtual | ~DSGraphObject () |
Destructs a DSGraphObject. | |
bool | createGraphBuilder () |
Creates a new filter graph builder. | |
void | releaseGraphBuilder () |
Releases a filter graph builder. | |
virtual bool | buildGraph ()=0 |
Builds the entire filter graph. | |
virtual void | releaseGraph ()=0 |
Releases the entire filter graph. | |
virtual bool | startGraph () |
Stars the filter graph. | |
virtual bool | pauseGraph () |
Pauses the filter graph. | |
virtual bool | stopGraph () |
Stops the filter graph. | |
ScopedIBaseFilter | addFilter (const GUID &classIdentifier, const std::wstring &name) |
Adds a new filter to the filter graph. | |
bool | connectFilters (IBaseFilter *outputFilter, IBaseFilter *inputFilter, const AM_MEDIA_TYPE *type=nullptr) |
Connects two filters by using the first free pins. | |
bool | connectFilter (IPin *outputPin, IBaseFilter *inputFilter, const AM_MEDIA_TYPE *type=nullptr) |
Connects a pin with the first free pin of a filter. | |
bool | connectFilter (IBaseFilter *outputFilter, IPin *inputPin, const AM_MEDIA_TYPE *type=nullptr) |
Connects a pin with the first free pin of a filter. | |
Filters | filters () |
Returns all filters which are part of the current filter graph. | |
bool | addFilterGraphToROT () |
Adds the filter graph to the running object table. | |
bool | removeFilterGraphFromROT () |
Removes the filter graph from the running object table. | |
![]() | |
Recorder () | |
Creates a new recorder. | |
virtual | ~Recorder () |
Destructs a recorder. | |
![]() | |
FileRecorder () | |
Creates a new file recorder. | |
~FileRecorder () override | |
Destructs a file recorder. | |
![]() | |
ExplicitRecorder () | |
Creates a new explicit recorder. | |
~ExplicitRecorder () override | |
Destructs a explicit recorder. | |
Protected Attributes | |
ScopedIBaseFilter | aviMuxFilter_ |
AVI MUX filter. | |
ScopedIBaseFilter | fileWriterFilter_ |
DirectShow file writer filter. | |
ScopedIFileSinkFilter | fileSinkInterface_ |
DirectShow file sink interface. | |
![]() | |
ScopedIGraphBuilder | filterGraph_ |
DirectShow filter graph manager. | |
ScopedIMediaControl | mediaControlInterface_ |
DirectShow media control interface. | |
ScopedIMediaEvent | mediaEventInterface_ |
DirectShow media event interface. | |
bool | graphIsRunning_ = false |
Indicates whether the graph is running. | |
![]() | |
Type | recorderType |
Type of this recorder. | |
Lock | recorderLock |
Lock of this recorder. | |
![]() | |
std::string | recorderFilename |
Filename of this recorder. | |
bool | recorderFilenameSuffixed |
Flag determining whether the filename will be suffixed with date and time. | |
Additional Inherited Members | |
![]() | |
enum | PinType { PTYPE_INPUT , PTYPE_OUTPUT , PTYPE_DONT_CARE } |
Definition of input and output pin. More... | |
enum | ConnectionType { CTYPE_CONNECTED , CTYPE_NOT_CONNECTED , CTYPE_DONT_CARE } |
Definition of pin connection types. More... | |
typedef std::pair< ScopedIPin, ScopedIPin > | PinPair |
Definition of a pair of pins. | |
typedef std::vector< PinPair > | PinPairs |
Definition of a vector holding pin pairs. | |
typedef std::vector< ScopedIPin > | Pins |
Definition of a vector holding pins. | |
![]() | |
enum | Type { RECORDER = 0 , FRAME_RECORDER = 1 , SOUND_RECORDER = 2 , EXPLICIT_RECORDER = 4 , IMPLICIT_RECORDER = 8 , FILE_RECORDER = 16 | EXPLICIT_RECORDER , BUFFER_RECORDER = 32 | EXPLICIT_RECORDER , STREAMING_RECORDER = 64 | IMPLICIT_RECORDER , MOVIE_RECORDER = 128 | FRAME_RECORDER | FILE_RECORDER , FRAME_STREAMING_RECORDER = 256 | FRAME_RECORDER | STREAMING_RECORDER , IMAGE_RECORDER = 512 | FRAME_RECORDER | FILE_RECORDER , BUFFER_IMAGE_RECORDER = 1024 | FRAME_RECORDER | BUFFER_RECORDER , IMAGE_SEQUENCE_RECORDER = 2048 | FRAME_RECORDER | FILE_RECORDER , FRAME_MEMORY_RECORDER = 4096 | FRAME_RECORDER } |
Definition of different recorder types. More... | |
typedef std::vector< std::string > | Encoders |
Definition of a vector holding encoder names. | |
![]() | |
static ScopedIPin | firstPin (IBaseFilter *filter, PinType pinType, ConnectionType connectionType) |
Returns the first pin. | |
static Pins | pins (IBaseFilter *filter, PinType pinType, ConnectionType connectionType) |
Returns all pins with a specified property. | |
static PinPairs | connections (IBaseFilter *filter) |
Returns all connects in a branch. | |
static ScopedIBaseFilter | pinOwner (IPin *pin) |
Returns the owner filter of a pin. | |
static ScopedIPin | connectedPin (IPin *pin) |
Returns the connected pin of a given pin. | |
![]() | |
static std::string | addOptionalSuffixToFilename (const std::string &filename, const bool addSuffix) |
Determines the filename to be used for the next file. | |
static std::string | addOptionalSuffixToFilename (const std::string &filename, const unsigned int index, const bool addSuffix) |
Determines the filename to be used for the next file. | |
![]() | |
typedef std::vector< ScopedIBaseFilter > | Filters |
Definition of a vector holding DirectShow filters. | |
This class implements a DirectShow file recorder.
|
protecteddefault |
Creates a new DirectShow file recorder.
|
overrideprotected |
Destructs a DirectShow file recorder.
|
protectedvirtual |
Inserts an AVI MUX and file writer filter to the filter graph.
The file writer filter should be connected with a MUX filter.
outputPin | Output pin of e.g. encoder filter which will be connected with the input pin of the file writer filter |
|
overridevirtual |
Returns whether this recorder is currently recording.
Implements Ocean::Media::Recorder.
|
protected |
Releases the filter writer filter.
|
overridevirtual |
Sets the filename of this recorder.
Reimplemented from Ocean::Media::FileRecorder.
|
overridevirtual |
|
overridevirtual |
|
protected |
AVI MUX filter.
|
protected |
DirectShow file sink interface.
|
protected |
DirectShow file writer filter.