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
파일 보기 프로젝트 열기: MediaPortal/MediaPortal-1 1 사용 예제들

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