Lightspark, an innovative FLOSS Flash player, reaches Beta Status


More than a year has passed since the begin­ning of the Lightspark project. It was a long time indeed, but not wasted. I’m extremely pleased with the cur­rent level of sup­port and the robust­ness of the sys­tem. You may be won­der­ing “What the heck is lightspark?”, so let me intro­duce it.

Lightspark is an open source Adobe Flash imple­men­ta­tion, designed from the ground up to be effi­cient on cur­rent and (hope­fully) future hardware.

The long term objec­tive of this project is not only to deliver a free as in free­dom flash player, but also to give to the Flash tech­nol­ogy the dig­nity of a real open stan­dard. I really believe Flash is a pow­er­ful tech­nol­ogy, it’s main weak­ness being it’s closed­ness. Lightspark has been entirely designed after Adobe released the SWF file for­mat doc­u­men­ta­tion, so no reverse engi­neer­ing has been done.

Fea­tures

I’ll try to review and sum­ma­rize what as been done so far, and what is planned for the future.

Lightspark show­ing video. Pro­fil­ing graphs can be over­layed on the movie.

  • OpenGL based ren­der­ing allows for fast ren­der­ing of geome­tries and video frames. More­over, although those are not yet sup­ported, blur and other effects can be imple­mented using shaders for max­i­mum eff­i­cency. Using OpenGL tex­tures to dis­play video frames is a bit less eff­i­cent than using XVideo, but make it pos­si­ble to sup­port any overlaying/transformation effect that flash provides.
  • Mostly com­plete sup­port for the newer ver­sion of the flash script­ing lan­guage: Action­Script 3.0, intro­duced with Flash 9. Both an inter­preter and a JIT engine based on LLVM are pro­vided. The pre­vi­ous ver­sions of the lan­guage (sup­ported by Gnash, which does not sup­port 3.0) run on a com­pletely dif­fer­ent, and quite weird, vir­tual machine. Cur­rently Ligth­spark does not sup­port the older engine, but most sites (e.g, YouTube) are migrat­ing to the newer engine, so we will be fine just with 3.0
  • Beside the Vir­tual Machine Flash pro­vides a huge run­time libraries that ranges from Video Ren­der­ing ser­vices to XML pars­ing. Imple­men­ta­tion of the run­time is of course far from com­plete, but the archi­tec­ture of the VM makes it pos­si­ble to eas­ily imple­ment the var­i­ous objects in plain C++. More­over, an arbi­trary degree of mix­ing between VM gen­er­ated and C++ code is pos­si­ble. This means that func­tions can be called from what­ever con­text with­out wor­ry­ing about their origin.
  • A mozilla com­pat­i­ble plu­gin is pro­vided, I’ve spent a lot of time try­ing to make the code robust to unex­pected con­di­tions and it should fail grace­fully and dis­play a gen­tle mes­sage. But, as plu­g­ins runs inside the browser process, there a not-so-slight pos­si­bil­ity of crashes. Please report any crashes using the bug report­ing sys­tem of launchpad
  • As an added bonus, dur­ing devel­op­ment I’ve also added a cou­ple of inter­est­ing per­for­mance profiling/debugging fea­tures which are not pro­vided by the orig­i­nal Adobe player. Key­board short­cut can be used to enable a pro­fil­ing over­lay, and a prim­i­tive inspec­tor of the objects on screen
There­fore I declare lightspark to be in beta sta­tus! Now the most impor­tant thing that is still miss­ing is a nice Logo for the project. I’m very bad at art, so any con­tri­bu­tion is very wel­come. And of course the whole project, in a pure open phy­los­o­phy, is open to con­tri­bu­tion! To have a quick glance at the cur­rent sta­tus it is pos­si­ble to get lightspark pack­aged from our PPA on launch­pad.
Lightspark should fail in a clean way on unsupported Flash movies

Lightspark should fail in a clean way on unsup­ported Flash movies

, , ,

