Skip to content

Conversation

@MaZderMind
Copy link
Contributor

fixes #182

@MaZderMind
Copy link
Contributor Author

It would be interesting to also retrieve the Enum-Values as String, but I don't have a good Idea how to nicely to the public API.

*/
package org.freedesktop.gstreamer.glib;

import static org.freedesktop.gstreamer.lowlevel.GObjectAPI.GOBJECT_API;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Import-Reordering happens automatically in IntelliJ and I'd have to reconfigure it to avoid it. If this is important to you, I can do this, but it would be simpler to just let IntelliJ format the File. This would also fix a lot of the Whitespasce-Issues that are in the Code and that I did not commit this time. How do you think about this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conversation in #163 still stands! Tell IntelliJ to leave it alone, or use a better IDE. 😉

@neilcsmith-net
Copy link
Member

Thanks, but I'm not sure this is the right approach. We need something more generic here, I think, probably built around https://gstreamer.freedesktop.org/documentation/gstreamer/gstvalue.html?gi-language=c#gst_value_deserialize I started a wider refactor of GValue support, but maybe something short term we can get in - maybe setAsString / getAsString.

@MaZderMind
Copy link
Contributor Author

Would you mind explaining what 'more generic here' means to you? More generic way to set any Property from any Input, by removing the existing switch/case within set and replacing it with something around gst_value_deserialize?

@neilcsmith-net
Copy link
Member

That any property type should be settable by using a String as the Java value, and that ideally you should be able to get the String back again somehow. I'm not talking specifically about removing the if/else (not switch) chain particularly by that, although that is also on my agenda as it's replicated (badly) in different places.

@MaZderMind
Copy link
Contributor Author

#190 certainly looks like the better implementation. Closing this one.

@MaZderMind MaZderMind closed this Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set Enum-Properties on Elements by their literal Name

2 participants