Elecard
September 02, 2010, 01:14:53 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Push Demultiplexer pinout creation delay  (Read 1192 times)
gil
Newbie
*
Posts: 5


View Profile
« on: June 09, 2010, 06:23:34 am »

Hi,

I've encountered the next problem: When I create a new pin to the Push Demultiplexer I can't connect it to the Decoder, but when I don't create a new pin, run the graph and wait long enough an output pin is created automatically and everything works just fine.
The problem is that while it takes only one or two seconds for the GraphStudio to create the output pin, it takes between 30 and 180 seconds (approximately) for my program to create the same pin. It is important to emphasize that when my program finally manages to create the pin everything works just fine.

Is there something I can do to accelerate the pin creation?

my waiting loop looks something like this:



QzCComPtr<IMediaControl>   pMC;
QzCComPtr<IMediaEvent>      pME;
QzCComPtr<IBaseFilter>      pDemultiplexer;

.
.
.

pMC->Run();
long evCode=0;
pME->WaitForCompletion(INFINITE, &evCode);
   
int num;
do
{
   num = NumOfDemuxPins();

} while (num<2);


pMC->Stop();

.
.
.


int NumOfDemuxPins()
{
   QzCComPtr<IEnumPins> pEP;
   int counter=0;

   pDemultiplexer->EnumPins(&pEP);
   
   QzCComPtr<IPin> pPin;
   while (pEP->Next(1, &pPin, NULL)==S_OK)
   {
      counter++;
      pPin.Release();
   }

   return counter;
}
Logged
OlgaM
Newbie
*
Posts: 25


View Profile
« Reply #1 on: August 09, 2010, 04:54:41 am »

If you create Video Pin and want to connect it to Elecard Video Decoder then you should set 'majortype' and 'sub type' in MediaType of this pin. This information should be enough to connect it to Elecard Video Decoder.
If you create Audio Pin and want to connect it to Elecard Video Decoder then you should set 'majortype' and 'sub type' and 'WAVEFORMATEX' in MediaType of this pin.
Please note that you should map these pins to PIDs of streams that you are expecting to receive. In other case Demultiplxer will create it's own pins with right PIDs and your pins will not be used.
Logged
Pages: [1]
  Print  
 
Jump to:  

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