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

reapply yuv encoding deprecation #257

Open
wants to merge 4 commits into
base: rolling
Choose a base branch
from

Conversation

christianrauch
Copy link
Contributor

@christianrauch christianrauch commented Sep 8, 2024

This reapplies #247 with fixes for MSVC.

With ros2/rviz#1276 there are no references to the deprecated encodings yuv422 or yuv422_yuy2 left in the core packages (https://github.com/ros2/ros2/blob/rolling/ros2.repos).

Requires:

@ahcorde
Copy link
Contributor

ahcorde commented Sep 9, 2024

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@clalancette
Copy link
Contributor

I'm going to be perfectly frank; I'm not sure that this is worth putting in. The simple fact is that these encodings are not standardized anywhere. And I am fine having two aliases for the same thing. Finally, this PR adds in a lot of #ifdef cruft. The combination of all of these things says to me that this is making work for not a lot of gain.

That said, this is just my opinion, and I'm not going to fight hard for it. If others think that this is much clearer, then I'm not going to put up a fuss about it.

@christianrauch christianrauch marked this pull request as ready for review October 3, 2024 11:10
@christianrauch christianrauch requested a review from tfoote as a code owner October 3, 2024 11:10
@christianrauch
Copy link
Contributor Author

@ahcorde With ros2/rviz#1276 now merged, can you run the CI again?

#else
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
Copy link
Member

Choose a reason for hiding this comment

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

For the sake of maintenance, can we scope down where the ifdef/pragmas are required?

I think we could use a function like:

static inline bool isPackedYUV(const std::string& encoding)

That contains the deprecation suppression, and then use that in the other functions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you also want to use isPackedYUV as a public function? Eventually, the deprecated encodings will be removed. If this is a functionality that is supposed to be exposed to a user and used often, then I can add a isPackedYUV. But doing this just for the more narrow scoping of the encodings is a maintenance overhead IMHO.

@christianrauch
Copy link
Contributor Author

@ahcorde Can you run the CI again?

@ahcorde
Copy link
Contributor

ahcorde commented Dec 2, 2024

Pulls: #257
Gist: https://gist.githubusercontent.com/ahcorde/3c3c497d78d15771820e5f1fe05e4d21/raw/ed0296b88c82fce76a31bf4360771600ef5803e1/ros2.repos
BUILD args: --packages-above-and-dependencies common_interfaces --packages-above-and-dependencies common_interfaces
TEST args: --packages-above common_interfaces --packages-above common_interfaces
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/14885

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

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.

4 participants