OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ossimVideoHandler Class Referenceabstract

Pure virtual base class for all video file handlers – analogous to ossimImageHandler. More...

#include <ossimVideoHandler.h>

Inheritance diagram for ossimVideoHandler:
ossimVideoSource ossimSource ossimConnectableObject ossimErrorStatusInterface ossimObject ossimListenerManager ossimPropertyInterface ossimReferenced

Public Member Functions

virtual bool open (const ossimFilename &videoFile)
 Returns TRUE if video file named is successfully opened. More...
 
virtual bool open ()=0
 Returns TRUE if video file at m_videoFilename is successfully opened. More...
 
virtual void close ()=0
 Closes video file. More...
 
virtual bool isOpen () const =0
 Returns TRUE if video file is open. More...
 
const ossimFilenamefilename () const
 Returns filename of previously opened video file. More...
 
virtual void rewind ()
 For rewinding all active streams to beginning. More...
 
virtual bool seek (ossim_float64 reference_time_sec, SeekType seekType)=0
 Seeks to the frame at time specified, according to the seekType (relative to active frame or absolute time from start of video). More...
 
virtual const ossimRefPtr< ossimVideoGeometrygetVideoGeometry () const
 Access to video geometry object. More...
 
ossim_float64 currentFrameTime () const
 Time in seconds from start of video of the current active frame, or NAN if no active frame. More...
 
ossim_float64 videoFrameRate () const
 Nominal frames per second. More...
 
ossim_float64 duration () const
 Total length of video in seconds. More...
 
virtual bool canConnectMyInputTo (ossim_int32, const ossimConnectableObject *) const
 This object does not accept inputs. More...
 
- Public Member Functions inherited from ossimVideoSource
virtual bool nextFrame ()
 Seeks to start of next frame. Returns TRUE if successful. More...
 
virtual ossim_uint32 getNumberOfFrames () const
 Total number of frames in video. More...
 
int computeFrameNumber (double seconds_from_start) const
 Utility method for computing frame number from frame time. More...
 
double computeFrameTime (ossim_uint32 frame_count) const
 Utility method for computing frame time from frame number. More...
 
virtual const ossimRefPtr< ossimVideoImageHandlergetCurrentFrame () const
 Access to current active frame. More...
 
const ossimIptframeSize () const
 Nominal size of a frame in pixels. More...
 
virtual bool canConnectMyOutputTo (ossim_int32 index, const ossimConnectableObject *object) const
 Presently can only connect into an image chain via an ossimVideoImageSource bridge, or to another video source for video chains. More...
 
- Public Member Functions inherited from ossimSource
 ossimSource (ossimObject *owner=0)
 
 ossimSource (ossimObject *owner, ossim_uint32 inputListSize, ossim_uint32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true)
 
virtual ~ossimSource ()
 
virtual bool isSourceEnabled () const
 
virtual void enableSource ()
 
virtual void disableSource ()
 
virtual bool getEnableFlag () const
 
virtual void setEnableFlag (bool flag)
 
virtual bool isInitialized () const
 
virtual void setInitializedFlag (bool flag)
 
virtual void initialize ()
 
virtual void setProperty (ossimRefPtr< ossimProperty > property)
 
virtual ossimRefPtr< ossimPropertygetProperty (const ossimString &name) const
 
virtual void getPropertyNames (std::vector< ossimString > &propertyNames) const
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 
virtual std::ostream & print (std::ostream &out) const
 Outputs theErrorStatus as an ossimErrorCode and an ossimString. More...
 
- Public Member Functions inherited from ossimConnectableObject
 ossimConnectableObject (ossimObject *owner=0)
 Base constructor of this object. More...
 
 ossimConnectableObject (ossimObject *owner, ossim_int32 inputListSize, ossim_int32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true)
 
virtual ~ossimConnectableObject ()
 
void setId (const ossimId &id)
 All connectable objects will have id's. More...
 
const ossimIdgetId () const
 Will allow us to get this object's id. More...
 
const ossimObjectgetOwner () const
 Fetches the current owner, most likely a container but not limited to one. More...
 
