Article View: borland.public.cppbuilder.multimedia
Article #271Re: Access Violation?!
From: Juampi David
Date: Fri, 24 Dec 2004 01:17
Date: Fri, 24 Dec 2004 01:17
80 lines
3396 bytes
3396 bytes
Gambit ... Thanks for your help! ... and for your Time! ...
I found the solution on ...
1st ... Make a Timeline
2nd... Make a Group
3th... Adjust MediaSubType --->
AM_MEDIA_TYPE mtGroup;
ZeroMemory(&mtGroup, sizeof(AM_MEDIA_TYPE));
mtGroup.majortype = MEDIATYPE_Video;
pGroup->SetMediaType(&mtGroup);
mtGroup.majortype = MEDIATYPE_Video;
mtGroup.subtype = MEDIASUBTYPE_RGB24;
mtGroup.pbFormat = (BYTE*)CoTaskMemAlloc(sizeof(VIDEOINFOHEADER));
VIDEOINFOHEADER *pVideoHeader = (VIDEOINFOHEADER*)mtGroup.pbFormat;
ZeroMemory(pVideoHeader, sizeof(VIDEOINFOHEADER));
pVideoHeader->bmiHeader.biBitCount = 24;
pVideoHeader->bmiHeader.biWidth = 720;
pVideoHeader->bmiHeader.biHeight = 576;
pVideoHeader->bmiHeader.biPlanes = 1;
pVideoHeader->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
pVideoHeader->bmiHeader.biSizeImage = DIBSIZE(pVideoHeader->bmiHeader);
mtGroup.formattype = FORMAT_VideoInfo;
mtGroup.cbFormat = sizeof(VIDEOINFOHEADER);
mtGroup.bFixedSizeSamples = TRUE;
mtGroup.lSampleSize = DIBSIZE(pVideoHeader->bmiHeader);
pGroup->SetMediaType(&mtGroup);
CoTaskMemFree(mtGroup.pbFormat);
4th. Adding Group to TimeLine
pTimeline->AddGroup(pGroupObj);
pGroupObj->Release();
And following....
Thanks and if you want, tell me if my solution is or not Rigth! ...
Thanks!!!
Juampi David
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> escribi๏ฟฝ en el mensaje
news:41cb08f2$1@newsgroups.borland.com...
>
> "Juampi David" <multimedia@mdpsistemas.com.ar> wrote in message
> news:41caebfa@newsgroups.borland.com...
>
>> IAMTimelineGroup *pGroup;
>>
>> pGroup->SetMediaType(&mtGroup);
>
> You are declaring an uninitialized pointer and not instantiating an
> IAMTimelineGroup object before using it. For example:
>
> IAMTimeline *pTimeline = NULL;
> IAMTimelineObj *pObj = NULL;
> IAMTimelineGroup *pGroup = NULL;
>
> // first obtain the Timeline as needed, then do one of the following as
> needed ...
>
> pTimeline->CreateEmptyNode(&pObj, TIMELINE_MAJOR_TYPE_GROUP);
> // or ...
> pTimeline->GetGroup(&pObj, SomeIndex);
>
> // then obtain the Group...
> if( pObj )
> {
> pObj->QueryInterface(IID_IAMTimelineGroup, (LPVOID*)&pGroup);
> // now use the Group as needed...
> pGroup->Release();
> }
>
>
> Gambit
>
>
Technical Details
Message-ID:
<41cb6e3e@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!easynet-monga!easynet.net!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<41caebfa@newsgroups.borland.com> <41cb08f2$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10d0fc,83d0bed4519bc3d4 X-Google-Attributes: gid10d0fc,public X-Google-Language: ENGLISH,ASCII Reply-To: "Juampi David" <misticaverdad@speedy.com.ar> From: "Juampi David" <misticaverdad@speedy.com.ar> Newsgroups: borland.public.cppbuilder.multimedia References: <41caebfa@newsgroups.borland.com> <41cb08f2$1@newsgroups.borland.com> Subject: Re: Access Violation?! Date: Thu, 23 Dec 2004 22:17:51 -0300 Lines: 82 Organization: ninguna X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 201.255.87.192 Message-ID: <41cb6e3e@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1103851070 201.255.87.192 (23 Dec 2004 17:17:50 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!easynet-monga!easynet.net!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail