Discussion:
converting Images into media file
(too old to reply)
Nima
2006-05-26 12:19:18 UTC
Permalink
Hi All,

I am trying to make a video file which contains sequence of images. But

When I try to add more than three sources, it results in undetermined
behaviour.
for reference i am placing my code here.


REFERENCE_TIME TLStart = 0;
REFERENCE_TIME TLStop = 200000000;


REFERENCE_TIME MediaStart =0;
REFERENCE_TIME MediaStop = 50000000;


m_vecPicPath.push_back("pic1.jpg");
m_vecPicPath.push_back("pic2.jpg");
m_vecPicPath.push_back("pic3.jpg");
m_vecPicPath.push_back("pic4.jpg");


vector<string>::iterator it = m_vecPicPath.begin();
string strPath;
for(int i=0, it != m_vecPicPath.end(),it++,i++)
{


hr = pTimeline->CreateEmptyNode(&pTrack1Obj,
TIMELINE_MAJOR_TYPE_TRACK);
if(i==0)


pVideoGroupObj->QueryInterface(IID_IAMTimelineComp,(void**)&pRootComp);

pRootComp->VTrackInsBefore(pTrack1Obj, -1);
pTimeline->CreateEmptyNode(&pSource1Obj,TIMELINE_MAJOR_TYPE_SOURCE);


if(i==1)
{
TLStart = 50000000;
TLStop = 100000000;


}


if(i==2)
{
TLStart = 100000000;
TLStop = 150000000;

}


if(i==3)
{
TLStart = 150000000;
TLStop = 200000000;

}


strPath =(*it);

pSource1Obj->QueryInterface(IID_IAMTimelineSrc,(void**)&pSource1Src);
pSource1Obj->SetStartStop(TLStart,TLStop);
pSource1Src->SetMediaName(T2W(strPath.c_str()));
pSource1Src->SetMediaTimes(MediaStart, MediaStop);


pTrack1Obj->QueryInterface(IID_IAMTimelineTrack,(void**)&pTrack1);
pTrack1Obj->Release();
pTrack1->Release();
pSource1Oj->Release();
pSource1Src->Release();



}


Can anybody help me...

Thanks in Advance,
Poornima
The March Hare [MVP]
2006-05-26 12:56:09 UTC
Permalink
Post by Nima
I am trying to make a video file which contains sequence of images. But
This newsgroup is no longer active. Please see

http://tmhare.mvps.org/help.htm#where

to find the active dshow newsgroups and post in the most appropriate one.

In the future, I recommend you look at a few posts in a newsgroup before
posting in it.

9 blind people have posted here so far this month.

Please do not multi-post.

See: http://tmhare.mvps.org/help.htm#mp
--
Microsoft MVPs: http://www.microsoft.com/mvp and
MVPs.org site http://www.mvps.org
My dshow site: http://tmhare.mvps.org
Loading...