Skip to content

Conversation

@Dan-Flores
Copy link
Contributor

@Dan-Flores Dan-Flores commented Nov 17, 2025

This PR resolves lints and other miscellaneous fixes:

  • use std::move on codec, pixel_format
  • update codec to std::string_view rather than std::string
  • remove unused exception in tryToValidateCodecOption()
  • Add None as default in ops.py
  • Move extra_options to be keyword param in video_encoder.py

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 17, 2025
@Dan-Flores Dan-Flores marked this pull request as ready for review November 17, 2025 14:04
VideoStreamOptions videoStreamOptions;
videoStreamOptions.codec = codec;
videoStreamOptions.pixelFormat = pixel_format;
videoStreamOptions.codec = std::move(codec);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you share the lint warning related to that? I'm surprised we need std::move for codec and pixel_format but not for preset?

Made me realize we should make this a string_view like the rest, instead of a string. Same below in the other function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This comes from clang-tidy:
parameter 'codec' is passed by value and only copied once; consider moving it to avoid unnecessary copies.
Perhaps because preset can be an int, the lint is not raised?

we should make this a string_view like the rest, instead of a string

Thanks for catching this, I'll update this PR

#include <cstdint>
#include <sstream>
#include <string>
#include <utility>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you double check whether that's needed?

@Dan-Flores Dan-Flores merged commit 1ea235a into meta-pytorch:main Nov 18, 2025
109 of 112 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants