Exemple #1
0
        /**
         * Constructor.
         */
        public Streaming()
        {
            log.Trace("Creating streaming server");
            this.livePublishingPoint = null;
            this.onDemandPublishingPoint = null;
            this.onDemandState = State.Stopped;
            this.liveState = State.Stopped;
            this.mode = Modes.None;

            this.wmServer = new WMSServerClass();

            // Remove existing publishing points
            for (int i = 0; i < this.wmServer.PublishingPoints.length; ++i)
            {
                log.Trace("Existing publishing points = " + this.wmServer.PublishingPoints.length);
                if (this.wmServer.PublishingPoints[i].Type == WMS_PUBLISHING_POINT_TYPE.WMS_PUBLISHING_POINT_TYPE_BROADCAST ||
                    this.wmServer.PublishingPoints[i].Type == WMS_PUBLISHING_POINT_TYPE.WMS_PUBLISHING_POINT_TYPE_ON_DEMAND)
                {
                    try
                    {
                        this.wmServer.PublishingPoints.Remove(i);
                        i--;
                    }
                    catch (Exception e)
                    {
                        log.ErrorException("Exception raised while removing publishing point: " + e.Message, e);
                    }
                }
            }
        }
Exemple #2
0
        /**
         * Constructor.
         */
        public Streaming()
        {
            log.Trace("Creating streaming server");
            this.livePublishingPoint     = null;
            this.onDemandPublishingPoint = null;
            this.onDemandState           = State.Stopped;
            this.liveState = State.Stopped;
            this.mode      = Modes.None;

            this.wmServer = new WMSServerClass();

            // Remove existing publishing points
            for (int i = 0; i < this.wmServer.PublishingPoints.length; ++i)
            {
                log.Trace("Existing publishing points = " + this.wmServer.PublishingPoints.length);
                if (this.wmServer.PublishingPoints[i].Type == WMS_PUBLISHING_POINT_TYPE.WMS_PUBLISHING_POINT_TYPE_BROADCAST ||
                    this.wmServer.PublishingPoints[i].Type == WMS_PUBLISHING_POINT_TYPE.WMS_PUBLISHING_POINT_TYPE_ON_DEMAND)
                {
                    try
                    {
                        this.wmServer.PublishingPoints.Remove(i);
                        i--;
                    }
                    catch (Exception e)
                    {
                        log.ErrorException("Exception raised while removing publishing point: " + e.Message, e);
                    }
                }
            }
        }
Exemple #3
0
        /**
         * Set video on demand info.
         * @param path : Directory to share.
         */
        public DVRBResult SetVoDInfo(string path)
        {
            bool allow_clients = false;

            if (this.onDemandPublishingPoint == null)
            {
                log.Trace("Set VoDInfo: addr = " + path);
                this.onDemandPublishingPoint = (IWMSOnDemandPublishingPoint)this.wmServer.PublishingPoints.Add(
                    "OnDemand",
                    WMS_PUBLISHING_POINT_CATEGORY.WMS_PUBLISHING_POINT_ON_DEMAND,
                    path);
                this.onDemandPublishingPoint.AllowClientsToConnect = false;
            }
            else
            {
                this.onDemandPublishingPoint.AllowClientsToConnect = false;
                log.Trace("Change VoDInfo: addr = " + path);
                allow_clients = this.onDemandPublishingPoint.AllowClientsToConnect;
                this.onDemandPublishingPoint.Path = path;
            }

            this.onDemandPublishingPoint.EnableClientWildcardDirectoryAccess = false;
            this.onDemandState = State.Stopped;
            return(new DVRBResult());
        }
Exemple #4
0
        /**
         * Set video on demand info.
         * @param path : Directory to share.
         */
        public DVRBResult SetVoDInfo(string path)
        {
            bool allow_clients = false;
            if (this.onDemandPublishingPoint == null)
            {
                log.Trace("Set VoDInfo: addr = " + path);
                this.onDemandPublishingPoint = (IWMSOnDemandPublishingPoint)this.wmServer.PublishingPoints.Add(
                                                     "OnDemand",
                                                     WMS_PUBLISHING_POINT_CATEGORY.WMS_PUBLISHING_POINT_ON_DEMAND,
                                                     path);
                this.onDemandPublishingPoint.AllowClientsToConnect = false;
            }
            else
            {
                this.onDemandPublishingPoint.AllowClientsToConnect = false;
                log.Trace("Change VoDInfo: addr = " + path);
                allow_clients = this.onDemandPublishingPoint.AllowClientsToConnect;
                this.onDemandPublishingPoint.Path = path;
            }

            this.onDemandPublishingPoint.EnableClientWildcardDirectoryAccess = false;
            this.onDemandState = State.Stopped;
            return new DVRBResult();
        }