Menu

Using the library in a commercial application

2015-01-25
2015-02-04
  • Yakir Dorani

    Yakir Dorani - 2015-01-25

    Hi,

    I rebuilt the source code in Debug in order to get the untested interfaces and made the following changes:

    1.
    Added this method to the IMFSourceReader interface:

        [PreserveSig]
        int SetCurrentMediaType(
            int dwStreamIndex,
            IntPtr pdwReserved,
            IMFMediaType pMediaType
        );
    

    2.
    Imported the following methods (added to MFExtern)

        [DllImport("mfplat.dll", ExactSpelling = true), SuppressUnmanagedCodeSecurity]
        public static extern int MFCreateMFByteStreamOnStream(
            IStream pStream,
            out IMFByteStream ppByteStream
        );
    
        [DllImport("Mfreadwrite.dll", ExactSpelling = true), SuppressUnmanagedCodeSecurity]
        public static extern int MFCreateSourceReaderFromByteStream(
            IMFByteStream pByteStream,
            IMFAttributes pAttributes,
            out IMFSourceReader ppSourceReader
        );
    

    What should I do in order to use it?

     
  • snarfle

    snarfle - 2015-01-25

    1) You said you added SetCurrentMediaType to IMFSourceReader, but it is already there? Changing pdwReserved to IntPtr is a probably a good thing.

    In order to move IMFSourceReader outside the #if ALLOW_UNTESTED_INTERFACES, I'd want to be sure all the methods are correct. Ideally by having some test code that calls each of them. Have you tried all the methods on this interface?

    2) These methods are both already in MFExtern, but marked as untested. Moving them out of the #if just requires creating a bit of test code to be sure they are defined correctly.

     
  • snarfle

    snarfle - 2015-01-28

    <sigh> Putting yet more interfaces into the untested regions doesn't really seem productive. And I'm not actually using MFNet these days, so I'm not much motivated to write more test code. Or were you offering to help test these?

    If Yakir has a serious need, he might be able to convince me to do a v2.1 with what's there right now.

     
  • Eric

    Eric - 2015-02-02

    I can work on validating the tests and possibly write new ones but if they requires Windows 8.1, I will have to install one in a VM...

     
  • Eric

    Eric - 2015-02-04

    OK, I will work on that this week-end.

     

Log in to post a comment.