DSPack Video Size

Top  Previous  Next

 

 

no one can help me?

I declare AM_MEDIA_TYPE and after

 SourceFilter.FindPin('Output',PinOutSource);

 DefaultAudioFilter.FindPin('Input',PInIntermediateFilter);

case PinOutSource.Connect(PInIntermediateFilter,@mt) of

        S_OK                                        : showmessage('S_OK       ');

        E_POINTER                            : showmessage('E_POINTER   ');

        VFW_E_NOT_CONNECTED : showmessage('VFW_E_NOT_CONNECTED   );

        VFW_S_PARTIAL_RENDER : showmessage('VFW_S_PARTIAL_RENDER');

        E_ABORT                               : showmessage('E_ABORT   ');

        VFW_E_NOT_IN_GRAPH      : showmessage('VFW_E_NOT_IN_GRAPH ');

        VFW_E_CANNOT_CONNECT: showmessage('VFW_E_CANNOT_CONNECT');

 end;

I receive " E_POINTER " error.

I have to change the filter to assign "@mt".

 

or I wrong statement?

pWIH : MPEG2VIDEOINFO;

SeqHdr : array[0..0] of DWORD;

 

I have tried with many filters, I get more and 'E_POINTER '

 

 

 

 

hr = FindPin (m_pSourceFilter, PINDIR_OUTPUT, &PIN_CATEGORY_CAPTURE, &mediaType, FALSE, 0, &m_pPin);

...

 

  IAMStreamConfigPtr pConf (m_pPin);

  if (! pConf)

      return S_FALSE;

 

  int cCaps, cbCap;

  hr = pConf-> GetNumberOfCapabilities (&cCaps, &cbCap);

  if (FAILED (hr))

      return S_FALSE;

 

  ASSERT (cbCap> = sizeof (VIDEO_STREAM_CONFIG_CAPS));

  if (cbCap <sizeof (VIDEO_STREAM_CONFIG_CAPS))

      return S_FALSE;

 

  TOLEPtr <VIDEO_STREAM_CONFIG_CAPS> pvc;

  if (! pvc.make (cbCap))

      return E_OUTOFMEMORY;

 

  for (int icap = 0; icap <cCaps; ++ icap)

  {

      std:: auto_ptr <CMediaType> pmt;

      hr = pConf-> GetStreamCaps (icap, (AM_MEDIA_TYPE **) &pmt, (BYTE *) pvc.get ());

      ... //search of the most suitable format here is fulfilled. Fortunately, it does not concern our question

 

  }

 

  hr = pConf-> SetFormat (m_pmt);

  ....