C# Класс MediaPortal.Player.PlaneScene

This class will draw a video texture onscreen when using VMR9 renderless Its controlled by the allocator wrapper Example on how to use: PlaneScene scene = new PlaneScene(GUIGraphicsContext.RenderGUI) scene.Init() ... allocate direct3d texture scene.SetSrcRect(1.0f,1.0f); //change this depending on the texture dimensions scene.SetSurface(texture); //change this depending on the texture dimensions while (playingMovie) { scene.Render(GUIGraphicsContext.DX9Device, videoTextre, videoSize) } scene.ReleaseSurface(texture) scene.Stop(); scene.DeInit();
Наследование: IVMR9PresentCallback, IRenderLayer
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
Crop void
DrawTexture void
DrawTextureSegment void
InternalPresentImage void
OnMessage void
RenderBlackImage void
RenderLayers int

Открытые методы

Метод Описание
Deinit ( ) : void

Deinitialize. Release the vertex buffer and the render target resources This function should be called at last when playing has been stopped

ForceOsdUpdate ( bool pForce ) : void
Init ( ) : void

Initialize. This should be called before any other methods. It allocates resources needed

IsFullScreen ( ) : bool
IsUiVisible ( ) : bool
PlaneScene ( VMR9Util util ) : System
PresentImage ( Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, uint pTexture, uint pSurface ) : int
ReduceMadvrFrame ( ) : int
RenderFor3DMode ( GUIGraphicsContext renderModeHalf, float timePassed, Surface backbuffer, Surface surface, Rectangle targetRect ) : void
RenderFrame ( Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, uint pSurface ) : void
RenderGui ( Int16 width, Int16 height, Int16 arWidth, Int16 arHeight ) : int
RenderLayer ( float timePassed ) : void
RenderOverlay ( Int16 width, Int16 height, Int16 arWidth, Int16 arHeight ) : int
RenderSubtitle ( long frameStart, int left, int top, int right, int bottom, int width, int height, int xOffsetInPixels ) : void
Repaint ( ) : void
RestoreDeviceSurface ( uint pSurfaceDevice ) : void
SetRenderTarget ( uint target ) : void
SetSampleTime ( long nsSampleTime ) : void
SetSrcRect ( float fU, float fV ) : void

Set the texture dimensions. Sometimes the video texture is larger then the video resolution. In this case we should copy only a part from the video texture Using this function one can set how much of the video texture should be used

SetSubtitleDevice ( IntPtr device ) : void
SetVideoWindow ( Size videoSize ) : bool

This method calculates the rectangle on screen where the video should be presented this depends on if we are in fullscreen mode or preview mode and on the current aspect ration settings

ShouldRenderLayer ( ) : bool
Stop ( ) : void

Stop VMR9 rendering this method will restore the DirectX render target since this might have been changed by the Video Mixing Renderer9

Приватные методы

Метод Описание
Crop ( MediaPortal.Player.CropSettings cs ) : void

Crop. Crops the current picture..

DrawTexture ( uint texAddr, long lColorDiffuse ) : void
DrawTextureSegment ( VertexBuffer vertexBuffer, float srcX, float srcY, float srcWidth, float srcHeight, float dstX, float dstY, float dstWidth, float dstHeight, long lColorDiffuse ) : void
InternalPresentImage ( int width, int height, int arWidth, int arHeight, bool isRepaint ) : void
OnMessage ( GUIMessage message ) : void

OnMessage. Handles received GUIMessage's from graphics context.

RenderBlackImage ( float timePassed ) : void
RenderLayers ( GUILayers layers, Int16 width, Int16 height, Int16 arWidth, Int16 arHeight ) : int

Описание методов

Deinit() публичный Метод

Deinitialize. Release the vertex buffer and the render target resources This function should be called at last when playing has been stopped
public Deinit ( ) : void
Результат void

ForceOsdUpdate() публичный Метод

