Posts: 3,077
Joined: Jun 2009
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.
Posts: 3,077
Joined: Jun 2009
Well seems no one knows
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.
Posts: 3,077
Joined: Jun 2009
Well well well
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
I know that HTTP Api is no more supported but since JSON will be finished for eden what is the way for dharma ?
Posts: 3,077
Joined: Jun 2009
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.
This one is with External player
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
Posts: 57
Joined: Aug 2010
Reputation:
0
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.
Posts: 3,077
Joined: Jun 2009
Well i hope someone will find the reason
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
Posts: 57
Joined: Aug 2010
Reputation:
0
How do you detect MPC? Did you find a way by the JSON api?
Posts: 3,077
Joined: Jun 2009
No
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
Posts: 57
Joined: Aug 2010
Reputation:
0
If you're on windows I guess you could use DSPlayer instead of mpc-hc
Posts: 3,077
Joined: Jun 2009
Well the problem is that i don't do that for me
There a big community of users that use XBMC + MPCHC, and some have asked me to support that in Yatse
Posts: 599
Joined: Jan 2010
Reputation:
3
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.
Posts: 3,077
Joined: Jun 2009
Will json suffer from this too ?
Or since it's multi threaded it will be better ?
And if there's a way to detect external player from json to stop hammering the web server it would be cool
Since usually when a media is playing remote does ask every second to get position
and a 1 sec delay in this case cause some problems :p