List Info

Thread: CR: Multi-threads support for helix dbus-server




CR: Multi-threads support for helix dbus-server
user name
2007-11-23 06:14:33

Synopsis:

    Some functions of Helix dbus-server may be called by multi-threads. Add some protection here.

    Support change gdk windows for playback

    Some update for fastforward/fastwind

   

Overview:

    Some functions of Helix dbus-server may be called by multi-threads/different threads. Add some protection here.

    For example:

        Create a new thread to do hxplayer_pump() doesn't work well on Atlas branch; since Helix engine is not thread-safe.

        We have added an API Pump() for Helix dbus-server, higher level media application can call Pump() to do it.

       

    1> during the period of creating a player instance, run hxplayer_pump() will lead to some crash, add a flag bInitialized

       to avoid the collision – only after the player has finished its initialization, hxplayer_pump() can work.

    2> multi-threads call into hxplayer_pump() will lead to some crash.

       Disable the internal thread doing hxplayer_pump() by define the macro _ENABLE_INTERNAL_PUMP to 0.

    3> higher level media application could give Helix dbus-server different gdk windows to render to,

       Add some code in hxplayer_init() to re-create the player if higher level application give another xid.

    4> update velocity capability interface before call fast forward/rewind.

 I have tried to update this interface in OnTitleChange(), however that doesn't work, it seems the capability interface hasn't been updated at that time.

       

Files Added:

       No file added

Files Modified:

    hxplayer.h: (player/kit/dbus-server/pub/hxplayer.h)

        #define _ENABLE_INTERNAL_PUMP 0 to disable thread to do hxplayer_pump()

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

        UpdateVelocityCaps before set playback speed.

        Remove hxplayer_pump_end in helix_dbus_server_free() and helix_dbus_server_handle_player_free

           ; because the following hxplayer_free() will do this.

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

        Add bInitialized in struct HxPlayer to avoid collision for multi-threads.

        Re-creat a player if higher level application give a different gdk window (xid) to render to.

        Use _ENABLE_INTERNAL_PUMP to disable internal thread doing hxplayer_pump()

       

       

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 >

 &nbsp; 2. ; &nbsp; &nbsp; Intel has signed and delivered a Joint Copyright Assignment

 &nbsp; &nbsp; &nbsp; &nbsp;   to RealNetworks, and received acknowledgment that the

 &nbsp; &nbsp; &nbsp; &nbsp;   agreement was received.

Files Attached:

 &nbsp;  helix-dbus-server.diff

 

ZHAO, Halley (Aihua)

Email: halley.zhaointel.com" title="mailto:hui.xueintel.com">intel.com

Tel: +86(21)61166476

iNet: 8821-6476

SSG/OTC/UMD

 

  
RE: Re-Send CR: Multi-threads support for helix dbus-server
user name
2007-11-27 20:59:59

Re-send the letter since I have got any feed back yet.

BR

 


From: Zhao, Halley
Sent: 2007
1123 20:15
To: 'helix-client-devhelixcommunity.org'
Cc: 'player-devhelixcommunity.org'; Zhao, Halley; Shen, Cathy
Subject: [Helix-Client-dev] CR: Multi-threads support for helix dbus-server

 

Synopsis:

 &nbsp;  Some functions of Helix dbus-server may be called by multi-threads. Add some protection here.

 &nbsp;  Support change gdk windows for playback

 &nbsp;  Some update for fastforward/fastwind

 &nbsp; 

Overview:

 &nbsp;  Some functions of Helix dbus-server may be called by multi-threads/different threads. Add some protection here.

 &nbsp;  For example:

 &nbsp; &nbsp; &nbsp;  Create a new thread to do hxplayer_pump() doesn't work well on Atlas branch; since Helix engine is not thread-safe.

 &nbsp; &nbsp; &nbsp;  We have added an API Pump() for Helix dbus-server, higher level media application can call Pump() to do it.

 &nbsp; &nbsp; &nbsp; 

 &nbsp;  1> during the period of creating a player instance, run hxplayer_pump() will lead to some crash, add a flag bInitialized

 &nbsp;  &nbsp;  to avoid the collision – only after the player has finished its initialization, hxplayer_pump() can work.

 &nbsp;  2> multi-threads call into hxplayer_pump() will lead to some crash.

 &nbsp; &nbsp; &nbsp; Disable the internal thread doing hxplayer_pump() by define the macro _ENABLE_INTERNAL_PUMP to 0.

 &nbsp;  3> higher level media application could give Helix dbus-server different gdk windows to render to,

 &nbsp; &nbsp; &nbsp; Add some code in hxplayer_init() to re-create the player if higher level application give another xid.

 &nbsp;  4> update velocity capability interface before call fast forward/rewind.

 I have tried to update this interface in OnTitleChange(), however that doesn't work, it seems the capability interface hasn't been updated at that time.

 &nbsp; &nbsp; &nbsp; 