public ForceOsdUpdate ( bool pForce ) : void
pForce bool
Результат void

Init() публичный Метод

Initialize. This should be called before any other methods. It allocates resources needed
public Init ( ) : void
Результат void

IsFullScreen() публичный Метод

public IsFullScreen ( ) : bool
Результат bool

IsUiVisible() публичный Метод

public IsUiVisible ( ) : bool
Результат bool

PlaneScene() публичный Метод

public PlaneScene ( VMR9Util util ) : System
util VMR9Util
Результат System

PresentImage() публичный Метод

public PresentImage ( Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, uint pTexture, uint pSurface ) : int
width System.Int16
height System.Int16
arWidth System.Int16
arHeight System.Int16
pTexture uint
pSurface uint
Результат int

ReduceMadvrFrame() публичный Метод

public ReduceMadvrFrame ( ) : int
Результат int

RenderFor3DMode() публичный статический Метод

public static RenderFor3DMode ( GUIGraphicsContext renderModeHalf, float timePassed, Surface backbuffer, Surface surface, Rectangle targetRect ) : void
renderModeHalf MediaPortal.GUI.Library.GUIGraphicsContext
timePassed float
backbuffer Surface
surface Surface
targetRect System.Drawing.Rectangle
Результат void

RenderFrame() публичный Метод

public RenderFrame ( Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, uint pSurface ) : void
width System.Int16
height System.Int16
arWidth System.Int16
arHeight System.Int16
pSurface uint
Результат void

RenderGui() публичный Метод

public RenderGui ( Int16 width, Int16 height, Int16 arWidth, Int16 arHeight ) : int
width System.Int16
height System.Int16
arWidth System.Int16
arHeight System.Int16
Результат int

RenderLayer() публичный Метод

public RenderLayer ( float timePassed ) : void
timePassed float
Результат void

RenderOverlay() публичный Метод

public RenderOverlay ( Int16 width, Int16 height, Int16 arWidth, Int16 arHeight ) : int
width System.Int16
height System.Int16
arWidth System.Int16
arHeight System.Int16
Результат int

RenderSubtitle() публичный Метод

public RenderSubtitle ( long frameStart, int left, int top, int right, int bottom, int width, int height, int xOffsetInPixels ) : void
frameStart long
left int
top int
right int
bottom int
width int
height int
xOffsetInPixels int
Результат void

Repaint() публичный Метод

public Repaint ( ) : void
Результат void

RestoreDeviceSurface() публичный Метод

public RestoreDeviceSurface ( uint pSurfaceDevice ) : void
pSurfaceDevice uint
Результат void

SetRenderTarget() публичный Метод

public SetRenderTarget ( uint target ) : void
target uint
Результат void

SetSampleTime() публичный Метод

public SetSampleTime ( long nsSampleTime ) : void
nsSampleTime long
Результат void

SetSrcRect() публичный Метод

Set the texture dimensions. Sometimes the video texture is larger then the video resolution. In this case we should copy only a part from the video texture Using this function one can set how much of the video texture should be used
public SetSrcRect ( float fU, float fV ) : void
fU float (0-1) Specifies the width to used of the video texture
fV float (0-1) Specifies the height to used of the video texture
Результат void

SetSubtitleDevice() публичный Метод

public SetSubtitleDevice ( IntPtr device ) : void
device System.IntPtr
Результат void

SetVideoWindow() публичный Метод

This method calculates the rectangle on screen where the video should be presented this depends on if we are in fullscreen mode or preview mode and on the current aspect ration settings
public SetVideoWindow ( Size videoSize ) : bool
videoSize System.Drawing.Size Size of video stream
Результат bool

ShouldRenderLayer() публичный Метод

public ShouldRenderLayer ( ) : bool
Результат bool

Stop() публичный Метод

Stop VMR9 rendering this method will restore the DirectX render target since this might have been changed by the Video Mixing Renderer9
public Stop ( ) : void
Результат void