|
Here's some header info for the MPEG file format which should help you:
1-4 byte Sequence header In Hex 000001B3
12 bits Horizontal size In pixels
12 bits Vertical size In pixels
4 bits Pel aspect ratio
18 bits Picture rate
Mind the difference between bits and bytes here. Only the sequence header is four whole bytes, the rest are all a certain amount of bits.
The picture rate stands for a certain frame rate:
1 = 23.976 frames/sec
2 = 24
3 = 25
4 = 29.97
5 = 30
6 = 50
7 = 59.94
8 = 60
|
|
|
|
|
Yep, thanx, found this one too, but it doesn't give me an info about the length... More I'm reading, more I'm thinking that there is not actual length is written into MPEG file...
Anyway.. Vitec (SDK) does a good work, unlike DirectX, which couldn't be used for a frame-accurate editing
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
After upgrading to WInXP pro, JIT Debugging isn't working anymore.
I completely disabled error reporting, but this didn't help.
VC++ options has JIT debugging enabled.
The application shows a msg box with the exception, and OK / CANCEL.
I click Cancel, VC++ pops up, goes into "Debugging" layout, displays the same exception again, this time only with an OK button. OK terminates the debug session.
Wasn't a big problen until now - but now I have an "issue" that appears only with release builds (seems to be performance-dependent, i.e. appears in an "release build with debug info" too), and only if I don't start it under the debugger.
Any ideas?
Peter
Italian is a beautiful language. amare means to love, and amara bitter.
sighist | Agile Programming | doxygen
|
|
|
|
|
As part of my MDI program I created a CMyScrollView class derived from CScrollView. I've overrided the following functions: OnInitialUpdate,OnUpdate,OnSize,OnPrepareDC,etc. In OnInitialUpdate I've called "SetScrollSizes". Everything went well when there's only one file opened, but when I clicked the "new" toolbar button or opened another file, the following MFC codes asserted(in CScrollView::OnPrepareDC(...) from viewscrl.cpp):
#ifdef _DEBUG
if (m_nMapMode == MM_NONE)
{
TRACE0("Error: must call SetScrollSizes() or SetScaleToFitSize()");
TRACE0("\tbefore painting scroll view.\n");
ASSERT(FALSE);
return;
}
#endif //_DEBUG
and the call stack showed:
CScrollView::OnPrepareDC(...)
CMyScrollView::OnPrepareDC(...)
CView::OnPaint()
CWnd::OnWndMsg(...)
CWnd::WindowProc(...)
Where does my codes go wrong? Can anyone help me?
|
|
|
|
|
I have a question. Where can I find a free class (Visual C++) which I can use for parsing XML document?
|
|
|
|
|
CodeProject has a SOAP/XML Section full of simple Xml parsers.
Besides that, MS distributes the MSXML parser, and it's free.
|
|
|
|
|
Does any C++ class exist that would handle most of this functionality for me???
I need it to act system wide so I believe it must be a dll...
Thanks
"Two wrongs don't make a right, but three lefts do!" - Alex Barylski
|
|
|
|
|
Look past MSDN mag issues. You've got a free VBScript/JScript engine mouse/keystroke recorder.
|
|
|
|
|
I've created a pattern brush (not sure if this kind of brush is the right one) in this way:
HBITMAP hBmp=NULL;
m_Height = 400;
m_Width = 622;
CString csPath = "C:\\xxx.bmp";
hBmp=(HBITMAP)::LoadImage(NULL,csPath,IMAGE_BITMAP,m_Width,m_Height,LR_LOADFROMFILE);
CBitmap *pBmp=CBitmap::FromHandle(hBmp);
m_brush.CreatePatternBrush(pBmp);
::DeleteObject(hBmp); And I try to show it using this code (in OnPaint()):
CRect rcClient;
rcClient.left = 0;
rcClient.right = rcClient.left + m_Width;
rcClient.top = 0;
rcClient.bottom = m_Height;
dc.FillRect(&rcClient,&m_brush); I'm trying to use this code in order to show a big image as background, I need to place it not at 0,0 coordinates, and it seems impossible by using this code because it seems that the pattern always begin at 0,0... the problem is that if I change the drawing coordinates, the rect that is filled is filled correctly (the size of the rect is the right one) but the image being drawn inside is not the desired (it gets drawn not at the starting point of the image, it is started at the x,y offset in which the rectangle is being drawn; and when the image reach it's end, then it's restarted at its 0,0 coordinate...
How can I do it?
Thank you in advance...
|
|
|
|
|
see my article,
WndImage Control[^]
It provides the "basics" to paint a bitmap, plus supports tiling (which you're probably looking for).
[edit] I just noticed I didn't update the article yet. An updated version with palette handling support can be found here[^]
Italian is a beautiful language. amare means to love, and amara bitter.
sighist | Agile Programming | doxygen
|
|
|
|
|
Can anyone tell me the easiest way to handle events fired from ATL control in a MFC application. There is a code here at CP but it works only if the connection point interface inside the control is not a dispinterface.
|
|
|
|
|
are there any setting can confine the function?
help me!
|
|
|
|
|
1. open browse dialog without MFC
2. show picture at picture control
3. load ANI extension
I would like all example, somebody help me.
thank a lot.
|
|
|
|
|
1. GetOpenFileName()
2. See this[^] link
3. Not sure what you mean.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
1. successed
2. in tab controls have edit box, button, static text, radio button, picture, combobox etc. i would like to know the fuction to use display bitmap into picture control that create from tab controls
3. assume i have ANI file(test.ani) that animation of icon file, i would like to know the function to use Load and Display ANI file
|
|
|
|
|
Hello,
I've written a program in VisualC++ to call a DLL file. I came to the DLL file by compiling a Matlab file with the function mcc. When I write a simple DLL file (output=input) my C++ program works very well and gets a good link with the DLL. But when I change the DLL file a little bit(output = 3* input), my program gets no good link with the DLL file. It seems that the main function can't call the other subfunctions of my dll file(the functions that are extra created when I changed my DLL file to "output=3*input" and are needed to perform the multiplication)
Please, can you explain me what's wrong, what I have to change??
Is their something wrong with the settings of my program?
Could you give me a good example of such a program?
Is there maybe something wrong with the mcc compiler code?
The code I used was "mcc -W lib:libFLOPS -t -h -T link:lib libmmfile.mlib FLOPS".
This is a part of my C++ program:
void CDLLTESTDlg::OnStartdllbutton()
{
typedef mxArray*(* LPFNDLLFUNC1)(mxArray* input);
HINSTANCE hDLL; // Handle to DLL
LPFNDLLFUNC1 lpfnDllFunc1; // Function pointer
hDLL = LoadLibrary("libFLOPS.dll");
if (hDLL != NULL)
{
lpfnDllFunc1 = (LPFNDLLFUNC1)GetProcAddress(hDLL,"mlfFLOPS");
if (!lpfnDllFunc1)
{
// handle the error
FreeLibrary(hDLL);
SetDlgItemText(IDC_RESULTDLLCALL,"ddl found, but no function");
}
else
{
// call the function
char szTemp[100];
mxArray *INPUT=NULL,
*OUTPUT=NULL;
INPUT=mxCreateScalarDouble(100);
OUTPUT=(*lpfnDllFunc1)(INPUT);
sprintf(szTemp,"%f",mxGetScalar(OUTPUT));
SetDlgItemText(IDC_RESULT,szTemp);
SetDlgItemText(IDC_RESULTDLLCALL,"ddl en functie gevonden");
FreeLibrary(hDLL);
}
}
}
Thanx for your support ,
kind regards,
Geert
|
|
|
|
|
Hi,
the simplest reason could be a PATH problem. Probably Mathlab engine must be addressed to the OS: your DLL has the Mathlab Engine implicilty linked and so OS do load your DLL only if all the dependencies are loadad.
Try to add the Mathlab engine path in the PATH env variable: use Dependency Walker to find the dependencies of your DLL and than search the file in HD.
|
|
|
|
|
Could you explain me what you mean with "try to add the Mathlab engine path in the PATH env variable: use Dependency Walker to find the dependencies of your DLL and than search the file in HD"
Thanx, kind regards,
Geert
|
|
|
|
|
In order to use Mathlab functionality you need some DLL for sure. You probably have linked your app with the enty point lib of these. There is a free utility called Dependency Walker that can help in identify the DLL your component need. All these DLLs must be present in one or more of the following path list:
- your app path;
- the %systemroot% path;
- the %winnt%\system32 path;
- one of the path specified by the PATH environment variable;
If something gets wrong in loading any of these DLLs your primary DLL cannot be loaded and you experience the problem you have reported.
More info in "Advanced Programming for Windows" by Richter
|
|
|
|
|
What do you just mean with?
- the %systemroot% path;
- one of the path specified by the PATH environment variable;
I'm not such an experienced programmaer
Kind regards,
ciao,
Geert
|
|
|
|
|
%systemroot% : the directory of windows (if you are using XP it's probably c:\windows, if you are using NT/2000 it's probably c:\winnt).
Check in the Windows online help "Environment Variables", type SET PATH on command prompt and get the content of the PATH env var.
You'll see ";"-separated list of paths, append the path of the Mathlab DLL folder you found w/ the method I have explained earlier.
Probably you 'll need a help by someone more expert in the dept you are working...
|
|
|
|
|
|
|
Some problems with your question
1. There is a language called c as opposed to c++. Is that what you mean ?
2. The question is way too broad, and you're on a site full of information on the topic, if you meant C++. Either way, how can anyone explain such a huge topic in a reply to a message board ?
If you meant C and not C++ then you obviously cannot use MFC, and your best bet is to buy 'Programming Windows' by Charles Petzold. You need to make sure you get his book for C and not his book for C#, which is the newer one.
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
Anonymous wrote:
OK. I read a c++ book. Or...a bit of it anyway. I'm sick of that evil looking console window.
I think you are a good candidate for Visual Basic. - Nemanja Trifunovic
|
|
|
|
|
Perhaps they've heard of the legendary powers of the posters on CP and assumed that the gurus could tell the full nuances of the question from that one emoticon?
Debbie
|
|
|
|