Click here to Skip to main content
15,896,269 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Moire effect Pin
_Flaviu24-Jun-13 21:49
_Flaviu24-Jun-13 21:49 
GeneralRe: Moire effect Pin
CPallini24-Jun-13 22:05
mveCPallini24-Jun-13 22:05 
AnswerRe: Moire effect Pin
JackDingler26-Jun-13 11:48
JackDingler26-Jun-13 11:48 
Questiona C++ / XINPUT project getting underway.. Pin
JimmyOneSlap23-Jun-13 14:42
JimmyOneSlap23-Jun-13 14:42 
AnswerRe: a C++ / XINPUT project getting underway.. Pin
Richard MacCutchan23-Jun-13 21:10
mveRichard MacCutchan23-Jun-13 21:10 
Questionimplemented code of inline assembly language on any of the method e.g: Stack, Calculator Pin
Member 1012140622-Jun-13 6:05
Member 1012140622-Jun-13 6:05 
AnswerRe: implemented code of inline assembly language on any of the method e.g: Stack, Calculator Pin
NotPolitcallyCorrect22-Jun-13 6:19
NotPolitcallyCorrect22-Jun-13 6:19 
QuestionDirectShow Source Filter Connection Error 0x8004022F Pin
sdancer7520-Jun-13 21:54
sdancer7520-Jun-13 21:54 
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 :

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


I debugged the code and I found that somewhere in the
C++
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 :

C++
hr = pReceivePin->EnumMediaTypes(&pEnumMediaTypes);


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

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


by retriving them one by one with the following statement

C++
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

C++
hr = AttemptConnection(pReceivePin, pMediaType);
and specifically at
C++
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.

C++
const WCHAR szAsyncFile[] = L"Async Source (File)";
const WCHAR szAsyncHttp[] = L"Async Source (Http)";

//
// Setup data for filter registration
//
const AMOVIESETUP_MEDIATYPE sudOpPinTypes =
{ 

	&MEDIATYPE_Stream, 
	&MEDIASUBTYPE_NULL 
	

};



const AMOVIESETUP_PIN sudOpPin =
{ 
	
		L"Output",          // String pin name
		FALSE,              // Is it rendered
		TRUE,               // Is it an output
		FALSE,              // Allowed none
		FALSE,              // Allowed many
		&CLSID_NULL,        // Connects to filter
		L"Input",           // Connects to pin
		1,					// Number of types
		&sudOpPinTypes		// The pin details
    
};



const AMOVIESETUP_FILTER sudAsyncFile =
{ 
    &CLSID_PIAsyncFile,				 // clsID
    szAsyncFile,                    // strName
    MERIT_UNLIKELY,                 // dwMerit
    1,                              // nPins
    &sudOpPin                       // lpPin
};

const AMOVIESETUP_FILTER sudAsyncHttp =
{ 
    &CLSID_PIAsyncHttp,				// clsID
    szAsyncHttp,                    // strName
    MERIT_UNLIKELY,                 // dwMerit
    1,                              // nPins
    &sudOpPin                       // lpPin
};




//
//  Object creation template
//
CFactoryTemplate g_Templates[] = 
{
    { 
        szAsyncFile,
        &CLSID_PIAsyncFile,
        CAsyncFilter::CreateInstance,
        NULL,
        &sudAsyncFile  
    },

    {
        szAsyncHttp,
        &CLSID_PIAsyncHttp,
        CAsyncFilterHttp::CreateInstance,
        NULL,
        &sudAsyncHttp
    }


};



int g_cTemplates = sizeof(g_Templates) / sizeof(CFactoryTemplate);

sdancer75


modified 21-Jun-13 8:45am.

QuestionHow to add shadow to a dialog without border Pin
smithzhang20-Jun-13 20:17
smithzhang20-Jun-13 20:17 
AnswerRe: How to add shadow to a dialog without border Pin
smithzhang20-Jun-13 20:34
smithzhang20-Jun-13 20:34 
QuestionFont size of menu text in MFCRibbonbar in feature pack. Pin
Anu_Bala20-Jun-13 19:16
Anu_Bala20-Jun-13 19:16 
QuestionOnLButtonDown not getting called for Slider Control in MFC.? Pin
mbatra3120-Jun-13 7:04
mbatra3120-Jun-13 7:04 
AnswerRe: OnLButtonDown not getting called for Slider Control in MFC.? Pin
thanh_bkhn20-Jun-13 18:59
professionalthanh_bkhn20-Jun-13 18:59 
GeneralRe: OnLButtonDown not getting called for Slider Control in MFC.? Pin
mbatra3120-Jun-13 19:20
mbatra3120-Jun-13 19:20 
GeneralRe: OnLButtonDown not getting called for Slider Control in MFC.? Pin
thanh_bkhn20-Jun-13 20:27
professionalthanh_bkhn20-Jun-13 20:27 
GeneralRe: OnLButtonDown not getting called for Slider Control in MFC.? Pin
mbatra3120-Jun-13 20:35
mbatra3120-Jun-13 20:35 
AnswerRe: OnLButtonDown not getting called for Slider Control in MFC.? Pin
David Crow21-Jun-13 10:12
David Crow21-Jun-13 10:12 
GeneralRe: OnLButtonDown not getting called for Slider Control in MFC.? Pin
mbatra3121-Jun-13 20:16
mbatra3121-Jun-13 20:16 
AnswerRe: OnLButtonDown not getting called for Slider Control in MFC.? Pin
David Crow24-Jun-13 5:29
David Crow24-Jun-13 5:29 
GeneralRe: OnLButtonDown not getting called for Slider Control in MFC.? Pin
mbatra3124-Jun-13 22:40
mbatra3124-Jun-13 22:40 
AnswerRe: OnLButtonDown not getting called for Slider Control in MFC.? Pin
David Crow25-Jun-13 2:57
David Crow25-Jun-13 2:57 
QuestionHow to retrieve the user defined data type into main function Pin
Manoj739019-Jun-13 22:54
Manoj739019-Jun-13 22:54 
AnswerRe: How to retrieve the user defined data type into main function Pin
CPallini20-Jun-13 1:57
mveCPallini20-Jun-13 1:57 
GeneralRe: How to retrieve the user defined data type into main function Pin
Manoj739020-Jun-13 18:36
Manoj739020-Jun-13 18:36 
GeneralRe: How to retrieve the user defined data type into main function Pin
Richard MacCutchan20-Jun-13 20:53
mveRichard MacCutchan20-Jun-13 20:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.