Show / Hide Table of Contents

Struct AVMultiDictionary_ref

Represents a managed reference to an FFmpeg AVDictionary that supports multiple values for the same key.

Implements
ILookup<string, string>
IEnumerable<IGrouping<string, string>>
IEnumerable
IReference<AVMultiDictionary>
IAVPointer<_AVDictionary>
Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
object.GetType()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: FFmpeg.Collections
Assembly: FFmpeg.dll
Syntax
public struct AVMultiDictionary_ref : ILookup<string, string>, IEnumerable<IGrouping<string, string>>, IEnumerable, IReference<AVMultiDictionary>, IAVPointer<_AVDictionary>
Remarks

Unlike AVMultiDictionary, this type does not own the underlying dictionary. It provides direct access to an existing FFmpeg AVDictionary.

Properties

View Source

Count

Gets the total number of key/value pairs contained in the dictionary.

Declaration
public readonly int Count { get; }
Property Value
Type Description
int
Remarks

Multiple entries having the same key are counted individually.

View Source

this[string]

Gets an enumerable sequence containing all values associated with the specified key.

Declaration
public readonly IEnumerable<string> this[string key] { get; }
Parameters
Type Name Description
string key

The key whose values to get.

Property Value
Type Description
IEnumerable<string>

An enumerable collection of values associated with the specified key.

Methods

View Source

Add(string, string)

Adds a key/value pair to the dictionary.

Declaration
public readonly void Add(string key, string value)
Parameters
Type Name Description
string key

The key of the element to add.

string value

The value of the element to add.

Remarks

Existing values are preserved. If the key already exists, the new value is added as an additional entry.

View Source

AsAVDictionary()

Returns a view of the referenced dictionary as an AVDictionary_ref.

Declaration
public readonly AVDictionary_ref AsAVDictionary()
Returns
Type Description
AVDictionary_ref
Remarks

Since AVDictionary_ref does not support duplicate keys, retrieving a value through the returned reference returns only the first matching entry for each key.

View Source

Clear()

Clears all key/value pairs from the dictionary.

Declaration
public readonly void Clear()
View Source

Contains(string)

Determines whether the dictionary contains the specified key.

Declaration
public readonly bool Contains(string key)
Parameters
Type Name Description
string key

The key to locate in the dictionary.

Returns
Type Description
bool

true if the dictionary contains an element with the specified key; otherwise, false.

View Source

GetEnumerator()

Returns an enumerator that iterates through the dictionary.

Declaration
public readonly IEnumerator<IGrouping<string, string>> GetEnumerator()
Returns
Type Description
IEnumerator<IGrouping<string, string>>

An enumerator that can be used to iterate through the dictionary.

View Source

GetReferencedObject()

Creates an independent copy of the referenced dictionary.

Declaration
public readonly AVMultiDictionary? GetReferencedObject()
Returns
Type Description
AVMultiDictionary

A new AVMultiDictionary containing the same entries, or null if no dictionary is referenced.

Remarks

Since FFmpeg dictionaries are not reference counted, this method performs a deep copy.

View Source

RemoveAll(string)

Removes all values associated with the specified key.

Declaration
public readonly bool RemoveAll(string key)
Parameters
Type Name Description
string key

The key whose values to remove.

Returns
Type Description
bool

true if any values were removed; otherwise, false.

Remarks

All entries having the specified key are removed.

View Source

RemoveFirst(string)

Removes the first value associated with the specified key.

Declaration
public readonly bool RemoveFirst(string key)
Parameters
Type Name Description
string key

The key whose first value to remove.

Returns
Type Description
bool

true if a value was removed; otherwise, false.

Remarks

If multiple values exist for the specified key, only the first matching entry is removed.

View Source

SetReferencedObject(AVMultiDictionary?)

Replaces the referenced dictionary with a copy of the specified dictionary.

Declaration
public void SetReferencedObject(AVMultiDictionary? obj)
Parameters
Type Name Description
AVMultiDictionary obj

The dictionary to copy, or null to free the referenced dictionary.

View Source

ToString()

Represents a managed wrapper around FFmpeg's AVDictionary that supports multiple values for the same key.

Declaration
public override readonly string ToString()
Returns
Type Description
string
Overrides
ValueType.ToString()
Remarks

Unlike AVDictionary, this class allows duplicate keys by storing multiple entries with the same key.

Implements

ILookup<TKey, TElement>
IEnumerable<T>
IEnumerable
IReference<T>
IAVPointer<T>
  • View Source
In this article
Back to top Generated by DocFX