[Common-cvs] include hxresult.h,1.37.2.13,1.37.2.14
anugrahk at helixcommunity.org anugrahk at helixcommunity.orgUpdate of /cvsroot/common/include
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv16821
Modified Files:
Tag: hxclient_2_1_0_cayennes
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.37.2.13
retrieving revision 1.37.2.14
diff -u -d -r1.37.2.13 -r1.37.2.14
--- hxresult.h 23 Jun 2008 20:34:39 -0000 1.37.2.13
+++ hxresult.h 15 Feb 2011 04:57:59 -0000 1.37.2.14
@@ -174,6 +174,7 @@
#define HXR_DEVVIDEO_RESOURCE_LOST MAKE_HX_RESULT(1,SS_GLO,39) // 80040027
#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_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
@@ -322,6 +323,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