Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Entertainment » microsoft.public.windowsmedia.sdk
Thread: User allocated samples examlpe

HTVi
TV Discussion Newsgroups

User allocated samples examlpe
Stas 6/6/2007 9:38:03 PM
Hi.

Does anyone have a working user allocated sample, allowing to create a
buffer of samples prior to sending them to the Writer object?

Thanks in advance,
Stas.
Re: User allocated samples examlpe
Vegethalia <vegethalia[ at ]gmail.com> 6/13/2007 3:13:45 PM

Stas ha escrit:
[Quoted Text]
> Hi.
>
> Does anyone have a working user allocated sample, allowing to create a
> buffer of samples prior to sending them to the Writer object?
>
> Thanks in advance,
> Stas.

Hi Stas,

You just need to create your samples calling:
hr=pPortraitWriter->AllocateSample(dwLength, &pMyINSBuff);

where dwLength, is, tipically imgWidth*imgWeigth*(colorDepth/8) (if
your bitmaps are RGB)

after creating the INSBuffer, retrieve a pointer to the buffer itself:
hr=pMyINSBuff->GetBuffer(&pbBuffDest); //BYTE *pbBuffDest;

copy/create/whatever your bitmaps to pbBuffDest and call the writer:

hr=pWriter->WriteSample(dwInput, qwTime, dwFlags, pMyINSBuff);

And... thats all if i understood your question! :)


Vegethalia
--------------------------------
http://www.pleyhades.com

Re: User allocated samples examlpe
Vegethalia <vegethalia[ at ]gmail.com> 6/13/2007 3:15:24 PM
[Quoted Text]
> You just need to create your samples calling:
> hr=pPortraitWriter->AllocateSample(dwLength, &pMyINSBuff);
>

Ops! replace this for:
hr=pWriter->AllocateSample(dwLength, &pMyINSBuff);

Copy&Paste problems you know....

Vegethalia
--------------------------------
http://www.pleyhades.com

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen