JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC
Mizaki
Fan Joined: Apr 2011 Reputation: 12 |
2012-04-12 14:09
Post: #1881
Thanks for the update. Hope you had a good holiday
|
| find quote |
joethefox
Team-XBMC Member Joined: Nov 2010 Reputation: 15 |
2012-04-17 21:25
Post: #1882
If the ActivePlayer is the video player (id=1) if I make this kind of request (to open a picture)
{"method":"Player.Open","id":-111891377,"jsonrpc":"2.0","params":{"item":{"file":"/path/to/image.jpg"}}} xbmc crash. Regardless of whether the request is correct or not, I think this should not happen. linux xbmc version eden 11 stable compiled 7 april 2012.
(This post was last modified: 2012-04-17 21:26 by joethefox.)
|
| find quote |
doozer
Junior Member Posts: 32 Joined: Jun 2011 Reputation: 0 |
2012-04-22 08:36
Post: #1883
Hi All,
In Eden (11.0), when you insert a DVD in a local optical drive, you get get a new menu item appearing on the homepage called "PLAY DISC". Selecting this starts playback of the DVD (or brings up the DVD menu system). How can I: a) detect a dvd has been inserted (I don't seem to get any kind of notification via JSON); and b) how do you play said DVD? The only way I can think to play the dvd is to allow the user to browse the "video" files via the 'Files.GetSources' request. I suspect i'm over thinking it and there's a much simpler method? Thanks in advance, Matt. |
| find quote |
Montellese
Team-XBMC Developer Joined: Jan 2009 Reputation: 20 Location: Switzerland |
2012-04-22 09:52
Post: #1884
(2012-04-17 21:25)joethefox Wrote: If the ActivePlayer is the video player (id=1) if I make this kind of request (to open a picture)Will have to try and reproduce this myself. Can you please create a bug report on trac and CC me so I won't forget? Thanks. And BTW a debug log and crash log (if available) would be nice. (2012-04-22 08:36)doozer Wrote: Hi All,First of all there's no notification for when a DVD was inserted. And I also don't think that there's currently a way to play a disc. This would be possible if there would be a "dvd://" VFS path in XBMC but AFAIK there isn't. Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |
joethefox
Team-XBMC Member Joined: Nov 2010 Reputation: 15 |
2012-04-22 10:29
Post: #1885
(2012-04-22 09:52)Montellese Wrote: Can you please create a bug report on trac and CC me so I won't forget? Thanks. And BTW a debug log and crash log (if available) would be nice. done http://trac.xbmc.org/ticket/12947 . GDB Backtrace included. EDIT: sunday morning coders rocks . Thank you.EDIT2: just tested and confirmed that the issue is solved.
(This post was last modified: 2012-04-22 12:02 by joethefox.)
|
| find quote |
doozer
Junior Member Posts: 32 Joined: Jun 2011 Reputation: 0 |
2012-04-22 11:49
Post: #1886
(2012-04-22 09:52)Montellese Wrote:(2012-04-17 21:25)joethefox Wrote: If the ActivePlayer is the video player (id=1) if I make this kind of request (to open a picture)Will have to try and reproduce this myself. Can you please create a bug report on trac and CC me so I won't forget? Thanks. And BTW a debug log and crash log (if available) would be nice. Thanks for the quick reply. Is this something I can request for a future version? |
| find quote |
Montellese
Team-XBMC Developer Joined: Jan 2009 Reputation: 20 Location: Switzerland |
2012-04-22 11:51
Post: #1887
(2012-04-22 11:49)doozer Wrote: Thanks for the quick reply. Sure create a feature request ticket on trac and describe what you would like to be able to do. Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |
Mizaki
Fan Joined: Apr 2011 Reputation: 12 |
2012-04-29 15:24
Post: #1888
I want to display the stream details (codecs etc) of the currently playing file and it seems you have to use either Player.GetItem for video or Player.GetProperties for music. So:
Code: {"jsonrpc":"2.0","id":2,"method":"Player.GetProperties","params":{ "playerid":0,"properties":["speed", "shuffled", "repeat", "subtitleenabled", "time", "totaltime", "position", "currentaudiostream"] } }Code: {"jsonrpc": "2.0", "method": "Player.GetItem", "params": { "properties": ["title", "album", "artist", "duration", "thumbnail", "file", "fanart", "streamdetails"], "playerid": 0 }, "id": 1}It makes sense that Player.GetItem gives me all the streams for video but doesn't make sense (to me) that I get nothing for music. It also doesn't make sense (again to me) that Player.GetProperties currentaudiosteam is empty for videos. What I'd like to see is Player.GetProperties returning the current video as well (so a currentvideostream, a videostreams to keep it consistent with audio) and Player.GetItem streamdetails returning the audio streams of audio files. Hopefully that makes sense. If you agree I'll create a ticket (bug or feature?). |
| find quote |
Montellese
Team-XBMC Developer Joined: Jan 2009 Reputation: 20 Location: Switzerland |
2012-04-29 16:19
Post: #1889
Hm Player.GetProperties should work for videos as well. I just tested your example request (replaced the "playerid" though) and both "currentaudiostream" as well as "audiostreams" (which is not part of your request) work perfectly fine for me:
Code: {Player.GetItem does not have any streamdetails for music because XBMC doesn't store those at all. See the details you can retrieve for songs using AudioLibrary.GetSongs. There's no "streamdetails" property or anything remotely similar. Concerning "currentvideostream" and "videostreams": I'm not really fond of this idea because probably 99% (in my case 100%) of the videos only have a single video stream. You need to use Player.GetItem anyway to retrieve things properties like "title" etc so you can also retrieve the videostream from the "streamdetails" property. The only reason for "currentaudiostream", "audiostreams", "currentsubtitle" and "subtitles" is because the player allows to change them using Player.SetAudioStream and Player.SetSubtitle. Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |
Mizaki
Fan Joined: Apr 2011 Reputation: 12 |
2012-04-29 17:43
Post: #1890
Okay, you're right about Player.GetProperties. I think I must have been watching Live TV. Sorry about that, put it down to a Sunday.
|
| find quote |

![[Image: watched-clearlogo.jpg]](http://trakt.tv/user/jinxy/widget/watched-clearlogo.jpg)
![[Image: badge.gif]](http://www.ohloh.net/projects/9132/badge.gif)
. Thank you.
Search
Help