1 #ifndef _moviefile_common__hpp__included__
2 #define _moviefile_common__hpp__included__
4 #include "core/moviefile.hpp"
5 #define DEFAULT_RTC_SECOND 1000000000ULL
6 #define DEFAULT_RTC_SUBSECOND 0ULL
8 template<typename target
>
9 static void moviefile_write_settings(target
& w
, const std::map
<std::string
, std::string
>& settings
,
10 core_setting_group
& sgroup
, std::function
<void(target
& w
, const std::string
& name
,
11 const std::string
& value
)> writefn
)
13 for(auto i
: settings
) {
14 if(!sgroup
.settings
.count(i
.first
))
16 if(sgroup
.settings
.find(i
.first
)->second
.dflt
== i
.second
)
18 writefn(w
, i
.first
, i
.second
);
22 struct moviefile_branch_extractor_text
: public moviefile::branch_extractor
24 moviefile_branch_extractor_text(const std::string
& filename
);
25 ~moviefile_branch_extractor_text();
26 std::set
<std::string
> enumerate();
27 void read(const std::string
& name
, portctrl::frame_vector
& v
);
32 struct moviefile_branch_extractor_binary
: public moviefile::branch_extractor
34 moviefile_branch_extractor_binary(const std::string
& filename
);
35 ~moviefile_branch_extractor_binary();
36 std::set
<std::string
> enumerate();
37 void read(const std::string
& name
, portctrl::frame_vector
& v
);
42 struct moviefile_sram_extractor_text
: public moviefile::sram_extractor
44 moviefile_sram_extractor_text(const std::string
& filename
);
45 ~moviefile_sram_extractor_text();
46 std::set
<std::string
> enumerate();
47 void read(const std::string
& name
, std::vector
<char>& v
);
52 struct moviefile_sram_extractor_binary
: public moviefile::sram_extractor
54 moviefile_sram_extractor_binary(const std::string
& filename
);
55 ~moviefile_sram_extractor_binary();
56 std::set
<std::string
> enumerate();
57 void read(const std::string
& name
, std::vector
<char>& v
);