Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add little/big endian check #25

Open
wants to merge 1 commit into
base: ros2
Choose a base branch
from
Open

Add little/big endian check #25

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Aug 25, 2021

This will use the system little/big endian status to set the value of endianness in rosimagesrc_set_msg_props_from_caps_string(). It's slightly better than just guessing.

@BrettRD
Copy link
Owner

BrettRD commented Aug 25, 2021

Thanks for flagging that!

looking through the format enums gstreamer knows of, many of them can specify the endianness there.
The format enum should have a good idea of what the caps endianness is, that allows the user to specify the endianness in a caps string and then run a big-endian stream on a little-endian machine.

gst_video_format_get_info can unpack the enum into a data structure, GST_VIDEO_FORMAT_INFO_IS_LE will check if the caps is little endian.

That would save us from having to test behaviour of undefined operations

@ghost
Copy link
Author

ghost commented Aug 25, 2021

Good catch. Will resubmit patch to use that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant