Check if external player is used
#1
Hello,

For Yatse i've got some demand on implementing MPC remote support.
But is there a way via http api or json to know when an external player is in use or not ? (Well is playing would be better since a user can use mpc only for some kinds of media)

Tolriq.
Reply
#2
Well seems no one knows Sad

For the moment the best way i found is that via http api and getcurrently, the duration seems to always be 00:01 with external players.
Reply
#3
Well well well Sad

It also seems that when using an external player the http api gets suddenly a 1 sec delay in all request rendering the api unusable Sad

I know that HTTP Api is no more supported but since JSON will be finished for eden what is the way for dharma ?
Reply
#4
I use mpc-hc as my external player for *.ts files and I haven't noticed the delay in the HTTP api. Yes the time and duration are wrong but this can be retrieved from the mpc-hc web interface (http://localhost:13579/status.html).

I use mpc-hc because it can use FFDShow and this allows bitstreaming of DTS-HD MA to my amplifier.
Reply
#5
Well i know for the data and i use the mpc web interface to get correct one.

But the lag is here and real.

The proof with firefox and firebug to show that it does not come from my code or something.

Image
This one is with External player


Image
This one is with internal player

As you can see there's 939ms of waiting XBMC. It's sometimes goes down to 500 but most of the time it's in this zone.

I use same computer same movie, and the computer is a Q9650 with 8 Go of RAM and ATI 4870 so not a performance issue.

Screenshots are in french but Attente = Waiting Smile
Reply
#6
I agree that the response is slower but I can't explain it. I traced the http api call and it takes about the same length of time in libhttpapi (5-10ms). So it looks like somehow the ExternalPlayer code is causing the delay, not the http api.
Reply
#7
Well i hope someone will find the reason Smile

For the moment i stop requesting HTTPAPI when i detect MPC. But if somenone use HTTPAPI and use MPC without webinterface activated or another player i can't do anything Sad
Reply
#8
How do you detect MPC? Did you find a way by the JSON api?
Reply
#9
No Sad

But via httpapi and the getcurrenltyplaying when using external player the duration field is always 00:01.

Since movies / series of 1 sec should not exists i use that Smile
Reply
#10
If you're on windows I guess you could use DSPlayer instead of mpc-hc
Reply
#11
Well the problem is that i don't do that for me Smile

There a big community of users that use XBMC + MPCHC, and some have asked me to support that in Yatse Smile
Reply
#12
The 1s delay is normal. When an external player is launched, fps drop to 1 (in order to save resources for the external player): webserver's requests are handled once per second.
AndroIRC - Best IRC client for Android!
Reply
#13
Will json suffer from this too ?
Or since it's multi threaded it will be better ? Smile

And if there's a way to detect external player from json to stop hammering the web server it would be cool Smile

Since usually when a media is playing remote does ask every second to get position Smile and a 1 sec delay in this case cause some problems :p
Reply

Logout Mark Read Team Forum Stats Members Help
Check if external player is used0