Package flumotion :: Package component :: Package misc :: Package httpserver :: Module httpfile :: Class FLVFile
[hide private]

Class FLVFile

source code

twisted.web.resource.Resource --+    
                                |    
      extern.log.log.Loggable --+    
                                |    
                             File --+
                                    |
                                   FLVFile

I am a File resource for FLV files. I can handle requests with a 'start' GET parameter. This parameter represents the byte offset from where to start. If it is non-zero, I will output an FLV header so the result is playable.

Nested Classes [hide private]

Inherited from twisted.web.resource.Resource: entityType

Instance Methods [hide private]
 
do_prepareBody(self, request, provider, first, last)
I am called before the body of the response gets written, and after generic header setting has been done.
source code

Inherited from File: __init__, getChild, render

Inherited from twisted.web.resource.Resource: __providedBy__, __provides__, delEntity, getChildForRequest, getChildWithDefault, getDynamicEntity, getStaticEntity, listDynamicEntities, listDynamicNames, listEntities, listNames, listStaticEntities, listStaticNames, putChild, reallyPutEntity, render_HEAD

Inherited from extern.log.log.Loggable: debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure, writeMarker

Class Variables [hide private]
  header = 'FLV\x01\x01\x00\x00\x00\t\x00\x00\x00\t'

Inherited from File: badRequest, childNotFound, defaultType, forbiddenerrorpage, internalServerError, logCategory, serviceUnavailable

Inherited from twisted.web.resource.Resource: __implemented__, isLeaf, server

Method Details [hide private]

do_prepareBody(self, request, provider, first, last)

source code 

I am called before the body of the response gets written, and after generic header setting has been done.

I set Content-Length.

Override me to send additional headers, or to prefix the body with data headers.

I can return a Deferred, that should fire with a string header. That header will be written to the request.

Overrides: File.do_prepareBody
(inherited documentation)