1 #ifndef _moviefile_common__hpp__included__
2 #define _moviefile_common__hpp__included__
5 #include "core/moviefile.hpp"
6 #define DEFAULT_RTC_SECOND 1000000000ULL
7 #define DEFAULT_RTC_SUBSECOND 0ULL
9 template<typename target
>
10 static void moviefile_write_settings(target
& w
, const std::map
<std::string
, std::string
>& settings
,
11 core_setting_group
& sgroup
, std::function
<void(target
& w
, const std::string
& name
,
12 const std::string
& value
)> writefn
)
14 for(auto i
: settings
) {
15 if(!sgroup
.settings
.count(i
.first
))
17 if(sgroup
.settings
.find(i
.first
)->second
.dflt
== i
.second
)
19 writefn(w
, i
.first
, i
.second
);
23 struct moviefile_branch_extractor_text
: public moviefile::branch_extractor
25 moviefile_branch_extractor_text(const std::string
& filename
);
26 ~moviefile_branch_extractor_text();
27 std::set
<std::string
> enumerate();
28 void read(const std::string
& name
, portctrl::frame_vector
& v
);
33 struct moviefile_branch_extractor_binary
: public moviefile::branch_extractor
35 moviefile_branch_extractor_binary(const std::string
& filename
);
36 ~moviefile_branch_extractor_binary();
37 std::set
<std::string
> enumerate();
38 void read(const std::string
& name
, portctrl::frame_vector
& v
);
43 struct moviefile_sram_extractor_text
: public moviefile::sram_extractor
45 moviefile_sram_extractor_text(const std::string
& filename
);
46 ~moviefile_sram_extractor_text();
47 std::set
<std::string
> enumerate();
48 void read(const std::string
& name
, std::vector
<char>& v
);
53 struct moviefile_sram_extractor_binary
: public moviefile::sram_extractor
55 moviefile_sram_extractor_binary(const std::string
& filename
);
56 ~moviefile_sram_extractor_binary();
57 std::set
<std::string
> enumerate();
58 void read(const std::string
& name
, std::vector
<char>& v
);