WIP Stereoscopic 3D support for half/full SBS, over/under, etc
(2014-01-06, 06:24)giftie Wrote: As da-anda had stated, you should be able to query the Stereopic setting using JSONRPC.

For Example:
{"jsonrpc": "2.0", "method": "Settings.GetSettingValue",  "params": { "setting": "videoscreen.stereoscopicmode" }, "id": 1}
This gives the setting from the video screen settings
Hello giftie,

Reading the current Stereoscopic mode has been implemented with a bit different json that gives the actual string of the mode instead of emun. As has been explained earlier - enums may change, while strings should not.

import xbmc
import simplejson

def getStereoscopicMode():
    query = '{"jsonrpc": "2.0", "method": "GUI.GetProperties", "params": {"properties": ["stereoscopicmode"]}, "id": 1}'
    result = xbmc.executeJSONRPC(query)
    json = simplejson.loads(result)
    print json
    ret = 'unknown'
    if json.has_key('result'):
        if json['result'].has_key('stereoscopicmode'):
            if json['result']['stereoscopicmode'].has_key('mode'):
                ret = json['result']['stereoscopicmode']['mode'].encode('utf-8')
    #"off", "split_vertical", "split_horizontal", "row_interleaved", "hardware_based", "anaglyph_cyan_red", "anaglyph_green_magenta", "monoscopic"
    return ret

Now the problem is on actual detection of the change event.

da-anda Wrote:@Pavel unfortunately there is no way around polling atm. Or you check only on playback start/stop which should be announced in python

Hello da-anda,

Polling with jsonrpc querying is an overkill.
Only checking Play/Stop announcements is limiting addon functionality as Stereoscopic mode can be changed after Playback has started OR in System settings directly.

I can stick with a combination of both polling and Play/Stop announcements, but that is a workaround only.
Having announcement from StereoscipicManager would be perfect solution. Cheers

Messages In This Thread
RE: Stereoscopic 3D support for half/full SBS, over/under, etc - by pavel.kuzub - 2014-01-06, 15:39
Intel® InTru™ 3D support - by acidizer - 2014-01-26, 12:47

Logout Mark Read Team Forum Stats Members Help
Stereoscopic 3D support for half/full SBS, over/under, etc11
This forum uses Lukasz Tkacz MyBB addons.