Table of Contents

Class Buffer

Namespace
Gst
Assembly
Gst-1.0.dll
public sealed class Buffer : BoxedRecord, IEquatable<Buffer>
Inheritance
Buffer
Implements
Inherited Members

Constructors

Buffer()

public Buffer()

Buffer(BufferOwnedHandle)

public Buffer(BufferOwnedHandle handle)

Parameters

handle BufferOwnedHandle

Properties

Handle

public BufferOwnedHandle Handle { get; }

Property Value

BufferOwnedHandle

Offset

public ulong Offset { get; set; }

Property Value

ulong

OffsetEnd

public ulong OffsetEnd { get; set; }

Property Value

ulong

Methods

AddCustomMeta(string)

[Version("1.20")]
public CustomMeta? AddCustomMeta(string name)

Parameters

name string

Returns

CustomMeta

AddMeta(MetaInfo, IntPtr)

public Meta? AddMeta(MetaInfo info, IntPtr @params)

Parameters

info MetaInfo
params IntPtr

Returns

Meta

AddParentBufferMeta(Buffer)

[Version("1.6")]
public ParentBufferMeta? AddParentBufferMeta(Buffer @ref)

Parameters

ref Buffer

Returns

ParentBufferMeta

AddProtectionMeta(Structure)

[Version("1.6")]
public ProtectionMeta AddProtectionMeta(Structure info)

Parameters

info Structure

Returns

ProtectionMeta

AddReferenceTimestampMeta(Caps, ClockTime, ClockTime)

[Version("1.14")]
public ReferenceTimestampMeta? AddReferenceTimestampMeta(Caps reference, ClockTime timestamp, ClockTime duration)

Parameters

reference Caps
timestamp ClockTime
duration ClockTime

Returns

ReferenceTimestampMeta

Append(Buffer)

public Buffer Append(Buffer buf2)

Parameters

buf2 Buffer

Returns

Buffer

AppendMemory(Memory)

public void AppendMemory(Memory mem)

Parameters

mem Memory

AppendRegion(Buffer, long, long)

public Buffer AppendRegion(Buffer buf2, long offset, long size)

Parameters

buf2 Buffer
offset long
size long

Returns

Buffer

CopyDeep()

[Version("1.6")]
public Buffer? CopyDeep()

Returns

Buffer

CopyInto(Buffer, BufferCopyFlags, nuint, nuint)

public bool CopyInto(Buffer src, BufferCopyFlags flags, nuint offset, nuint size)

Parameters

src Buffer
flags BufferCopyFlags
offset nuint
size nuint

Returns

bool

CopyRegion(BufferCopyFlags, nuint, nuint)

public Buffer? CopyRegion(BufferCopyFlags flags, nuint offset, nuint size)

Parameters

flags BufferCopyFlags
offset nuint
size nuint

Returns

Buffer

Equals(Buffer?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Buffer? other)

Parameters

other Buffer

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Fill(nuint, Span<byte>)

public nuint Fill(nuint offset, Span<byte> src)

Parameters

offset nuint
src Span<byte>

Returns

nuint

FindMemory(nuint, nuint, out uint, out uint, out nuint)

public bool FindMemory(nuint offset, nuint size, out uint idx, out uint length, out nuint skip)

Parameters

offset nuint
size nuint
idx uint
length uint
skip nuint

Returns

bool

ForeachMeta(BufferForeachMetaFunc)

public bool ForeachMeta(BufferForeachMetaFunc func)

Parameters

func BufferForeachMetaFunc

Returns

bool

GetAllMemory()

public Memory? GetAllMemory()

Returns

Memory

GetCustomMeta(string)

[Version("1.20")]
public CustomMeta? GetCustomMeta(string name)

Parameters

name string

Returns

CustomMeta

GetFlags()

[Version("1.10")]
public BufferFlags GetFlags()

Returns

BufferFlags

GetGType()

public static Type GetGType()

Returns

Type

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

GetMaxMemory()

[Version("1.2")]
public static uint GetMaxMemory()

Returns

uint

GetMemory(uint)

public Memory? GetMemory(uint idx)

Parameters

idx uint

Returns

Memory

GetMemoryRange(uint, int)

public Memory? GetMemoryRange(uint idx, int length)

Parameters

idx uint
length int

Returns

Memory

GetMeta(Type)

public Meta? GetMeta(Type api)

Parameters

api Type

Returns

Meta

GetNMeta(Type)

[Version("1.14")]
public uint GetNMeta(Type apiType)

Parameters

apiType Type

Returns

uint

GetReferenceTimestampMeta(Caps?)

[Version("1.14")]
public ReferenceTimestampMeta? GetReferenceTimestampMeta(Caps? reference)

Parameters

reference Caps

Returns

ReferenceTimestampMeta

GetSize()

public nuint GetSize()

Returns

