Skip to content

VPLAY-13053 Migrate AampGrowableBuffer in MediaTrack to std::vector#1193

Merged
pstroffolino merged 8 commits intodev_sprint_25_2from
feature/VPLAY-13053_Migrate_Mediatrack_to_std_vector
Mar 24, 2026
Merged

VPLAY-13053 Migrate AampGrowableBuffer in MediaTrack to std::vector#1193
pstroffolino merged 8 commits intodev_sprint_25_2from
feature/VPLAY-13053_Migrate_Mediatrack_to_std_vector

Conversation

@DomSyna
Copy link
Contributor

@DomSyna DomSyna commented Mar 17, 2026

Migrate the AampGrowableBuffer in MediaTrack to std::vector

@DomSyna DomSyna marked this pull request as ready for review March 19, 2026 14:08
@DomSyna DomSyna requested a review from a team as a code owner March 19, 2026 14:08
Copilot AI review requested due to automatic review settings March 19, 2026 14:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Migrates MediaTrack’s internal growable buffers and playlist-processing interfaces from AampGrowableBuffer to std::vector<uint8_t>, and updates ISO-BMFF chunk parsing APIs accordingly to use byte pointers.

Changes:

  • Replace MediaTrack chunk buffers (unparsedBufferChunk / parsedBufferChunk) with std::vector<uint8_t> and update chunk-processing code paths.
  • Update MediaTrack::ProcessPlaylist virtual interface and HLS implementation to accept std::vector<uint8_t>&.
  • Change IsoBmffBuffer::ParseChunkData / UpdateBufferData to use uint8_t* & and adjust mocks/fakes/unit tests to match.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
StreamAbstractionAAMP.h Updates MediaTrack::ProcessPlaylist signature and switches chunk buffers to std::vector<uint8_t>.
streamabstraction.cpp Migrates chunk inject/parse flow to vector operations and uses aamp_utils::ClearAndRelease for buffer lifecycle.
fragmentcollector_hls.h Updates HLS TrackState::ProcessPlaylist override signature to vector-based interface.
fragmentcollector_hls.cpp Implements vector-based ProcessPlaylist and moves playlist data into internal storage.
isobmff/isobmffbuffer.h Updates ISO-BMFF parsing APIs to use uint8_t* & for unparsed buffer pointer updates.
isobmff/isobmffbuffer.cpp Adjusts implementations for new byte-pointer APIs and vector buffer setters.
MediaStreamContext.h Updates ProcessPlaylist override signature to vector-based interface (no-op override).
test/utests/mocks/MockMediaTrack.h Updates mock to match new ProcessPlaylist(std::vector<uint8_t>&, ...) signature.
test/utests/mocks/MockIsoBmffBuffer.h Updates mock signatures for ParseChunkData / UpdateBufferData to byte pointers.
test/utests/fakes/FakeIsoBmffBuffer.cpp Updates fake forwarding for ParseChunkData / UpdateBufferData signatures.
test/utests/fakes/FakeStreamAbstractionAamp.cpp Aligns fake MediaTrack ctor init list with removal of growable-buffer members.
test/utests/tests/TrackInjectTests/TrackInjectTests.cpp Updates test ProcessPlaylist signature and chunk-parse buffer type usage.
test/utests/tests/StreamAbstractionAAMP_HLS/FunctionalTests.cpp Updates playlist variable type to std::vector<uint8_t> for ProcessPlaylist call.
test/utests/tests/MediaTrackTests/MediaTrackTests.cpp Updates derived test track override signature for ProcessPlaylist.
test/utests/tests/MediaStreamContextTests/MediaStreamContextTests.cpp Updates playlist variable type to std::vector<uint8_t> for ProcessPlaylist call.

Copilot AI review requested due to automatic review settings March 20, 2026 09:27
Copy link
Contributor

Copilot AI left a comment

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 migrates MediaTrack’s remaining AampGrowableBuffer usages to std::vector<uint8_t> to simplify buffer ownership/moves and align with existing vector-based APIs in the player.

Changes:

  • Update MediaTrack::ProcessPlaylist to use std::vector<uint8_t>& across implementations, mocks, and tests.
  • Replace MediaTrack’s unparsedBufferChunk/parsedBufferChunk with std::vector<uint8_t> and adjust chunk processing/injection paths.
  • Update IsoBmffBuffer chunk-parsing APIs from char* to uint8_t* and propagate through fakes/mocks.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
streamabstraction.cpp Migrates chunk processing buffers to std::vector<uint8_t> and updates injection/cleanup logic.
StreamAbstractionAAMP.h Changes ProcessPlaylist signature and replaces chunk buffer members with vectors.
fragmentcollector_hls.h Updates TrackState::ProcessPlaylist override signature.
fragmentcollector_hls.cpp Adapts playlist handoff to move from std::vector<uint8_t> into the existing playlist buffer.
isobmff/isobmffbuffer.h Updates ParseChunkData/UpdateBufferData signatures to uint8_t*.
isobmff/isobmffbuffer.cpp Implements updated uint8_t*-based chunk parsing.
MediaStreamContext.h Updates ProcessPlaylist override signature.
test/utests/mocks/MockMediaTrack.h Updates mock signature for ProcessPlaylist.
test/utests/mocks/MockIsoBmffBuffer.h Updates mock signatures for chunk parsing/buffer update APIs.
test/utests/fakes/FakeStreamAbstractionAamp.cpp Updates fake MediaTrack ctor init list after member type changes.
test/utests/fakes/FakeIsoBmffBuffer.cpp Updates fake implementations to match new uint8_t* signatures.
test/utests/tests/TrackInjectTests/TrackInjectTests.cpp Updates test overrides/types to match new vector/pointer signatures.
test/utests/tests/StreamAbstractionAAMP_HLS/FunctionalTests.cpp Updates test to call ProcessPlaylist with std::vector<uint8_t>.
test/utests/tests/MediaTrackTests/MediaTrackTests.cpp Updates test track stub signature for ProcessPlaylist.
test/utests/tests/MediaStreamContextTests/MediaStreamContextTests.cpp Updates playlist test parameter type to std::vector<uint8_t>.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 20, 2026 10:33
Copy link
Contributor

Copilot AI left a comment

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 15 out of 15 changed files in this pull request and generated no new comments.

@pstroffolino pstroffolino merged commit f39502d into dev_sprint_25_2 Mar 24, 2026
8 of 9 checks passed
@pstroffolino pstroffolino deleted the feature/VPLAY-13053_Migrate_Mediatrack_to_std_vector branch March 24, 2026 14:16
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