ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 DShow event and Animated GIF
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

graph_man

328 Posts

Posted - Apr 28 2020 :  18:33:19  Show Profile  Reply
At the end of playing the video file, I get "IEEC_COMPLETE" event.
But this event does not occur at the end of the animated GIF.
How to fix it and stop GIF animation at the end?

xequte

39141 Posts

Posted - Apr 29 2020 :  01:44:41  Show Profile  Reply
Hi

What code are you using?



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

graph_man

328 Posts

Posted - Apr 29 2020 :  07:07:06  Show Profile  Reply
ImageEnView1->IO->DShowParams->FileInput = OpenImageEnDialog1->FileName;
ImageEnView1->IO->DShowParams->EnableSampleGrabber = true;
ImageEnView1->IO->DShowParams->RenderAudio = true;
ImageEnView1->IO->DShowParams->Connect();
ImageEnView1->IO->DShowParams->Run();


void __fastcall TForm1::ImageEnView1DShowEvent(TObject *Sender)
{
int event;
if (ImageEnView1->IO->DShowParams->Connected)
{
while (ImageEnView1->IO->DShowParams->GetEventCode(event))
{
if (event == IEEC_COMPLETE) Stop1Click(this); //call STOP button
}
}
}
Go to Top of Page

xequte

39141 Posts

Posted - Apr 30 2020 :  21:42:07  Show Profile  Reply
Hi

This appears to be a feature of DirectShow. It continually loops animated GIF files and so does not raise an IEEC_COMPLETE event.

You don't need to use DirectShow to play animated gif files, you can just use:

ImageEnView1.IO.LoadFromFile( 'anim.gif' );
ImageEnView1.Playing := True;

https://www.imageen.com/help/TImageEnView.Playing.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

graph_man

328 Posts

Posted - May 01 2020 :  14:09:08  Show Profile  Reply
I tried to use the method you proposed, but it loads a animated GIF file several times slower.
Go to Top of Page

xequte

39141 Posts

Posted - May 01 2020 :  22:46:27  Show Profile  Reply
Hi

Please email me for an update that provides much better performance when playing animated GIFs.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: