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

List:       helix-datatype-cvs
Subject:    [Datatype-cvs] tools/dtdriver/engine ffdriver.cpp, 1.66.2.5, 1.66.2.6
From:       yuxinliu () helixcommunity ! org
Date:       2012-10-12 3:59:42
[Download RAW message or body]

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

Modified Files:
      Tag: PRODUCER_14_0_RN
	ffdriver.cpp 
Log Message:
Synopsis
========
This CR fix bug HLXPROD-18 RTSP Ingest does not recuperate stream after stream drops.

Branch : PRODUCER_14_0_RN
Reviewed by Sujeet and Jamie

Description:
When the IP ingest stream is lost, the producer crashes and does not recuperate the \
ID. Customer in mexico was given the beta that fixed the ts ingest and got mixed \
results. customer in mexico is using RTSP.

My solution:
Add new interface to RTSP plug-in, DTDRIVE plug-in and DTDRREADER plug-in to info \
DTDRREADER plug-in when socket disconnect because of timeout. If socket disconnect is \
because of timeout and ConnectionRetryCount is not 0, DTDRREADER plug-in should try \
to reconnect RTSP server ConnectionRetryCount times.

Files affected:
=========
client_rn/encodesvc/plugins/input/dtdrreader/hxdtdrreader.cpp
client_rn/encodesvc/plugins/input/dtdrreader/hxdtdrservice.cpp
client_rn/encodesvc/plugins/input/dtdrreader/hxdtdrservice.h
datatype/rtsp/fileformat/rtspfformat.cpp
datatype/rtsp/fileformat/pub/rtspfformat.h
datatype/tools/dtdriver/engine/ffdriver.cpp
datatype/tools/dtdriver/engine/pub/ffdriver.h
datatype/tools/dtdriver/dtdrplin/datatypedr.cpp
datatype/tools/dtdriver/dtdrplin/pub/datatypedr.h


Testing Performed:
================
My test environment:
1)there are 2 PC, PCA and PCB.
2)PCA will run HMP. PCM will run Helix server.
3)job file rtsp_file.xml which you can get from attach file.

Unit Tests:
Case 1. 
1) start HMP, never start Helix server
2) set ConnectionRetryCount to 2, . 
Expected: HMP should try to connect to Helix server 2 time. and then exit. 
Real result: Yes

Case 2. 
1) start HMP, start Helix server
2) set ConnectionRetryCount to 2. 
Expected: HMP should receive all desertraceh264aac1channel.mp4, and then exit.
Real result: Yes

Case3.
1) start HMP, start Helix server
2) set ConnectionRetryCount to 2. 
3) after HMP receive video a period of time, stop Helix server
4) when HMP report message "Stream disconnected, Will try to ..", start Helix server \
                again
Expected: HMP reconnect Helix server, after receive all \
desertraceh264aac1channel.mp4, HMP will exit. Real result: Yes

Case4.
1) start HMP, start Helix server
2) set ConnectionRetryCount to 2. 
3) after HMP receive video a period of time, stop Helix server
Expected: HMP try to reconnect Helix server 2 times and then exit.
Real result: Yes


Unit Tests: None
Leak Tests: None
Performance Tests: N/A

Platforms Tested: win32-i386-vc9

Builds Verified: win32-i386-vc9

QA Hints
no



Index: ffdriver.cpp
===================================================================
RCS file: /cvsroot/datatype/tools/dtdriver/engine/ffdriver.cpp,v
retrieving revision 1.66.2.5
retrieving revision 1.66.2.6
diff -u -d -r1.66.2.5 -r1.66.2.6
--- ffdriver.cpp	22 Jul 2011 00:55:40 -0000	1.66.2.5
+++ ffdriver.cpp	12 Oct 2012 03:59:35 -0000	1.66.2.6
@@ -375,6 +375,7 @@
     , m_bUseFileRecognition(FALSE)
     , m_bLiveSource(FALSE)
     , m_bTerminated(FALSE)
+    , m_pFFErrorResponse(NULL)
 {
 #ifdef _WRITER_WRITE_SIZE_TEST
     m_bPadToSize = TRUE;
@@ -2416,6 +2417,8 @@
     if (m_pClientContext)
     {
         m_pClientContext->AddRef();
+
+        m_pClientContext->QueryInterface(IID_IHXErrorMessages, \
(void**)&m_pFFErrorResponse);          }
 
     return retVal;
@@ -3920,6 +3923,34 @@
 #endif
 
 
+/************************************************************************
+ *	Method:
+ *	    IHXErrorMessages::Report
+ */
+STDMETHODIMP FFDriver::Report(const UINT8 unSeverity,  
+                                                          HX_RESULT ulHXCode,
+                                                          const ULONG32 ulUserCode,
+                                                          const char* pUserString,
+                                                          const char* pMoreInfoURL)
+{  
+    if(m_pFFErrorResponse)
+    {
+        m_pFFErrorResponse->Report(unSeverity, ulHXCode, ulUserCode, pUserString, \
pMoreInfoURL); +    }
+    
+    return HXR_OK;
+}
+
+/************************************************************************
+ *	Method:
+ *	    IHXErrorMessages::GetErrorText
+ */
+STDMETHODIMP_(IHXBuffer*) FFDriver::GetErrorText(HX_RESULT ulHXCode)
+{
+    return NULL;
+}
+
+
 /*
  *  IHXFormatResponse methods
  */
@@ -5081,6 +5112,12 @@
         *ppvObj = this;
         return HXR_OK;
     }
+    else if (IsEqualIID(riid, IID_IHXErrorMessages))
+    {
+        AddRef();
+        *ppvObj = (IHXErrorMessages*)this;
+        return HXR_OK;
+    }
     else if (IsEqualIID(riid, IID_IHXFormatResponse))
     {
         AddRef();


_______________________________________________
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