mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
37 lines
807 B
C++
37 lines
807 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 "VideoSampleData.h"
|
|
|
|
namespace Media {
|
|
|
|
class Sample final {
|
|
public:
|
|
using AuxiliaryData = Variant<VideoSampleData>;
|
|
|
|
Sample(AK::Duration timestamp, ReadonlyBytes data, AuxiliaryData auxiliary_data)
|
|
: m_timestamp(timestamp)
|
|
, m_data(data)
|
|
, m_auxiliary_data(auxiliary_data)
|
|
{
|
|
}
|
|
|
|
AK::Duration timestamp() const { return m_timestamp; }
|
|
ReadonlyBytes const& data() const { return m_data; }
|
|
AuxiliaryData const& auxiliary_data() const { return m_auxiliary_data; }
|
|
|
|
private:
|
|
AK::Duration m_timestamp;
|
|
ReadonlyBytes m_data;
|
|
AuxiliaryData m_auxiliary_data;
|
|
};
|
|
|
|
}
|