#include "../stream_meta_type_compressed_video.h"
#include <vector>
#include <chrono>
using namespace adtf_file::adtf2::compressed_video;
struct cMySessionTestSystem : cSessionTestSystem
{
cMySessionTestSystem()
{
CreateSession(ADTF_TESTING_SOURCE_DIR "/test_compressed_video_project"
"/adtfsessions/demo_video_decompressor_filter_test.adtfsession");
}
};
TEST_CASE_METHOD(cMySessionTestSystem, "Deserialization of compressed video", "[req:ACORE-8497],[req:ACORE-8498]")
{
object_ptr<adtf::services::IPlayer> pPlayer;
auto pPlaybackInput = GetGraphObject("compressed_video_player");
cOutputRecorder oPlaybackRecorder(pPlaybackInput, "compressed_video");
auto pDecompressorFilter = GetGraphObject("demo_video_decompressor_filter_test_filter_graph.video_decompressor_filter");
cOutputRecorder oDecomopressorRecorder(pDecompressorFilter, "decompressed_video");
SetRunLevel(tADTFRunLevel::RL_Running);
while (pPlayer->GetCurrentState() == IPlayer::tState::Streaming)
{
}
auto oInputTypes = oPlaybackRecorder.GetCurrentOutput().GetTypes();
REQUIRE(!oInputTypes.empty());
REQUIRE_OK(oInputTypes.front()->GetMetaTypeName(
adtf_string_intf(strMetaTypeName)));
REQUIRE(strMetaTypeName ==
cString(stream_meta_type_video_compressed::MetaTypeName));
auto oDecompressorFilterOutput = oDecomopressorRecorder.GetCurrentOutput();
auto oDecompressorTypes = oDecompressorFilterOutput.GetTypes();
REQUIRE(!oDecompressorTypes.empty());
REQUIRE_OK(oDecompressorTypes.front()->GetMetaTypeName(
adtf_string_intf(strMetaTypeName)));
REQUIRE(strMetaTypeName ==
cString(stream_meta_type_image::MetaTypeName));
auto oDecompressorSamples = oDecompressorFilterOutput.GetSamples();
REQUIRE(149 == oDecompressorSamples.size());
for (auto sample : oDecompressorSamples)
{
object_ptr_shared_locked<const ISampleBuffer> buffer;
REQUIRE_OK(sample->Lock(buffer));
REQUIRE(0x12C00 == buffer->GetSize());
}
}
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
virtual tResult GetObject(iobject_ptr< IObject > &pObject, const char *strNameOID) const =0
Get registered object from object registry.
string_base< cStackString > cString
cString implementation for a stack string which works on stack if string is lower than A_UTILS_DEFAUL...
std::chrono::milliseconds milliseconds
Compatibility to C++11 std::chrono::milliseconds
@ RL_FilterGraph
The Filtergraph level.
Namespace for the ADTF Base SDK.
Namespace for all testing functionality of the ADTF Filter SDK.
Namespace for a summary of all service interfaces (System Service) provided by ADTF.
Namespace for all testing functionality provided within the ADTF Streaming SDK.
Namespace for the ADTF Streaming SDK.
Namespace for all testing functionality of the ADTF System SDK.
Namespace for the ADTF uCOM3 SDK.
alias namespace for the A_UTILS Library.
Copyright © Audi Electronics Venture GmbH.
adtf::ucom::IRuntime * _runtime
Global Runtime Pointer to reference to the current runtime.
#define adtf_string_intf(__string__)
The adtf_string_intf Macro helps to easily create a rvalue reference of a adtf::util::cString.
Copyright © Audi Electronics Venture GmbH.