Click here to Skip to main content
15,926,281 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to encrpyt a file and decrpyt on the fly Pin
beko31-Mar-06 22:03
beko31-Mar-06 22:03 
Questionhow can i add DLL file in my application Pin
baldha rakesh31-Mar-06 2:27
baldha rakesh31-Mar-06 2:27 
GeneralRe: [OT] Pin
kakan31-Mar-06 2:51
professionalkakan31-Mar-06 2:51 
GeneralRe: [OT] Pin
kakan31-Mar-06 2:57
professionalkakan31-Mar-06 2:57 
GeneralRe: [OT] Pin
Toby Opferman31-Mar-06 21:45
Toby Opferman31-Mar-06 21:45 
AnswerRe: how can i add DLL file in my application Pin
Cedric Moonen31-Mar-06 2:53
Cedric Moonen31-Mar-06 2:53 
AnswerRe: how can i add DLL file in my application Pin
Laxman Auti31-Mar-06 17:53
Laxman Auti31-Mar-06 17:53 
QuestionHow to create an AVI file from a compressed buffer? Pin
dvillet31-Mar-06 1:45
dvillet31-Mar-06 1:45 
Hello,

I’m trying to create an AVI File (using the API VfW) where data are already compressed. Frames are already compressed by my board grabber, and my application just receive in a shared memory the compressed buffer.
I created a BITMAPINFOHEADER struct and an AVISTREAMINFO struct to create the stream associated to my open AVI file.

m_pBitmapInfo->biSize= sizeof(BITMAPINFOHEADER); <br />
m_pBitmapInfo->biPlanes= 1; <br />
m_pBitmapInfo->biBitCount= 24; <br />
m_pBitmapInfo->biCompression= mmioFOURCC('d','i','v','x'); <br />
m_pBitmapInfo->biClrUsed= 0; <br />
m_pBitmapInfo->biClrImportant= 0; <br />
m_pBitmapInfoHeaderPos->biSizeImage= m_bufferSize;//size of the compressed buffer<br />
m_pBitmapInfoHeaderPos->biWidth= SizeX;//size of the src 352*288 <br />
m_pBitmapInfoHeaderPos->biHeight = SizeY; <br />
... <br />
<br />
m_pAviStreamInfo.fccType= streamtypeVIDEO; <br />
m_pAviStreamInfo.fccHandler= mmioFOURCC('d','i','v','x'); <br />
m_pAviStreamInfo.dwScale= 1; <br />
m_pAviStreamInfo.dwRate = 5;       <br />
m_pAviStreamInfo.dwSuggestedBufferSize= m_pBitmapInfo->biSizeImage; <br />
RECT RectImageSize = { 0, 0,SizeX ,SizeY}; <br />
m_pAviStreamInfo.rcFrame= RectImageSize; <br />
<br />
... <br />
hr = AVIFileCreateStream(m_pAviFile, &m_psAvi, &m_pAviStreamInfo); <br />
... <br />
hr = AVIStreamSetFormat(m_psAvi, 0, m_pBitmapInfo, m_pBitmapInfo->biSize);

Then, I wrote the frame:

hr = AVIStreamWrite (m_psAvi, images, 1, m_pCurrentBuffer, m_bufferSize, AVIIF_KEYFRAME, &plSampWritten, &plBytesWritten);

At the end of the process, my file is too big and I have only a black display.
If I ask my grabber to not compress the video source I have no problem to create my AVI file using the API VfW…

I don't understand what is wrong...

Is there anybody that has an idea?

Thank your.
AnswerRe: How to create an AVI file from a compressed buffer? Pin
Hamid_RT31-Mar-06 2:31
Hamid_RT31-Mar-06 2:31 
GeneralRe: How to create an AVI file from a compressed buffer? Pin
dvillet31-Mar-06 2:52
dvillet31-Mar-06 2:52 
GeneralRe: How to create an AVI file from a compressed buffer? Pin
Hamid_RT31-Mar-06 3:14
Hamid_RT31-Mar-06 3:14 
GeneralRe: How to create an AVI file from a compressed buffer? Pin
dvillet31-Mar-06 3:17
dvillet31-Mar-06 3:17 
GeneralRe: How to create an AVI file from a compressed buffer? Pin
Hamid_RT31-Mar-06 8:14
Hamid_RT31-Mar-06 8:14 
Questionregarding focus Pin
yang__lee31-Mar-06 0:32
yang__lee31-Mar-06 0:32 
AnswerRe: regarding focus Pin
FarPointer31-Mar-06 4:32
FarPointer31-Mar-06 4:32 
AnswerRe: regarding focus Pin
FarPointer31-Mar-06 4:33
FarPointer31-Mar-06 4:33 
Questionhow to stream video files Pin
ramyasangeet31-Mar-06 0:08
ramyasangeet31-Mar-06 0:08 
AnswerRe: how to stream video files Pin
Hamid_RT31-Mar-06 2:28
Hamid_RT31-Mar-06 2:28 
Questionprintdlg not working Pin
_tasleem31-Mar-06 0:03
_tasleem31-Mar-06 0:03 
AnswerRe: printdlg not working Pin
Ștefan-Mihai MOGA31-Mar-06 0:21
professionalȘtefan-Mihai MOGA31-Mar-06 0:21 
GeneralRe: printdlg not working Pin
_tasleem31-Mar-06 0:25
_tasleem31-Mar-06 0:25 
AnswerRe: printdlg not working Pin
Hamid_RT31-Mar-06 2:41
Hamid_RT31-Mar-06 2:41 
Questionfatal error LNK1181: cannot open input file 'MagicFM.lib' Pin
rossol21930-Mar-06 23:58
rossol21930-Mar-06 23:58 
AnswerRe: fatal error LNK1181: cannot open input file 'MagicFM.lib' Pin
Cedric Moonen31-Mar-06 0:22
Cedric Moonen31-Mar-06 0:22 
GeneralRe: fatal error LNK1181: cannot open input file 'MagicFM.lib' Pin
rossol21931-Mar-06 1:02
rossol21931-Mar-06 1:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.