#21 Trouble with 2 or more DMO objects

open
nobody
Samples (12)
5
2013-11-29
2007-11-16
yaodongxian
No

I tried to create two DMO objects in the sameple, but it raised a error 0x80131534.

Here is what I did, on the DmoFlip sample, Form1.cs, in BuildGraph() function, instead of only add DmoFlip filter, I also add a DmoSplit filter, but it raised the error. Source code is like this

        // Add a DMO Wrapper Filter
        dmoFilter = (IBaseFilter) new DMOWrapperFilter();
        dmoWrapperFilter = (IDMOWrapperFilter) dmoFilter;

        // Since I know the guid of the DMO I am looking for, I *could* do this.
        //hr = dmoWrapperFilter.Init(new Guid("{7EF28FD7-E88F-45bb-9CDD-8A62956F2D75}"), DMOCatergory.VideoEffect);
        //DMOError.ThrowExceptionForHR(hr);

        // But it is more useful to show how to scan for the DMO
        Guid g = FindGuid("DmoFlip", DMOCategory.VideoEffect);

        hr = dmoWrapperFilter.Init(g, DMOCategory.VideoEffect);
        DMOError.ThrowExceptionForHR(hr);

        SetDMOParams(dmoFilter);

        IBaseFilter dmoFilter1 = null;
        IDMOWrapperFilter dmoWrapperFilter1 = null;

        // Add another DMO Wrapper Filter
        dmoFilter1 = (IBaseFilter)new DMOWrapperFilter();
        dmoWrapperFilter1 = (IDMOWrapperFilter)dmoFilter1;

        // But it is more useful to show how to scan for the DMO
        Guid g1 = FindGuid("DmoSplit", DMOCategory.AudioEffect);

        hr = dmoWrapperFilter.Init(g1, DMOCategory.AudioEffect);
        DMOError.ThrowExceptionForHR(hr);

Discussion

  • snarfle

    snarfle - 2007-11-16

    Logged In: YES
    user_id=1220080
    Originator: NO

    I'm not clear how this is a bug in the sample? Our samples don't do this.

    If you are having trouble writing your code, you might try asking people in the forum at http://sourceforge.net/forum/forum.php?forum_id=460697

     
  • yaodongxian

    yaodongxian - 2007-11-16

    Logged In: YES
    user_id=1362317
    Originator: YES

    This is not a coding problem, and I believe this should be a bug. What I wanted to do was to use 2 or more DMO object in one graph, but as I tested, it didn't work. I just changed few lines of code in the sample program, add both DmoFlip and DmoSplit into same graph, the first dmo object init successfully, but the second dmo object init failed with a error code, no matter the order of dmo object init, and I google the error code but didn't help.

    Could you just spend one or two minites to try it out, it just need one or two minites to confirm the problem.

    Thanks and have a good weekend.

     

Log in to post a comment.