Ejemplo n.º 1
0
        /// <summary>
        /// Sends record stop notifications.
        /// </summary>
        private void SendRecordStopNotify()
        {
            StatusASO stopStatus = new StatusASO(StatusASO.NS_RECORD_STOP);
            stopStatus.clientid = this.StreamId;
            stopStatus.details = this.PublishedName;

            StatusMessage startMsg = new StatusMessage();
            startMsg.body = stopStatus;
            try
            {
                _connMsgOut.PushMessage(startMsg);
            }
            catch (System.IO.IOException ex)
            {
                log.Error("Error while pushing message.", ex);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Sends record failed notifications.
        /// </summary>
        /// <param name="reason"></param>
        private void SendRecordFailedNotify(string reason)
        {
            StatusASO failedStatus = new StatusASO(StatusASO.NS_RECORD_FAILED);
            failedStatus.level = StatusASO.ERROR;
            failedStatus.clientid = this.StreamId;
            failedStatus.details = this.PublishedName;
            failedStatus.description = reason;

            StatusMessage failedMsg = new StatusMessage();
            failedMsg.body = failedStatus;
            try
            {
                _connMsgOut.PushMessage(failedMsg);
            }
            catch (IOException ex)
            {
                log.Error("Error while pushing message.", ex);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Insufficient bandwidth notification
        /// </summary>
        /// <param name="item"></param>
        private void SendInsufficientBandwidthStatus(IPlayItem item)
        {
            StatusASO insufficientBW = new StatusASO(StatusASO.NS_PLAY_INSUFFICIENT_BW);
            insufficientBW.clientid = this.StreamId;
            insufficientBW.level = StatusASO.WARNING;
            insufficientBW.details = item.Name;
            insufficientBW.description = "Data is playing behind the normal speed.";

            StatusMessage insufficientBWMsg = new StatusMessage();
            insufficientBWMsg.body = insufficientBW;
            DoPushMessage(insufficientBWMsg);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Sends publish start notifications.
 /// </summary>
 private void SendPublishStartNotify()
 {
     StatusASO publishStatus = new StatusASO(StatusASO.NS_PUBLISH_START);
     publishStatus.clientid = this.StreamId;
     publishStatus.details = this.PublishedName;
     StatusMessage startMsg = new StatusMessage();
     startMsg.body = publishStatus;
     try
     {
         _connMsgOut.PushMessage(startMsg);
     }
     catch(System.IO.IOException ex)
     {
         log.Error("Error while pushing message.", ex);
     }
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Send unpublished status notification
        /// </summary>
        /// <param name="item"></param>
        private void SendUnpublishedStatus(IPlayItem item)
        {
            StatusASO unpublished = new StatusASO(StatusASO.NS_PLAY_UNPUBLISHNOTIFY);
            unpublished.clientid = this.StreamId;
            unpublished.details = item.Name;

            StatusMessage unpublishedMsg = new StatusMessage();
            unpublishedMsg.body = unpublished;
            DoPushMessage(unpublishedMsg);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Stream not found status notification
        /// </summary>
        /// <param name="item"></param>
        private void SendStreamNotFoundStatus(IPlayItem item)
        {
            StatusASO notFound = new StatusASO(StatusASO.NS_PLAY_STREAMNOTFOUND);
            notFound.clientid = this.StreamId;
            notFound.level = StatusASO.ERROR;
            notFound.details = item.Name;

            StatusMessage notFoundMsg = new StatusMessage();
            notFoundMsg.body = notFound;
            DoPushMessage(notFoundMsg);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Send pause status notification
        /// </summary>
        /// <param name="item"></param>
        private void SendPauseStatus(IPlayItem item)
        {
            StatusASO pause = new StatusASO(StatusASO.NS_PAUSE_NOTIFY);
            pause.clientid = this.StreamId;
            pause.details = item.Name;

            StatusMessage pauseMsg = new StatusMessage();
            pauseMsg.body = pause;
            DoPushMessage(pauseMsg);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Send resume status notification
        /// </summary>
        /// <param name="item"></param>
        private void SendResumeStatus(IPlayItem item)
        {
            StatusASO resume = new StatusASO(StatusASO.NS_UNPAUSE_NOTIFY);
            resume.clientid = this.StreamId;
            resume.details = item.Name;

            StatusMessage resumeMsg = new StatusMessage();
            resumeMsg.body = resume;
            DoPushMessage(resumeMsg);
        }
Ejemplo n.º 9
0
 /// <summary>
 /// Send seek status notification
 /// </summary>
 /// <param name="item"></param>
 /// <param name="position"></param>
 private void SendSeekStatus(IPlayItem item, int position)
 {
     StatusASO seek = new StatusASO(StatusASO.NS_SEEK_NOTIFY);
     seek.clientid = this.StreamId;
     seek.details = item.Name;
     seek.description = "Seeking " + position + " (stream ID: " + this.StreamId + ").";
     StatusMessage seekMsg = new StatusMessage();
     seekMsg.body = seek;
     DoPushMessage(seekMsg);
 }
Ejemplo n.º 10
0
        /// <summary>
        /// Send playback stoppage status notification
        /// </summary>
        /// <param name="item"></param>
        private void SendStopStatus(IPlayItem item)
        {
            StatusASO stop = new StatusASO(StatusASO.NS_PLAY_STOP);
            stop.clientid = this.StreamId;
            stop.description = "Stopped playing " + item.Name + ".";
            stop.details = item.Name;

            StatusMessage stopMsg = new StatusMessage();
            stopMsg.body = stop;
            DoPushMessage(stopMsg);
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Send playback start status notification
        /// </summary>
        /// <param name="item"></param>
        private void SendStartStatus(IPlayItem item)
        {
            StatusASO start = new StatusASO(StatusASO.NS_PLAY_START);
            start.clientid = this.StreamId;
            start.details = item.Name;
            start.description = "Started playing " + item.Name + '.';

            StatusMessage startMsg = new StatusMessage();
            startMsg.body = start;
            DoPushMessage(startMsg);
        }
Ejemplo n.º 12
0
 /// <summary>
 /// Send reset status for item
 /// </summary>
 /// <param name="item"></param>
 private void SendResetStatus(IPlayItem item)
 {
     StatusASO reset = new StatusASO(StatusASO.NS_PLAY_RESET);
     reset.clientid = this.StreamId;
     reset.details = item.Name;
     reset.description = "Playing and resetting " + item.Name + '.';
     StatusMessage resetMsg = new StatusMessage();
     resetMsg.body = reset;
     DoPushMessage(resetMsg);
 }
Ejemplo n.º 13
0
 protected override MessageBase CopyImpl(MessageBase clone)
 {
     // Instantiate the clone, if a derived type hasn't already.
     if (clone == null) clone = new StatusMessage();
     return base.CopyImpl(clone);
 }