Click here to Skip to main content
12,945,800 members (37,708 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I have a problem in adding "LAV Splitter Source" filter in the graph using directshow. If i give mp4 format file as a source file the "LAV Splitter Source" filter was created with 2 output pin(video and audio).
IGraphBuilder::AddSourceFilter(L"C:\\video.mp4",L"LAV Splitter Source",&pLAVSplitterSource);

But if i give avi file format as a source file the "LAV Splitter Source" filter was created with only 1 output pin(video).
IGraphBuilder::AddSourceFilter(L"C:\\video.avi",L"LAV Splitter Source",&pLAVSplitterSource);

What i need to do to get both output pin?
Posted 5-Feb-13 19:29pm
Updated 5-Feb-13 23:36pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I have solved this myself by using the below code rather than using AddSourceFilter function.
                        IID_IBaseFilter, (void **)&pLAVSplitterSource);
     if (FAILED(hr))
        MessageBox(hwnd,L"ERROR - Could not create the LAV.",L"Error",0);
    hr = pLAVSplitterSource->QueryInterface(IID_IFileSourceFilter,(void **)&pLAV);
    hr = pLAV->Load(strFilename,NULL);
    hr = pGraph->AddFilter(pLAVSplitterSource,L"LAV");

Now its created in both the formats what i was expected.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 4,899
CHill60 3,180
Maciej Los 2,453
Jochen Arndt 1,910
ppolymorphe 1,785

Advertise | Privacy | Mobile
Web02 | 2.8.170518.1 | Last Updated 6 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100