mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-17 15:02:24 +00:00
LibMedia: Move VideoSampleData out of the Video namespace
This commit is contained in:
parent
8848ee775b
commit
3cc1187036
Notes:
sideshowbarker
2024-07-16 17:12:03 +09:00
Author: https://github.com/Zaggy1024
Commit: 3cc1187036
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/230
Reviewed-by: https://github.com/ADKaster
4 changed files with 6 additions and 5 deletions
|
@ -148,7 +148,7 @@ DecoderErrorOr<Sample> MatroskaDemuxer::get_next_sample_for_track(Track track)
|
|||
status.frame_index = 0;
|
||||
}
|
||||
auto cicp = TRY(m_reader.track_for_track_number(track.identifier()))->video_track()->color_format.to_cicp();
|
||||
return Sample(status.block->timestamp(), status.block->frame(status.frame_index++), Video::VideoSampleData(cicp));
|
||||
return Sample(status.block->timestamp(), status.block->frame(status.frame_index++), VideoSampleData(cicp));
|
||||
}
|
||||
|
||||
DecoderErrorOr<Duration> MatroskaDemuxer::duration()
|
||||
|
|
|
@ -218,7 +218,7 @@ void PlaybackManager::decode_and_queue_one_sample()
|
|||
break;
|
||||
}
|
||||
auto sample = sample_result.release_value();
|
||||
container_cicp = sample.auxiliary_data().get<Video::VideoSampleData>().container_cicp();
|
||||
container_cicp = sample.auxiliary_data().get<VideoSampleData>().container_cicp();
|
||||
|
||||
// Submit the sample to the decoder.
|
||||
auto decode_result = m_decoder->receive_sample(sample.timestamp(), sample.data());
|
||||
|
|
|
@ -8,13 +8,14 @@
|
|||
|
||||
#include <AK/ByteBuffer.h>
|
||||
#include <AK/Time.h>
|
||||
#include <LibMedia/Video/VideoSampleData.h>
|
||||
|
||||
#include "VideoSampleData.h"
|
||||
|
||||
namespace Media {
|
||||
|
||||
class Sample final {
|
||||
public:
|
||||
using AuxiliaryData = Variant<Video::VideoSampleData>;
|
||||
using AuxiliaryData = Variant<VideoSampleData>;
|
||||
|
||||
Sample(Duration timestamp, ReadonlyBytes data, AuxiliaryData auxiliary_data)
|
||||
: m_timestamp(timestamp)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <LibMedia/Color/CodingIndependentCodePoints.h>
|
||||
|
||||
namespace Media::Video {
|
||||
namespace Media {
|
||||
|
||||
class VideoSampleData {
|
||||
public:
|
Loading…
Add table
Add a link
Reference in a new issue