Click here to Skip to main content
15,885,546 members

Comments by weirdProgrammer-2 (Top 10 by date)

weirdProgrammer-2 25-Apr-13 8:29am View    
it happens in my CMainFrame constructor actually :S nothing major happening there! But something is wrong, unable to narrow it down at the moment
weirdProgrammer-2 5-Mar-13 4:57am View    
Yes, process B is mine...its just that I didn't want to touch it :D Ok, I will look into that I think. Thanks,

Best REgards,
weirdProgrammer-2 30-Nov-12 14:51pm View    
Hey guys,

Thanks to Maxim's great explainations, I have reached somewhere.
The program is running in Windows 7.

My aim is for the frame rate convert DMO to render at 25 fps, I am using an external renderer which only makes a connection if the incoming frame-rate is 25fps

So if I was to use an avi of 25 fps, it would connect just fine, however if I was to connect with an avi of 24fps, it would refuse to connect.


Here is a snippet my code, am I using the frame rate convert DMO correctly to render at 25fps?

// Some extra includes
#include "Wmcodecdsp.h"
#include "dmodshow.h"
#include "Dmo.h"


#pragma comment(lib,"wmcodecdspuuid.lib")



IBaseFilter * _filter;
hr = CoCreateInstance(CLSID_DMOWrapperFilter,NULL,CLSCTX_ALL,IID_IBaseFilter,(void**)&_filter);
// HRESULT = 0
IDMOWrapperFilter * _wrapper;
hr = _filter->QueryInterface(__uuidof(IDMOWrapperFilter),(void**)&_wrapper);
// HRESULT = 0

hr = _wrapper->Init(__uuidof(CFrameRateConvertDmo),DMOCATEGORY_VIDEO_EFFECT);
// HRESULT = 0

_wrapper->Release();

int _numerator=25; // rate numerator
int _denominator=1; // rate denominator

IPropertyStore * _store;
if (S_OK == _filter->QueryInterface(IID_IPropertyStore,(void**)&_store))
{
printf("\n Alles OK! ");

PROPVARIANT _value;
PropVariantInit(&_value);
_value.vt = VT_UI8;
_value.uhVal.HighPart = _numerator;
_value.uhVal.LowPart = _denominator;
_store->SetValue(MFPKEY_CONV_OUTPUTFRAMERATE,_value);
_store->Release();
PropVariantClear(&_value);
}
else{

printf("Alles nicht ok! ");

}


hr=pGraph->AddFilter(_filter, L"FPS Adjust");
// pGraph is the Graph Builder



Then I go along and connect the frame rate converter right before the renderer (direct pin connections)
As I said, everything connects fine if the source video file is 25fps, if its not I was assuming that the Frame Rate converter should convert it to 25 fps, but sadly it comes with a 0x80040217 return.

Any ideas?
weirdProgrammer-2 30-Nov-12 14:01pm View    
Yes thanks,

I did register them through regsvr32, even though the registration succeeded, the HRESULT return wasn't successful. :(

I tried to run the program in Windows 7, so I don't know why it can;t get a hold of it.
weirdProgrammer-2 30-Nov-12 13:31pm View    
Thanks for your comprehensive answer Maxim!
You are the man!

I am unfortunately still stuck at CoCreateInstance, the program compiles fine, however I am getting a HRESULT return 0x80040154 (Class not registered) :S ANy ideas?