Table of Contents

Delegate MediaPlayer.LibVLCVideoFormatCb

Namespace
LibVLCSharp.Shared
Assembly
LibVLCSharp.dll

Callback prototype to configure picture buffers format.

This callback gets the format of the video as output by the video decoder

and the chain of video filters (if any). It can opt to change any parameter

as it needs. In that case, LibVLC will attempt to convert the video format

(rescaling and chroma conversion) but these operations can be CPU intensive.

public delegate uint MediaPlayer.LibVLCVideoFormatCb(ref nint opaque, nint chroma, ref uint width, ref uint height, ref uint pitches, ref uint lines)

Parameters

opaque nint

pointer to the private pointer passed to

libvlc_video_set_callbacks() [IN/OUT]

chroma nint

pointer to the 4 bytes video format identifier [IN/OUT]

width uint

pointer to the pixel width [IN/OUT]

height uint

pointer to the pixel height [IN/OUT]

pitches uint

table of scanline pitches in bytes for each pixel plane

(the table is allocated by LibVLC) [OUT]

lines uint

table of scanlines count for each plane [OUT]

Returns

uint

the number of picture buffers allocated, 0 indicates failure

Remarks

For each pixels plane, the scanline pitch must be bigger than or equal to

the number of bytes per pixel multiplied by the pixel width.

Similarly, the number of scanlines must be bigger than of equal to

the pixel height.

Furthermore, we recommend that pitches and lines be multiple of 32

to not break assumptions that might be held by optimized code

in the video decoders, video filters and/or video converters.

Constructors

LibVLCVideoFormatCb(object, nint)

public LibVLCVideoFormatCb(object @object, nint method)

Parameters

object object
method nint

Methods

BeginInvoke(ref nint, nint, ref uint, ref uint, ref uint, ref uint, AsyncCallback, object)

public virtual IAsyncResult BeginInvoke(ref nint opaque, nint chroma, ref uint width, ref uint height, ref uint pitches, ref uint lines, AsyncCallback callback, object @object)

Parameters

opaque nint
chroma nint
width uint
height uint
pitches uint
lines uint
callback AsyncCallback
object object

Returns

IAsyncResult

EndInvoke(ref nint, ref uint, ref uint, ref uint, ref uint, IAsyncResult)

public virtual uint EndInvoke(ref nint opaque, ref uint width, ref uint height, ref uint pitches, ref uint lines, IAsyncResult result)

Parameters

opaque nint
width uint
height uint
pitches uint
lines uint
result IAsyncResult

Returns

uint

Invoke(ref nint, nint, ref uint, ref uint, ref uint, ref uint)

public virtual uint Invoke(ref nint opaque, nint chroma, ref uint width, ref uint height, ref uint pitches, ref uint lines)

Parameters

opaque nint
chroma nint
width uint
height uint
pitches uint
lines uint

Returns

uint