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

List:       helix-player-dev
Subject:    [Player-dev] CR:Change preference initial time for dbus-server
From:       "Zheng, Huan" <huan.zheng () intel ! com>
Date:       2008-05-29 2:49:15
Message-ID: EFE0C8A50A5D94448E3C7DD762E4FAA201876085 () pdsmsx413 ! ccr ! corp ! intel ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


CR: Change preference initial time for dbus-server

Synopsis:

Change preference initial time

Overview: 

    Related bug 8256: can't config video size and text size in
.hxdbussvrrc file

    Currently, preference data initilization is on the dbus level, that
is preference data is initialed when dbus session is established, and
preference data is restored to disk when dbus session is closed. So,
after changed .hxdbussvrrc user have to restart dbus session to let it
take effect. But user may want preference data be initialed and take
effect when player is opened. So this patch changes preference data
initial and restore/release time, make it take effect on the player
level.

    So that user can just restart RP4Mid to let changing .hxdbussvrrc
take effect.

Files Added:


    None

Files Modified:

    helix-dbus-server-main.cpp:
(player/kit/dbus-server/src/helix-dbus-server-main.cpp)

         Remove preference data initial and restore/release code

    hxplayer.cpp: (player/kit/dbus-server/src/hxplayer.cpp)

         Add preference data initial and release code

Image Size and Heap Use impact (Client -Only):

    little

Platforms and Profiles Affected:

    platform:   linux-2.2-libc6-gcc32-i586

    profile:    helix-client-all-defines

Distribution Libraries Affected:

    <helix-dbus-server.bin>

Distribution library impact and planned action:

    <None>

Platforms and Profiles Build Verified:

    Set BIF branch  -> hxdbus_3_1_0_atlas

    Set Target(s)   -> dbus_server_with_video

    Set Profile     -> helix-client-all-defines

    System ID       -> linux-2.2-libc6-gcc32-i586

Branch: 

    HEAD, hxclient_3_1_0_atlas

Copyright assignment: <MUST be one of the following statements >

  2.      Intel has signed and delivered a Joint Copyright Assignment

           to RealNetworks, and received acknowledgment that the 

           agreement was received. 

Files Attached:

    pref_load.diff

 

Best Regards, Zheng, Huan(ZBT)

OTC/SSD/SSG

Intel Aisa-Pacific Research & Developement Ltd

Tel: 021-6116 6435

Inet: 8821 6435

Cub: 3W035

 


[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="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 11 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:&#23435;&#20307;;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:PMingLiU;
	panose-1:2 2 3 0 0 0 0 0 0 0;}
@font-face
	{font-family:"Palatino Linotype";
	panose-1:2 4 5 2 5 5 5 3 3 4;}
@font-face
	{font-family:Pristina;
	panose-1:3 6 4 2 4 4 6 8 2 4;}
@font-face
	{font-family:"\@&#23435;&#20307;";
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:"\@PMingLiU";
	panose-1:2 2 3 0 0 0 0 0 0 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.5pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Palatino Linotype";
	color:navy;
	font-weight:normal;
	font-style:normal;
	text-decoration:none none;}
 /* Page Definitions */
 @page Section1
	{size:595.3pt 841.9pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;
	layout-grid:15.6pt;}
div.Section1
	{page:Section1;}
-->
</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=ZH-CN link=blue vlink=purple style='text-justify-trim:punctuation'>

<div class=Section1 style='layout-grid:15.6pt'>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino Linotype";color:navy'>CR:
Change preference initial time for dbus-server<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>Synopsis:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino Linotype";color:navy'>Change
preference initial time<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>Overview: <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>&nbsp;&nbsp;&nbsp; Related bug 8256: can't config video size \
and text size in .hxdbussvrrc file<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>&nbsp;&nbsp;&nbsp; Currently, preference data initilization is \
on the dbus level, that is preference data is initialed when dbus session is \
established, and preference data is restored to disk when dbus session is closed. So, \
                after changed
