[
http://dev.sourcefabric.org/browse/LS-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15551#action_15551
]
Romain Beauxis commented on LS-478:
-----------------------------------
Well, the reason why I want a common initialization is that I am not sure that
the SDL library supports several initializations. In C, those tricks are
usually supposed to be done once and for all. It also seems a bit hackish to
call init with all possible options in each operators..
I have started a branch fixing video_text by postponing its ressources
allocation to runtime.
I think overall that it could be good to pursue this way and let sdl operators
that do not allow initialization at Init.start so that we can catch these
issues and fix them in the code..
> Cannot use video.add_text since SDL init changes
> ------------------------------------------------
>
> Key: LS-478
> URL: http://dev.sourcefabric.org/browse/LS-478
> Project: Liquidsoap
> Issue Type: Bug
> Components: Liquidsoap
> Environment: current dev version
> Reporter: David Baelde
> Assignee: Romain Beauxis
> Priority: Blocker
>
> $ ./src/liquidsoap 'output.dummy(video.add_text("foo",blank()))'
> Invalid value at line 1, char 28-42: Library not initialized.
> The problem is that SDL is only initialized when streaming starts, just
> before sources are woken up, but the text operator initializes its font upon
> creation and not upon #wake_up. This in itself is (slightly) incorrect since
> resources should only be allocated within #wake_up and #sleep, but it is
> useful to check that the font exists.
> The simplest solution is that all SDL operators call Sdl_utils.init which
> inits with all options if not already done. The current architecture tries to
> do better by not initializing components that don't need to. This is nice but
> I don't see why it's necessary.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://dev.sourcefabric.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself;
WebMatrix provides all the features you need to develop and
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Savonet-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-devl