#pragma once\r
\r
-#include <core/frame/gpu_frame.h>\r
+#include "mock_frame.h"\r
+\r
#include <core/producer/frame_producer.h>\r
#include <common/exception/exceptions.h>\r
\r
{\r
public:\r
mock_frame_producer(bool null = false, bool throws = false) \r
- : null_(null), throws_(throws){}\r
+ : null_(null), throws_(throws), initialized_(false), volume_(100){}\r
+ void set_volume(short volume) { volume_ = volume;}\r
gpu_frame_ptr get_frame()\r
{ \r
if(throws_)\r
if(leading_)\r
return leading_->get_frame();\r
if(!null_)\r
- return std::make_shared<gpu_frame>(0, 0);\r
+ return std::make_shared<mock_frame>(this, volume_);\r
return nullptr;\r
}\r
std::shared_ptr<frame_producer> get_following_producer() const \r
return format;\r
}\r
void initialize(const frame_factory_ptr& factory)\r
- {}\r
+ {initialized_ = true;}\r
void set_following_producer(const std::shared_ptr<frame_producer>& following)\r
{following_ = following;}\r
+\r
+ bool is_initialized() const { return initialized_;}\r
private:\r
std::shared_ptr<frame_producer> following_;\r
std::shared_ptr<frame_producer> leading_;\r
bool null_;\r
bool throws_;\r
+ bool initialized_;\r
+ short volume_;\r
};
\ No newline at end of file