|
I have an application that captures digital video and all is well with my world. The problem is that I have had a request to have the capture of the audio be user controllable (always capture video). I took my existing filter graph and disconnected the audio output pin from the DV Splitter so that only the video was input to the AVIMux and then out to the file.
Running the graph via GraphEdit produces the desired results but when I run it programatically I get the first frame of the capture repeated for the entire duration of the capture almost like the video data is not being pushed through the filter graph.
Does anyone have any ideas on this?
thanks in Advance
cje
|
|
|
|
|
Make sure that all the relevant pins are connected to a renderer. Try connecting the audio output pin to a null renderer.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
I get the same effect...all frames in the resultant avi file are the same frame of video (the first one captured)
|
|
|
|
|
Hi.
I'm trying to override CMDIChildWnd::OnCreateClient in a mdi child window.
In that window i have a splitter window and one of the views is a CTreeView.
If at the beginning of my OnCreateClient i call parents (CMDIChildWnd) OnCreateClient my inner splitter is fixed (can't be moved) and the tree control is uneditable (can't select items), if i remove call to parents OnCreateClient i can move the splitter and edit (select items) from tree control,
and if i call at the end of my OnCreateClient to parents - i get an empty child.
I've tried figuring out why each change causes what it does, but didn't make it.
Any help will be appreciated.
Ori.
|
|
|
|
|
I'm trying to get some code working that was available at another site. Having difficulty identifying how to pass values to the following function.
void WnWd_CreateHWDrv(CWnd* pWnd ,
WORD wHWCardNo ,
BYTE* lpImage,
BITMAPINFO* lpDIBHdr)
{
CWnDrv* pThread;
pThread = new CWnDrv(pWnd,
wHWCardNo,
lpImage ,
lpDIBHdr);
if (pThread == NULL) return;
ASSERT_VALID(pThread);
// Create Thread in a suspended state so we can set the Priority
// before it starts getting away from us
if (!pThread->CreateThread(CREATE_SUSPENDED))
{
delete pThread;
return;
}
// since everything is successful, add the thread to our list
m_threadList.AddTail(pThread);
}
Are these standard values obtained from windows somewhere, or do I have to give them from an MFC dialouge application ? If I have to give them, where do I get them from in windows? The wHWCardNo is straight forward enough, thats zero or '0'. Does anyone know what form or value this should take ?
|
|
|
|
|
I need an efficient way to determine the name of a function from within the function itself, or possible the parent function (what’s down one level on the stack). Any ideas?
This is for an error logging system. I want to provide a way to make a log entry that identifies where in the source code the error occurs. Something similar to __LINE__ __FILE__, but not so bloated, would be great.
-Matt
|
|
|
|
|
Dunno about a way to tell the function name.
As far as identifying the file and line, one solution I've used is macros. In fact, it's probably the only solution. Something like this may do it:
#define RAISE_ERROR(description) \
do { \
CString strError; \
strError.Format("Error %s at %s(%d)", description, __FILE__, __LINE__); \
LogError(strError); \
throw CMyException(strError); \
} while (0)
Regards,
Alvaro
Hey! It compiles! Ship it.
|
|
|
|
|
Use the __FUNCTION__ macro in VS.NET
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Andrew,
Thank you. I guess I will have to work on the move to VS.NET. Does the __FUNCTION__ macro return the class and function name? i.e. Box::GetSize() or just GetSize()?
Thank you,
Matt
|
|
|
|
|
Box::GetSize()
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
You can use the StackWalk function from dbgHelp
It's the only way I know, so I'm not sure if it's the most efficient.
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
|
|
|
|
|
Incredibly easy question, I know, but what's the function you use to convert a char * to the ascii characters that make up its contents?
|
|
|
|
|
|
a char* is an array, you can access each of it's element with the [] operator:
char* str;
str[0], str[1], etc...
Jonathan de Halleux.
|
|
|
|
|
Try this,
long ConvertToLong( char* szValue )
{
unsigned long *p = (unsigned long*)szValue;
long lFieldValue = *p;
return lFieldValue;
}
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
I have to parse file that contains (some times) character > 255, this is due to some problem with the device that writes the file.
Does anybody know how to handle this case with ifstream ?
Jonathan de Halleux.
|
|
|
|
|
|
The file is mixture of binary and text data. Normally, the device writes character < 255 but sometimes it screws up and write random bits which can be > 255:
Here's the kind of text I get:
1ŠÂ‚b¢ºb’šb¢‚R5,$
???
Jonathan de Halleux.
|
|
|
|
|
was another bug, soory
Jonathan de Halleux.
|
|
|
|
|
Are you referring to c-style (char* ) strings, CString , or std::string ?
- Mike
|
|
|
|
|
Thanks for replying.
I've already found a way.
William
Fortes in fide et opere!
|
|
|
|
|
Does anybody know how to get tape drive info?
Does MS provide tape API to control tape drive such as rewind etc.?
Thanx!
Williams
|
|
|
|
|
hi there,
i am writing a c++ program to make statistical analysis, which demands quite some memory (i'm using new to allocate an array and filling it with values)... whenever i need to allocate close to 200 mb the program and the computer gets really slow, taking forever just to allocate the memory... this happen when compilling on vc 6 and vc 7. when using dev c++ (mingw), the program just crashes while trying to allocate the memory... i am pretty much sure thats nothing to deal with memory leaks (all memory allocate is freed in the end), bad memory chips (i tested them using memtest) or insufficient memory (this pc runs with 2 gb of ram memory)... any suggestions on how to solve this??????
|
|
|
|
|
tguzella wrote:
whenever i need to allocate close to 200 mb the program and the computer gets really slow, taking forever just to allocate the memory
This sounds reasonable. Allocating that much requires a good deal of work by the memory manager, including lots of virtual disk activity.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Is this memory being allocated in lots of tiny chunks or as one big array?
In either case, the virtual memory manager will be working overtime to figure out how to arrange blocks and track them. If you have a whole bunch of tiny memory blocks, you might consider allocating a large pool of memory at the start of the day and writing your own allocator tuned to your requirements.
- Mike
|
|
|
|