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

List:       helix-clientapps-dev
Subject:    RESEND: [Clientapps-dev] CR: Case 883906: Streaming WM HTTP content
From:       <girish.shetty () nokia ! com>
Date:       2011-08-22 22:16:02
Message-ID: 16EDD0D433A1D0498F4A33532517B6B2A4EEE6 () 008-AM1MPN1-041 ! mgdnok ! nokia ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Any comments on this CR?

Regards
Girish


From: clientapps-dev-bounces@helixcommunity.org [mailto:clientapps-dev-boun=
ces@helixcommunity.org] On Behalf Of Shetty Girish (Nokia-SD/SiliconValley)
Sent: Thursday, August 18, 2011 2:10 PM
To: nokia-private-dev@helixcommunity.org; client-dev@helixcommunity.org; cl=
ientapps-dev@helixcommunity.org
Cc: sfu@real.com; qluo@real.com
Subject: [Clientapps-dev] CR: Case 883906: Streaming WM HTTP content withou=
t media extension fails

"Nokia submits this code under the terms of a commercial contribution agree=
ment with RealNetworks, and I am authorized to contribute this code under s=
aid agreement."

Modified by:  girish.shetty@nokia.com<mailto:girish.shetty@nokia.com>

Reviewed by:

Date:  08/16/2011

Project:  SymbianMmf_wm, Symbian_client_apps

Error Id:  ou1cimx1#883906

Synopsis: Case 883906: Streaming WM HTTP content without media extension fa=
ils

Overview:

When the URI opened for streaming is WM content and if it does not have an =
extension associated with the URL, then following operation happens based o=
n the protocol name in the URI:

-   mms://  - In this case asf_fileformat_net claims it (as its mms) and co=
re loads this dll and streaming happens as expected

-   rtsp:// - rtspclnt takes over and tries to connect with the WMserver, b=
ut eventually lets asf_fileformat_net do the streaming

-   http:// - http_filesystem is recognized as the preferred file system (a=
s the URI has http as the protocol and it does not have an extension). Core=
 loads httpfs and it fails after loading corresponding file format (asf_fil=
eformat_file) as it HXR_INVALID_FILE while reading the file header. HXFileS=
ource::InitDone receives this error and the same error is reported back to =
the controller and the playback ends with HXR_INVALID_FILE

But if we have an WM extension with the URI, we don't get into this situati=
on for http:// URL as it is directly handled by asf_fileformat_net, as it c=
laims the protocol-schema pair.

This CR addresses this use-case to make it work by trying with mms:// when =
http:// fails to stream the content.

Solution:

Changes in Core:


-    HXFileSource::InitDone receives the error and Reports the error

-    In HXPlayer::ReportError, if the error is HXR_INVALID_FILE, then we at=
temp a ProtocolSwitch based on the current URI (from http:// to mms://)

-    If its possible to do so, then communicate the controller about possib=
le protocol switch so that controller can prepare itself for the same

-    Reopen the new URI


Changes in (Symbian) Controller:

-   While in Buffering state, if we get HXR_PROTOCOL_SWITCH_MESSAGE informa=
tion message from the core, then don't change the state to ERROR as we are =
expecting re-attempt by core with protocol switch

-   While in Buffering state, change state to CLOSED after receiving OnStop=
, only if we are not waiting on protocol switch

-   Communicate Playback/Prepare complete (OnPresentationClosed) to the app=
lication unless we are we are waiting on protocol switch

I have introduced a new helix error code (HXR_PROTOCOL_SWITCH_MESSAGE) for =
the same and a corresponding Symbian error code (KErrExpectingProtocolSwitc=
h)

Diff: <attached>

Files added:  None

Files modified:
/cvsroot/client/core/hxplay.cpp
/cvsroot/client/core/pub/hxplay.h
/cvsroot/common/include/hxresult.h

/cvsroot/clientapps/symbianMmf/hxmmfstatectrl.cpp
/cvsroot/clientapps/symbianMmf/hxmmfstatectrl.h
/cvsroot/clientapps/symbianMmf/hxmmfstatepaused.cpp
/cvsroot/clientapps/symbianMmf/hxmmfstatepaused.h
/cvsroot/clientapps/symbianMmf/videocontroller/hxmmfctrlimpl.cpp

Image size and heap use impact:  Negligible

Module release testing (STIF):  Done

Test case(s) added:  No

Memory leak check performed:  NA

Platforms and profiles build verified:  helix-client-s60-52-mmf-mdf-dsp, he=
lix-client-symbian-4

Platforms and profiles functionality verified:  armv5

Branch: 420Brizo, HEAD




[Attachment #5 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{mso-style-priority:34;
	margin-top:0in;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
span.EmailStyle18
	{mso-style-type:personal;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
span.EmailStyle19
	{mso-style-type:personal;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
span.EmailStyle20
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
/* List Definitions */
@list l0
	{mso-list-id:122618878;
	mso-list-type:hybrid;
	mso-list-template-ids:-615208618 1994063166 67698691 67698693 67698689 67698691 \
67698693 67698689 67698691 67698693;} @list l0:level1
	{mso-level-start-at:0;
	mso-level-number-format:bullet;
	mso-level-text:-;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:"Courier New";
	mso-fareast-font-family:Calibri;}
@list l0:level2
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:"Courier New";}
@list l0:level3
	{mso-level-number-format:bullet;
	mso-level-text:\F0A7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:Wingdings;}
@list l0:level4
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:Symbol;}
@list l0:level5
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:"Courier New";}
@list l0:level6
	{mso-level-number-format:bullet;
	mso-level-text:\F0A7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:Wingdings;}
@list l0:level7
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:Symbol;}
@list l0:level8
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:"Courier New";}
@list l0:level9
	{mso-level-number-format:bullet;
	mso-level-text:\F0A7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:Wingdings;}
