Ejemplo n.º 1
0
        /// <summary>
        /// Gets the shape of the player's display window (default: DisplayShape.Normal). See also: Player.Display.Shape.
        /// </summary>
        /// <param name="shape">A value that indicates the shape of the player's display window.</param>
        /// <param name="videoShape">A value that indicates whether the shape applies to the video image (or to the display window).</param>
        /// <param name="overlayShape">A value that indicates whether the shape is also applied to display overlays.</param>
        public int GetShape(out DisplayShape shape, out bool videoShape, out bool overlayShape)
        {
            _base._lastError = Player.NO_ERROR;

            shape        = _base._displayShape;
            videoShape   = _base._hasVideoShape;
            overlayShape = _base._hasOverlayClipping;

            return((int)_base._lastError);
        }
 /// <summary>
 ///   Copies this graphElement data into the copyOfElt.
 /// </summary>
 /// <param name = "copyOfElt">The copy of elt.</param>
 protected virtual void copy(graphElement copyOfElt)
 {
     copyOfElt.name = name;
     foreach (var label in localLabels)
     {
         copyOfElt.localLabels.Add(label);
     }
     foreach (var d in localVariables)
     {
         copyOfElt.localVariables.Add(d);
     }
     if (DisplayShape != null)
     {
         copyOfElt.DisplayShape = DisplayShape.Copy(copyOfElt);
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Sets the shape of the player's display window. See also: Player.Display.Shape.
        /// </summary>
        /// <param name="shape">A value that indicates the shape of the player's display window.</param>
        /// <param name="videoShape">A value that indicates whether the shape applies to the video image (or to the display window).</param>
        /// <param name="overlayShape">A value that indicates whether the shape should also be applied to display overlays.</param>
        public int SetShape(DisplayShape shape, bool videoShape, bool overlayShape)
        {
            _base._lastError = Player.NO_ERROR;

            if (shape == DisplayShape.Normal)
            {
                _base.AV_RemoveDisplayShape(true);
            }
            else
            {
                if (_base._hasDisplay)
                {
                    if (_base._displayShape != shape || videoShape != _base._hasVideoShape || overlayShape != _base._hasOverlayClipping)
                    {
                        _base._displayShape         = shape;
                        _base._hasVideoShape        = videoShape;
                        _base._displayShapeCallback = _base.AV_GetShapeCallback(shape);
                        _base.AV_SetOverlayClipping(overlayShape);

                        _base._hasDisplayShape = true;
                        _base.AV_UpdateDisplayShape();

                        if (videoShape)
                        {
                            _base._mediaVideoBoundsChanged += _base.AV_DisplayShapeChanged;
                        }
                        _base._mediaDisplayShapeChanged?.Invoke(_base, EventArgs.Empty);
                    }
                }
                else
                {
                    if (_base._displayShape != DisplayShape.Normal)
                    {
                        _base.AV_RemoveDisplayShape(true);
                    }
                    _base._lastError = HResult.MF_E_NOT_AVAILABLE; // No Display
                }
            }
            return((int)_base._lastError);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Sets the shape of the player's display window. See also: Player.Display.Shape.
 /// </summary>
 /// <param name="shape">A value that indicates the shape of the player's display window.</param>
 public int SetShape(DisplayShape shape)
 {
     return(SetShape(shape, _base._hasVideoShape, _base._hasOverlayClipping));
 }