diff --git a/mediastreammodel.go b/mediastreammodel.go index 29eae8c..5c52857 100644 --- a/mediastreammodel.go +++ b/mediastreammodel.go @@ -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",