[Common-cvs] include hxresult.h,1.58,1.59
anugrahk at helixcommunity.org anugrahk at helixcommunity.orgUpdate of /cvsroot/common/include In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv6515 Modified Files: hxresult.h Log Message: "Nokia submits this code under the terms of a commercial contribution agreement with RealNetworks, and I am authorized to contribute this code under said agreement." Modified by: ext-anugrah.2.kashari at nokia.com Reviewed by: praveen.timmashetty at nokia.com Girish.shetty at nokia.com Sheldon Fu [sfu at real.com] RC Id: 594038 Date: 10/02/2011 Project: SymbianMmf_wm Synopsis: Streaming cannot be resumed after pausing and seeking Overview: In this use case sometimes server does not respond to PLAY request and after some time it sends RTCP BYE packet (RFC 1889 section 6.5). As server has closed connection without sending any data playback should also close. Fix: 1. When user seek, RTSPTransportBuffer::m_status is set as TRANSBUF_INITIALIZING and it is changed to TRANSBUF_READY when server acknowledges resumption. In this case server sends bye packet without acknowledgment. As a result stream done is not sent to helix core because m_uSeekCount is non-zero. Made change to inform helix core that server has closed connection. NOTE: Please note that if this is not done playback closes itself when server time out occurs. Also if BYE packet come in middle of playback and not during seek then source is informed about end of clip. But actual playback will end when audio limit reaches. During this time playback will appear as frozen. This CR includes fix for this use-case. Fix: 2. We have made changes in audio and video renderer which will send specific error message when time as reported in OnTimeSync() exceeds last packet duration. These error messages are passed directly to MMF controller. MMF controller waits for message from both audio and video renderer. Once it receives both the message, it set a timer of RENDERER_TIMEOUT_IN_MILISEC(500 ms). On completion it will close playback. Without this, I was getting random crash, because calling Stop(), results in destroying some objects which were still on call stack. Fix : 3. HandleSourceDone() should be send only when all the streams are done. This actually triggers HXNetSource::handleEndOfSource() which stops buffering for all the streams. In use-case where goodbye packet is received during playback, only ~500ms of audio data was read from socket when this was called. So for audio, stream end was set at ~500ms even though server has sent more data causing playback to end at ~500ms for this particular rtsp link. So I have modified code to ensure that HandleSourceDone() is sent when all streams has ended. There is a similar API RTSPClientProtocol::IsSourceDone(), but implementation appears to be confusing. Files modified & changes: /cvsroot/protocol/rtsp/rtspclnt.cpp /cvsroot/protocol/rtsp/pub/rtspclnt.h /cvsroot/protocol/transport/common/system/pub/transbuf.h /cvsroot/protocol/transport/rtp/rtptran.cpp /cvsroot/common/include/hxresult.h /cvsroot/clientapps/symbianMmf/hxmmfstatectrl.cpp /cvsroot/clientapps/symbianMmf/audiocontroller/hxmmfaudioctrl.cpp /cvsroot/clientapps/symbianMmf/common/hxmmfbasectrl.cpp /cvsroot/clientapps/symbianMmf/common/hxmmfbasectrl.h /cvsroot/clientapps/symbianMmf/videocontroller/hxmmfctrlimpl.cpp /cvsroot/clientapps/symbianMmf/videocontroller/hxmmfctrlimpl.h /cvsroot/datatype/common/audrend/audrend.cpp /cvsroot/datatype/common/audrend/pub/audrend.h /cvsroot/datatype/mdf/video/renderer/mdfvideoadapter.cpp /cvsroot/datatype/mdf/video/renderer/mdfvidrend.cpp /cvsroot/datatype/mdf/video/renderer/pub/mdfvideoadapter.h Image Size and Heap Use impact: No major impact Module Release testing (STIF) : Passed. Also tested with rtsp links (including excerpts links) that sends goodbye packet during normal playback. I have also verified for only audio and only video playback. Test case(s) Added : No Memory leak check performed : Passed, No additional leaks introduced. Platforms and Profiles Build Verified: helix-client-s60-52-mmf-mdf-dsp Platforms and Profiles Functionality verified: armv5, winscw Branch: 210CayS,Brizo420 and Head. Index: hxresult.h =================================================================== RCS file: /cvsroot/common/include/hxresult.h,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- hxresult.h 2 Aug 2010 09:35:43 -0000 1.58 +++ hxresult.h 16 Feb 2011 05:16:45 -0000 1.59 @@ -178,6 +178,7 @@ #define HXR_DEVVIDEO_RESOURCE_RESTORED MAKE_HX_RESULT(1,SS_GLO,40) // 80040028 #define HXR_NOT_SUPPORTED_FOR_LINEAR_FILE_SYSTEMS MAKE_HX_RESULT(1,SS_GLO,41) // 80040029 #define HXR_REQUEST_FIRST_FRAME MAKE_HX_RESULT(1,SS_GLO,41) // 80040030 +#define HXR_DEVVIDEO_PLAYBACK_DONE MAKE_HX_RESULT(1,SS_GLO,42) // 8004002a #define HXR_BUFFERING MAKE_HX_RESULT(0,SS_NET,0) // 00040040 #define HXR_PAUSED MAKE_HX_RESULT(0,SS_NET,1) // 00040041 @@ -331,6 +332,7 @@ #define HXR_OVERLAPPED_PACKET MAKE_HX_RESULT(1,SS_AUD,2) // 80040102 #define HXR_OUTOFORDER_PACKET MAKE_HX_RESULT(1,SS_AUD,3) // 80040103 #define HXR_NONCONTIGUOUS_PACKET MAKE_HX_RESULT(1,SS_AUD,4) // 80040104 +#define HXR_AUDIO_PLAYBACK_DONE MAKE_HX_RESULT(1,SS_AUD,5) // 80040105 #define HXR_OPEN_NOT_PROCESSED MAKE_HX_RESULT(1,SS_INT,0) // 80040140 #define HXR_WINDRAW_EXCEPTION MAKE_HX_RESULT(1,SS_INT,1) // 80040141