mirror of
https://github.com/WiVRn/WiVRn.git
synced 2026-11-20 00:51:32 -08:00
Add support for raw video
This commit is contained in:
1 parent
7861d508c7
commit
6932f9461d
20 files changed
+726
-25
No files matched your search
+34
-15
@@ -23,36 +23,54 @@
|
||||
#else
|
||||
#include "decoder/ffmpeg/ffmpeg_decoder.h"
|
||||
#endif
|
||||
#include "decoder/raw_decoder.h"
|
||||
|
||||
wivrn::decoder::~decoder() = default;
|
||||
|
||||
std::shared_ptr<wivrn::decoder> wivrn::decoder::make(
|
||||
vk::raii::Device & device,
|
||||
vk::raii::PhysicalDevice & phys_dev,
|
||||
uint32_t vk_queue_family_index,
|
||||
const wivrn::to_headset::video_stream_description::item & description,
|
||||
float fps,
|
||||
uint8_t stream_index,
|
||||
std::weak_ptr<scenes::stream> scene,
|
||||
shard_accumulator * acc)
|
||||
{
|
||||
switch (description.codec)
|
||||
{
|
||||
case h264:
|
||||
case h265:
|
||||
case av1:
|
||||
#ifdef __ANDROID__
|
||||
return std::make_shared<wivrn::android::decoder>(
|
||||
device,
|
||||
phys_dev,
|
||||
description,
|
||||
fps,
|
||||
stream_index,
|
||||
scene,
|
||||
acc);
|
||||
return std::make_shared<wivrn::android::decoder>(
|
||||
device,
|
||||
phys_dev,
|
||||
description,
|
||||
fps,
|
||||
stream_index,
|
||||
scene,
|
||||
acc);
|
||||
#else
|
||||
return std::make_shared<wivrn::ffmpeg::decoder>(
|
||||
device,
|
||||
phys_dev,
|
||||
description,
|
||||
stream_index,
|
||||
scene,
|
||||
acc);
|
||||
return std::make_shared<wivrn::ffmpeg::decoder>(
|
||||
device,
|
||||
phys_dev,
|
||||
description,
|
||||
stream_index,
|
||||
scene,
|
||||
acc);
|
||||
#endif
|
||||
case raw:
|
||||
return std::make_shared<wivrn::raw_decoder>(
|
||||
device,
|
||||
phys_dev,
|
||||
vk_queue_family_index,
|
||||
description,
|
||||
stream_index,
|
||||
scene,
|
||||
acc);
|
||||
}
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
std::vector<wivrn::video_codec> wivrn::decoder::supported_codecs()
|
||||
@@ -63,5 +81,6 @@ std::vector<wivrn::video_codec> wivrn::decoder::supported_codecs()
|
||||
#else
|
||||
ffmpeg::decoder::supported_codecs(res);
|
||||
#endif
|
||||
res.push_back(video_codec::raw);
|
||||
return res;
|
||||
}
|
||||
Reference in new issue
Block a user