ol
	{margin-bottom:0in;}
ul
	{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Any comments on this \
CR?<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="color:#1F497D"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
style="color:#1F497D">Regards<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="color:#1F497D">Girish<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="color:#1F497D"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
style="color:#1F497D"><o:p>&nbsp;</o:p></span></p> <div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span \
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span \
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> \
clientapps-dev-bounces@helixcommunity.org \
[mailto:clientapps-dev-bounces@helixcommunity.org] <b>On Behalf Of </b>Shetty Girish \
(Nokia-SD/SiliconValley)<br> <b>Sent:</b> Thursday, August 18, 2011 2:10 PM<br>
<b>To:</b> nokia-private-dev@helixcommunity.org; client-dev@helixcommunity.org; \
clientapps-dev@helixcommunity.org<br> <b>Cc:</b> sfu@real.com; qluo@real.com<br>
<b>Subject:</b> [Clientapps-dev] CR: Case 883906: Streaming WM HTTP content without \
media extension fails<o:p></o:p></span></p> </div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">&quot;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.&quot;<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Modified \
by:&nbsp; <a href="mailto:girish.shetty@nokia.com"> girish.shetty@nokia.com</a>&nbsp; \
<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;">Reviewed by:&nbsp; <o:p></o:p></span></p> \
<p class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;">Date:&nbsp; \
08/16/2011<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Project:&nbsp; \
SymbianMmf_wm, Symbian_client_apps<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Error Id:&nbsp; \
ou1cimx1#883906<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Synopsis: Case \
883906: Streaming WM HTTP content without media extension fails<o:p></o:p></span></p> \
<p class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;">Overview:&nbsp; <o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;">When the URI opened for streaming is WM \
content and if it does not have an extension associated with the URL, then following \
operation happens based on the protocol name in the URI:<o:p></o:p></span></p> <p \
class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if \
!supportLists]><span style="font-family:&quot;Courier New&quot;"><span \
style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New \
Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span \
style="font-family:&quot;Courier New&quot;">mms://&nbsp; - In this case \
asf_fileformat_net claims it (as its mms) and core loads this dll and streaming \
happens as expected<o:p></o:p></span></p> <p class="MsoListParagraph" \
style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span \
style="font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">-<span \
style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; \
</span></span></span><![endif]><span style="font-family:&quot;Courier \
New&quot;">rtsp:// - rtspclnt takes over and tries to connect with the WMserver, but \
eventually lets asf_fileformat_net do the streaming<o:p></o:p></span></p> <p \
class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if \
!supportLists]><span style="font-family:&quot;Courier New&quot;"><span \
style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New \
Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span \
style="font-family:&quot;Courier New&quot;">http:// - http_filesystem is recognized \
as the preferred file system (as the URI has http as the protocol and it does not \
have an extension). Core loads httpfs and it fails after loading  corresponding file \
format (asf_fileformat_file) as it HXR_INVALID_FILE while reading the file header. \
</span><span style="font-size:10.0pt;font-family:&quot;Courier \
New&quot;">HXFileSource::InitDone</span><span style="font-family:&quot;Courier \
New&quot;"> receives this error and the same error is reported back to the controller \
and the playback ends with HXR_INVALID_FILE<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;">But if we have an WM extension with the \
URI, we don&#8217;t get into this situation for http:// URL as it is directly handled \
by asf_fileformat_net, as it claims the protocol-schema pair.<o:p></o:p></span></p> \
<p class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;">This CR addresses this use-case to make \
it work by trying with mms:// when http:// fails to stream the \
content.<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Solution:&nbsp; \
<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;">Changes in Core:<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;"><o:p>&nbsp;</o:p></span></p> <p class="MsoListParagraph" \
style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span \
style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><span \
style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New \
Roman&quot;">&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span \
style="font-size:10.0pt;font-family:&quot;Courier New&quot;">HXFileSource::InitDone \
receives the error and Reports the error<o:p></o:p></span></p> <p \
class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if \
!supportLists]><span style="font-size:10.0pt;font-family:&quot;Courier \
New&quot;"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New \
Roman&quot;">&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span \
style="font-size:10.0pt;font-family:&quot;Courier New&quot;">In \
HXPlayer::ReportError, if the error is HXR_INVALID_FILE, then we attemp a \
ProtocolSwitch based on the current URI (from http:// to <a \
href="mms://">mms://</a>)<o:p></o:p></span></p> <p class="MsoListParagraph" \
style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span \
style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><span \
style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New \
Roman&quot;">&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span \
style="font-size:10.0pt;font-family:&quot;Courier New&quot;">If its possible to do \
so, then communicate the controller about possible protocol switch so that controller \
can prepare itself for the same<o:p></o:p></span></p> <p class="MsoListParagraph" \
style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span \
style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><span \
style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New \
Roman&quot;">&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span \
style="font-size:10.0pt;font-family:&quot;Courier New&quot;">Reopen the new \
URI<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Changes in \
(Symbian) Controller:<o:p></o:p></span></p> <p class="MsoListParagraph" \
style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span \
style="font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">-<span \
style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; \
</span></span></span><![endif]><span style="font-family:&quot;Courier \
New&quot;">While in Buffering state, if we get HXR_PROTOCOL_SWITCH_MESSAGE \
information message from the core, then don&#8217;t change the state to ERROR as we \
are expecting re-attempt by core with protocol  switch<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if \
!supportLists]><span style="font-family:&quot;Courier New&quot;"><span \
style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New \
Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span \
style="font-family:&quot;Courier New&quot;">While in Buffering state, change state to \
CLOSED after receiving OnStop, only if we are not waiting on protocol \
switch<o:p></o:p></span></p> <p class="MsoListParagraph" \
style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span \
style="font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">-<span \
style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; \
</span></span></span><![endif]><span style="font-family:&quot;Courier \
New&quot;">Communicate Playback/Prepare complete (OnPresentationClosed) to the \
application unless we are we are waiting on protocol switch<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;">I have introduced a new helix error code \
(HXR_PROTOCOL_SWITCH_MESSAGE) for the same and a corresponding Symbian error code \
(KErrExpectingProtocolSwitch)<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Diff: \
&lt;attached&gt;<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Files \
added:&nbsp; None<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Files \
modified:&nbsp; <o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;">/cvsroot/client/core/hxplay.cpp<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;">/cvsroot/client/core/pub/hxplay.h<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;">/cvsroot/common/include/hxresult.h<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier \
New&quot;">/cvsroot/clientapps/symbianMmf/hxmmfstatectrl.cpp<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;">/cvsroot/clientapps/symbianMmf/hxmmfstatectrl.h<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;">/cvsroot/clientapps/symbianMmf/hxmmfstatepaused.cpp<o:p></o:p></span></p> \
<p class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;">/cvsroot/clientapps/symbianMmf/hxmmfstatepaused.h<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;">/cvsroot/clientapps/symbianMmf/videocontroller/hxmmfctrlimpl.cpp<o:p></o:p></span></p>
 <p class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;">Image size and heap use impact:&nbsp; \
Negligible<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Module release \
testing (STIF):&nbsp; Done<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Test case(s) \
added:&nbsp; No&nbsp; <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;">Memory leak check performed:&nbsp; \
NA<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;">Platforms and profiles build \
verified:&nbsp; helix-client-s60-52-mmf-mdf-dsp, \
helix-client-symbian-4<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Platforms and \
profiles functionality verified:&nbsp; armv5 <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;">Branch:&nbsp;420Brizo, \
HEAD<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span style="font-family:&quot;Courier \
New&quot;"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>


["Protocol_Switch_Changes.txt" (text/plain)]

Index: hxmmfstatectrl.cpp
===================================================================
RCS file: /cvsroot/clientapps/symbianMmf/hxmmfstatectrl.cpp,v
retrieving revision 1.32.12.17
diff -u -b -r1.32.12.17 hxmmfstatectrl.cpp
--- hxmmfstatectrl.cpp	23 Jun 2011 23:21:27 -0000	1.32.12.17
+++ hxmmfstatectrl.cpp	15 Aug 2011 23:53:26 -0000
@@ -151,10 +151,13 @@
 STDMETHODIMP
 HXMMFStateCtrl::OnPresentationClosed()
 {
-    TInt lError;
-    lError = m_pCurrentState->OnPresentationClosed();
+    TInt lError = m_pCurrentState->OnPresentationClosed();
+    //If we are expecting protocol switch to happen, then defer OnPresentationClosed \
callback +    if(lError != KErrExpectingProtocolSwitch)
+    {
     //tell MMF for playback complete
     m_pObserver->OnPresentationClosed();
+    }
 
     return(lError);
 }
Index: hxmmfstatectrl.h
===================================================================
RCS file: /cvsroot/clientapps/symbianMmf/hxmmfstatectrl.h,v
retrieving revision 1.19.12.11
diff -u -b -r1.19.12.11 hxmmfstatectrl.h
--- hxmmfstatectrl.h	23 Jun 2011 23:21:33 -0000	1.19.12.11
+++ hxmmfstatectrl.h	15 Aug 2011 23:53:26 -0000
@@ -80,6 +80,8 @@
 
 #define POST_SEEK_TIMER_VALUE  5000*1000  //5 seconds
 
