Пример #1
0
        //---

        /// <summary>
        ///     Resets the enumeration sequence to the beginning.
        /// </summary>
        /// <returns>HRESULT</returns>
        public unsafe int ResetNative()
        {
            return(InteropCalls.CalliMethodPtr(UnsafeBasePtr, ((void **)(*(void **)UnsafeBasePtr))[5]));
        }
Пример #2
0
 /// <summary>
 ///     Specifies the quality of the output.
 /// </summary>
 /// <param name="quality">
 ///     Specifies the quality of the output. The valid range is 1 to 60,
 ///     inclusive.
 /// </param>
 /// <returns>HRESULT</returns>
 public unsafe int SetHalfFilterLengthNative(int quality)
 {
     return(InteropCalls.CalliMethodPtr(UnsafeBasePtr, quality, ((void **)(*(void **)UnsafeBasePtr))[3]));
 }
Пример #3
0
        //---

        /// <summary>
        ///     Skips over a specified number of items in the enumeration sequence.
        /// </summary>
        /// <param name="itemsToSkip">Number of items to skip.</param>
        /// <returns>HRESULT</returns>
        public unsafe int SkipNative(int itemsToSkip)
        {
            return(InteropCalls.CalliMethodPtr(UnsafeBasePtr, itemsToSkip, ((void **)(*(void **)UnsafeBasePtr))[4]));
        }
Пример #4
0
 /// <summary>
 ///     Delivers a buffer to the specified input stream.
 /// </summary>
 /// <param name="inputStreamIndex">Zero-based index of an input stream on the DMO.</param>
 /// <param name="mediaBuffer">The <see cref="MediaBuffer"/> to process.</param>
 /// <param name="flags">Bitwise combination of <see cref="InputDataBufferFlags.None"/> or more flags from the <see cref="InputDataBufferFlags"/> enumeration.</param>
 /// <param name="timestamp">
 ///     Time stamp that specifies the start time of the data in the buffer. If the buffer has a valid
 ///     time stamp, set the Time flag in the flags parameter.
 /// </param>
 /// <param name="timeduration">
 ///     Reference time specifying the duration of the data in the buffer. If the buffer has a valid
 ///     time stamp, set the TimeLength flag in the flags parameter.
 /// </param>
 /// <returns>HRESULT</returns>
 public unsafe int ProcessInputNative(int inputStreamIndex, IMediaBuffer mediaBuffer, InputDataBufferFlags flags,
                                      long timestamp, long timeduration)
 {
     return(InteropCalls.CalliMethodPtr(UnsafeBasePtr, inputStreamIndex, mediaBuffer, flags, timestamp, timeduration,
                                        ((void **)(*(void **)UnsafeBasePtr))[21]));
 }
Пример #5
0
        //---

        /// <summary>
        ///     Acquires or releases a lock on the DMO. Call this method to keep the DMO serialized when performing multiple
        ///     operations.
        /// </summary>
        /// <param name="bLock">
        ///     Value that specifies whether to acquire or release the lock. If the value is non-zero, a lock is
        ///     acquired. If the value is zero, the lock is released.
        /// </param>
        /// <returns>HRESULT</returns>
        public unsafe int LockNative(long bLock)
        {
            return(InteropCalls.CalliMethodPtr(UnsafeBasePtr, bLock, ((void **)(*(void **)UnsafeBasePtr))[23]));
        }
Пример #6
0
        //---

        /// <summary>
        ///     Signals a discontinuity on the specified input stream.
        /// </summary>
        /// <param name="inputStreamIndex">Zero-based index of an input stream on the DMO.</param>
        /// <returns>HRESULT</returns>
        /// <remarks>A discontinuity represents a break in the input. A discontinuity might occur because no more data is expected, the format is changing, or there is a gap in the data.
        /// After a discontinuity, the DMO does not accept further input on that stream until all pending data has been processed.
        /// The application should call the <see cref="ProcessOutput(CSCore.DMO.ProcessOutputFlags,CSCore.DMO.DmoOutputDataBuffer[])"/> method until none of the streams returns the <see cref="OutputDataBufferFlags.Incomplete"/> (see <see cref="DmoOutputDataBuffer.Status"/>) flag.
        /// This method might fail if it is called before the client sets the input and output types on the DMO.</remarks>
        public unsafe int DiscontinuityNative(int inputStreamIndex)
        {
            return(InteropCalls.CalliMethodPtr(UnsafeBasePtr, inputStreamIndex, ((void **)(*(void **)UnsafeBasePtr))[17]));
        }
Пример #7
0
        //---

        /// <summary>
        ///     Frees resources allocated by the DMO. Calling this method is always optional.
        /// </summary>
        /// <returns>HREUSLT</returns>
        /// <remarks>
        ///     For more information, see <see href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd406946(v=vs.85).aspx"/>.
        /// </remarks>
        public unsafe int FreeStreamingResourcesNative()
        {
            return(InteropCalls.CalliMethodPtr(UnsafeBasePtr, ((void **)(*(void **)UnsafeBasePtr))[19]));
        }
Пример #8
0
 /// <summary>
 ///     Clears the outputtype for a specific output stream.
 /// </summary>
 /// <param name="outputStreamIndex">Zero-based index of an output stream on the DMO.</param>
 public unsafe void ClearOutputType(int outputStreamIndex)
 {
     DmoException.Try(
         InteropCalls.CalliMethodPtr(UnsafeBasePtr, outputStreamIndex, IntPtr.Zero.ToPointer(), SetTypeFlags.Clear,
                                     ((void **)(*(void **)UnsafeBasePtr))[9]), n, "SetOutputType");
 }
Пример #9
0
        //---

        /// <summary>
        ///     Sets the maximum latency on a specified input stream.
        /// </summary>
        /// <param name="inputStreamIndex">Zero-based index of an input stream on the DMO.</param>
        /// <param name="maxLatency">Maximum latency in reference time units. Unit = REFERENCE_TIME = 100 nanoseconds</param>
        /// <returns>HRESULT</returns>
        /// <remarks>For the definition of maximum latency, see <see href="https://msdn.microsoft.com/en-us/Library/dd406948(v=vs.85).aspx"/>.</remarks>
        public unsafe int SetInputMaxLatencyNative(int inputStreamIndex, long maxLatency)
        {
            return(InteropCalls.CalliMethodPtr(UnsafeBasePtr, inputStreamIndex, maxLatency,
                                               ((void **)(*(void **)UnsafeBasePtr))[15]));
        }
Пример #10
0
        //----

        /// <summary>
        ///     Sets the <see cref="MediaType"/> on an output stream, or tests whether a <see cref="MediaType"/> is acceptable.
        /// </summary>
        /// <param name="outputStreamIndex">Zero-based index of an output stream on the DMO.</param>
        /// <param name="mediaType">The new <see cref="MediaType"/>.</param>
        /// <param name="flags">Bitwise combination of zero or more flags from the <see cref="SetTypeFlags"/> enumeration.</param>
        /// <returns>HRESULT</returns>
        public unsafe int SetOutputTypeNative(int outputStreamIndex, MediaType mediaType, SetTypeFlags flags)
        {
            return(InteropCalls.CalliMethodPtr(UnsafeBasePtr, outputStreamIndex, &mediaType, flags,
                                               ((void **)(*(void **)UnsafeBasePtr))[9]));
        }
Пример #11
0
        //---

        /// <summary>
        /// The AllocateStreamingResources method allocates any resources needed by the DMO. Calling this method is always optional.
        /// See http://msdn.microsoft.com/en-us/library/windows/desktop/dd406943(v=vs.85).aspx
        /// </summary>
        /// <returns>HRESULT</returns>
        public unsafe int AllocateStreamingResourcesNative()
        {
            return(InteropCalls.CalliMethodPtr(_basePtr, ((void **)(*(void **)_basePtr))[18]));
        }
Пример #12
0
        //---

        /// <summary>
        /// This method flushes all internally buffered data.
        /// </summary>
        /// <returns>HRESULT</returns>
        public unsafe int FlushNative()
        {
            return(InteropCalls.CalliMethodPtr(_basePtr, ((void **)(*(void **)_basePtr))[16]));
        }
Пример #13
0
 /// <summary>
 /// Clears the inputtype for a specific inputStreamIndex.
 /// </summary>
 /// <param name="inputStreamIndex">Zero-based index of an input stream on the DMO.</param>
 public unsafe void ClearInputType(int inputStreamIndex)
 {
     DmoException.Try(InteropCalls.CalliMethodPtr(_basePtr, inputStreamIndex, IntPtr.Zero.ToPointer(), SetTypeFlags.Clear, ((void **)(*(void **)_basePtr))[8]), n, "SetInputType");
 }
Пример #14
0
        //--

        /// <summary>
        /// The SetInputType method sets the media type on an input stream, or tests whether a media type is acceptable.
        /// </summary>
        /// <param name="inputStreamIndex">Zero-based index of an input stream on the DMO.</param>
        /// <param name="mediaType">The new mediatype.</param>
        /// <param name="flags">Flags for setting the mediatype.</param>
        /// <returns>HRESULT</returns>
        public unsafe int SetInputTypeNative(int inputStreamIndex, MediaType mediaType, SetTypeFlags flags)
        {
            return(InteropCalls.CalliMethodPtr(_basePtr,
                                               inputStreamIndex, ((void *)(&mediaType)), flags, ((void **)(*(void **)_basePtr))[8]));
        }