Kristian Lippert a écrit : > Olivier wrote >> I had a very quick look at the code you sent me. I would say that it can >> be done in a much simpler way. If you already have the URLs to the MMS >> streams then you don't need a resource provider and new models. A simple >> controller that lists the streams and passes a PlayableModel to the >> player should do (in a first step, let's make things simple first, and >> then enrich them!). The player, being gstreamer-based, is perfectly able >> to handle MMS streams. >> > > Any examples in Elisa on the simple controller? (I know nothing of > Python and Elisa, but am an excellent C++ programmer). It is much easier > to learn by example for me!
The YoutubeController (in elisa-plugins/elisa/plugins/youtube/controller.py) is pretty simple and you could base your controller on this. Your list of streams should be populated in the initialize() method. The rendering of the list items is implemented in the YoutubeViewMode that inherits from the GenericListViewMode. API documentation is available at http://elisa.fluendo.com/documentation/api/elisa.plugins.poblesec.base.hierarchy.HierarchyController.html and http://elisa.fluendo.com/documentation/api/elisa.plugins.poblesec.base.list.GenericListViewMode.html. One gotcha you'll want to understand when working with Elisa: we make heavy use of twisted's deferreds mechanism to ensure a reactive UI at all moments. If you are not familiar with asynchronous programming and deferreds in particular, I advise you to start by reading the tutorial: http://twistedmatrix.com/projects/core/documentation/howto/deferredindepth.html. > Best Regards, > Kristian Cheers, Olivier