+const TInt KErrExpectingProtocolSwitch = -3001;
+
 class HXMMFStateCtrl : public HXMMFState
                      , public IHXAccessPointSelector
                      , public IHXPropWatchResponse
Index: hxmmfstatepaused.cpp
===================================================================
RCS file: /cvsroot/clientapps/symbianMmf/hxmmfstatepaused.cpp,v
retrieving revision 1.15.14.1
diff -u -b -r1.15.14.1 hxmmfstatepaused.cpp
--- hxmmfstatepaused.cpp	12 Apr 2010 05:05:22 -0000	1.15.14.1
+++ hxmmfstatepaused.cpp	15 Aug 2011 23:53:26 -0000
@@ -57,6 +57,7 @@
 
 
 HXMMFStatePaused::HXMMFStatePaused(HXMMFStateCtrl *m_pCtrl, HXMMFPlayCtrl \
*pPlayerControl) +    : m_bExpectingProtocolSwitch(FALSE)
 {
     m_pPlayerControl = pPlayerControl;
     m_pStateCtrl = m_pCtrl;
@@ -153,11 +154,30 @@
     return(KErrNone);
 }
 
+STDMETHODIMP HXMMFStatePaused::OnPresentationClosed()
+{
+    HXLOGL3(HXLOG_SMMF, "HXMMFStatePaused::OnPresentationClosed()");
+    HX_RESULT retCode = KErrNotSupported;
+    if(m_bExpectingProtocolSwitch)
+    {
+        HXLOGL3(HXLOG_SMMF, "HXMMFStatePaused::OnPresentationClosed() Waiting for \
Protocol Switch"); +        //Overwrite the default error code
+        retCode = KErrExpectingProtocolSwitch;
+        //Reset the flag now
+        m_bExpectingProtocolSwitch = FALSE;
+    }
+
+    return(retCode);
+}
 
 STDMETHODIMP
 HXMMFStatePaused::OnStop()
 {
     HXLOGL2(HXLOG_SMMF, "HXMMFStatePaused::OnStop");
+    //If we are waiting on Protocol Switch to happen, then don't change the current \
state +    if(!m_bExpectingProtocolSwitch)
+    {
     m_pStateCtrl->ChangeState(STATE_CLOSED);
+    }
 
     return(KErrNone);
 }
@@ -198,6 +216,12 @@
             m_setPositionSent = TRUE;
         }
     }
