public static extern int PropVariantClear(ref PropertyVariant propertyVariant);
public static extern int PropVariantClear(ref PropertyVariant propertyVariant);
private void SetPosition(long value) { if (CanSeek) { lock (_lockObj) { value -= (value % WaveFormat.BlockAlign); long hnsPos = BytesToNanoSecond100Units(value); var propertyVariant = new PropertyVariant {HValue = hnsPos, DataType = VarEnum.VT_I8}; _reader.SetCurrentPosition(Guid.Empty, propertyVariant); _decoderBufferCount = 0; _decoderBufferOffset = 0; _position = value; _positionChanged = true; } } }
/// <summary> /// Seeks to a new position in the media source. /// </summary> public void SetCurrentPosition(Guid guidTimeFormat, PropertyVariant position) { MediaFoundationException.Try(SetCurrentPositionNative(guidTimeFormat, position), c, "SetCurrentPosition"); }
/// <summary> /// Seeks to a new position in the media source. /// </summary> /// <returns>HRESULT</returns> public unsafe int SetCurrentPositionNative(Guid guidTimeFormat, PropertyVariant position) { return InteropCalls.CalliMethodPtr(_basePtr, &guidTimeFormat, &position, ((void**)(*(void**)_basePtr))[8]); }
/// <summary> /// Gets an attribute from the underlying media source. /// </summary> /// <returns>HRESULT</returns> public unsafe int GetPresentationAttributeNative(int streamIndex, Guid guidAttribute, out PropertyVariant variant) { variant = default(PropertyVariant); fixed (void* ptr = &variant) { return InteropCalls.CalliMethodPtr(_basePtr, streamIndex, &guidAttribute, ptr, ((void**)(*(void**)_basePtr))[12]); } }
internal static unsafe int CalliMethodPtr(void* _basePtr, Guid* guid, PropertyVariant* propertyVariant, NativeBool* pr, void* p) { throw new NotImplementedException(); }
private static extern int PropVariantClear(ref PropertyVariant propertyVariant);
private static extern int PropVariantClear(ref PropertyVariant propertyVariant);
private void SetPosition(long value) { if (CanSeek) { lock (_lockObj) { long hnsPos = (10000000L * value) / WaveFormat.BytesPerSecond; var propertyVariant = new PropertyVariant {HValue = hnsPos, DataType = VarEnum.VT_I8}; _reader.SetCurrentPosition(Guid.Empty, propertyVariant); _decoderBufferCount = 0; _decoderBufferOffset = 0; _position = value; } } }