com.googlecode.fascinator.transformer.ffmpeg
Class FfmpegDatabase

java.lang.Object
  extended by com.googlecode.fascinator.transformer.ffmpeg.FfmpegDatabase

public class FfmpegDatabase
extends Object

A wrapper class for database access to collect FFmpeg transcoding information This class can be used for statistical collection, as well as to support decision making on whether a re-transcode is required.

Author:
Greg Pendlebury

Constructor Summary
FfmpegDatabase(JsonSimple config)
           
 
Method Summary
 long getLastTranscoded(String oid, String render, String source, String output, String resolution)
          Retrieve from the database the timestamp of the last time this particular transcoding was performed.
 void shutdown()
          Shutdown the database connections and cleanup.
 void storeTranscoding(Map<String,String> data)
          Store the transcoding data in the provided map
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FfmpegDatabase

public FfmpegDatabase(JsonSimple config)
               throws Exception
Throws:
Exception
Method Detail

shutdown

public void shutdown()
              throws Exception
Shutdown the database connections and cleanup.

Throws:
Exception - if there are errors

getLastTranscoded

public long getLastTranscoded(String oid,
                              String render,
                              String source,
                              String output,
                              String resolution)
Retrieve from the database the timestamp of the last time this particular transcoding was performed.

Parameters:
oid: - The object identifier of the source
render: - The render string used to transcode
source: - The source file transcoded from
output: - The output file transcoded to
resolution: - The resolution of the output
Returns:
long: The timestamp when the transcoding occurred

storeTranscoding

public void storeTranscoding(Map<String,String> data)
                      throws Exception
Store the transcoding data in the provided map

Parameters:
data: - A map of transcoding data from the transformer
Throws:
Exception


Copyright © 2009-2014. All Rights Reserved.