Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. DirectShow Source Filter Connection Error 0x8004022F

DirectShow Source Filter Connection Error 0x8004022F

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sdancer75
    wrote on last edited by
    #1

    Trying to build my own source filter (AVI format) I always get connection error with AVI Splitter. Please take in mind that I am trying to open a fully functional avi video file, that works just fine with microsoft's async file and I that tried at the very begginng to change my mediatype declaration without success. The error description in the graphEdit is "These filters cannot agree on connection. Verify type compatibility of input pin and output pin. Return code VFW_E_INVALID_FILE_FORMAT 0x8004022F". DXerr.exe reports : HRESULT: 0x80040207 (2147746311) Name: DIERR_NOTBUFFERED VFW_E_NO_ACCEPTABLE_TYPES Description: Attempted to read buffered device data from a device that is not buffered. & There is no common media type between these pins. Severity code: Failed Facility Code: FACILITY_ITF (4) Error Code: 0x0207 (519) My mediatype is declared as :

    const AMOVIESETUP_MEDIATYPE sudOpPinTypes =
    {
    &MEDIATYPE_Stream,
    &MEDIASUBTYPE_NULL
    };

    I debugged the code and I found that somewhere in the

    HRESULT CBasePin::AgreeMediaType(IPin *pReceivePin, const CMediaType *pmt)

    inside the amfilter.cpp is gettings first the AVI Splitter's MediaType list with the folowing code :

    hr = pReceivePin->EnumMediaTypes(&pEnumMediaTypes);

    Ok with that. Then it tries all mediatypes inside the method

    HRESULT CBasePin::TryMediaTypes(IPin *pReceivePin, __in_opt const CMediaType *pmt, IEnumMediaTypes *pEnum)

    by retriving them one by one with the following statement

    hr = pEnum->Next(1, (AM_MEDIA_TYPE**)&pMediaType,&ulMediaCount);

    At this point, the hr result returns S_FALSE and the pMediaType is undefined. The error code is 0x8004022f error code VFW_E_INVALID_FILE_FORMAT So the AVISplitter does not purpose any right ? Now the code beggins to scan my own source filter mediatype list. Despite the fact that I declared 2 or 3 different mediatypes it returns only one and it fails at

    hr = AttemptConnection(pReceivePin, pMediaType);

    and specifically at

    hr = pReceivePin->ReceiveConnection((IPin *)this, pmt);

    What am I doing wrong ? I suspect my MediaType declaration, but i dont see anything wrong. Below I attach the filter's template declarations with only one mediatype.

    const WCHAR szAsyncFile[] = L"Async Source (File)";
    const WC

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups