2022-10-08 18:36:57 -05:00
|
|
|
/*
|
2026-01-20 20:10:33 -06:00
|
|
|
* Copyright (c) 2022-2026, Gregory Bertilson <gregory@ladybird.org>
|
2022-10-08 18:36:57 -05:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
2026-01-20 20:10:33 -06:00
|
|
|
#include <LibGfx/ImmutableBitmap.h>
|
2022-10-08 18:36:57 -05:00
|
|
|
|
|
|
|
|
#include "VideoFrame.h"
|
|
|
|
|
|
2024-06-10 15:04:03 -05:00
|
|
|
namespace Media {
|
2022-10-08 18:36:57 -05:00
|
|
|
|
2026-01-20 20:10:33 -06:00
|
|
|
VideoFrame::VideoFrame(AK::Duration timestamp, AK::Duration duration,
|
2023-04-16 07:43:31 -05:00
|
|
|
Gfx::Size<u32> size,
|
2022-10-08 18:36:57 -05:00
|
|
|
u8 bit_depth, CodingIndependentCodePoints cicp,
|
2026-01-20 20:10:33 -06:00
|
|
|
NonnullRefPtr<Gfx::ImmutableBitmap> bitmap)
|
|
|
|
|
: m_timestamp(timestamp)
|
|
|
|
|
, m_duration(duration)
|
|
|
|
|
, m_size(size)
|
|
|
|
|
, m_bit_depth(bit_depth)
|
|
|
|
|
, m_cicp(cicp)
|
|
|
|
|
, m_bitmap(move(bitmap))
|
2023-04-16 07:43:31 -05:00
|
|
|
{
|
2024-06-20 21:50:54 -05:00
|
|
|
}
|
|
|
|
|
|
2026-01-20 20:10:33 -06:00
|
|
|
VideoFrame::~VideoFrame() = default;
|
2023-04-20 05:11:57 -05:00
|
|
|
|
2026-01-20 20:10:33 -06:00
|
|
|
NonnullRefPtr<Gfx::ImmutableBitmap> VideoFrame::immutable_bitmap() const
|
2023-04-20 05:11:57 -05:00
|
|
|
{
|
2026-01-20 20:10:33 -06:00
|
|
|
return m_bitmap;
|
2023-04-16 07:43:31 -05:00
|
|
|
}
|
|
|
|
|
|
2022-10-08 18:36:57 -05:00
|
|
|
}
|