Author Topic: Xine_Player: what is it really doing?  (Read 6872 times)

MarcoZan

  • Veteran
  • ***
  • Posts: 148
    • View Profile
Xine_Player: what is it really doing?
« on: November 26, 2007, 11:08:16 pm »
Hi all

I'm facing the following issue with Xine_player on my EPIA M10000 MD:

when I start playback of any kind of video (DVD or DivX) things go smooth for a while, then playback tends to stutter and progressively gets worst.

If I play the very same DVD or DivX on the very same MD but ith Xine (i.e NOT from within LMCE) playback is fine from the beginning till the end.

So it is definitely something that has NOT to do with MD, but has surely to do with Xine_player.

By looking at what top says during playback, i've noticed that Xine_player is eating some 50% CPU in the beginning, and progressively tends to eat more and more CPU hitting also 80%.

When Xine plays the very same movie on the very same box outside LMCE it sticks around some 50 - 55% CPU load and never moves higher.

Of course when I play movies on my hybrid things are always good (definitely more horse-power) but on a 1Ghz box this kind of increasing CPU load negatively impacts on video performances.

My EPIA MD has a CLE266 Integrated Graphics with Viaarena Unichrome Pro drivers (compiled as per totallymaxed advice found on this forum), so it is not a matter of bad drivers or missing video acceleration.

To be honest this issue has been present also in some releases of Pluto, so it is something that LMCE inherited from its ancestor.

In the past I've always managed to play my media avoiding Xine_player and launching Xine with custom scripts that I manually fired in Computing section, but this turns to be quite annoying.

My question is: what is supposed to do Xine_player?
To my knowledge (but I can be easily wrong) it should be a kind of a xine gui controlled by LMCE, that manages to call xine libraries in order to perform media playback.

But what else is it doing to eat that much of extra CPU?

Is this issue something that developers are already aware of?

On a recent post from Fiire GM I've read the following:

Quote
Further, Fiire sponsors 2 full time developers who work on LinuxMCE.  We have offered the LinuxMCE team a bunch of new code, which will likely be in the 0710 release, to now support HD-DVD and Blu-Ray, which will be part of our new 1080p FiireStation due out next month. This was *not* a trivial task by any means. It required re-writing a bunch of code in LinuxMCE to use MPlayer instead of Xine.  And our developers are now working on adding support for HD-DVD menus, sub titles and audio tracks in mplayer under the GPL, which will benefit not only LinuxMCE, but all MPlayer users.

Should I assume that actually Xine is beeing totally replaced by MPlayer starting from 0710, so my question about Xine_player has come a bit late?

TIA
Reagards
Marco


totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Xine_Player: what is it really doing?
« Reply #1 on: November 27, 2007, 11:01:43 am »
Hi all

I'm facing the following issue with Xine_player on my EPIA M10000 MD:

when I start playback of any kind of video (DVD or DivX) things go smooth for a while, then playback tends to stutter and progressively gets worst.

If I play the very same DVD or DivX on the very same MD but ith Xine (i.e NOT from within LMCE) playback is fine from the beginning till the end.

So it is definitely something that has NOT to do with MD, but has surely to do with Xine_player.

By looking at what top says during playback, i've noticed that Xine_player is eating some 50% CPU in the beginning, and progressively tends to eat more and more CPU hitting also 80%.

When Xine plays the very same movie on the very same box outside LMCE it sticks around some 50 - 55% CPU load and never moves higher.

Of course when I play movies on my hybrid things are always good (definitely more horse-power) but on a 1Ghz box this kind of increasing CPU load negatively impacts on video performances.

My EPIA MD has a CLE266 Integrated Graphics with Viaarena Unichrome Pro drivers (compiled as per totallymaxed advice found on this forum), so it is not a matter of bad drivers or missing video acceleration.

To be honest this issue has been present also in some releases of Pluto, so it is something that LMCE inherited from its ancestor.

In the past I've always managed to play my media avoiding Xine_player and launching Xine with custom scripts that I manually fired in Computing section, but this turns to be quite annoying.

My question is: what is supposed to do Xine_player?
To my knowledge (but I can be easily wrong) it should be a kind of a xine gui controlled by LMCE, that manages to call xine libraries in order to perform media playback.

But what else is it doing to eat that much of extra CPU?

Is this issue something that developers are already aware of?

On a recent post from Fiire GM I've read the following:

Quote
Further, Fiire sponsors 2 full time developers who work on LinuxMCE.  We have offered the LinuxMCE team a bunch of new code, which will likely be in the 0710 release, to now support HD-DVD and Blu-Ray, which will be part of our new 1080p FiireStation due out next month. This was *not* a trivial task by any means. It required re-writing a bunch of code in LinuxMCE to use MPlayer instead of Xine.  And our developers are now working on adding support for HD-DVD menus, sub titles and audio tracks in mplayer under the GPL, which will benefit not only LinuxMCE, but all MPlayer users.

Should I assume that actually Xine is beeing totally replaced by MPlayer starting from 0710, so my question about Xine_player has come a bit late?

TIA
Reagards
Marco



Hmmm... we don't see that when using our Via based MD's for media playback. So I my thinking is that it is something to do with your installation.

My understanding is that for HD content playback @ 1080p mPlayer delivers much smoother playback. The xine_player is a wrapper for xine.

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: Xine_Player: what is it really doing?
« Reply #2 on: December 04, 2007, 01:50:46 am »
The question of Xine's role (vs MPlayer's) in LMCE v0710 came up in another thread "Appliance vs Package vs Distro", and I pushed it a little further, including pointing discussion back to this thread.

chrisbirkinshaw

  • Guru
  • ****
  • Posts: 431
    • View Profile
Re: Xine_Player: what is it really doing?
« Reply #3 on: December 04, 2007, 06:24:42 pm »
Is there any documentation anywhere which describes how Xine_player take the audio output setting in the admin interface and uses this to select an alsa output device?

I am desperately trying to get Xine to output 5.1 via my ADAT out on device hw:0,1 but having little luck modifying /etc/asound.conf. I am also trying to tell xine that I have a 5.1 setup and that it should decode AC3/DTS but it seems Xine_Player rewrites the config.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Xine_Player: what is it really doing?
« Reply #4 on: December 04, 2007, 06:33:05 pm »
Xine_Player is a DCE device.

This means, it uses the DCE data that's inside the database, to determine its initialization paramters. These are exposed via the Device Template for the Xine Player, and are set in the device fields for the installed Xine Player underneath the appropriate Orbiter in the Devices page.

-Thom

chrisbirkinshaw

  • Guru
  • ****
  • Posts: 431
    • View Profile
Re: Xine_Player: what is it really doing?
« Reply #5 on: December 04, 2007, 07:28:20 pm »
So at the moment the Xine_player template has a parameter no 74 which is called the alsa output device. This is however currently set with "Allowed to modify" unticked. I wonder why this is unticked?

I am still confused:

1. How does Xine_Player know that when it gets parameter 74 sent at initialisation this sets the alsa output device? Is this hard coded into the app?

2. If I wanted to add a parameter for speaker setup (e.g. 5.1, 4.0, 2.0 etc) with id xxx would this mapping have to be hard coded into the Xine_Player wrapper?

3. Same question as above but if I wanted to add a new keyboard -> command mapping

Thanks,

Chris

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Xine_Player: what is it really doing?
« Reply #6 on: December 04, 2007, 07:39:14 pm »
you need to look at how C++ DCE devices are generated, because Xine_Player is a C++ DCE device.

Initially, if I want to create a new device, I define everything the device is going to need on the Device Template for that device. I then run DCEGen with the device template I wish to generate code for. This creates a set of C++ files in your development source tree to compile your device, as well as some generics. You then have to run sql2cpp in the same folder to generate needed files to extract the parameter information from the database that you specified.

but once this is done, you'll see a bunch of stub functions, with log indicators that indicate that you need to implement these things. One of these little bits of code, is implemetned for the parameter you're asking for.

Basically, Xine_Player wraps around libxine (as does every other Xine based player such as Totem, or xine-ui), and implements the appropriate code for each command, filling in parameters from the device data as needed from the individual data fields, using a default specified in the template if all else fails. It does NOT use xine_ui! .. read that again... It does NOT use xine_ui! ... read that again... IT DOES NOT USE XINE_UI. so if you're thinking "I'll implement a command to send a keystroke g for full screen." you're going in the wrong direction for the Xine_Player, because it is, in itself, its own player, much in the same way, Totem is.

-Thom

So at the moment the Xine_player template has a parameter no 74 which is called the alsa output device. This is however currently set with "Allowed to modify" unticked. I wonder why this is unticked?

I am still confused:

1. How does Xine_Player know that when it gets parameter 74 sent at initialisation this sets the alsa output device? Is this hard coded into the app?

2. If I wanted to add a parameter for speaker setup (e.g. 5.1, 4.0, 2.0 etc) with id xxx would this mapping have to be hard coded into the Xine_Player wrapper?

3. Same question as above but if I wanted to add a new keyboard -> command mapping

Thanks,

Chris


jetrich

  • Veteran
  • ***
  • Posts: 58
    • View Profile
Re: Xine_Player: what is it really doing?
« Reply #7 on: December 04, 2007, 08:40:06 pm »
Is there any documentation anywhere which describes how Xine_player take the audio output setting in the admin interface and uses this to select an alsa output device?

I am desperately trying to get Xine to output 5.1 via my ADAT out on device hw:0,1 but having little luck modifying /etc/asound.conf. I am also trying to tell xine that I have a 5.1 setup and that it should decode AC3/DTS but it seems Xine_Player rewrites the config.

I found a solution and posted here http://forum.linuxmce.org/index.php?topic=2921.msg15003#msg15003.

My results are with an A8N-E mobo with the CK804 chipset, however I believe at least some of the info is relevant regardless of mobo used. I can now rerun the AV Wizard and the sound works each time.

I believe the most important steps were to change the audio settings as I documented
here http://wiki.linuxmce.org/index.php/Sound_Cards#NVidia_CK804
and here http://wiki.linuxmce.org/index.php/Sound_Cards#xine.conf

LMCE overwrote my audio configurations (asound.conf) yet my spdif output still functions.

Hopefully that helps.

--Jason
Silverstone LC20M (silver)
Fiire Chief
Asus A8N-E
AMD Athlon 64 3200+
Skystar 2
Hauppauge WinTV-PVR 150 MCE
PNY 7300GT
Sony XL1B3
Sherwood RVD-6090 (needs replaced)
32" RCA SDTV

MarcoZan

  • Veteran
  • ***
  • Posts: 148
    • View Profile
Re: Xine_Player: what is it really doing?
« Reply #8 on: December 08, 2007, 06:14:42 pm »
Ok, Xine_Player is a DCE device that wraps libxine.

My point is slightly different indeed.

It was already clear that Xine_Player was a wrapper for libxine (a sort of Xine ui designed for LMCE), but as such I'm trying to understand what other special functions this device is offering to justify the consistent CPU overhead compared to other Xine-Ui.

I can understand that interfacing DVD menu and piping them to orbiters can be a nasty task and may be resource consuming, but normal playback should not introduce any extra CPU load.

As this is consistently happening and having relevant impact to small sized MD, my question is:

is this overhead due to some special feature that LMCE can't do without, or is it due to some bug/bad design?

Another point is that Xine_Player is using its own version of Xine. In fact we can find 2 series of libxine sitting on our systems: one comes from "vanilla" Xine installed with Kubuntu, and the other one is installed by LMCE.
It was like this since early Pluto days, and the reason for this was that "custom" version of Xine contained some patch to use VDR.

What are actual plans related to this?
Is this "xine duplication " going to continue, or are there plans to merge into a single libxine installation?

TIA and regards
Marco






totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Xine_Player: what is it really doing?
« Reply #9 on: December 08, 2007, 07:27:08 pm »
Another point is that Xine_Player is using its own version of Xine. In fact we can find 2 series of libxine sitting on our systems: one comes from "vanilla" Xine installed with Kubuntu, and the other one is installed by LMCE.
It was like this since early Pluto days, and the reason for this was that "custom" version of Xine contained some patch to use VDR.

What are actual plans related to this?
Is this "xine duplication " going to continue, or are there plans to merge into a single libxine installation?

TIA and regards
Marco

Xine has never been 'patched' for VDR... the 'special' version of xine is to support some features in media playback. As to whether that will remain the case I cant say.
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk