Example #1
0
 public WebTvResult(int result, string rtspURL, string timeshiftFile, TvControl.User u)
 {
     this.result        = result;
     this.rtspURL       = rtspURL;
     user               = new WebTvServerUser(u);
     this.timeshiftFile = timeshiftFile;
 }
Example #2
0
 public WebTvResult(int result, string rtspURL,string timeshiftFile,TvControl.IUser u)
 {
   this.result = result;
   this.rtspURL = rtspURL;
   user = new WebTvServerUser((TvControl.User)u);
   this.timeshiftFile = timeshiftFile;
 }
Example #3
0
    public WebTvResult()
    {
      result=5; //unknown error
      rtspURL = "";
      user = new WebTvServerUser();

    }
Example #4
0
 public WebTvResult()
 {
     result  = 5; //unknown error
     rtspURL = "";
     user    = new WebTvServerUser();
 }
Example #5
0
        public static WebTvResult StartTimeshifting(int idChannel)
        {
            SetupConnection();

            TvControl.User userId = new TvControl.User(System.Guid.NewGuid().ToString("B"), false);
            IUser iUser = (IUser)userId;
            TvResult tvResult;
            VirtualCard vcard;
            WebTvResult webTvResult = new WebTvResult();

            try
            {
                tvResult = RemoteControl.Instance.StartTimeShifting(ref iUser, idChannel, out vcard);
            }
            catch (Exception generatedExceptionName)
            {
                return webTvResult;
            }

            string rtspURL = string.Empty;
            string timeshiftFilename = string.Empty;

            if (tvResult == TvResult.Succeeded)
            {
                userId.IdChannel = idChannel;
                userId.CardId = vcard.Id;
                rtspURL = vcard.RTSPUrl;
                timeshiftFilename = vcard.TimeShiftFileName;

                WebTvServerUser u = new WebTvServerUser();
                u.idCard = vcard.Id;
                u.idChannel = idChannel;
                u.name = userId.Name;

                webTvResult.result = (int)tvResult;
                webTvResult.rtspURL = vcard.RTSPUrl;
                webTvResult.timeshiftFile = vcard.TimeShiftFileName;
                webTvResult.user = u;
            }

            return webTvResult;
        }