[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-datatype-cvs
Subject:    [Datatype-cvs] tools/dtdriver/engine cencsrchdlr.cpp, 1.23.2.1,
From:       stanb () helixcommunity ! org
Date:       2007-09-28 22:15:39
Message-ID: 200709282216.l8SMG7hM024862 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/datatype/tools/dtdriver/engine
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv14604

Modified Files:
      Tag: hxclient_3_1_0_atlas
	cencsrchdlr.cpp ffdriver.cpp 
Log Message:
These fixes make sure that on canceling of transcode process (FFDriver::Stop() call):
- encoding is stopped in Producer SDK;
- DTDR is not blocking waiting for the encoding to finish;
- Producer created objects are released in time (before Producer SDK dlls are unloaded).


Index: cencsrchdlr.cpp
===================================================================
RCS file: /cvsroot/datatype/tools/dtdriver/engine/cencsrchdlr.cpp,v
retrieving revision 1.23.2.1
retrieving revision 1.23.2.2
diff -u -d -r1.23.2.1 -r1.23.2.2
--- cencsrchdlr.cpp	31 Aug 2007 23:20:02 -0000	1.23.2.1
+++ cencsrchdlr.cpp	28 Sep 2007 22:15:37 -0000	1.23.2.2
@@ -289,6 +289,11 @@
                 break;
             case eEventDestinationFinished:
                 HXLOGL2(HXLOG_DTDR, "Producer SDK: Destination Finished");
+		m_bEncodeFinished = TRUE;
+                break;
+            case eEventDestinationCanceled:
+                HXLOGL2(HXLOG_DTDR, "Producer SDK: Destination Canceled");
+		m_bEncodeFinished = TRUE;
                 break;
             case eEventEncodeProgress:
                 HXLOGL3(HXLOG_DTDR, "Producer SDK: Encode %lu%% Done", (puValue ? *puValue : 0));
@@ -896,6 +901,14 @@
 HX_RESULT CEncoderSourceHandler::_OnTermination(HX_RESULT status)
 {
     HX_RESULT retVal = HXR_OK;
+
+    if(status != HXR_OK)
+    {
+	if(m_pJob)
+	{
+	    m_pJob->StopEncoding();
+	}
+    }
     
     if (m_bAllPassThru)
     {

Index: ffdriver.cpp
===================================================================
RCS file: /cvsroot/datatype/tools/dtdriver/engine/ffdriver.cpp,v
retrieving revision 1.39.2.4
retrieving revision 1.39.2.5
diff -u -d -r1.39.2.4 -r1.39.2.5
--- ffdriver.cpp	31 Aug 2007 23:20:02 -0000	1.39.2.4
+++ ffdriver.cpp	28 Sep 2007 22:15:37 -0000	1.39.2.5
@@ -393,6 +393,10 @@
 {
     HXLOGL1(HXLOG_DTDR, "FFDriver::Stop()");
     m_bStop = TRUE;
+    if (m_pContext)
+    {
+        m_pContext->Interrupt();
+    }
 }
 
 
@@ -831,6 +835,14 @@
             case State_GetPackets:
             case State_PacketsReadyPending:
             case State_CleanUpReadyPending:
+
+		// If we got a Stop, then go to the cleanup state
+                if (m_bStop)
+                {
+                    m_state = State_CleanUp;
+                    break;
+                }
+
                 if (m_pContext == NULL)
                 {
                     m_status = HXR_FAIL;
@@ -1465,6 +1477,8 @@
                 MEMPROBE_FREEZE(MEMPRB_FILEOBJTOTAL);
 
                 HX_RELEASE(m_pFileSystem);
+		HX_RELEASE(m_pLastWrittenPacket);
+		HX_RELEASE(m_pLastWrittenFileHeader);
                 MEMPROBE_FREEZE(MEMPRB_FILESYSTOTAL);
 
                 m_ulContextEvents = m_pContext->GetProcessEventCount();


_______________________________________________
Datatype-cvs mailing list
Datatype-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/datatype-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic