VPLAY-13053 Migrate AampGrowableBuffer in MediaTrack to std::vector#1193
Merged
pstroffolino merged 8 commits intodev_sprint_25_2from Mar 24, 2026
Merged
Conversation
…track_to_std_vector
…track_to_std_vector
cpc005
reviewed
Mar 19, 2026
cpc005
approved these changes
Mar 19, 2026
Contributor
There was a problem hiding this comment.
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
MediaTrackchunk buffers (unparsedBufferChunk/parsedBufferChunk) withstd::vector<uint8_t>and update chunk-processing code paths. - Update
MediaTrack::ProcessPlaylistvirtual interface and HLS implementation to acceptstd::vector<uint8_t>&. - Change
IsoBmffBuffer::ParseChunkData/UpdateBufferDatato useuint8_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. |
Contributor
There was a problem hiding this comment.
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::ProcessPlaylistto usestd::vector<uint8_t>&across implementations, mocks, and tests. - Replace
MediaTrack’sunparsedBufferChunk/parsedBufferChunkwithstd::vector<uint8_t>and adjust chunk processing/injection paths. - Update
IsoBmffBufferchunk-parsing APIs fromchar*touint8_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>
…track_to_std_vector
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrate the AampGrowableBuffer in MediaTrack to std::vector