+    else if(ulHXCode == HXR_PROTOCOL_SWITCH_MESSAGE && unSeverity == HXLOG_INFO && \
ulUserCode == HXR_OK) +    {
+        //We are expecting a protocol switch to happen. So don't error-out
+        m_bExpectingProtocolSwitch = TRUE;
+        HXLOGL2(HXLOG_SMMF, "HXMMFStatePaused::ErrorOccurred - We are expecting a \
protocol switch to happen"); +    }
     else
     {
         m_pStateCtrl->ChangeState(STATE_ERROR);
Index: hxmmfstatepaused.h
===================================================================
RCS file: /cvsroot/clientapps/symbianMmf/hxmmfstatepaused.h,v
retrieving revision 1.6.14.1
diff -u -b -r1.6.14.1 hxmmfstatepaused.h
--- hxmmfstatepaused.h	12 Apr 2010 05:05:54 -0000	1.6.14.1
+++ hxmmfstatepaused.h	15 Aug 2011 23:53:26 -0000
@@ -63,6 +63,7 @@
     virtual ~HXMMFStatePaused();
 
     STDMETHOD(OnPresentationOpened) (THIS);
+    STDMETHOD(OnPresentationClosed) (THIS);
     STDMETHOD(OnStop) (THIS);
     STDMETHOD(OnBuffering) (THIS_ ULONG32 ulFlags, UINT16 unPercentComplete);
 	STDMETHOD(ErrorOccurred)    (THIS_
@@ -83,6 +84,7 @@
     UINT32 m_prebufferEnabled;
     HXBOOL m_setPositionSent;
     HXBOOL m_bfirstPlayHasBeenSent;
+    HXBOOL m_bExpectingProtocolSwitch;
   public:
 #ifdef HELIX_FEATURE_VIDEO_FRAME_STEP
     HX_RESULT StepFrames(TInt aStep);
Index: videocontroller/hxmmfctrlimpl.cpp
===================================================================
RCS file: /cvsroot/clientapps/symbianMmf/videocontroller/hxmmfctrlimpl.cpp,v
retrieving revision 1.91.4.20
diff -u -b -r1.91.4.20 hxmmfctrlimpl.cpp
--- videocontroller/hxmmfctrlimpl.cpp	15 Jul 2011 17:51:05 -0000	1.91.4.20
+++ videocontroller/hxmmfctrlimpl.cpp	15 Aug 2011 23:53:26 -0000
@@ -1297,6 +1297,11 @@
         m_pLogSink->LogMessage( KMMFROPErrorLogRTSP, pUserString );
 #endif        
     }
+    else if(ulHXCode == HXR_PROTOCOL_SWITCH_MESSAGE && unSeverity == HXLOG_INFO && \
ulUserCode == HXR_OK) +    {
+        //Do Nothing, as its not an "Error"
+        HXLOGL2(HXLOG_SMMF, "HXMMFCtrlImpl::OnError(HXR_PROTOCOL_SWITCH_MESSAGE) - \
Do Nothing, as its not an Error"); +    }
     else
     {
         // Hold the last error code. But if the error code is sent to TLC, it
Index: hxresult.h
===================================================================
RCS file: /cvsroot/common/include/hxresult.h,v
retrieving revision 1.55.14.1
diff -u -b -r1.55.14.1 hxresult.h
--- hxresult.h	15 Feb 2011 09:16:21 -0000	1.55.14.1
+++ hxresult.h	15 Aug 2011 23:54:58 -0000
@@ -325,6 +325,7 @@
 #define HXR_PE_RTSP_VERSION_NOT_SUPPORTED            MAKE_HX_RESULT(1,SS_RTSP,32)    \
// 800406a0  #define HXR_PE_OPTION_NOT_SUPPORTED                  \
MAKE_HX_RESULT(1,SS_RTSP,33)    // 800406a1  #define HXR_RTSP_RESP_SINK_MESSAGE       \
MAKE_HX_RESULT(0,SS_RTSP,34)    // 000406a2 +#define HXR_PROTOCOL_SWITCH_MESSAGE      \
MAKE_HX_RESULT(0,SS_RTSP,35)    // 000406a3  
 #define HXR_AUDIO_DRIVER                MAKE_HX_RESULT(1,SS_AUD,0)                  \
// 80040100  #define HXR_LATE_PACKET                 MAKE_HX_RESULT(1,SS_AUD,1)       \
// 80040101

Index: hxplay.cpp
===================================================================
RCS file: /cvsroot/client/core/hxplay.cpp,v
retrieving revision 1.200.8.1.2.7
diff -u -b -r1.200.8.1.2.7 hxplay.cpp
--- hxplay.cpp	29 Jul 2011 14:41:47 -0000	1.200.8.1.2.7
+++ hxplay.cpp	16 Aug 2011 00:18:01 -0000
@@ -6370,14 +6370,80 @@
         goto cleanup;
     }
 #endif /* HELIX_FEATURE_NEXTGROUPMGR */
-
+    if(theErr == HXR_INVALID_FILE && pURL)
+    {
+        //If we have failed with first protocol/filesystem try with a protocol \
switch before failing +        if(CanWeTryProtocolSwitch(pURL))
+        {
+            //Report to the sink controller about the possible protocol switch \
message +            ActualReport(HXLOG_INFO, HXR_PROTOCOL_SWITCH_MESSAGE, HXR_OK, \
pUserString, NULL); +            HXLOGL2(HXLOG_CORE, "HXPlayer::ReportError() Trying \
another attempt with Protocol Switch"); +            theErr = \
OpenRequest(m_pRequest); +        }
+    }
+    if(FAILED(theErr))
+    {
     Report(HXLOG_ERR, theErr, HXR_OK, pUserString, NULL);
+    }
 
 cleanup:
 
     return;
 }
 
+/*
+ * If the url has http as the protocol with no extention in the url, then core tries \
with normal http file system + * And if that fails (it does, in case of url with http \
protocol and the contents is wm without extension) + * then we have another chance to \
make it play by changing the schema/protocol to mms + */
+HXBOOL HXPlayer::CanWeTryProtocolSwitch(CHXURL* pHxURL)
+{
+    HXBOOL canWe = FALSE;
+    const char* pURL = pHxURL->GetURL();
+    //Search for "http" protocol in the begining of the URI
+    if(pURL && strncmp(pURL, "http", 4) == 0)
+    {
+        //Read content name out of the URI and check whether it has an file \
extension +        CHXString theUrl(pURL);
+        CHXString contentName;
+        char delim = '/';
+        ULONG32 numFields = theUrl.CountFields(delim);
+        if(numFields > 1)
+        {
+            contentName = theUrl.NthField(delim, numFields);
+            INT32 extensionIndex = contentName.Find('.');
+            if(extensionIndex == -1)
+            {
+                canWe = TRUE;
+                /*
+                * Current http URI does not have an extension
+                * We have tried with normal http file system and failed
+                * So, try with other (wm) http file system now
+                */
+                const char* pScheme = "http";
+                const char fifthChar = theUrl.GetAt(4);
+                //if its "httpt"
+                if(fifthChar == 't')
+                {
+                    pScheme = "httpt";
+                }
+                //if its "httpu"
+                else if(fifthChar == 'u')
+                {
+                    pScheme = "httpu";
+                }
+                //Prepare the URI for the fallback (re)attempt
+                theUrl.FindAndReplace(pScheme, "mms");
+                m_pRequest->SetURL(theUrl);
+                m_pRequest->SetResponseHeaders(NULL);
+                m_pRequest->GetURL(pURL);
+            }
+        }
+    }
+
+    return canWe;
+}
+
 HX_RESULT HXPlayer::InitializeNetworkDrivers(void)
 {
 #if defined(HELIX_FEATURE_PLAYBACK_NET)
Index: pub/hxplay.h
===================================================================
RCS file: /cvsroot/client/core/pub/hxplay.h,v
retrieving revision 1.69.8.1.2.2
diff -u -b -r1.69.8.1.2.2 hxplay.h
--- pub/hxplay.h	8 Jul 2011 13:44:53 -0000	1.69.8.1.2.2
+++ pub/hxplay.h	16 Aug 2011 00:18:02 -0000
@@ -2302,6 +2302,9 @@
     STDMETHODIMP SetPlayRangeEndTime( UINT32 ulEndTime );
 #endif
 
+private:
+    HXBOOL CanWeTryProtocolSwitch(CHXURL* pURL);
+
 public:
     HXBOOL FindSharedWallClocks(const char* pClockName, void*& ppValue)
 	    {


["ATT00001.txt" (text/plain)]

_______________________________________________
Clientapps-dev mailing list
Clientapps-dev@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/clientapps-dev


_______________________________________________
Clientapps-dev mailing list
Clientapps-dev@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/clientapps-dev


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

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