Playback¶
Find and playback video
Interface Overview¶
| interface Name | Functional Description |
|---|---|
NET_SDK_FindFile | Find Recording |
NET_SDK_FindNextFile | Get file information (file name, size, start and end time) |
NET_SDK_FindClose | Close Find File |
NET_SDK_PlayBackByTime | Play By Time |
NET_SDK_PlayBackControl | Control Playback Status |
NET_SDK_StopPlayBack | Stop playback |
Note
For detailed parameters of the interface, see the interface definition section.
Process Description¶
---
title: Video Playback
---
flowchart TD
A(Device SDK initialization <br> <strong>NET_SDK_Init</strong>)
B(User registers device <br> <strong>NET_SDK_Login</strong> or <br> <strong>NET_SDK_LoginEx</strong>)
subgraph SF [Find video file]
direction LR
S0(Find video file <br> <strong>NET_SDK_FindFile</strong>)
S1(Get video file information one by one <br> <strong>NET_SDK_FindNextFile</strong>)
S2(Stop video search <br> <strong>NET_SDK_FindClose</strong>)
S0 --> S1 --> S2
end
subgraph SF1 [Video file playback]
direction LR
S00(Playback by time <br> <strong>NET_SDK_PlayBackByTime</strong>)
S01(Playback status control <br> <strong>NET_SDK_PlayBackControl</strong>)
S02(Stop video playback <br> <strong>NET_SDK_StopPlayBack</strong>)
S00 --> S01 --> S02
end
E(Log out of device <br><strong>NET_SDK_Logout</strong>)
F(Release SDK resources <br><strong>NET_SDK_Cleanup</strong>)
A --> B --> SF --> SF1 --> E --> F -
NET_SDK_FindFile: Query whether there is a video file in a certain time period
-
NET_SDK_FindNextFile: Handle returned by NET_SDK_FindFile, query the specific information of the recording file, including the start and end time of the recording, etc.
-
NET_SDK_PlayBackByTime: Start and end time of the video returned by NET_SDK_FindNextFile, play back the video
Sample Code¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | |
Relevant Instructions¶
- NET_SDK_PlayBackControl only exemplifies pausing playback (NET_SDK_PLAYCTRL_pause)