2 * Copyright (C) 2024 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
25 ~CPackerMAT() = default;
27 bool PackTrueHD(const uint8_t* data
, int size
);
28 std::vector
<uint8_t> GetOutputFrame();
33 bool init
; // differentiates the first header
35 // audio_sampling_frequency:
44 // input timing of previous audio unit used to calculate padding bytes
45 uint16_t prevFrametime
;
46 bool prevFrametimeValid
;
48 uint32_t matFramesize
; // size in bytes of current MAT frame
49 uint32_t prevMatFramesize
; // size in bytes of previous MAT frame
51 uint32_t padding
; // padding bytes pending to write
56 void AppendData(const uint8_t* data
, int size
, Type type
);
57 uint32_t GetCount() const { return m_bufferCount
; }
58 int FillDataBuffer(const uint8_t* data
, int size
, Type type
);
63 uint32_t m_bufferCount
{0};
64 std::vector
<uint8_t> m_buffer
;
65 std::deque
<std::vector
<uint8_t>> m_outputQueue
;