--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="html.cpp" />
+ <ClCompile Include="producer\html_producer.cpp">
+ <Filter>producer</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="html.h" />
+ <ClInclude Include="producer\html_producer.h">
+ <Filter>producer</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <Filter Include="producer">
+ <UniqueIdentifier>{03836375-dd07-4eb0-bcc7-08942aed1900}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project>
\ No newline at end of file
std::unique_ptr<Berkelium::Window> window_;
- high_prec_timer timer_;
-
executor executor_;
public:
safe_ptr<core::basic_frame> receive(int) override
{
+ executor_.begin_invoke([this]{ tick(); });
+
return last_frame();
}
bitmap_in + ((y + copy_rects[i].top() - bitmap_rect.top()) * bitmap_rect.width() + copy_rects[i].left() - bitmap_rect.left()) * 4,
copy_rects[i].width() * 4);
});
- });
+ });
});
}
}
// html_producer
+
+ void invoke_on_enter_frame()
+ {
+ html::invoke([this]
+ {
+ static const std::wstring javascript = L"onEnterFrame()";
+ window_->executeJavascript(Berkelium::WideString::point_to(javascript.data(), javascript.length()));
+ });
+ }
safe_ptr<core::basic_frame> draw(
safe_ptr<core::write_frame> frame,
const auto& height = pixel_desc.planes[0].height;
const auto& linesize = pixel_desc.planes[0].linesize;
+ invoke_on_enter_frame();
+
lock(frame_mutex_, [&]
{
tbb::parallel_for<int>(
{
if(invalidated_.fetch_and_store(false))
{
+ high_prec_timer timer;
+ timer.tick(0.0);
+
core::pixel_format_desc pixel_desc;
pixel_desc.pix_fmt = core::pixel_format::bgra;
pixel_desc.planes.push_back(
draw(frame, format_desc.field_mode);
executor_.yield();
- timer_.tick(1.0 / (format_desc.fps * format_desc.field_count));
+ timer.tick(1.0 / (format_desc.fps * format_desc.field_count));
draw(frame, static_cast<core::field_mode::type>(format_desc.field_mode ^ core::field_mode::progressive));
}
{
last_frame_ = frame;
});
-
- executor_.yield();
-
- timer_.tick(1.0 / (format_desc.fps * format_desc.field_count));
}
-
- executor_.begin_invoke([this]{ tick(); });
}
};