Another Day, Another Release

Yes, releasing MPRIS Tester 1.3 a day after 1.2 is a bit ridiculous, but Fred Emmott pointed out a serious flaw for a D-Bus interface tester program: the type for the MPRIS Version field was wrong.  It should have been a struct of two uint16s, but instead I had it as two ints.

For safety, I’ve also specified that the status field is comprised of 4 int32s, rather than simply ints.  I hear tell of one (C, admittedly) compiler that implements ints as 24 bits…

About these ads

5 Responses to “Another Day, Another Release”

  1. Kevin Krammer Says:

    Isn’t there a D-Bus introspection file for the interface which allows generating the Interfaces/Adaptors, i.e. letting the code generator decide which native type it will use?

  2. randomguy3 Says:

    Yeah… for some reason, I had an incorrect copy. I think it possibly came from Amarok, and I don’t know where that one came from. Certainly Amarok had the same issue, which I’ve also fixed.

    The other issue is that Qt’s code-generation tool can’t cope with simple structs, like a struct of ints. So you have to write the marshalling and demarshalling code yourself, which means interpreting the introspection file yourself.

  3. Sturmflut Says:

    An int is usually as long as a single CPU register on your platform. There are indeed CPUs (like some DSPs) that use 24 Bit registers.

  4. Kevin Krammer Says:

    You can use annotations to allow Qt to generate the correct C++ types.
    When they map to usual types (QPoint, QRect, etc) this is all you will need.

  5. randomguy3 Says:

    Yes, but a struct of ints isn’t a standard Qt type…

    Which I suppose is why you have to write your own marshalling code.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: