mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 06:29:43 +00:00
This should be a clearer name, as "sample" is most often used to refer to the output of a decoder.
36 lines
830 B
C++
36 lines
830 B
C++
/*
|
|
* Copyright (c) 2022, Gregory Bertilson <zaggy1024@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/ByteBuffer.h>
|
|
#include <AK/Time.h>
|
|
#include <LibMedia/CodedVideoFrameData.h>
|
|
|
|
namespace Media {
|
|
|
|
class CodedFrame final {
|
|
public:
|
|
using AuxiliaryData = Variant<CodedVideoFrameData>;
|
|
|
|
CodedFrame(AK::Duration timestamp, ByteBuffer&& data, AuxiliaryData auxiliary_data)
|
|
: m_timestamp(timestamp)
|
|
, m_data(move(data))
|
|
, m_auxiliary_data(auxiliary_data)
|
|
{
|
|
}
|
|
|
|
AK::Duration timestamp() const { return m_timestamp; }
|
|
ByteBuffer const& data() const { return m_data; }
|
|
AuxiliaryData const& auxiliary_data() const { return m_auxiliary_data; }
|
|
|
|
private:
|
|
AK::Duration m_timestamp;
|
|
ByteBuffer m_data;
|
|
AuxiliaryData m_auxiliary_data;
|
|
};
|
|
|
|
}
|