virtual void changeOwner (ossimObject *owner)
 Permits changing the object's owner. More...
 
virtual void setDescription (const ossimString &description)
 
virtual ossimString getDescription () const
 
virtual bool isConnected (ossimConnectableObjectDirectionType direction=CONNECTABLE_DIRECTION_INPUT) const
 will check the direction specified to see if all slots are full. More...
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findConnectableObject(const ossimId &id))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObjectOfType(RTTItypeid typeId, ossimConnectableObjectDirectionType directionType, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObjectOfType(const ossimString &obj, ossimConnectableObjectDirectionType directionType, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findInputObjectOfType(const ossimString &className))
 
virtual ossim_int32 findInputIndex (const ossimConnectableObject *object)
 Return a valid index of the input list if the passed in object is found else return -1. More...
 
virtual ossim_int32 findInputIndex (const ossimId &id)
 Return a valid index of the input list if the passed id is found else return -1. More...
 
virtual ossim_int32 findOutputIndex (const ossimConnectableObject *object)
 Return a valid index of the output list if the passed in object is found else return -1. More...
 
virtual ossim_int32 findOutputIndex (const ossimId &id)
 Return a valid index of the output list if the passed in object is found else return -1. More...
 
virtual ossim_int32 getMyInputIndexToConnectTo (ossimConnectableObject *object) const
 Should return the first available index to connect to. More...
 
virtual ossim_int32 getMyOutputIndexToConnectTo (ossimConnectableObject *object) const
 Should return the first available index to connect to. More...
 
virtual void disconnect (ossimConnectableObject *object=0)
 Will disconnect the object passed in. More...
 
virtual void disconnect (const ossimId &id)
 Will disconnect the object passed in. More...
 
virtual ossimRefPtr< ossimConnectableObjectdisconnectMyInput (ossim_int32 inputIndex, bool disconnectOutputFlag=true, bool createEventFlag=true)
 Will disconnect the object at the given input index and generate a connection event. More...
 
virtual void disconnectMyInput (ossimConnectableObject *input, bool disconnectOutputFlag=true, bool createEventFlag=true)
 Finds the index of the passed in input and calls disconnectMyInput(inputIndex, disconnectOutputFlag, createEventFlag);. More...
 
virtual void disconnectMyInputs (ConnectableObjectList &inputList, bool disconnectOutputFlag=true, bool createEventFlag=true)
 
virtual ossimRefPtr< ossimConnectableObjectdisconnectMyOutput (ossim_int32 outputIndex, bool disconnectInputFlag=true, bool createEventFlag=true)
 Will disconnect the object at the given output index and generate a connection event. More...
 
virtual void disconnectMyOutput (ossimConnectableObject *output, bool disconnectInputFlag=true, bool createEventFlag=true)
 Will disconnect the output object. More...
 
virtual void disconnectMyOutputs (ConnectableObjectList &outputList, bool disconnectOutputFlag=true, bool createEventFlag=true)
 
virtual void disconnectAllInputs ()
 Will disconnect all of the input objects. More...
 
virtual void disconnectAllOutputs ()
 Will disconnect all of the output objects. More...
 
virtual ossim_int32 connectMyInputTo (ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
 Will try to connect this objects input to the passed in object. More...
 
virtual ossim_int32 connectMyInputTo (ossim_int32 inputIndex, ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
 Will connect the specified input to the passed in object. More...
 
virtual bool connectMyInputTo (ConnectableObjectList &inputList, bool makeOutputConnection=true, bool createEventFlag=true)
 
virtual ossim_int32 connectMyOutputTo (ossimConnectableObject *outputObject, bool makeInputConnection=true, bool createEventFlag=true)
 Will try to connect this objects output to the passed in object. More...
 
virtual bool connectMyOutputTo (ConnectableObjectList &outputList, bool makeInputConnection=true, bool createEventFlag=true)
 
virtual bool connectInputList (ConnectableObjectList &inputList)
 Will disconnect itself from all inputs and reset to the passed in input list. More...
 
virtual bool connectOutputList (ConnectableObjectList &outputList)
 Will disconnect itself from all outputs and reset to the passed in output list. More...
 
virtual ossim_uint32 getNumberOfInputs () const
 Returns the number of input objects. More...
 
virtual ossim_uint32 getNumberOfOutputs () const
 Return the number of output objects. More...
 
ossimConnectableObjectgetInput (ossim_uint32 index=0)
 returns the object at the specified index. More...
 
const ossimConnectableObjectgetInput (ossim_uint32 index=0) const
 returns the object at the specified index. More...
 
ossimConnectableObjectgetOutput (ossim_uint32 index=0)
 returns the object at the specified index. More...
 
const ossimConnectableObjectgetOutput (ossim_uint32 index=0) const
 returns the object at the specified index. More...
 
virtual void setNumberOfInputs (ossim_int32 numberOfInputs)
 Will set the number of inputs. More...
 
virtual bool getInputListIsFixedFlag () const
 
virtual bool getOutputListIsFixedFlag () const
 
virtual void setNumberOfOutputs (ossim_int32 numberOfInputs)
 Will set the number of outputs. More...
 
const ConnectableObjectListgetInputList () const
 
const ConnectableObjectListgetOutputList () const
 
ConnectableObjectListgetInputList ()
 
ConnectableObjectListgetOutputList ()
 
 OSSIM_DEPRECATE_METHOD (virtual void findAllObjectsOfType(ConnectableObjectList &result, const RTTItypeid &typeInfo, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual void findAllObjectsOfType(ConnectableObjectList &result, const ossimString &className, bool recurse=true))
 
virtual void propagateEventToOutputs (ossimEvent &event)
 
virtual void propagateEventToInputs (ossimEvent &event)
 
virtual void setProperty (const ossimString &name, const ossimString &value)
 
virtual ossim_uint32 saveStateOfAllInputs (ossimKeywordlist &kwl, bool saveThisStateFlag=true, ossim_uint32 objectIndex=1, const char *prefix=0) const
 Save the state of all inputs to a keyword list. More...
 
virtual bool fillContainer (ossimConnectableContainer &container)
 Inserts this object and all of its children and inputs into the container provided. More...
 
bool moveInputUp (const ossimId &id)
 Moves the input connection matching id up one in the connection list. More...
 
bool moveInputDown (const ossimId &id)
 Moves the input connection matching id down one in the connection list. More...
 
bool moveInputToTop (const ossimId &id)
 Moves the input connection matching id to the top of the connection list. More...
 
bool moveInputToBottom (const ossimId &id)
 Moves the input connection matching id to the bottom of the connection list. More...
 
virtual void accept (ossimVisitor &visitor)
 We will add a visitor interface for all connectable objects. More...
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimObjectdup () const
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 
- Public Member Functions inherited from ossimListenerManager
 ossimListenerManager ()
 
virtual ~ossimListenerManager ()
 
virtual void fireEvent (ossimEvent &event)
 
virtual bool addListener (ossimListener *listener)
 
virtual bool removeListener (ossimListener *listener)
 
virtual bool findListener (ossimListener *listener)
 
- Public Member Functions inherited from ossimPropertyInterface
 ossimPropertyInterface ()
 
virtual ~ossimPropertyInterface ()
 
virtual ossimString getPropertyValueAsString (const ossimString &name) const
 
void getPropertyList (std::vector< ossimRefPtr< ossimProperty > > &propertyList) const
 
void setProperties (std::vector< ossimRefPtr< ossimProperty > > &propertyList)
 
- Public Member Functions inherited from ossimErrorStatusInterface
 ossimErrorStatusInterface ()
 
virtual ~ossimErrorStatusInterface ()
 
virtual ossimErrorCode getErrorStatus () const
 
virtual ossimString getErrorStatusString () const
 
virtual void setErrorStatus (ossimErrorCode error_status) const
 
virtual void setErrorStatus () const
 
virtual void clearErrorStatus () const
 
bool hasError () const
 

Protected Member Functions

 ossimVideoHandler ()
 Default constructor. More...
 
- Protected Member Functions inherited from ossimVideoSource
 ossimVideoSource ()
 Default constructor. More...
 
- Protected Member Functions inherited from ossimSource
 ossimSource (const ossimSource &rhs)
 
const ossimSourceoperator= (const ossimSource &rhs)
 
- Protected Member Functions inherited from ossimConnectableObject
ossimConnectableObjectfindObjectOfType (ConnectableObjectList *connectableList, ossimVisitor &visitor)
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 
- Protected Member Functions inherited from ossimListenerManager
 ossimListenerManager (const ossimListenerManager &rhs)
 

Protected Attributes

ossimFilename m_videoFilename
 
ossimRefPtr< ossimVideoGeometrym_videoGeometry
 
ossim_float64 m_currentFrameTime
 in seconds from start of video More...
 
ossim_float64 m_videoDuration
 in seconds More...
 
ossim_float64 m_frameRate
 in frames per second More...
 
- Protected Attributes inherited from ossimVideoSource
ossimIpt m_frameSize
 in pixels More...
 
- Protected Attributes inherited from ossimSource
bool theEnableFlag
 
bool theInitializedFlag
 
- Protected Attributes inherited from ossimConnectableObject
ossimId theId
 
ossimString theDescription
 
ossimObjecttheOwner
 
bool theInputListIsFixedFlag
 Indicates whether the theInputObjectList is fixed. More...
 
bool theOutputListIsFixedFlag
 Indicates whether the theOutputObjectList is fixed. More...
 
ConnectableObjectList theInputObjectList
 Holds a list of input objects. More...
 
ConnectableObjectList theOutputObjectList
 Holds a list of output objects. More...
 
- Protected Attributes inherited from ossimListenerManager
std::list< ossimListener * > theListenerList
 
bool theEnabledFlag
 
std::list< ossimListener * > theDelayedAdd
 
std::list< ossimListener * > theDelayedRemove
 
bool theFireEventFlag
 
- Protected Attributes inherited from ossimErrorStatusInterface
ossimErrorCode theErrorStatus
 

Additional Inherited Members

- Public Types inherited from ossimVideoSource
enum  SeekType { SEEK_NONE = 0, SEEK_RELATIVE = 1, SEEK_ABSOLUTE = 2 }
 
- Public Types inherited from ossimConnectableObject
enum  ossimConnectableObjectDirectionType { CONNECTABLE_DIRECTION_NONE = 0, CONNECTABLE_DIRECTION_INPUT = 1, CONNECTABLE_DIRECTION_OUTPUT = 2 }
 
typedef std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
 

Detailed Description

Pure virtual base class for all video file handlers – analogous to ossimImageHandler.

Definition at line 25 of file ossimVideoHandler.h.

Constructor & Destructor Documentation

◆ ossimVideoHandler()

ossimVideoHandler::ossimVideoHandler ( )
protected

Default constructor.

Definition at line 20 of file ossimVideoHandler.cpp.

21  :
23  m_videoDuration (0),
25 { }
double nan()
Method to return ieee floating point double precision NAN.
Definition: ossimCommon.h:135
ossim_float64 m_currentFrameTime
in seconds from start of video
ossim_float64 m_frameRate
in frames per second
ossim_float64 m_videoDuration
in seconds

Member Function Documentation

◆ canConnectMyInputTo()

virtual bool ossimVideoHandler::canConnectMyInputTo ( ossim_int32  ,
const ossimConnectableObject  
) const
inlinevirtual

This object does not accept inputs.

Reimplemented from ossimVideoSource.

Definition at line 73 of file ossimVideoHandler.h.

73 {return false;}

◆ close()

virtual void ossimVideoHandler::close ( )
pure virtual

Closes video file.

◆ currentFrameTime()

ossim_float64 ossimVideoHandler::currentFrameTime ( ) const
inlinevirtual

Time in seconds from start of video of the current active frame, or NAN if no active frame.

Reimplemented from ossimVideoSource.

Definition at line 61 of file ossimVideoHandler.h.

61 { return m_currentFrameTime; }
ossim_float64 m_currentFrameTime
in seconds from start of video

◆ duration()

ossim_float64 ossimVideoHandler::duration ( ) const
inlinevirtual

Total length of video in seconds.

Reimplemented from ossimVideoSource.

Definition at line 67 of file ossimVideoHandler.h.

Referenced by ossimVideoImageHandler::getNumberOfEntries().

67 { return m_videoDuration; }
ossim_float64 m_videoDuration
in seconds

◆ filename()

const ossimFilename& ossimVideoHandler::filename ( ) const
inline

Returns filename of previously opened video file.

Definition at line 45 of file ossimVideoHandler.h.

45 { return m_videoFilename; }
ossimFilename m_videoFilename

◆ getVideoGeometry()

virtual const ossimRefPtr<ossimVideoGeometry> ossimVideoHandler::getVideoGeometry ( ) const
inlinevirtual

Access to video geometry object.

Reimplemented from ossimVideoSource.

Definition at line 58 of file ossimVideoHandler.h.

58 {return m_videoGeometry;}
ossimRefPtr< ossimVideoGeometry > m_videoGeometry

◆ isOpen()

virtual bool ossimVideoHandler::isOpen ( ) const
pure virtual

Returns TRUE if video file is open.

◆ open() [1/2]

bool ossimVideoHandler::open ( const ossimFilename videoFile)
virtual

Returns TRUE if video file named is successfully opened.

Definition at line 38 of file ossimVideoHandler.cpp.

References m_videoFilename, and open().

39 {
40  m_videoFilename = videoFile;
41  return open();
42 }
virtual bool open()=0
Returns TRUE if video file at m_videoFilename is successfully opened.
ossimFilename m_videoFilename

◆ open() [2/2]

virtual bool ossimVideoHandler::open ( )
pure virtual

Returns TRUE if video file at m_videoFilename is successfully opened.

Referenced by open().

◆ rewind()

void ossimVideoHandler::rewind ( )
virtual

For rewinding all active streams to beginning.

Reimplemented from ossimVideoSource.

Definition at line 30 of file ossimVideoHandler.cpp.

References seek(), and ossimVideoSource::SEEK_ABSOLUTE.

31 {
32  seek(0, SEEK_ABSOLUTE);
33 }
virtual bool seek(ossim_float64 reference_time_sec, SeekType seekType)=0
Seeks to the frame at time specified, according to the seekType (relative to active frame or absolute...

◆ seek()

virtual bool ossimVideoHandler::seek ( ossim_float64  reference_time_sec,
SeekType  seekType 
)
pure virtual

Seeks to the frame at time specified, according to the seekType (relative to active frame or absolute time from start of video).

Reimplemented from ossimVideoSource.

Referenced by rewind(), and ossimVideoImageHandler::setCurrentEntry().

◆ videoFrameRate()

ossim_float64 ossimVideoHandler::videoFrameRate ( ) const
inlinevirtual

Nominal frames per second.

Reimplemented from ossimVideoSource.

Definition at line 64 of file ossimVideoHandler.h.

64 { return m_frameRate; };
ossim_float64 m_frameRate
in frames per second

Member Data Documentation

◆ m_currentFrameTime

ossim_float64 ossimVideoHandler::m_currentFrameTime
protected

in seconds from start of video

Definition at line 81 of file ossimVideoHandler.h.

◆ m_frameRate

ossim_float64 ossimVideoHandler::m_frameRate
protected

in frames per second

Definition at line 83 of file ossimVideoHandler.h.

◆ m_videoDuration

ossim_float64 ossimVideoHandler::m_videoDuration
mutableprotected

in seconds

Definition at line 82 of file ossimVideoHandler.h.

◆ m_videoFilename

ossimFilename ossimVideoHandler::m_videoFilename
protected

Definition at line 79 of file ossimVideoHandler.h.

Referenced by open().

◆ m_videoGeometry

ossimRefPtr<ossimVideoGeometry> ossimVideoHandler::m_videoGeometry
protected

Definition at line 80 of file ossimVideoHandler.h.


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