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

libobs/util: Add seeking support to array serializer #10670

Merged
merged 1 commit into from May 18, 2024

Conversation

derrod
Copy link
Member

@derrod derrod commented May 13, 2024

Description

Adds support for the seeking functionality of the OBS serializer API to the array serializer.

Also adds a reset function that can be used to avoid reallocating memory when multiple things need to be serialized in one step.

Motivation and Context

Sometimes you need to be able to seek in memory to make things easier, e.g. to write a size field after the contents have been written.

Split out from #10608 for easier review and slimming down that PR as things get merged.

How Has This Been Tested?

Tested as part of #10608.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@derrod derrod added the Enhancement Improvement to existing functionality label May 13, 2024
Copy link
Member

@RytoEX RytoEX left a comment

Choose a reason for hiding this comment

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

Seems okay at a glance. Would appreciate another sanity check or review.

@Lain-B Lain-B merged commit dc4cba7 into obsproject:master May 18, 2024
14 checks passed
@RytoEX RytoEX added this to the OBS Studio (Next Version) milestone May 18, 2024
@derrod derrod deleted the seeking-array-serializer branch May 18, 2024 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants