1#include "video_writer.h"
2#include <cgv/base/register.h>
36 static std::vector<abst_video_writer*>& ref_writers()
38 static std::vector<abst_video_writer*> writers;
43 return "video_writer_listener";
49 ref_writers().push_back(rd);
53 for (
unsigned int i=0; i<ref_writers().size(); ++i) {
54 if (
object == ref_writers()[i]) {
55 ref_writers().erase(ref_writers().begin()+i);
66 static std::string exts;
68 std::vector<abst_video_writer*>& writers = video_writer_listener::ref_writers();
69 for (
unsigned int i=0; i<writers.size(); ++i) {
72 exts += writers[i]->get_supported_extensions();
81 std::string text =
"Video Files (";
82 std::string exts =
"*.";
96 std::string ext =
to_lower(file_extension);
97 std::vector<abst_video_writer*>& writers = video_writer_listener::ref_writers();
98 for (
unsigned int i=0; i<writers.size(); ++i) {
100 wr = writers[i]->clone();
104 last_error =
"no video writer found for extension: ";
113 return wr->get_last_error();
120 return wr->get_type_name();
121 return "cmv::video_writer";
128 return wr->scan_codecs(codec_names);
136 return wr->set_codec(codec_name);
144 return wr->get_codec();
152 return wr->get_property_declarations();
160 return wr->set_void(property,
type, value);
167 return wr->get_void(property,
type, value);
176 return wr->open(file_name, image_format, fps, interactive);
185 return wr->write_frame(image_data);
base class for all classes that can be registered with support for dynamic properties (see also secti...
virtual std::string get_property_declarations()
return a semicolon separated list of property declarations
T * get_interface()
use dynamic type cast to check for the given interface
virtual bool set_void(const std::string &property, const std::string &value_type, const void *value_ptr)
abstract interface for the setter of a dynamic property.
virtual bool get_void(const std::string &property, const std::string &value_type, void *value_ptr)
abstract interface for the getter of a dynamic property.
The const_data_view has the functionality of the data_view but uses a const pointer and therefore doe...
the base namespace holds the base hierarchy, support for plugin registration and signals
data::ref_ptr< base, true > base_ptr
ref counted pointer to base
namespace for data management components
namespace for compile time type information
namespace that holds tools that dont fit any other namespace
unsigned int replace(std::string &s, char c1, char c2)
replace char c1 with c2 in the given string _s and return number of replacements
char to_lower(char c)
convert char to lower case
bool is_element(char c, const std::string &s)
check if char c arises in string s
this header is dependency free
Helper functions to process strings.
convenience class to register an object of the given class type
interfaces that allows to listen to registration events.