123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- using System;
- using Vinno.IUS.Common.Network.Leaf;
- using Vinno.vCloud.Protocol.Infrastructures;
- namespace Vinno.vCloud.Common.FIS.LiveVideos
- {
- public enum LiveVideoCommandType
- {
- Start, //Start push live video stream
- Stop //Stop push live video stream
- }
- public class ChannelData
- {
- /// <summary>
- /// Gets the channel id of the liveVideo channel.
- /// </summary>
- public string ChannelId { get; }
- /// <summary>
- /// Gets the url of the channel, usually is a rtmp url.
- /// </summary>
- public string Url { get; }
- public ChannelData(string id, string url)
- {
- ChannelId = id;
- Url = url;
- }
- }
- public class LiveVideoEventArgs : EventArgs
- {
- private readonly ClientLeaf _leaf;
- private string _terminalName;
- /// <summary>
- /// the viewer login source
- /// </summary>
- private readonly LoginSource _userSource;
- /// <summary>
- /// terminal login source
- /// </summary>
- private readonly LoginSource _terminalSource;
- /// <summary>
- /// Gets the terminal id which belongs to the target terminal.
- /// </summary>
- public string TerminalId { get; }
- /// <summary>
- /// Gets the user's id which send this command.
- /// </summary>
- public string UserId { get; }
- /// <summary>
- /// channel for terminal
- /// </summary>
- public ChannelData TerminalChannel { get; }
- /// <summary>
- /// channel for camera
- /// </summary>
- public ChannelData CammeraChannel { get; }
- /// <summary>
- /// Channel url for combination
- /// </summary>
- public string CombinationUrl { get; set; }
- /// <summary>
- /// Gets the command type of this event args.
- /// </summary>
- public LiveVideoCommandType CommandType { get; }
- public string LogPath { get; }
- internal LiveVideoEventArgs(ClientLeaf leaf, string terminalId, string userId, LoginSource userSource, LoginSource terminalSource, ChannelData terminalChannel, ChannelData cammeraChannel, LiveVideoCommandType commandType, string terminalName, string logPath = "")
- {
- _leaf = leaf;
- TerminalId = terminalId;
- UserId = userId;
- _userSource = userSource;
- _terminalSource = terminalSource;
- TerminalChannel = terminalChannel;
- CammeraChannel = cammeraChannel;
- CommandType = commandType;
- LogPath = logPath;
- _terminalName = terminalName;
- }
- internal LiveVideoEventArgs(ClientLeaf leaf, string terminalId, string userId, LoginSource terminalSource, LiveVideoCommandType commandType)
- {
- _leaf = leaf;
- TerminalId = terminalId;
- UserId = userId;
- _terminalSource = terminalSource;
- CommandType = commandType;
- }
- }
- }
|