Esempio n. 1
0
        /// <summary>
        /// Reads the next sample from the media source.
        /// </summary>
        public MFSample ReadSample(int streamIndex, int controlFlags, out int actualStreamIndex, out MFSourceReaderFlag streamFlags, out long timestamp)
        {
            MFSample sample;

            MediaFoundationException.Try(ReadSampleNative(streamIndex, controlFlags, out actualStreamIndex, out streamFlags, out timestamp, out sample), c, "ReadSample");
            return(sample);
        }
Esempio n. 2
0
 /// <summary>
 /// Reads the next sample from the media source.
 /// </summary>
 /// <returns>HRESULT</returns>
 public unsafe int ReadSampleNative(int streamIndex, int controlFlags, out int actualStreamIndex, out MFSourceReaderFlag streamFlags, out long timestamp, out MFSample sample)
 {
     IntPtr psample = IntPtr.Zero;
     fixed (void* ptr0 = &actualStreamIndex, ptr1 = &streamFlags, ptr2 = &timestamp)
     {
         int result = InteropCalls.CalliMethodPtr(_basePtr, streamIndex, controlFlags, ptr0, ptr1, ptr2, &psample, ((void**)(*(void**)_basePtr))[9]);
         sample = psample == IntPtr.Zero ? null : new MFSample(psample);
         return result;
     }
 }
Esempio n. 3
0
        /// <summary>
        /// Reads the next sample from the media source.
        /// </summary>
        /// <returns>HRESULT</returns>
        public unsafe int ReadSampleNative(int streamIndex, int controlFlags, out int actualStreamIndex, out MFSourceReaderFlag streamFlags, out long timestamp, out MFSample sample)
        {
            IntPtr psample = IntPtr.Zero;

            fixed(void *ptr0 = &actualStreamIndex, ptr1 = &streamFlags, ptr2 = &timestamp)
            {
                int result = InteropCalls.CalliMethodPtr(_basePtr, streamIndex, controlFlags, ptr0, ptr1, ptr2, &psample, ((void **)(*(void **)_basePtr))[9]);

                sample = psample == IntPtr.Zero ? null : new MFSample(psample);
                return(result);
            }
        }
Esempio n. 4
0
 /// <summary>
 /// Reads the next sample from the media source.
 /// </summary>
 public MFSample ReadSample(int streamIndex, int controlFlags, out int actualStreamIndex, out MFSourceReaderFlag streamFlags, out long timestamp)
 {
     MFSample sample;
     MediaFoundationException.Try(ReadSampleNative(streamIndex, controlFlags, out actualStreamIndex, out streamFlags, out timestamp, out sample), c, "ReadSample");
     return sample;
 }