Hello again,
I came across a situation where I am requesting a stream or changing a stream and using the SeekType of Time and a Time value that is earlier than the earliest recording for that camera on the system.
The response received is OK and I get the stream starting at the earliest recording, which can be significantly later than the requested time.
How can I determine if I am requesting a Time that is prior to the earliest recording on the server? I don’t see any indication in the response from the RequestStream that my requested time is before DB start.
Thank you,
-Dave Engel
Hi Dave,
You can use the VideoData Headers - more specifically :
Header Extension playback events
Headerflag - 0x04
Available Flags:
• PlayStopped = 0x1,
• PlayForward = 0x2,
• PlayBackward = 0x4,
• DatabaseStart = 0x10,
• DatabaseEnd = 0x20,
• DatabaseError = 0x40,
(You can find more details about the video data headers in Mobile Server protocol - Video Channel section)
Hi Svetlana,
Looking through the sample VideoConnectionItem.js script file provided by the SDK, I found some references for currentPlaybackEvents and changedPlaybackEvents properties which can be found in the frame object returned from the sendFrameRequest method in requestFrames.js.
Looking at a good playback scenario, I am receiving the value of 2 for both the currentPlaybackEvents and changedPlaybackEvents on the initial frame and no playback headers on the following frames. Does the value of 2 represent the 0x2 ‘PlayForward’ hex flag in decimal equivalent?
In the scneario where the saved video doesn’t go back as far as the time I am requesting, I am initially receiving the same value of 2 for both the currentPlaybackEvents and changedPlaybackEvents, however on the next frame I am receiving a value of 18 and 16 for the currentPlaybackEvents and changedPlaybackEvents respectively. Does the value of 16 represent the 0x10 ‘DatabaseStart’ hex flag decimal equivalent?
Any idea why the initial frames are valued at 2 in both scenarios?
Thanks,
-Dave Engel
Hi David,
Yes,
2 - stands for 0x00000010 → PlayForward
18 - stands for 0x00010010 → PlayForward and DatabaseStart
It is possible to receive two frames in the described order depending what commands you send.
Could you please give us more details what you aim to achieve and how do you do it (what commands are you sending), so we can provide you more detailed information
/Svetlana
Hi,
I am sending a RequestStream using the SignalType of ‘Playback’, SeekType of ‘Time’ and the Time I want to start the playback. Then I send a ChangeStream to set the Speed to ‘1.0’ to start the playback. (Would be nice to send the Speed of 1.0 in the initial RequestStream so I can get the playback going in one command request).
I’m trying to catch the scenario where the Time for the playback request is earlier than the start of the camera DB.
It looks like if I receive a currentPlaybackEvents or changedPlaybackEvents that is >= 16 when the mobile server returns the initial frame of the camera db.
Thanks,
-Dave