Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
urshofer committed Apr 17, 2015
2 parents a6ad74f + c33d85e commit 5796711
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Start Function:
ffmpeg.start();
ffmpeg.start(string path_to_ffmpeg); // Path with trailing slash required!

Create a slice of a movie clip in the background:
Create a slice of a movie clip in the background. The message string is passed to the onFileProcessed event:

ffmpeg.addTask(string file, float in_point, int frames_duration);
ffmpeg.addTask(string file, float in_point, int frames_duration, string message);

Check how many clips are pending in the queue:

Expand Down Expand Up @@ -77,3 +77,30 @@ Width:
ffmpeg.setWidth(int _width)

Set Width of scaled output (default: 640). Height is set automatically according to the original aspect ratio.

Events
------

You can register the following event:

ofEvent<endEvent> onFileProcessed;

In you application, register the event like (assuming your instance of the add-on is called ffmpeg):

ofAddListener(ffmpeg.onFileProcessed,this, &ofApp::onFileProcessed);

The callback function receives a endEvent struct as parameter:

void ofApp::onFileProcessed(ofxVideoSlicer::endEvent & ev) {
cout << ev.file << " processed with the message " << ev.message;
}

As you can see, endEvent contains two string, the filename and the message you passed on the beginning:

struct endEvent {
string file;
string message;
};

You can use the message for various purposes. One is to pass metadata about the movie to the slicer and
upload it afterwards together with the movie clip to a web server.

0 comments on commit 5796711

Please sign in to comment.