nuint

GetSizes(out nuint, out nuint)

public nuint GetSizes(out nuint offset, out nuint maxsize)

Parameters

offset nuint
maxsize nuint

Returns

nuint

GetSizesRange(uint, int, out nuint, out nuint)

public nuint GetSizesRange(uint idx, int length, out nuint offset, out nuint maxsize)

Parameters

idx uint
length int
offset nuint
maxsize nuint

Returns

nuint

HasFlags(BufferFlags)

[Version("1.10")]
public bool HasFlags(BufferFlags flags)

Parameters

flags BufferFlags

Returns

bool

InsertMemory(int, Memory)

public void InsertMemory(int idx, Memory mem)

Parameters

idx int
mem Memory

IsAllMemoryWritable()

[Version("1.4")]
public bool IsAllMemoryWritable()

Returns

bool

IsMemoryRangeWritable(uint, int)

[Version("1.4")]
public bool IsMemoryRangeWritable(uint idx, int length)

Parameters

idx uint
length int

Returns

bool

IterateMeta(out IntPtr)

public Meta? IterateMeta(out IntPtr state)

Parameters

state IntPtr

Returns

Meta

IterateMetaFiltered(out IntPtr, Type)

[Version("1.12")]
public Meta? IterateMetaFiltered(out IntPtr state, Type metaApiType)

Parameters

state IntPtr
metaApiType Type

Returns

Meta

Map(out MapInfo, MapFlags)

public bool Map(out MapInfo info, MapFlags flags)

Parameters

info MapInfo
flags MapFlags

Returns

bool

MapRange(uint, int, out MapInfo, MapFlags)

public bool MapRange(uint idx, int length, out MapInfo info, MapFlags flags)

Parameters

idx uint
length int
info MapInfo
flags MapFlags

Returns

bool

Memcmp(nuint, Span<byte>)

public int Memcmp(nuint offset, Span<byte> mem)

Parameters

offset nuint
mem Span<byte>

Returns

int

Memset(nuint, byte, nuint)

public nuint Memset(nuint offset, byte val, nuint size)

Parameters

offset nuint
val byte
size nuint

Returns

nuint

NMemory()

public uint NMemory()

Returns

uint

New()

public static Buffer New()

Returns

Buffer

NewAllocate(Allocator?, nuint, AllocationParams?)

public static Buffer? NewAllocate(Allocator? allocator, nuint size, AllocationParams? @params)

Parameters

allocator Allocator
size nuint
params AllocationParams

Returns

Buffer

NewMemdup(Span<byte>)

[Version("1.20")]
public static Buffer NewMemdup(Span<byte> data)

Parameters

data Span<byte>

Returns

Buffer

NewWrapped(Span<byte>)

public static Buffer NewWrapped(Span<byte> data)

Parameters

data Span<byte>

Returns

Buffer

NewWrappedBytes(Bytes)

[Version("1.16")]
public static Buffer NewWrappedBytes(Bytes bytes)

Parameters

bytes Bytes

Returns

Buffer

PeekMemory(uint)

public Memory? PeekMemory(uint idx)

Parameters

idx uint

Returns

Memory

PrependMemory(Memory)

public void PrependMemory(Memory mem)

Parameters

mem Memory

RemoveAllMemory()

public void RemoveAllMemory()

RemoveMemory(uint)

public void RemoveMemory(uint idx)

Parameters

idx uint

RemoveMemoryRange(uint, int)

public void RemoveMemoryRange(uint idx, int length)

Parameters

idx uint
length int

RemoveMeta(Meta)

public bool RemoveMeta(Meta meta)

Parameters

meta Meta

Returns

bool

ReplaceAllMemory(Memory)

public void ReplaceAllMemory(Memory mem)

Parameters

mem Memory

ReplaceMemory(uint, Memory)

public void ReplaceMemory(uint idx, Memory mem)

Parameters

idx uint
mem Memory

ReplaceMemoryRange(uint, int, Memory)

public void ReplaceMemoryRange(uint idx, int length, Memory mem)

Parameters

idx uint
length int
mem Memory

Resize(long, long)

public void Resize(long offset, long size)

Parameters

offset long
size long

ResizeRange(uint, int, long, long)

public bool ResizeRange(uint idx, int length, long offset, long size)

Parameters

idx uint
length int
offset long
size long

Returns

bool

SetFlags(BufferFlags)

[Version("1.10")]
public bool SetFlags(BufferFlags flags)

Parameters

flags BufferFlags

Returns

bool

SetSize(long)

public void SetSize(long size)

Parameters

size long

Unmap(MapInfo)

public void Unmap(MapInfo info)

Parameters

info MapInfo

UnsetFlags(BufferFlags)

[Version("1.10")]
public bool UnsetFlags(BufferFlags flags)

Parameters

flags BufferFlags

Returns

bool