Exemplo n.º 1
0
    private static void DoRegister(Type t)
    {
      // Tell what media types you are able to support.  This allows
      // the smart connect capability of DS to avoid loading your DMO
      // if it can't handle the stream type.

      // Note that you don't have to register any (but I recommend
      // you do).  Also, you don't have to provide a subtype (use
      // Guid.Empty).  You can negotiate this at run time in
      // InternalCheckInputType.
      DMOPartialMediatype[] inPin = new DMOPartialMediatype[2];
      inPin[0] = new DMOPartialMediatype();
      inPin[0].type = MediaType.Video;
      inPin[0].subtype = MediaSubType.RGB24;

      inPin[1] = new DMOPartialMediatype();
      inPin[1].type = MediaType.Video;
      inPin[1].subtype = MediaSubType.RGB32;

      DMOPartialMediatype[] outPin = new DMOPartialMediatype[2];
      outPin[0] = new DMOPartialMediatype();
      outPin[0].type = MediaType.Video;
      outPin[0].subtype = MediaSubType.RGB24;

      outPin[1] = new DMOPartialMediatype();
      outPin[1].type = MediaType.Video;
      outPin[1].subtype = MediaSubType.RGB32;

      int hr = DMOUtils.DMORegister(
          DMOName,
          typeof(DmoMixer).GUID,
          DMOCat,
          DMORegisterFlags.None,
          inPin.Length,
          inPin,
          outPin.Length,
          outPin);
    }
Exemplo n.º 2
0
        private static void DoRegister(Type t)
        {
            // Tell what media types you are able to support.  This allows
            // the smart connect capability of DS to avoid loading your DMO
            // if it can't handle the stream type.

            // Note that you don't have to register any (but I recommend
            // you do).  Also, you don't have to provide a subtype (use
            // Guid.Empty).  You can negotiate this at run time in
            // InternalCheckInputType.
            DMOPartialMediatype [] pIn = new DMOPartialMediatype[1];
            pIn[0] = new DMOPartialMediatype();
            pIn[0].type = MediaType.Audio;
            pIn[0].subtype = MediaSubType.PCM;

            DMOPartialMediatype [] pOut = new DMOPartialMediatype[1];
            pOut[0] = new DMOPartialMediatype();
            pOut[0].type = MediaType.Audio;
            pOut[0].subtype = MediaSubType.PCM;

            int hr = DMOUtils.DMORegister(
                DMOName,
                typeof(DmoSplit).GUID,
                DMOCat,
                DMORegisterFlags.None,
                pIn.Length,
                pIn,
                pOut.Length,
                pOut
                );
        }