October 2018
Intermediate to advanced
420 pages
10h 26m
English
These evolutions can now be used in the server itself. This implies some evolutions in the drivers used by the audio_encoder component, as demonstrated in the following example:
import audio_encode_server.s3 as s3Drivers = namedtuple('Drivers', ['encoder', 'httpd', 's3', 'file', 'argv'])Source = namedtuple('Source', ['encoder', 'httpd', 's3', 'file', 'argv'])Sink = namedtuple('Sink', ['encoder', 'httpd', 's3', 'file'])
The S3 driver has been added, and it is used both in Source and Sink of the component. Inside the component, a new step has been added between the encoding result and the sending of the HTTP response: the file is uploaded on the S3 database. This is done in the following way:
store_requests = ( sources.encoder.response ...
Read now
Unlock full access