catching up (trying to) wiht CSpot

This commit is contained in:
Philippe G
2022-01-06 18:46:57 -08:00
parent 491d0d260d
commit 9af4cd5b23
57 changed files with 2165 additions and 343 deletions

View File

@@ -53,8 +53,9 @@ PlayerState::PlayerState(std::shared_ptr<TimeProvider> timeProvider)
}
PlayerState::~PlayerState() {
pb_release(Frame_fields, innerFrame);
pb_release(Frame_fields, remoteFrame);
pb_release(Frame_fields, &remoteFrame);
// do not destruct inner frame as it is never allocated
// pb_release(Frame_fields, &innerFrame);
}
void PlayerState::setPlaybackState(const PlaybackState state)
@@ -136,7 +137,7 @@ void PlayerState::updatePositionMs(uint32_t position)
void PlayerState::updateTracks()
{
CSPOT_LOG(info, "---- Track count %d", remoteFrame.state.track_count);
innerFrame.state.context_uri = remoteFrame.state.context_uri == nullptr ? nullptr : strdup(remoteFrame.state.context_uri);
//innerFrame.state.context_uri = remoteFrame.state.context_uri == nullptr ? nullptr : strdup(remoteFrame.state.context_uri);
std::copy(std::begin(remoteFrame.state.track), std::end(remoteFrame.state.track), std::begin(innerFrame.state.track));
innerFrame.state.track_count = remoteFrame.state.track_count;
innerFrame.state.has_playing_track_index = true;