16,015,641 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
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?
weirdProgrammer-2
30-Nov-12 13:06pm
View
Thank you for your solution.
I similiarly added CLSID_CFrameRateConvertDmo.
It compiles, so thats one problem out of the way.
Could you also suggest how to change the MFPKEY_CONV_OUTPUTFRAMERATE property for CLSID_CFrameRateConvertDmo?
Thanks,
Kind Regards,
weirdProgrammer-2
12-Nov-12 13:34pm
View
dear sir,
it won't be a crime, I work for a security organisation and our customers are the police force. One aspect of the application, uses a screen grabbing methodology , where in the Time and Date information is to be overlapped. (Windows Aero messes it up)
It is actually not a bug, this software of ours is in the market for 10 years now. All I wanted to know was that is there a way to change the border padding of the user , but ofcourse after a warning message!
Worst come worse, we will advice the customer to run the program in windows classic mode. But I was just asking a simple question, no evil intentions here! :)
weirdProgrammer-2
12-Nov-12 13:28pm
View
hi, thanks for your response.
I am a developer for a security company which offers certain utilities for third party CCTV players. In CCTV footages, it is of interest that the "time and date" information is overlapped from the player onto the footage, so that the footage can be presented to court, etc.
Over the years, this software has been working fine on Windows XP, and is in use with various police forces around the world. But ofcourse, we need to move on and a support for Windows 7 is imperative.
When I say "porting", this is just one aspect of the application I was talking about, I had to hunt around for quiet a few driver for the hardware used in this application. (for example Phillips trimedia, sentinel drivers ,etc). The hunt is even more intense, the new customers are purchasing Win7 64 Bit, the hardware drivers can be a real pain to get right.
The question that I asked was for this "screen grabbing" from the CCTV footage and the subsequent overlapping of the time and date information. In XP - classic, this is simple enough as there are no borders, etc
In Win7, as you may know, the active window caption area is 21 pixels (instead of 18, as is the case of windows xp classic) and the border padding is 4 (instead of 0 in windows xp classic)
This causes major complications in this overlapping of time and date information as various cctv players have their time and date information in different areas of the player. And different CCTV players act differently in Win7, some have the border padding, while some dont have the border padding. So lets say for instance, a CCTV player would be of area 320x240 in Windows XP Classic, in Windows Aero, this would be approximately 328 x 248 , all thanks to the border padding.
So I wanted some sort of functionality where as I could reset the users Border Padding to 0, and the active title bar area to 18, so as to avoid this complication. This can be done manually by going to Windows Appearance/Personalisation.
I guess if its not possible, I will have to come up with some other strategy, perhaps even retraining our entire algorithm.
Thanks
weirdProgrammer-2
21-Jun-12 8:56am
View
Thanks a lot, very comprehensive!
weirdProgrammer-2
21-Jun-12 8:45am
View
Thank you so much! Such a nice simple solution. I just wasted two hours of my life trying a figure it out. Thanks again!
Show More