Infognition forum
February 05, 2012, 07:56:06 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Last GraphEditPlus version: 1.4.0   Last Video Enhancer version: 1.9.7
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: GEP code won't connect crossbar to common USB2821 video capture device  (Read 654 times)
Mike
Newbie
*

Karma: +1/-0
Posts: 22


View Profile
« on: November 29, 2010, 01:14:26 PM »

Hi,

To test the code generation part of GEP I designed a small graph (link) which works fine in GEP (only thing I had to do was manually set the grabbers media format to RGB24). The code however does not work, using direct connect I get an AV in

    //connect WDM 2821 Crossbar and USB 2821 Device
    hr = pGraph->ConnectDirect(GetPin(pWDM2821Crossbar, L"0: Video Decoder Out"), GetPin(pUSB2821Device2, L"Analoge video-ingang"), NULL);

using stream connect I get a "cannot connect pins" error in

    //connect WDM 2821 Crossbar and USB 2821 Device
    hr = pBuilder->RenderStream(NULL, &MEDIATYPE_AnalogVideo, pWDM2821Crossbar, NULL, pUSB2821Device);

The code until this runs fine and all pointers are available.

Note if I write my own code that builds this graph (using intelligent connect) all goes well.

Is this a bug or am I doing something wrong?? It seems GEP connects the pin in a different manner than the code it generates?

Windows XP, C++ Builder 2006, DX8

Thanks,

Mike
Logged
Mike
Newbie
*

Karma: +1/-0
Posts: 22


View Profile
« Reply #1 on: November 29, 2010, 01:44:27 PM »

Further to this: if I comment out the creation and connection of the crossbar and leave this to intelligent connect, the next connection (deinterlacer to samplegrabber) won't work.
Logged
Dee Mon
Administrator
Hero Member
*****

Karma: +8/-0
Posts: 511



View Profile WWW
« Reply #2 on: November 30, 2010, 10:55:34 AM »

I wonder if AV occurs in GetPin or ConnectDirect. Can you see where exactly it happens?
Also check the sequence of filters creation and connection. Some pins appear only after some connections are made, and although GEP uses topological sort to connect everything in logical order, in some cases it's not enough and some lines (connecting filters) need to be moved down in the code.
Logged
Mike
Newbie
*

Karma: +1/-0
Posts: 22


View Profile
« Reply #3 on: December 03, 2010, 11:34:34 AM »

I'm not really motivated to make this code work (as I already wrote it myself), I am interested to see GEP work as it would save me some time in the future. I notice you have given this reply more often, can't you rewrite your app to be more intelligent in its placement of filters and connections?
As GEP is now, it is of no value to me as it does not add anything to GE. If you can improve it, it would be of great value and I'd easily pay a lot more for it.
Logged
Dee Mon
Administrator
Hero Member
*****

Karma: +8/-0
Posts: 511



View Profile WWW
« Reply #4 on: December 03, 2010, 12:42:48 PM »

Well, even a human often can't tell remotely why some DirectShow code doesn't work in some situations, you want a program to be smarter than humans. Smiley

As for "does not add anything to GE" that's clearly not true. There are dozens of features absent in MS GraphEdit and some of them are truly irreplaceable, like seeing what data goes through sample grabber, or controlling codecs' and cameras' output via IAMSrtreamConfig, or seeing the state of each filter, or a good search for filters... If you haven't happened to need those features yet that only means you either didn't work much with DirectShow or maybe just overlooked them.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!