nx_video_source_sdk
1.0
Video Source SDK
|
Provides access to archive, stored on camera. More...
#include <camera_plugin.h>
Public Types | |
enum | Capabilities { reverseGopModeCapability = 0x01, skipFramesCapability = 0x02, motionDataCapability = 0x04 } |
Public Member Functions | |
virtual unsigned int | getCapabilities () const =0 |
Returns bit mask with supported capabilities. | |
virtual int | open ()=0 |
Initialize connection to archive. More... | |
virtual StreamReader * | getStreamReader ()=0 |
Returns stream reader. More... | |
virtual UsecUTCTimestamp | startTime () const =0 |
Returns timestamp (usec (microseconds) since 1970-01-01, UTC) of oldest data, present in the archive. More... | |
virtual UsecUTCTimestamp | endTime () const =0 |
Returns timestamp (usec (microseconds) since 1970-01-01, UTC) of newest data, present in the archive. More... | |
virtual int | seek (unsigned int cSeq, UsecUTCTimestamp timestamp, bool findKeyFrame, UsecUTCTimestamp *selectedPosition)=0 |
Seek to specified posiition in stream. More... | |
virtual int | setReverseMode (unsigned int cSeq, bool isReverse, UsecUTCTimestamp timestamp, UsecUTCTimestamp *selectedPosition)=0 |
Set playback direction (forward/reverse) More... | |
virtual bool | isReverseModeEnabled () const =0 |
Returns true if reverse mode is currently on. | |
virtual int | setMotionDataEnabled (bool motionPresent)=0 |
Toggle motion data in media stream on/off. More... | |
virtual int | setQuality (MediaStreamQuality quality, bool waitForKeyFrame)=0 |
Select media stream quality (used for dynamic media stream adaptation) More... | |
virtual int | playRange (unsigned int cSeq, UsecUTCTimestamp start, UsecUTCTimestamp endTimeHint, unsigned int step)=0 |
Play time range [start; end) skipping frames. More... | |
virtual void | getLastErrorString (char *errorString) const =0 |
Returns text description of the last error. More... | |
![]() | |
virtual void * | queryInterface (const nxpl::NX_GUID &interfaceID)=0 |
Cast to type, specified by interfaceID. More... | |
virtual int | addRef () const =0 |
Increment reference counter. More... | |
virtual int | releaseRef () const =0 |
Decrement reference counter. More... | |
Provides access to archive, stored on camera.
Implements methods to manage (seek, select playback direction, select stream quality) archive playback.
Media stream is provided by nxcip::StreamReader instance returned by nxcip::DtsArchiveReader::getStreamReader().
It is not required, that archive contains data from all encoders
Enumerator | |
---|---|
reverseGopModeCapability | Signals that reverse playback by GOP (group of picture) reordering is supported. Plugin MAY support backward playback by GOP (group of picture) reordering. If this is not supported, reverse playback is emulated by server. ------ ------ ------ ------ ------ ------ |GOP1| |GOP2| |GOP3| |GOP4| |GOP5| |GOP6| ------ ------ ------ ------ ------ ------ To be able to play it in reverse mode, plugin passes GOPs in reverse mode (RB is "reverse block"): ------ | ------ | ------ | ------ | ------ | ------ |GOP6| | |GOP5| | |GOP4| | |GOP3| | |GOP2| | |GOP1| ------ | ------ | ------ | ------ | ------ | ------ RB1 | RB2 | RB3 | RB4 | RB5 | RB6 Reverse block can consist of multiple GOP. E.g.: ------ ------ | ------ ------ | ------ ------ |GOP5| |GOP6| | |GOP3| |GOP4| | |GOP1| |GOP2| ------ ------ | ------ ------ | ------ ------ RB1 | RB2 | RB3
Such stream is played by decoding the whole RB and then playing decoded frames in reverse order
|
skipFramesCapability | frame skipping with DtsArchiveReader::setSkipFrames method is supported
|
motionDataCapability | motion data can be provided in media stream |
|
pure virtual |
Returns timestamp (usec (microseconds) since 1970-01-01, UTC) of newest data, present in the archive.
This value can be changed at any time (if record is ongoing)
Implemented in ArchiveReader.
|
pure virtual |
Returns text description of the last error.
[out] | errorString | Buffer of size MAX_TEXT_LEN |
Implemented in ArchiveReader.
|
pure virtual |
Returns stream reader.
DtsArchiveReader instance holds reference to returned StreamReader instance
Implemented in ArchiveReader.
|
pure virtual |
Initialize connection to archive.
Implemented in ArchiveReader.
|
pure virtual |
Play time range [start; end) skipping frames.
Tells to skip media packets for inter-packet timestamp gap to be at least step usec (microseconds). When frame skipping is implied, audio packets SHOULD not be reported
[in] | cSeq | New value of command sequence counter |
start | Position to seek to | |
endTimeHint | Used to hint implementation that packets with greater timestamp are of no interest. Implementation MAY NOT cache (if it does) data with greater timestamp | |
step | If 0, no frames MUST be skipped |
Implemented in ArchiveReader.
|
pure virtual |
Seek to specified posiition in stream.
Implementation is allowed to jump to frame with timestamp next to requested (i.e., lower_bound algorithm is implied to find frame)
[in] | cSeq | New value of command sequence counter |
[in] | timestamp | timestamp to seek to |
[in] | findKeyFrame | If true, MUST jump to key-frame only (selected frame timestamp MUST be equal or less than requested) |
[out] | selectedPosition | Timestamp of actually selected position |
Implemented in ArchiveReader.
|
pure virtual |
Toggle motion data in media stream on/off.
Implemented in ArchiveReader.
|
pure virtual |
Select media stream quality (used for dynamic media stream adaptation)
Media stream switching may not occur immediately, depending on waitForKeyFrame argument
[in] | quality | Media stream quality |
[in] | waitForKeyFrame | If true, implementation SHOULD switch only on reaching next key frame of new stream. If false, StreamReader instance SHOULD switch immediately to the key frame of new stream with greatest pts, not exceeding current |
Implemented in ArchiveReader.
|
pure virtual |
Set playback direction (forward/reverse)
If timestamp is not equal to INVALID_TIMESTAMP_VALUE, seek is performed along with playback direction change
[in] | cSeq | New value of command sequence counter |
[in] | isReverse | If true, playback |
[in] | position | if not INVALID_TIMESTAMP_VALUE, playback SHOULD jump to this position (with rules, defined for DtsArchiveReader::seek) |
[out] | selectedPosition | Timestamp of actually selected position |
Implemented in ArchiveReader.
|
pure virtual |
Returns timestamp (usec (microseconds) since 1970-01-01, UTC) of oldest data, present in the archive.
This value can be changed at any time (if record is ongoing)
Implemented in ArchiveReader.