/// </summary>
public class MediaCodec : IDisposable
{
- private static readonly int CodecTypeMask = 0xFFFF;
- private static readonly int CodecKindMask = 0x3000;
- private static readonly int CodecKindAudio = 0x1000;
- private static readonly int CodecKindVideo = 0x2000;
+ private const int CodecTypeMask = 0xFFFF;
+ private const int CodecKindMask = 0x3000;
+// private const int CodecKindAudio = 0x1000; // Not used
+ private const int CodecKindVideo = 0x2000;
private IntPtr _handle;
byte this[int index]
{
get;
+ set;
}
/// <summary>
/// Gets the size of the buffer, in bytes.
public interface IMediaBuffer : IReadOnlyBuffer
{
/// <summary>
- /// Gets or sets a value at the specified index.
- /// </summary>
- /// <param name="index">The index of the value to get or set.</param>
- /// <exception cref="ArgumentOutOfRangeException">
- /// index is less than zero.
- /// <para>-or-</para>
- /// index is equal to or greater than <see cref="Length"/>.
- /// </exception>
- /// <exception cref="ObjectDisposedException">The object that owns the current buffer already has been disposed of.</exception>
- /// <exception cref="InvalidOperationException">The buffer is not available. i.e. not writable state.</exception>
- byte this[int index]
- {
- get;
- set;
- }
- /// <summary>
/// Copies data from the buffer to a byte array.
/// </summary>
/// <param name="dest">The array to copy to.</param>
/// <exception cref="ObjectDisposedException">The object that owns the current buffer already has been disposed of.</exception>
/// <exception cref="InvalidOperationException">The buffer is not available. i.e. not writable state.</exception>
void CopyFrom(byte[] source, int startIndex, int length, int offset);
-
}
/// <summary>
CopyFrom(source, startIndex, length, 0);
}
- public void CopyTo(byte[] dest, int startIndex, int length, int offset)
+ public void CopyTo(byte[] dest, int startIndex, int length, int offset)
{
_owner.ValidateBufferWritable(this);