Files Added:

 &nbsp; &nbsp; &nbsp; No file added

Files Modified:

 &nbsp;  hxplayer.h: (player/kit/dbus-server/pub/hxplayer.h)

 &nbsp; &nbsp; &nbsp;  #define _ENABLE_INTERNAL_PUMP 0 to disable thread to do hxplayer_pump()

 &nbsp;  helix-dbus-server.cpp: (player/dbus-server/src/helix-dbus-server.cpp)

 &nbsp; &nbsp; &nbsp;  UpdateVelocityCaps before set playback speed.

 &nbsp; &nbsp; &nbsp;  Remove hxplayer_pump_end in helix_dbus_server_free() and helix_dbus_server_handle_player_free

 &nbsp; &nbsp; &nbsp; &nbsp;   ; because the following hxplayer_free() will do this.

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

 &nbsp; &nbsp; &nbsp;  Add bInitialized in struct HxPlayer to avoid collision for multi-threads.

 &nbsp; &nbsp; &nbsp;  Re-creat a player if higher level application give a different gdk window (xid) to render to.

 &nbsp; &nbsp; &nbsp;  Use _ENABLE_INTERNAL_PUMP to disable internal thread doing hxplayer_pump()

 &nbsp; &nbsp; &nbsp; 

 &nbsp; &nbsp; &nbsp; 

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

 &nbsp;  little

Platforms and Profiles Affected:

 &nbsp;  platform:&nbsp;  linux-2.2-libc6-gcc32-i586

 &nbsp;  profile:&nbsp; &nbsp; helix-client-all-defines

 

Distribution Libraries Affected:

 &nbsp;  &lt;helix-dbus-server.bin>

Distribution library impact and planned action:

 &nbsp;  &lt;None>

Platforms and Profiles Build Verified:

 &nbsp;  Set BIF branch  -> hxdbus_3_1_0_atlas

 &nbsp;  Set Target(s) &nbsp; -> dbus_server_with_video

 &nbsp;  Set Profile &nbsp; &nbsp; -> helix-client-all-defines

 &nbsp;  System ID  ; &nbsp; &nbsp; -> linux-2.2-libc6-gcc32-i586

Branch:

 &nbsp;  HEAD, hxclient_3_1_0_atlas

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

 &nbsp; 2. ; &nbsp; &nbsp; Intel has signed and delivered a Joint Copyright Assignment

 &nbsp; &nbsp; &nbsp; &nbsp;   to RealNetworks, and received acknowledgment that the

 &nbsp; &nbsp; &nbsp; &nbsp;   agreement was received.

Files Attached:

 &nbsp;  helix-dbus-server.diff

 

ZHAO, Halley (Aihua)

Email: halley.zhaointel.com" title="mailto:hui.xueintel.com">intel.com

Tel: +86(21)61166476

iNet: 8821-6476

SSG/OTC/UMD

 

RE: Re-Send CR: Multi-threadssupport for helix dbus-server
country flaguser name
United States
2007-11-28 08:04:11
These changes looked good to me.

=============================================
Eric Hyche (ehychereal.com)
Technical Lead
RealNetworks, Inc.  

