54 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
| package models
 | |
| 
 | |
| import "gitea.unprism.ru/KRBL/n9m/v2/pkg/protocol"
 | |
| 
 | |
| type StreamType uint
 | |
| 
 | |
| const (
 | |
| 	StreamTypeSub StreamType = iota
 | |
| 	StreamTypeMain
 | |
| 	StreamTypeMobile
 | |
| )
 | |
| 
 | |
| type MediaStreamModelRequestLiveVideoRequest struct {
 | |
| 	SSRC        uint       `json:"SSRC,omitempty"`
 | |
| 	StreamName  string     `json:"STREAMNAME"`
 | |
| 	StreamType  StreamType `json:"STREAMTYPE"`
 | |
| 	Channel     uint       `json:"CHANNEL"`
 | |
| 	AudioValid  uint       `json:"AUDIOVALID"`
 | |
| 	Destination string     `json:"IPANDPORT,omitempty"`
 | |
| 	FrameCount  uint       `json:"FRAMECOUNT,omitempty"`
 | |
| 	FrameMode   uint       `json:"FRAMEMODE"`
 | |
| }
 | |
| 
 | |
| type MediaStreamModelRequestLiveVideoResponse struct {
 | |
| 	SSRC       uint       `json:"SSRC"`
 | |
| 	StreamName string     `json:"STREAMNAME"`
 | |
| 	StreamType StreamType `json:"STREAMTYPE"`
 | |
| 	ErrorCode  uint       `json:"ERRORCODE"`
 | |
| 	ErrorCause string     `json:"ERRORCAUSE"`
 | |
| }
 | |
| 
 | |
| type MediaStreamCommand uint
 | |
| 
 | |
| const (
 | |
| 	MediaStreamCommandStop MediaStreamCommand = iota
 | |
| 	MediaStreamCommandResume
 | |
| 	MediaStreamCommandPause
 | |
| 	MediaStreamCommandSwitchVideoStream
 | |
| 	MediaStreamAudioManagement
 | |
| 	MediaStreamFrameRate
 | |
| 	MediaStreamSendingMode
 | |
| )
 | |
| 
 | |
| type MediaStreamModelControlStreamRequest struct {
 | |
| 	PayloadType protocol.PayloadType `json:"PT"`
 | |
| 	SSRC        uint16               `json:"SSRC"`
 | |
| 	StreamName  string               `json:"STREAMNAME"`
 | |
| 	Command     MediaStreamCommand   `json:"CMD"`
 | |
| 
 | |
| 	StreamType StreamType `json:"STREAMTYPE,omitempty"`
 | |
| 	AudioValid uint       `json:"AUDIOVALID,omitempty"`
 | |
| 	FrameMode  uint       `json:"FRAMEMODE,omitempty"`
 | |
| }
 |