List Info

Thread: CR: Helix sending target-time=0 in 3gpp-adaptation header




CR: Helix sending target-time=0 in 3gpp-adaptation header
user name
2006-08-04 19:59:24

"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:
    carol.i.chennokia.com

Reviewed by:

Date:
    8-4-2006

Error ID:
    TSW ID=EJZG-6RKSX5

Project:
    Helix plugin for Symbian

Synopsis:
    When setting up 3gpp-adaptation headers, we send the buffer size and target time
values. In the SETUP in RTSP chat, we are sending target-time of 0. Currently there's
no "AdaptationTargetTime" defined in Prefs, so the target time is calculated based on
Preroll and PostDecodeDelay from the stream header. However, these values can be zero
as well (esp. before renderer is setup), and when that happens, the value going out
with the SETUP message is 0. (It is later updated in the PLAY message, but we still
shouldn't be sending 0 in SETUP.) In HXRAIStreamInfo::Init(), it's actually first set
to 1s, but when constructing RTSP message, HXRAIStreamInfo::Get3gpTargetTime() is
called and that value overwritten. Borrowing the same logic in Init(), I default
Preroll to 1s if it's 0 in the header. I also added a check if the target-time value
has been read from Prefs (and is non-zero), so it need not be read again each time
Get3gpTargetTime() is called.
    Preferred value of 10s for AdaptationTargetTime is added in config file.

Files Modified:
    protocol\rtsp\rateadaptinfo.cpp
    clientapps\symbiancommon\config\R1_Mobile_4_0_Factory.cfg   

Files Added:
    none

Image Size and Heap Use impact:
    none

Platforms and Profiles Build Verified:
    armv5 / helix-client-s60-mmf-mdf-dsp

Platforms and Profiles Functionality verified:
    armv5 / helix-client-s60-mmf-mdf-dsp

Branch:
    HEAD, hxclient_2_1_0_cayennes and hxclient_1_5_0_cayenne





Index: rateadaptinfo.cpp
===================================================================
RCS file: /cvsroot/protocol/rtsp/rateadaptinfo.cpp,v
retrieving revision 1.12.8.2
diff -u -w -r1.12.8.2 rateadaptinfo.cpp
--- rateadaptinfo.cpp   12 Apr 2006 23:24:45 -0000 ;     1.12.8.2
+++ rateadaptinfo.cpp   4 Aug 2006 19:39:29 -0000
-98,6 +98,7
     UINT16 m_uStreamNumber;
     UINT32 m_ulBufferSize;
     mutable UINT32 m_ulTargetTime;
+    HXBOOL m_bTargetTimeInPrefs;
     UINT32 m_ulReportFreq;
 };

-108,6 +109,7
     m_uStreamNumber(0),
     m_ulBufferSize(0),
     m_ulTargetTime(0),
+    m_bTargetTimeInPrefs(FALSE),
     m_ulReportFreq(0)
 {
 }
-246,6 +248,12

         m_ulTargetTime = ulPreroll + ulPostDecodeDelay;
     }
+    else
+    {
+        // m_ulTargetTime is set to a preferred value in Prefs. with this flag,
+        // we won't need to re-read from Prefs or recalculate target time later
+        m_bTargetTimeInPrefs = TRUE;
+    }

     // Compute the buffer size
     //
-340,11 +348,17
     ULONG32 ulPreroll    ;     = 0;
     ULONG32 ulTargetTime      = 0;

-    ReadPrefUINT32(m_pContext, "AdaptationTargetTime", ulTargetTime);
-    if (0 == ulTargetTime)
+    // We've already checked Prefs for AdaptationTargetTime in Init()
+    // if it wasn't in Prefs, then we calculate target time.
+    if (!m_bTargetTimeInPrefs)
     {
         m_pStreamHdr->GetPropertyULONG32("PostDecodeDelay", ulPostDecodeDelay);

         m_pStreamHdr->GetPropertyULONG32("Preroll";,         ulPreroll);
+        if (0 == ulPreroll)
+        {
+         ;   // Use default 1 sec preroll per 3gpp
+         ;   ulPreroll = 1000;
+        }
         m_ulTargetTime = ulPreroll + ulPostDecodeDelay;
     }
     m_ulTargetTime = HX_MIN(m_ulTargetTime, MAX_9DIGIT);


Index: R1_Mobile_4_0_Factory.cfg
===================================================================
RCS file: /cvsroot/clientapps/symbiancommon/config/R1_Mobile_4_0_Factory.cfg,v
retrieving revision 1.26.2.5
diff -u -w -r1.26.2.5 R1_Mobile_4_0_Factory.cfg
--- R1_Mobile_4_0_Factory.cfg   13 Jul 2006 02:06:36 -0000 ;     1.26.2.5
+++ R1_Mobile_4_0_Factory.cfg   4 Aug 2006 19:44:25 -0000
-55,6 +55,7
 LinkChar-GBW=32000
 LinkChar-MBW=40000
 LinkChar-MTD=2000
+AdaptationTargetTime=10000
 #Partial PlayBack values
 DisablePartialPlayback=0
 MinValidRendererReqd=1


CR: Helix sending target-time=0 in 3gpp-adaptationheader
user name
2006-08-07 13:19:45
These changes lookg good.

Eric 

> -----Original Message-----
> From: clientapps-dev-bounceshelixcommunity.org 
> [mailto:clientapps-dev-bounceshelixcommunity.org] On
Behalf 
> Of Carol.i.Chennokia.com
> Sent: Friday, August 04, 2006 3:59 PM
> To: protocol-devhelixcommunity.org; clientapps-devhelixcommunity.org
> Subject: [Clientapps-dev] CR: Helix sending
target-time=0 in 
> 3gpp-adaptationheader
> 
> "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: 
>     carol.i.chennokia.com 
> 
> Reviewed by: 
> 
> Date: 
>     8-4-2006 
> 
> Error ID: 
>     TSW ID=EJZG-6RKSX5 
> 
> Project: 
>     Helix plugin for Symbian 
> 
> Synopsis: 
>     When setting up 3gpp-adaptation headers, we send
the 
> buffer size and target time 
> values. In the SETUP in RTSP chat, we are sending
target-time 
> of 0. Currently there's 
> no "AdaptationTargetTime" defined in Prefs,
so the target 
> time is calculated based on 
> Preroll and PostDecodeDelay from the stream header.
However, 
> these values can be zero 
> as well (esp. before renderer is setup), and when that 
> happens, the value going out 
> with the SETUP message is 0. (It is later updated in
the PLAY 
> message, but we still 
> shouldn't be sending 0 in SETUP.) In
HXRAIStreamInfo::Init(), 
> it's actually first set 
> to 1s, but when constructing RTSP message, 
> HXRAIStreamInfo::Get3gpTargetTime() is 
> called and that value overwritten. Borrowing the same
logic 
> in Init(), I default 
> Preroll to 1s if it's 0 in the header. I also added a
check 
> if the target-time value 
> has been read from Prefs (and is non-zero), so it need
not be 
> read again each time 
> Get3gpTargetTime() is called. 
>     Preferred value of 10s for AdaptationTargetTime is
added 
> in config file. 
> 
> Files Modified: 
>     protocol\rtsp\rateadaptinfo.cpp 
>    
clientapps\symbiancommon\config\R1_Mobile_4_0_Factory.cfg
   
> 
> Files Added: 
>     none 
> 
> Image Size and Heap Use impact: 
>     none 
> 
> Platforms and Profiles Build Verified: 
>     armv5 / helix-client-s60-mmf-mdf-dsp 
> 
> Platforms and Profiles Functionality verified: 
>     armv5 / helix-client-s60-mmf-mdf-dsp 
> 
> Branch: 
>     HEAD, hxclient_2_1_0_cayennes and
hxclient_1_5_0_cayenne 
> 
> 
> 
> 
> 
> Index: rateadaptinfo.cpp 
>
============================================================
======= 
> RCS file: /cvsroot/protocol/rtsp/rateadaptinfo.cpp,v 
> retrieving revision 1.12.8.2 
> diff -u -w -r1.12.8.2 rateadaptinfo.cpp 
> --- rateadaptinfo.cpp   12 Apr 2006 23:24:45 -0000     
1.12.8.2 
> +++ rateadaptinfo.cpp   4 Aug 2006 19:39:29 -0000 
>  -98,6 +98,7  
>      UINT16 m_uStreamNumber; 
>      UINT32 m_ulBufferSize; 
>      mutable UINT32 m_ulTargetTime; 
> +    HXBOOL m_bTargetTimeInPrefs; 
>      UINT32 m_ulReportFreq; 
>  }; 
> 
>  -108,6 +109,7  
>      m_uStreamNumber(0), 
>      m_ulBufferSize(0), 
>      m_ulTargetTime(0), 
> +    m_bTargetTimeInPrefs(FALSE), 
>      m_ulReportFreq(0) 
>  { 
>  } 
>  -246,6 +248,12  
> 
>          m_ulTargetTime = ulPreroll +
ulPostDecodeDelay; 
>      } 
> +    else 
> +    { 
> +        // m_ulTargetTime is set to a preferred value
in 
> Prefs. with this flag, 
> +        // we won't need to re-read from Prefs or 
> recalculate target time later 
> +        m_bTargetTimeInPrefs = TRUE; 
> +    } 
> 
>      // Compute the buffer size 
>      // 
>  -340,11 +348,17  
>      ULONG32 ulPreroll         = 0; 
>      ULONG32 ulTargetTime      = 0; 
> 
> -    ReadPrefUINT32(m_pContext,
"AdaptationTargetTime", 
> ulTargetTime); 
> -    if (0 == ulTargetTime) 
> +    // We've already checked Prefs for
AdaptationTargetTime 
> in Init() 
> +    // if it wasn't in Prefs, then we calculate
target time. 
> +    if (!m_bTargetTimeInPrefs) 
>      { 
>         
m_pStreamHdr->GetPropertyULONG32("PostDecodeDelay&
quot;, 
> ulPostDecodeDelay); 
> 
>         
m_pStreamHdr->GetPropertyULONG32("Preroll",  
      
> ulPreroll); 
> +        if (0 == ulPreroll) 
> +        { 
> +            // Use default 1 sec preroll per 3gpp 
> +            ulPreroll = 1000; 
> +        } 
>          m_ulTargetTime = ulPreroll +
ulPostDecodeDelay; 
>      } 
>      m_ulTargetTime = HX_MIN(m_ulTargetTime,
MAX_9DIGIT); 
> 
> 
> Index: R1_Mobile_4_0_Factory.cfg 
>
============================================================
======= 
> RCS file: 
>
/cvsroot/clientapps/symbiancommon/config/R1_Mobile_4_0_Facto
ry.cfg,v 
> retrieving revision 1.26.2.5 
> diff -u -w -r1.26.2.5 R1_Mobile_4_0_Factory.cfg 
> --- R1_Mobile_4_0_Factory.cfg   13 Jul 2006 02:06:36
-0000    
>   1.26.2.5 
> +++ R1_Mobile_4_0_Factory.cfg   4 Aug 2006 19:44:25
-0000 
>  -55,6 +55,7  
>  LinkChar-GBW=32000 
>  LinkChar-MBW=40000 
>  LinkChar-MTD=2000 
> +AdaptationTargetTime=10000 
>  #Partial PlayBack values 
>  DisablePartialPlayback=0 
>  MinValidRendererReqd=1 
> 
> 
> 


_______________________________________________
Clientapps-dev mailing list
Clientapps-devhelixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/
clientapps-dev
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )