[MPlayer-dev-eng] The future of a GUI

Kevin DeKorte kdekorte at gmail.com
Mon Mar 14 18:42:09 CET 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/14/2011 11:18 AM, Reimar Döffinger wrote:
> On Mon, Mar 14, 2011 at 10:26:51AM -0600, Kevin DeKorte wrote:
>> For example if you ask for a property, the results come asynchronously,
>> sometimes this is ok, but other times it is just a pain to deal with.
>> Also, sometimes the information is out of date when you get it, which
>> sometimes leads to lags in the interface.
> 
> I think there is some critical information missing.
> Just moving the pipe into DBUS is not going to make it magically faster.
> IMHO either a move to DBUS would imply some other orthogonal change that
> really makes the difference or you're only imagining it will be faster :-)

Maybe not faster, but it will remove the async issues...

For example right now to get a property, I have to write into the input
pipe.

get_property volume

Then the output pipe reader has to wait for ANS_VOLUME to appear in the
stream. I then have to parse the data, and extract out the value.

And then I have to post an signal to do something with the data.


With dbus we could have it so that when you ask for the volume, you
would get it like a function call... I end up wrapping this stuff in
functions like request_int_value in plugin_dbus.cpp in gecko-mediaplayer.

Which the main part is something like this...

message = dbus_message_new_method_call(dest, path, "com.gnome.mplayer",
"GetVolume");

dbus_error_init(&error);

replymessage =
dbus_connection_send_with_reply_and_block(instance->connection, message,
- -1, &error);

if (dbus_error_is_set(&error)) {
    printf("Error message = %s\n", error.message);
}

dbus_message_get_args(replymessage, &error, DBUS_TYPE_INT32, &result,
DBUS_TYPE_INVALID);

Kinda messy I know, but then I know the result right then and I don't
have to mess with the async stuff.

I do this all the time with gecko-mediaplayer and gnome-mplayer and the
dbus interface is quite fast.


Kevin

- -- 
Get my public GnuPG key from
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7D0BD5D1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk1+U3EACgkQ6w2kMH0L1dFYlACeIRLS16yReNXW6P0wfxBl1CEY
eAYAnjJwk4P/KQ+BaLWm+79ws+HQsORl
=MiZl
-----END PGP SIGNATURE-----


More information about the MPlayer-dev-eng mailing list