> -----Original Message-----
> From: player-dev-bounceshelixcommunity.org 
> [mailto:player-dev-bounceshelixcommunity.org] On
Behalf Of 
> Zhao, Halley
> Sent: Tuesday, November 27, 2007 10:00 PM
> To: Zhao, Halley; helix-client-devhelixcommunity.org
> Cc: Shen, Cathy; player-devhelixcommunity.org
> Subject: [Player-dev] RE: [Helix-Client-dev] Re-Send
CR: 
> Multi-threadssupport for helix dbus-server
> 
> Re-send the letter since I have got any feed back yet.
> 
> BR
> 
>  
> 
> ________________________________
> 
> From: Zhao, Halley 
> Sent: 2007$BG/(B11$B7n(B23$BF|(B 20:15
> To: 'helix-client-devhelixcommunity.org'
> Cc: 'player-devhelixcommunity.org'; Zhao, Halley; Shen,
Cathy
> Subject: [Helix-Client-dev] CR: Multi-threads support
for 
> helix dbus-server
> 
>  
> 
> Synopsis: 
> 
>     Some functions of Helix dbus-server may be called
by 
> multi-threads. Add some protection here.
> 
>     Support change gdk windows for playback
> 
>     Some update for fastforward/fastwind
> 
>     
> 
> Overview: 
> 
>     Some functions of Helix dbus-server may be called
by 
> multi-threads/different threads. Add some protection
here.
> 
>     For example:
> 
>         Create a new thread to do hxplayer_pump()
doesn't 
> work well on Atlas branch; since Helix engine is not
thread-safe.
> 
>         We have added an API Pump() for Helix
dbus-server, 
> higher level media application can call Pump() to do
it.
> 
>         
> 
>     1> during the period of creating a player
instance, run 
> hxplayer_pump() will lead to some crash, add a flag
bInitialized 
> 
>        to avoid the collision - only after the player
has 
> finished its initialization, hxplayer_pump() can work.
> 
>     2> multi-threads call into hxplayer_pump() will
lead to 
> some crash.
> 
>        Disable the internal thread doing
hxplayer_pump() by 
> define the macro _ENABLE_INTERNAL_PUMP to 0.
> 
>     3> higher level media application could give
Helix 
> dbus-server different gdk windows to render to, 
> 
>        Add some code in hxplayer_init() to re-create
the 
> player if higher level application give another xid.
> 
>     4> update velocity capability interface before
call fast 
> forward/rewind.
> 
>  I have tried to update this interface in
OnTitleChange(), 
> however that doesn't work, it seems the capability
interface 
> hasn't been updated at that time.
> 
>         
> 
> Files Added:
> 
>        No file added
> 
> Files Modified:
> 
>     hxplayer.h:
(player/kit/dbus-server/pub/hxplayer.h)
> 
>         #define _ENABLE_INTERNAL_PUMP 0 to disable
thread to 
> do hxplayer_pump()
> 
>     helix-dbus-server.cpp: 
> (player/dbus-server/src/helix-dbus-server.cpp)
> 
>         UpdateVelocityCaps before set playback speed.
> 
>         Remove hxplayer_pump_end in
helix_dbus_server_free() 
> and helix_dbus_server_handle_player_free
> 
>             because the following hxplayer_free() will
do this.
> 
>     hxplayer.cpp:
(player/kit/dbus-server/src/hxplayer.cpp)
> 
>         Add bInitialized in struct HxPlayer to avoid 
> collision for multi-threads.
> 
>         Re-creat a player if higher level application
give a 
> different gdk window (xid) to render to.
> 
>         Use _ENABLE_INTERNAL_PUMP to disable internal
thread 
> doing hxplayer_pump()
> 
>         
> 
>         
> 
> 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:
> 
>     helix-dbus-server.diff
> 
>  
> 
> ZHAO, Halley (Aihua)
> 
> Email: halley.zhaointel.com <mailto:aihua.zhaointel.com> 
> 
> Tel: +86(21)61166476
> 
> iNet: 8821-6476
> 
> SSG/OTC/UMD
> 
>  
> 
> 


_______________________________________________
Helix-client-dev mailing list
Helix-client-devhelixcommunity.org
http://lists.helixcommunity.org/mailman/listinf
o/helix-client-dev

RE: Re-Send CR: Multi-threadssupport for helix dbus-server
user name
2007-11-29 20:24:54
  Commit to Atlas310 and Head branches.
  BR
  
  >-----Original Message-----
  >From: Eric Hyche [mailto:ehychereal.com]
  >Sent: 2007年11月28日 22:04
  >To: Zhao, Halley; helix-client-devhelixcommunity.org
  >Cc: Shen, Cathy; player-devhelixcommunity.org
  >Subject: RE: [Player-dev] RE: [Helix-Client-dev]
Re-Send CR:
  >Multi-threadssupport for helix dbus-server
  >
  >
  >These changes looked good to me.
  >
  >=============================================
  >Eric Hyche (ehychereal.com)
  >Technical Lead
  >RealNetworks, Inc.
  >
  >> -----Original Message-----
  >> From: player-dev-bounceshelixcommunity.org
  >> [mailto:player-dev-bounceshelixcommunity.org] On Behalf Of
  >> Zhao, Halley
  >> Sent: Tuesday, November 27, 2007 10:00 PM
  >> To: Zhao, Halley; helix-client-devhelixcommunity.org
  >> Cc: Shen, Cathy; player-devhelixcommunity.org
  >> Subject: [Player-dev] RE: [Helix-Client-dev]
Re-Send CR:
  >> Multi-threadssupport for helix dbus-server
  >>
  >> Re-send the letter since I have got any feed
back yet.
  >>
  >> BR
  >>
  >>
  >>
  >> ________________________________
  >>
  >> From: Zhao, Halley
  >> Sent: 2007年11月23日 20:15
  >> To: 'helix-client-devhelixcommunity.org'
  >> Cc: 'player-devhelixcommunity.org'; Zhao,
Halley; Shen, Cathy
  >> Subject: [Helix-Client-dev] CR: Multi-threads
support for
  >> helix dbus-server
  >>
  >>
  >>
  >> Synopsis:
  >>
  >>     Some functions of Helix dbus-server may be
called by
  >> multi-threads. Add some protection here.
  >>
  >>     Support change gdk windows for playback
  >>
  >>     Some update for fastforward/fastwind
  >>
  >>
  >>
  >> Overview:
  >>
  >>     Some functions of Helix dbus-server may be
called by
  >> multi-threads/different threads. Add some
protection here.
  >>
  >>     For example:
  >>
  >>         Create a new thread to do
hxplayer_pump() doesn't
  >> work well on Atlas branch; since Helix engine
is not thread-safe.
  >>
  >>         We have added an API Pump() for Helix
dbus-server,
  >> higher level media application can call Pump()
to do it.
  >>
  >>
  >>
  >>     1> during the period of creating a
player instance, run
  >> hxplayer_pump() will lead to some crash, add a
flag bInitialized
  >>
  >>        to avoid the collision - only after the
player has
  >> finished its initialization, hxplayer_pump()
can work.
  >>
  >>     2> multi-threads call into
hxplayer_pump() will lead to
  >> some crash.
  >>
  >>        Disable the internal thread doing
hxplayer_pump() by
  >> define the macro _ENABLE_INTERNAL_PUMP to 0.
  >>
  >>     3> higher level media application could
give Helix
  >> dbus-server different gdk windows to render
to,
  >>
  >>        Add some code in hxplayer_init() to
re-create the
  >> player if higher level application give another
xid.
  >>
  >>     4> update velocity capability interface
before call fast
  >> forward/rewind.
  >>
  >>  I have tried to update this interface in
OnTitleChange(),
  >> however that doesn't work, it seems the
capability interface
  >> hasn't been updated at that time.
  >>
  >>
  >>
  >> Files Added:
  >>
  >>        No file added
  >>
  >> Files Modified:
  >>
  >>     hxplayer.h:
(player/kit/dbus-server/pub/hxplayer.h)
  >>
  >>         #define _ENABLE_INTERNAL_PUMP 0 to
disable thread to
  >> do hxplayer_pump()
  >>
  >>     helix-dbus-server.cpp:
  >> (player/dbus-server/src/helix-dbus-server.cpp)
  >>
  >>         UpdateVelocityCaps before set playback
speed.
  >>
  >>         Remove hxplayer_pump_end in
helix_dbus_server_free()
  >> and helix_dbus_server_handle_player_free
  >>
  >>             because the following
hxplayer_free() will do this.
  >>
  >>     hxplayer.cpp:
(player/kit/dbus-server/src/hxplayer.cpp)
  >>
  >>         Add bInitialized in struct HxPlayer to
avoid
  >> collision for multi-threads.
  >>
  >>         Re-creat a player if higher level
application give a
  >> different gdk window (xid) to render to.
  >>
  >>         Use _ENABLE_INTERNAL_PUMP to disable
internal thread
  >> doing hxplayer_pump()
  >>
  >>
  >>
  >>
  >>
  >> 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:
  >>
  >>     helix-dbus-server.diff
  >>
  >>
  >>
  >> ZHAO, Halley (Aihua)
  >>
  >> Email: halley.zhaointel.com
<mailto:aihua.zhaointel.com>
  >>
  >> Tel: +86(21)61166476
  >>
  >> iNet: 8821-6476
  >>
  >> SSG/OTC/UMD
  >>
  >>
  >>
  >>

_______________________________________________
Helix-client-dev mailing list
Helix-client-devhelixcommunity.org
http://lists.helixcommunity.org/mailman/listinf
o/helix-client-dev

[1-4]

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