Lightspark, an innovative FLOSS Flash player, reaches Beta Status


More than a year has passed since the begin­ning of the Lightspark project. It was a long time indeed, but not wasted. I’m extremely pleased with the cur­rent level of sup­port and the robust­ness of the sys­tem. You may be won­der­ing “What the heck is lightspark?”, so let me intro­duce it.

Lightspark is an open source Adobe Flash imple­men­ta­tion, designed from the ground up to be effi­cient on cur­rent and (hope­fully) future hardware.

The long term objec­tive of this project is not only to deliver a free as in free­dom flash player, but also to give to the Flash tech­nol­ogy the dig­nity of a real open stan­dard. I really believe Flash is a pow­er­ful tech­nol­ogy, it’s main weak­ness being it’s closed­ness. Lightspark has been entirely designed after Adobe released the SWF file for­mat doc­u­men­ta­tion, so no reverse engi­neer­ing has been done.

Fea­tures

I’ll try to review and sum­ma­rize what as been done so far, and what is planned for the future.

Lightspark show­ing video. Pro­fil­ing graphs can be over­layed on the movie.

  • OpenGL based ren­der­ing allows for fast ren­der­ing of geome­tries and video frames. More­over, although those are not yet sup­ported, blur and other effects can be imple­mented using shaders for max­i­mum eff­i­cency. Using OpenGL tex­tures to dis­play video frames is a bit less eff­i­cent than using XVideo, but make it pos­si­ble to sup­port any overlaying/transformation effect that flash provides.
  • Mostly com­plete sup­port for the newer ver­sion of the flash script­ing lan­guage: Action­Script 3.0, intro­duced with Flash 9. Both an inter­preter and a JIT engine based on LLVM are pro­vided. The pre­vi­ous ver­sions of the lan­guage (sup­ported by Gnash, which does not sup­port 3.0) run on a com­pletely dif­fer­ent, and quite weird, vir­tual machine. Cur­rently Ligth­spark does not sup­port the older engine, but most sites (e.g, YouTube) are migrat­ing to the newer engine, so we will be fine just with 3.0
  • Beside the Vir­tual Machine Flash pro­vides a huge run­time libraries that ranges from Video Ren­der­ing ser­vices to XML pars­ing. Imple­men­ta­tion of the run­time is of course far from com­plete, but the archi­tec­ture of the VM makes it pos­si­ble to eas­ily imple­ment the var­i­ous objects in plain C++. More­over, an arbi­trary degree of mix­ing between VM gen­er­ated and C++ code is pos­si­ble. This means that func­tions can be called from what­ever con­text with­out wor­ry­ing about their origin.
  • A mozilla com­pat­i­ble plu­gin is pro­vided, I’ve spent a lot of time try­ing to make the code robust to unex­pected con­di­tions and it should fail grace­fully and dis­play a gen­tle mes­sage. But, as plu­g­ins runs inside the browser process, there a not-so-slight pos­si­bil­ity of crashes. Please report any crashes using the bug report­ing sys­tem of launchpad
  • As an added bonus, dur­ing devel­op­ment I’ve also added a cou­ple of inter­est­ing per­for­mance profiling/debugging fea­tures which are not pro­vided by the orig­i­nal Adobe player. Key­board short­cut can be used to enable a pro­fil­ing over­lay, and a prim­i­tive inspec­tor of the objects on screen
There­fore I declare lightspark to be in beta sta­tus! Now the most impor­tant thing that is still miss­ing is a nice Logo for the project. I’m very bad at art, so any con­tri­bu­tion is very wel­come. And of course the whole project, in a pure open phy­los­o­phy, is open to con­tri­bu­tion! To have a quick glance at the cur­rent sta­tus it is pos­si­ble to get lightspark pack­aged from our PPA on launch­pad.
Lightspark should fail in a clean way on unsupported Flash movies

Lightspark should fail in a clean way on unsup­ported Flash movies

, , ,