[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

AVIStreamGetFrameOpen

Posted on 2001-07-01
6
Medium Priority
?
1,528 Views
Last Modified: 2013-11-20
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);
0
Comment
Question by:RichJackson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 2

Expert Comment

by:GloriousRain
ID: 6243618
Hi,
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.
0
 

Author Comment

by:RichJackson
ID: 6244379
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!




0
 

Author Comment

by:RichJackson
ID: 6246508
What I am saying is, there was nothing with this BITMAPINFOHEADER when i made the AVI API calls from Delphi.

Anyone any clues??


0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 49

Accepted Solution

by:
DanRollins earned 200 total points
ID: 6246865
From MSDN:

If the system cannot find a decompressor that can decompress the stream to the given format, or to any RGB format, the function returns NULL.

Therefore, ... Try

   getFrame = AVIStreamGetFrameOpen(avi, 0);
or
   getFrame = AVIStreamGetFrameOpen(avi, AVIGETFRAMEF_BESTDISPLAYFMT);
 
-- Dan
0
 

Author Comment

by:RichJackson
ID: 6268391
Cheers Dan, My mistake.  I was asking for the CODEC to give me a different sized image, to what it was.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 6300861
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:
 
  http://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
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question