|
When lock the CriticalSection, the same thread can enter this CCriticalSection more than once at the same time.
How to avoid this problem?
|
|
|
|
|
Hi All,
I have a compressed AVI file.
Can i use OPENCV to decompress the AVI file and read each frame in it?
OR should i go for a library like FFMPEG?
Can i used FFMPEG functions inside a MFC application to read AVI files?
Please help me in this.
Thanking you in advance.
Regards,
ashwath.
|
|
|
|
|
Hi,
I am having a lot of problems displaying the CFileDialog modal dialog box
after much research I have noticed many examples of the CfileDialog with Just 1 paramter
and then a DoModal e.g. CFileDialog mydialog(TRUE); mydialog.DoModal();
The problem I am encurring is when step to the mydialog.DoModal(); a breakpoint is hit "int 3"
and I get a access exception
has anyone had this problem trying to use a CFileDialog
Thsnks
|
|
|
|
|
CFileDialogs are pretty much as simple as it gets... with that said, your question doesn't make a ton of sense. What's error that you're getting exactly? Is it a breakpoint or a assertion that's stopping execution?
Place applicable code and maybe I can get a better idea as to what you're doing wrong.
|
|
|
|
|
That exactly the point I had the contructer coded with filers window title etc.
but this code
CFileDialog mydialog(TRUE);
mydialog.DoModal();
should work
This what happens when I step to mydialog.DoModal();
The code hits a break point
and later on get a access violation
doing a Call Stack at this point seems that mscowrks.dll is executing
I moved this code to the beginng of CWinApp::Initinstance
so Its one the first things I do and still I have problem
000007FEFD223C6A nop
000007FEFD223C6B nop
000007FEFD223C6C nop
000007FEFD223C6D nop
000007FEFD223C6E nop
000007FEFD223C6F nop
000007FEFD223C70 xchg ax,ax
000007FEFD223C72 int 3
000007FEFD223C73 ret
000007FEFD223C74 nop
000007FEFD223C75 nop
000007FEFD223C76 nop
000007FEFD223C77 nop
000007FEFD223C78 nop
|
|
|
|
|
ForNow wrote: mscowrks.dll is executing
You're probably compiling this with some odd options, that's part of .Net (I believe), which you shouldn't be using at all on a C++/MFC application. I would guess your problem is not the code but the way you configured the project.
|
|
|
|
|
|
Assuming this is a continuation of your previous problem, I already suggested this[^], and similarly tried to explain, here[^], about the correct use of casts in C. Randomly changing parameters or removing them altogether is no substitute for making full use of both documentation and debug information.
Use the best guess
|
|
|
|
|
I did that and I still encountred the problem breakpoint followed by access violation
bottom line till me if I right
CFileDialog.mydialog(TRUE);
mydialog.DoModal(TRUE);
Should work as it would take default paramters correct ?
|
|
|
|
|
ForNow wrote: Should work as it would take default paramters correct ? Not necessarily, as we do not know what else your code is doing. As I said before, read the documentation[^] and carefully check against your code. Also ensure that your project has been completely rebuilt to ensure no undiagnosed compiler errors remain.
Use the best guess
|
|
|
|
|
I'll re-read the doc
but
1) I got s clean build
2) this is the first thing in CWinApp::InitInstance
thank you
|
|
|
|
|
There must be something wrong with your system that we are not aware of. Does this application run correctly if you do not use the CFileDialog ?
Use the best guess
|
|
|
|
|
Yes it does
I am begining to think it must be something like file permissions
I live next to someone who worked for MicroSoft
He had a look at it once I'll ask him again
Thsnks
|
|
|
|
|
That is most unlikely unless you have a Microsoft library that is corrupt or somehow unreadable.
I just reread some of your earlier posts and noticed :ForNow wrote: doing a Call Stack at this point seems that mscowrks.dll is executing This, according to http://www.ehow.com/facts_7827759_mscorwksdll.html[^] is a .NET library, so I would be interested to know how that is getting connected to your app.
Use the best guess
|
|
|
|
|
ForNow wrote: 2) this is the first thing in CWinApp::InitInstance The first thing? Maybe you are not giving the framework enough time to get everything ready. Perhaps putting the code someplace else (e.g., in response to a button click) would work better.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
ForNow wrote: mydialog.DoModal(TRUE); This compiles?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
I created an empty dialog-based app with the following change:
BOOL CDCDlg::OnInitDialog()
{
CDialog::OnInitDialog();
SetIcon(m_hIcon, TRUE);
SetIcon(m_hIcon, FALSE);
CFileDialog dlg(TRUE);
dlg.DoModal();
return TRUE;
}
It worked fine. Can you try something similar?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Tried the coce
the CfileDialog modeless displays it for an instance
and then i get a messagebox HERC_CMD encountered breakpoint
|
|
|
|
|
ForNow wrote: Tried the coce Where did you put it?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
There's a known problem with CFileDialog crashing although I can't remember the exact situations. Something to do with WINVER, I think. Anyway, you can test if this is what your problem is by creating the dialog on the stack and seeing if that stops the crash.
e.g.
CFileDialog* pFD = new CFileDialog(...);
pFD->DoModal();
.
.
delete pFD;
|
|
|
|
|
AbbeytekMD wrote: There's a known problem with CFileDialog crashing It was actually related to trying to use a CFileDialog object, which references m_pMainWnd , in a dialog-based app after the main dialog had been dismissed.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
OK I did embark into world of DirectShow and ditched VFW.
All the code samples here is way over my head for now.
I got as far as “using SDK to build basic DirectShow”. It is in one of many SDK 's “help doc” MS puts out here and there about DirectShow. I am suppose to build basic DirectShow application and use it as accessible debug library. I must be dense, but I cannot figure how to do it.
I do not need full blown sample code, there are plenty of them here, but gentle nudge into right direction in building from SDK sample would be appreciated.
Thanks for your time.
Cheers Vaclav
|
|
|
|
|
Vaclav_Sal wrote: but gentle nudge into right direction in building from SDK sample would be appreciated. Create the sample project in Visual Studio and press the "Build solution" button. Without more information on what problems you are having it's difficult to suggest anything more.
Use the best guess
|
|
|
|
|
|
Two reasons for this update.
Soren, I did not delete my last post, I guess gremlins at work.
Second, I am making progress using DirectShow, however, I just got past enumerating video devices and still struggling with DirectShow overall concept.
I just love MS inventing all these therms with very terse explanations – graph, filter , bag, moniker etc.
Old fashioned flow chart would IMHO work much better than MS one pages samples which are not tied together.
The most confusing are the VMR options – windowless or with window?
And when you do search all you get is reference to Window7, back paddling to XP as I do is inevitable.
But eventually I'll get
Thanks for your help.
Cheers Vaclav
|
|
|
|