(ezc): generate only requested frames
This commit is contained in:
@@ -168,7 +168,7 @@ Ezc::Pattern * pattern = 0;
|
||||
|
||||
if( pattern )
|
||||
{
|
||||
InitGenerator(content_gen, cur->request->models);
|
||||
InitGenerator(content_gen, *cur->request);
|
||||
content_gen.SetPattern(*pattern);
|
||||
content_gen.Generate(env.out, cur->request->out_streams);
|
||||
}
|
||||
@@ -1004,9 +1004,19 @@ using namespace TemplatesFunctions;
|
||||
|
||||
if( index )
|
||||
{
|
||||
InitGenerator(generator, cur->request->models);
|
||||
InitGenerator(generator, *cur->request);
|
||||
generator.SetPattern(*index);
|
||||
generator.UseMainStream(cur->request->send_main_stream);
|
||||
generator.Generate(cur->request->out_main_stream, cur->request->out_streams);
|
||||
|
||||
// for debug purposes:
|
||||
// log << log4 << "Templates: main stream size: " << cur->request->out_main_stream.size() << logend;
|
||||
// log << log4 << "Templates: produced frames: " << logend;
|
||||
|
||||
// for(auto i=cur->request->out_streams.streams_map.begin() ; i != cur->request->out_streams.streams_map.end() ; ++i)
|
||||
// {
|
||||
// log << log4 << " frame name: " << i->first << ", size: " << i->second->size() << logend;
|
||||
// }
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1016,20 +1026,6 @@ using namespace TemplatesFunctions;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void Templates::Generate(Ezc::Pattern & pattern)
|
||||
{
|
||||
using namespace TemplatesFunctions;
|
||||
|
||||
ezc_vars.clear();
|
||||
InitGenerator(generator, cur->request->models);
|
||||
generator.SetPattern(pattern);
|
||||
generator.Generate(cur->request->out_main_stream, cur->request->out_streams);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Templates::SetConfig(Config * pconfig)
|
||||
{
|
||||
TemplatesFunctions::config = pconfig;
|
||||
|
Reference in New Issue
Block a user