The idea is that you put the file in the workspace via:

Workspace.put(String mediaPackageID, String mediaPackageElementID, String
fileName, InputStream in)

which returns a URI to the file.  You then add a track to the mediapackage
with that URI.  Using addDerived helps others understand that the new track
was derived from the original:

Track splitTrack = (Track) MediaPackageElementBuilder.elementFromURI(uri,
Type.Track, MediaPackageElements.PRESENTER_SOURCE);
mediaPackage.addDerived(originalSourceTrack, splitTrack);

Then return the mediapackage as part of the WorkflowOperationResult.

Josh

On Wed, Mar 2, 2011 at 12:59 AM, Robert Robere <[email protected]> wrote:

> Hello All,
>
> I'm working on an operation handler to take the video streams from NCAST
> cards and split them into two files. The idea was to write this as an
> operation handler and perform the splitting during processing. Currently, I
> have a reference to the workspace injected so I can run a gstreamer pipeline
> to split the file locally, but what is the best way to insert the resultant
> pair of videos back into the workspace? Do I add a new Track to the
> MediaPackage, or do I use the addDerived method to add a modified Track?
> (I'm sorry but I'm a little lost).
>
> Robert Robere
>
> _______________________________________________
> Matterhorn mailing list
> [email protected]
> http://lists.opencastproject.org/mailman/listinfo/matterhorn
>
>
> To unsubscribe please email
> [email protected]
> _______________________________________________
>
_______________________________________________
Matterhorn mailing list
[email protected]
http://lists.opencastproject.org/mailman/listinfo/matterhorn


To unsubscribe please email
[email protected]
_______________________________________________

Reply via email to