Skip to content

VPAAMP-422 update isobmff#1519

Open
p-bond wants to merge 28 commits into
dev_sprint_25_2from
feature/VPAAMP-422_update_ISOBMFF
Open

VPAAMP-422 update isobmff#1519
p-bond wants to merge 28 commits into
dev_sprint_25_2from
feature/VPAAMP-422_update_ISOBMFF

Conversation

@p-bond

@p-bond p-bond commented May 28, 2026

Copy link
Copy Markdown
Contributor

Modernise & clean up ISOBMFF code so it is more idiomatic to C++17.

Remove the macros, remove the raw pointer use and protect the API.

(NB - does not remove duplicate code from middleware, that's the next ticket)

@p-bond p-bond requested a review from a team as a code owner May 28, 2026 12:55
@p-bond p-bond requested a review from Copilot May 28, 2026 12:55
@p-bond p-bond requested a review from DomSyna May 28, 2026 12:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR modernizes the ISOBMFF parser/buffer code toward C++17 idioms by replacing raw-owned box collections with std::unique_ptr, adding read-only buffer handling, and hardening parsing against malformed box sizes.

Changes:

  • Converts parsed box ownership from raw pointers to std::unique_ptr.
  • Adds read-only buffer mutation guards and malformed size checks.
  • Updates ISOBMFF unit tests and fakes for the new ownership model and new malformed-input cases.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
isobmff/isobmffbox.h Replaces parsing macros with inline helpers and updates box/container ownership APIs.
isobmff/isobmffbox.cpp Updates box construction/container parsing for unique_ptr ownership and malformed input handling.
isobmff/isobmffbuffer.h Updates buffer internals/API signatures for unique_ptr boxes and read-only state.
isobmff/isobmffbuffer.cpp Applies ownership changes, read-only mutation guards, and size validation during parsing/restamping.
isobmff/isobmffprocessor.h Replaces NULL constructor defaults with nullptr.
isobmff/isobmffprocessor.cpp Replaces a NULL comparison with nullptr.
MetadataProcessor.cpp Adapts metadata box construction to the new unique_ptr return type.
test/utests/fakes/FakeIsoBmffBuffer.cpp Updates fake signatures for the new box container type.
test/utests/tests/IsoBmffBoxTests/IsoBmffBoxTests.cpp Updates tests for unique_ptr construction and malformed nested/emsg boxes.
test/utests/tests/IsoBmffBufferTests/IsoBmffBufferTests.cpp Updates buffer tests for unique_ptr parsed boxes and read-only/malformed input behavior.

Comment thread isobmff/isobmffbox.cpp Outdated
Comment thread isobmff/isobmffbuffer.h Outdated
Comment thread isobmff/isobmffbox.cpp
Comment thread isobmff/isobmffbox.cpp Outdated
Comment thread isobmff/isobmffbox.cpp Outdated
Comment thread isobmff/isobmffbox.cpp
Comment thread isobmff/isobmffbox.cpp
Comment thread isobmff/isobmffbox.h Outdated
Comment thread isobmff/isobmffbox.h Outdated
Comment thread isobmff/isobmffbox.h Outdated
Comment thread isobmff/isobmffbox.h Outdated
Comment thread isobmff/isobmffbuffer.cpp Outdated
Comment thread isobmff/isobmffbuffer.cpp Outdated
Comment thread isobmff/isobmffbox.cpp
Comment thread isobmff/isobmffbox.cpp
Comment thread isobmff/isobmffbox.h Outdated
Comment thread isobmff/isobmffbox.h Outdated
converted temporary malloc/free branches to RAII with unique_ptr + std::free deleter
used explicit ownership transfer only at setMessage/setSchemeIdUri/setValue boundaries
added allocation-failure guards that return a safe default EMSG object
@p-bond p-bond changed the title Feature/vpaamp 422 update isobmff VPAAMP-422 update isobmff Jun 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Comment thread test/utests/tests/IsoBmffBufferTests/IsoBmffBufferTests.cpp
Comment thread test/utests/tests/IsoBmffBufferTests/IsoBmffBufferTests.cpp
Comment thread isobmff/isobmffbuffer.cpp
Comment thread isobmff/isobmffbuffer.cpp Outdated

@nebutler963 nebutler963 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks Good

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.

6 participants