Вы находитесь на странице: 1из 3

Ingest

Creating a media package


First, clients will ask the IngestService to create an empty media package (1) by calling createMediaPackage. The service implementation will generate a package identifier that it will return to the caller. In addition, a directory will be created that takes all the package elements that will be added during subsequent calls to the ingest service.

MediaIngestService
Thick Client The client itself creates a skeletal MediaPackage. The MediaPackage, tracks, catalogs and attachment are compressed and added to the repository usingaddMediaPackage(InputStream):

1.
2. 3.

Construct MediaPackage XML Compress the MediaPackage, tracks, catalogs and attachment addMediaPackage(InputStream) Thin Client

The client calls createMediaPackage() and receives an empty MediaPackage. This MediaPackage Document is than acompanying the process of ingestion. To add additional track, catalog or attachment, the client calls addTrack(), addCatalog() and addAttachment() respectevly. The parameters of this methods are: URL or FileStream of the file being added MediaPackageElementFlavor defining the type of the media MediaPackage the last recieved document of this package

The methods return an updated MediaPackage, which must be used with the next call to the add methods. Each add method can be called multiple times. The process to ingest: 1. 2. 3. createMediaPackage() addTrack(), addCatalog(), addAttachment() ingest()

Adding package elements


By calling addMediaPackageTrack, addMediaPackageCatalog and addMediaPackageAttachment, the package elements are added to the media package (2).

Moving the package elements to the WorkingFileRepository


After a call to ingest, the package elements are being downloaded to the ingestor inbox and then moved to the WorkingFileRepository in order to make them locally available (3).

Inspecting the package elements

Then the media package is assembled by calling inspect on the MediaInspectionService for each package element (4) and integrating the extracted technical information (5). That information will mainly consist of technical metadata like bit and framerate, duration, codecs etc.

MediaInspectionService
inspect(URL, NotificationCallback) : Get the technical metadata of a file at the given URL.Notes <track-information> <url>http://</url> <size>214756</size> <checksum type="md5">b155fc32e21f9558c01aa111e9b86647</checksum> <duration>10044</duration> </track-information>

Publishing the media package


Once the media package has been fully compiled, it is picked up by the ConductorService (6), a persite-implementation that is able to decide on what to do next with that media package.

Executing the required workflow


Depending on what the implementation looks like, the conductor service will call the WorkflowService(7) that will in turn make one or more calls to other services (8) in order to have the media package processed in the desired way.

WorkflowService
WorkflowOperation : An operation to run as part of a workflow. <operation name="compose" description="Compose new media" exception-handler-workflow="Default Error Handler" fail-on-error="true"> <configurations> <configuration key="encode">true</configuration> </configurations> </operation>

WorkflowDefinition : An description of a workflow, used as a template for WorkflowInstances. <workflow-definition id="123"> <title>A workflow definition title</title> <description>A workflow definition description</description> <operations> <operation name="compose" fail-on-error="true"/> <operation name="distribute" fail-on-error="false"/> </operations> </workflow-definition>

WorkflowInstance : An instance of a running, paused, or stopped workflow. <workflow-instance state="RUNNING" id="ff4e4b99-850e-4855-8b59215fe165f489"> <title>A workflow definition title Instance ff4e4b99-850e-4855-8b59215fe165f489</title>

<description>A workflow description Instance ff4e4b99-850e-4855-8b59215fe165f489</description> <configurations> <scope name="global"> <configuration key="encode">false</configuration> <configuration key="distribute">true</configuration> </scope> </configurations> <mediapackage duration="1004400000" start="2007-12-05T13:40:00" id="100000/1"/> <operation-definitions> <operation exception-handler-workflow="Default Error Handler" fail-onerror="true" name="compose" /> <operation exception-handler-workflow="Default Error Handler" fail-onerror="true" name="distribute" /> </operation-definitions> <operation-instances> <operation-instance description="Encode media" state="RUNNING" name="compose"> <configurations> <configuration key="distribute">true</configuration> <configuration key="encode">false</configuration> </configurations> </operation-instance> </operation-instances> </workflow-instance>

Processing the results


Finally, the workflow service will report back to the ConductorService (9) to indicate that processing has come to an end.

Вам также может понравиться