Cookbook Example
How can I...?
Example 10: Simple dirac player. Shows how to play a specific file. Components used: ReadFileAdaptor, DiracDecoder, MessageRateLimit, VideoOverlay
#!/usr/bin/pythonSource: Examples/example10/SimpleDiracPlayer.py
from Kamaelia.Util.PipelineComponent import pipeline
from Kamaelia.Codec.Dirac import DiracDecoder
from Kamaelia.ReadFileAdaptor import ReadFileAdaptor
from Kamaelia.Util.RateFilter import MessageRateLimit
from Kamaelia.UI.Pygame.VideoOverlay import VideoOverlay
file = "snowboard-jum-352x288x75.dirac.drc"
framerate = 15
pipeline(
ReadFileAdaptor(file, readmode="bitrate",
bitrate = 300000*8/5),
DiracDecoder(),
MessageRateLimit(framerate),
VideoOverlay(),
).run()
(C) 2006 Kamaelia Contributors, including the British Broadcasting Corporation, All Rights Reserved, This is an ongoing community based development site. As a result the contents of this page is the opinions of the contributors of the pages involved not the organisations involved. Specificially, this page may contain personal views which are not the views of the BBC.