RichJackson
asked on
AVIStreamGetFrameOpen
Hi,
I got a problem with AVIStreamGetFrameOpen, it keeps failing returning a null pointer. The problem occurs only when I specify the bitmapinfoheader which i want to!
Code Fragment:
BITMAPINFOHEADER wanted;
wanted.biBitCount = 8;
wanted.biClrImportant = 0;
wanted.biClrUsed = 0;
wanted.biCompression = BI_RGB;
wanted.biPlanes = 1;
wanted.biSize = 40;
wanted.biXPelsPerMeter = 0;
wanted.biYPelsPerMeter = 0;
wanted.biHeight = 300;
wanted.biWidth = 300;
wanted.biSizeImage = (((wanted.biWidth * 3) + 3) &
0xFFFC) * wanted.biHeight;
getFrame = AVIStreamGetFrameOpen(avi, &wanted);
ASSERT (getFrame != NULL);
I got a problem with AVIStreamGetFrameOpen, it keeps failing returning a null pointer. The problem occurs only when I specify the bitmapinfoheader which i want to!
Code Fragment:
BITMAPINFOHEADER wanted;
wanted.biBitCount = 8;
wanted.biClrImportant = 0;
wanted.biClrUsed = 0;
wanted.biCompression = BI_RGB;
wanted.biPlanes = 1;
wanted.biSize = 40;
wanted.biXPelsPerMeter = 0;
wanted.biYPelsPerMeter = 0;
wanted.biHeight = 300;
wanted.biWidth = 300;
wanted.biSizeImage = (((wanted.biWidth * 3) + 3) &
0xFFFC) * wanted.biHeight;
getFrame = AVIStreamGetFrameOpen(avi,
ASSERT (getFrame != NULL);
ASKER
Why would it do that?
It should return a pointer to a get frame object.
I tried BI_BITFIELDS and BI_RLE8
In Delphi making the equivalent API calls works!
It should return a pointer to a get frame object.
I tried BI_BITFIELDS and BI_RLE8
In Delphi making the equivalent API calls works!
ASKER
What I am saying is, there was nothing with this BITMAPINFOHEADER when i made the AVI API calls from Delphi.
Anyone any clues??
Anyone any clues??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Cheers Dan, My mistake. I was asking for the CODEC to give me a different sized image, to what it was.
Hi RichJackson,
I'm sure that you feel it was a kind thing to award me some points even thought my answer did not solve your problem.
But I'm here to inform you that a C grade in response to a comment is considered an insult. I see that you tend to give out a lot of C's, so I'd like to remind you to please read the EE grading guildelines:
https://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp#3
If you cannot get a complete answer, you should post additional comments ansking for clarifications or delete the question.
Thanks,
-- Dan
I'm sure that you feel it was a kind thing to award me some points even thought my answer did not solve your problem.
But I'm here to inform you that a C grade in response to a comment is considered an insult. I see that you tend to give out a lot of C's, so I'd like to remind you to please read the EE grading guildelines:
https://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp#3
If you cannot get a complete answer, you should post additional comments ansking for clarifications or delete the question.
Thanks,
-- Dan
As your code shows:
...
biCompression = BI_RGB
...
"The problem
occurs only when I specify the bitmapinfoheader which i want to!
"->to any RGB format, the function returns NULL.