Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
3241d59e7b
|
|||
71d0bc1018
|
@ -1,7 +1,5 @@
|
||||
package n9m
|
||||
|
||||
import "log"
|
||||
|
||||
// request reqistration parameters (directly to register)
|
||||
func (e *Package) RequestParameters(params map[string]any, serial int, session string) {
|
||||
e.Payload = map[string]any{
|
||||
@ -26,7 +24,7 @@ func (e *Package) SetParameters(params map[string]any, serial int, session strin
|
||||
},
|
||||
"SESSION": session,
|
||||
}
|
||||
log.Println(e.Payload)
|
||||
// log.Println(e.Payload)
|
||||
} // end of 'SetParameters' function
|
||||
|
||||
// todo al1
|
||||
|
2
io.go
2
io.go
@ -59,7 +59,7 @@ func (e *Package) ReadPackage() bool {
|
||||
e.PayloadType = r.TryReadBits(8)
|
||||
e.SSRC = r.TryReadBits(16)
|
||||
|
||||
log.Println(e.PayloadType)
|
||||
// log.Println(e.PayloadType)
|
||||
|
||||
is_special := e.Encription == 1 && e.Mark == 1
|
||||
if is_special {
|
||||
|
@ -1,8 +1,13 @@
|
||||
package n9m
|
||||
|
||||
import "fmt"
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
func (e *Package) MediaRequestDownloadVideo(token int, serial string, session string, camNo int, date string, begin_time string, end_time string, recordID string, serverId int, ip string) {
|
||||
var ip string = os.Getenv("SERVER_IP")
|
||||
|
||||
func (e *Package) MediaRequestDownloadVideo(token int, serial string, session string, camNo int, date string, begin_time string, end_time string, recordID string, serverId int) {
|
||||
e.Payload = map[string]any{
|
||||
"MODULE": "MEDIASTREAMMODEL",
|
||||
"OPERATION": "REQUESTDOWNLOADVIDEO",
|
||||
@ -26,7 +31,7 @@ func (e *Package) MediaRequestDownloadVideo(token int, serial string, session st
|
||||
}
|
||||
|
||||
// main server util
|
||||
func (e *Package) MediaRequestAliveVideo(token int, camNo int64, Sid string, serial string, quality int64, ip string) {
|
||||
func (e *Package) MediaRequestAliveVideo(token int, camNo int64, Sid string, serial string, quality int64) {
|
||||
|
||||
channel := 0
|
||||
|
||||
@ -52,7 +57,7 @@ func (e *Package) MediaRequestAliveVideo(token int, camNo int64, Sid string, ser
|
||||
}
|
||||
|
||||
// main server util
|
||||
func (e *Package) MediaRequestRemotePlayback(token int, serial string, session string, camNo int, date string, begin_time string, end_time string, serverId int, ip string) {
|
||||
func (e *Package) MediaRequestRemotePlayback(token int, serial string, session string, camNo int, date string, begin_time string, end_time string, serverId int) {
|
||||
e.Payload = map[string]any{
|
||||
"MODULE": "MEDIASTREAMMODEL",
|
||||
"OPERATION": "REQUESTREMOTEPLAYBACK",
|
||||
|
Reference in New Issue
Block a user