Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Commit

Permalink
unit_test ONLY: CSRIAPI: use libass rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
jesec committed Feb 11, 2019
1 parent d1ede28 commit 17a8b6f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/filters/transform/vsfilter/VSFilter.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="StyleEditorDialog.cpp" />
<ClCompile Include="SubFrame.cpp" />
<ClCompile Include="SubRenderOptionsImpl.cpp" />
<ClCompile Include="Systray.cpp" />
<ClCompile Include="TextInputPin.cpp" />
Expand All @@ -119,6 +120,7 @@
<ClInclude Include="resource.h" />
<ClInclude Include="StdAfx.h" />
<ClInclude Include="StyleEditorDialog.h" />
<ClInclude Include="SubFrame.h" />
<ClInclude Include="SubRenderOptionsImpl.h" />
<ClInclude Include="Systray.h" />
<ClInclude Include="TextInputPin.h" />
Expand Down
6 changes: 6 additions & 0 deletions src/filters/transform/vsfilter/VSFilter.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@
<ClCompile Include="DirectVobSubFilterDll.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="SubFrame.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="csri.h">
Expand Down Expand Up @@ -145,6 +148,9 @@
<ClInclude Include="XyOptionsImpl.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="SubFrame.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="VSFilter.def">
Expand Down
10 changes: 9 additions & 1 deletion src/filters/transform/vsfilter/csriapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ extern "C" struct csri_vsfilter_inst {
};
typedef struct csri_vsfilter_inst csri_inst;
#include "csri.h"
#include "SubFrame.h"
static csri_rend csri_vsfilter = "vsfilter";


Expand Down Expand Up @@ -154,7 +155,14 @@ CSRIAPI void csri_render(csri_inst *inst, struct csri_frame *frame, double time)
}
spd.vidrect = inst->video_rect;

inst->rts->Render(spd, (REFERENCE_TIME)(time*10000000), arbitrary_framerate, inst->video_rect);
if (inst->rts->m_assloaded) {
ass_set_frame_size(inst->rts->m_renderer.get(), inst->video_rect.right, inst->video_rect.bottom);
CComPtr<ISubRenderFrame> sub_render_frame = new SubFrame(inst->video_rect, 0, ass_render_frame(inst->rts->m_renderer.get(), inst->rts->m_track.get(), time * 1000, 0));
}
else
{
inst->rts->Render(spd, (REFERENCE_TIME)(time * 10000000), arbitrary_framerate, inst->video_rect);
}
}


Expand Down

0 comments on commit 17a8b6f

Please sign in to comment.