Пример #1
0
 public static extern int PropVariantClear(ref PropertyVariant propertyVariant);
Пример #2
0
 public static extern int PropVariantClear(ref PropertyVariant propertyVariant);
Пример #3
0
        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;
                }
            }
        }
Пример #4
0
 /// <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");
 }
Пример #5
0
 /// <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]);
 }
Пример #6
0
 /// <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]);
     }
 }
Пример #7
0
 internal static unsafe int CalliMethodPtr(void* _basePtr, Guid* guid, PropertyVariant* propertyVariant, NativeBool* pr, void* p)
 {
     throw new NotImplementedException();
 }
Пример #8
0
 private static extern int PropVariantClear(ref PropertyVariant propertyVariant);
Пример #9
0
 private static extern int PropVariantClear(ref PropertyVariant propertyVariant);
Пример #10
0
 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;
         }
     }
 }