[vlc-devel] JSON-RPC

Lukasz M lukasz.m.luki at gmail.com
Mon Sep 19 23:58:20 CEST 2011


I want to create some advanced subtitles editor working with VLC. I
want to make it as separate application (at least for now, maybe some
day some integration come too). I checked interfaces, like telnet,
provided by VLC and it is not very convinient to use. Of course it is
all ok as a "human interface", but in event based applications like QT
applications it is not very handy.

I've made new interface with implementation of JSON-RPC 2.0 protocol.
API is very limited so far, I focused more on module's engine, not on
wide API.
I attached patch with some test file.

To compile it you need to configure VLC with --enable-jsonrpc
To start VLC with this interface vlc --extraintf jsonrpc

When you start it you can connect with telnet on port 4213 and copy
paste some commands from test file.

JSON-RPC protocol is described here:

Unfortunately, link to JSON-RPC 2.0 spec is not working recently.
Some most important information are available on wikipedia tho.


I'm sending it now and I hope you enjoy this idea as general.
I believe you will have some remarks etc, but I would like some
feedback if you gonna merge it.

I started to make JSON-RPC over HTTP already, but I postponed it. It
will take some work and I prefer to know if you are intereseted.
For my own purpose I can skip HTTP at this moment.

I also moved some protocol specific code to separate file (json_rpc.c)
It will make posible to make another protocols like XML-RPC with minimal work.

I hope I mentioned all important things, if you have any remarks or
doubts then let me know :)

BTW, I tested it on linux only. I hope some buildbreak won't come on
other platforms, but I left it as disabled by default.

Best Regards,
Lukasz Marek.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vlc.diff.gz
Type: application/x-gzip
Size: 30114 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110919/7a011894/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vlc_test
Type: application/octet-stream
Size: 4443 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110919/7a011894/attachment.obj>

More information about the vlc-devel mailing list