Infognition forum
August 01, 2010, 06:50:11 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Last GraphEditPlus version: 1.4.0   Last Video Enhancer version: 1.9.3
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Graph State shows Running... even the streams has ended  (Read 798 times)
raza
Newbie
*

Karma: +0/-0
Posts: 4


View Profile
« on: November 03, 2008, 10:33:24 PM »

There are some streams where grapheditplus shows the state keep running and some streams shows incorrect duration. I am trying to use C++ code to create some specific filter to be able to use it at command line for batch files. the problem is causing the command line code to go in to infinite loop. Here is code :

        while(!stop)
        {
            long ev=0, p1=0, p2=0;
            Sleep(500);
            printf(".");
         
         if (mediaEvent->GetEvent(&ev, &p1, &p2, 0)==S_OK)
            {
            printf("%x ",ev);
                if (ev == EC_COMPLETE || ev == EC_USERABORT)
                {
                    printf("Done!\n");
                    stop = TRUE;
                }
                else
                if (ev == EC_ERRORABORT)
                {
                    printf("An error occured: HRESULT=%x\n", p1);
                    mediaControl->Stop();
                    stop = TRUE;
                }
                mediaEvent->FreeEventParams(ev, p1, p2);
            }
        }


Please suggest how do I resolve this issue.

thank you
« Last Edit: November 03, 2008, 10:56:13 PM by raza » Logged
Dee Mon
Administrator
Sr. Member
*****

Karma: +7/-0
Posts: 271



View Profile WWW
« Reply #1 on: November 04, 2008, 06:48:36 AM »

This means some of the filters in the graph didn't stop, hence the graph is still in running state. Only after all the filters are stopped graph switches to stopped state and sends appropriate event (EC_COMPLETE). You should investigate why there are running filters (this seems to be related with incorrect stream length).
If you come to a point when you know the processing is really finished, but some of the filters didn't stop, you may stop them by stopping the graph (mediaControl->Stop()).
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!