.hxdbussvrrc user have to restart dbus session to let it take effect. But user
may want preference data be initialed and take effect when player is opened. So
this patch changes preference data initial and restore/release time, make it
take effect on the player level.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>&nbsp;&nbsp;&nbsp; So that user can just restart RP4Mid to let \
changing .hxdbussvrrc take effect.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino Linotype";color:navy'>Files
Added:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n \
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs \
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n \
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs \
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<o:p></o:p></span></font></p>


<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>&nbsp;&nbsp;&nbsp; None<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino Linotype";color:navy'>Files
Modified:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>&nbsp;&nbsp;&nbsp; helix-dbus-server-main.cpp:
(player/kit/dbus-server/src/helix-dbus-server-main.cpp)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Remove \
preference data initial and restore/release code<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
                Linotype";color:navy'>&nbsp;&nbsp;&nbsp;
hxplayer.cpp: (player/kit/dbus-server/src/hxplayer.cpp)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add preference \
data initial and release code<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino Linotype";color:navy'>Image
Size and Heap Use impact (Client -Only):<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>&nbsp;&nbsp;&nbsp; little<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>Platforms and Profiles Affected:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>&nbsp;&nbsp;&nbsp; platform:&nbsp;&nbsp; \
linux-2.2-libc6-gcc32-i586<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>&nbsp;&nbsp;&nbsp; profile:&nbsp;&nbsp;&nbsp; \
helix-client-all-defines<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>Distribution Libraries Affected:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>&nbsp;&nbsp;&nbsp; \
&lt;helix-dbus-server.bin&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>Distribution library impact and planned \
action:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>&nbsp;&nbsp;&nbsp; &lt;None&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>Platforms and Profiles Build \
Verified:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>&nbsp;&nbsp;&nbsp; Set BIF branch&nbsp; -&gt; \
hxdbus_3_1_0_atlas<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>&nbsp;&nbsp;&nbsp; Set Target(s)&nbsp;&nbsp; -&gt; \
dbus_server_with_video<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>&nbsp;&nbsp;&nbsp; Set Profile&nbsp;&nbsp;&nbsp;&nbsp; -&gt; \
helix-client-all-defines<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>&nbsp;&nbsp;&nbsp; System \
ID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&gt; \
linux-2.2-libc6-gcc32-i586<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>Branch: <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>&nbsp;&nbsp;&nbsp; HEAD, \
hxclient_3_1_0_atlas<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
                Linotype";color:navy'>Copyright
assignment: &lt;MUST be one of the following statements \
&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino Linotype";color:navy'>&nbsp;
2.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Intel has signed and delivered a Joint
Copyright Assignment<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to \
RealNetworks, and received acknowledgment that the <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
agreement was received. <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino Linotype";color:navy'>Files
Attached:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'>&nbsp;&nbsp;&nbsp; pref_load.diff<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino \
Linotype";color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Pristina><span lang=EN-US
style='font-size:10.5pt;font-family:Pristina;color:navy'>Best Regards, Zheng,
Huan(ZBT)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Pristina><span lang=EN-US
style='font-size:10.5pt;font-family:Pristina;color:navy'>OTC/SSD/SSG<o:p></o:p></span></font></p>


<p class=MsoNormal><font size=2 color=navy face=Pristina><span lang=EN-US
style='font-size:10.5pt;font-family:Pristina;color:navy'>Intel Aisa-Pacific
Research &amp; Developement Ltd<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Pristina><span lang=EN-US
style='font-size:10.5pt;font-family:Pristina;color:navy'>Tel: 021-6116 \
6435<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Pristina><span lang=EN-US
style='font-size:10.5pt;font-family:Pristina;color:navy'>Inet: 8821 \
6435</span></font><font color=navy face=&#23435;&#20307;><span lang=EN-US \
style='font-family:&#23435;&#20307;;color:navy'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Pristina><span lang=EN-US
style='font-size:10.5pt;font-family:Pristina;color:navy'>Cub: \
3W035</span></font><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=2 face="Times New Roman"><span \
lang=EN-US><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>


["pref_load.diff" (application/octet-stream)]

Index: dbus-server/src/helix-dbus-server-main.cpp
===================================================================
RCS file: /cvsroot/player/kit/dbus-server/src/helix-dbus-server-main.cpp,v
retrieving revision 1.2.2.9
diff -u -w -r1.2.2.9 helix-dbus-server-main.cpp
--- dbus-server/src/helix-dbus-server-main.cpp	24 Apr 2008 08:40:39 -0000	1.2.2.9
+++ dbus-server/src/helix-dbus-server-main.cpp	29 May 2008 02:38:25 -0000
@@ -89,9 +89,6 @@
     DBusError error;
     HelixDbusServer *server;
     const gchar *env_path;
-    char config_file[50];
-    sprintf(config_file, "%s/.hxdbussvrrc", getenv("HOME"));
-    normal_pref_init(config_file);
 
     if(!XInitThreads())
     {
@@ -173,7 +170,5 @@
     dbus_connection_setup_with_g_main(connection, g_main_loop_get_context(loop));
     g_main_loop_run(loop);
 
-    normal_pref_commit(config_file);
-    normal_pref_finish();
     exit(0);
 }
Index: dbus-server/src/hxplayer.cpp
===================================================================
RCS file: /cvsroot/player/kit/dbus-server/src/hxplayer.cpp,v
retrieving revision 1.2.2.29
diff -u -w -r1.2.2.29 hxplayer.cpp
--- dbus-server/src/hxplayer.cpp	16 May 2008 02:30:15 -0000	1.2.2.29
+++ dbus-server/src/hxplayer.cpp	29 May 2008 02:38:25 -0000
@@ -74,6 +74,7 @@
     guint pumpSourceID;
     bool bPump;
     int size_mode;
+    bool bPref_initialed;
 };
 struct TnPlayer {
     HxPlayer *thumb_nail_service;
@@ -564,6 +565,7 @@
     hxplayer->bInitialized =0;
     hxplayer->pumpSourceID = 0;
     hxplayer->size_mode = 0;
+    hxplayer->bPref_initialed = FALSE;
 
     ClientEngineSetCallbacks(&CLIENT_ENGINE_CALLBACKS);
 
@@ -617,6 +619,14 @@
         hxplayer_free(hxplayer);
     }    
 
+    if (!hxplayer->bPref_initialed)
+    {
+        char config_file[50];
+        sprintf(config_file, "%s/.hxdbussvrrc", getenv("HOME"));
+        normal_pref_init(config_file);
+        hxplayer->bPref_initialed = TRUE;
+    }
+	
     hxplayer->bInitialized =0;
     gdk_flush();
     pWrapForeignWindow = gdk_window_foreign_new(xid);
@@ -654,6 +664,8 @@
     {
         free(hxplayer->window);
         hxplayer->window = NULL;
+        normal_pref_finish(); //free all pref data
+        hxplayer->bPref_initialed = FALSE;
         return FALSE;
     }
     
@@ -873,6 +885,15 @@
     int state_bak = hxplayer->state;
     gpointer user_info_bak = hxplayer->user_info;
     
+    if (hxplayer->bPref_initialed)
+    {
+        char config_file[50];
+        sprintf(config_file, "%s/.hxdbussvrrc", getenv("HOME"));
+        normal_pref_commit(config_file);
+        normal_pref_finish();
+        hxplayer->bPref_initialed = FALSE;
+    }
+    
     memset(hxplayer,0,sizeof(HxPlayer));
     hxplayer->message_cb = message_cb_bak;
     hxplayer->signal_cb = signal_cb_bak;


_______________________________________________
Player-dev mailing list
Player-dev@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/player-dev


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

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