public class VideoServiceImpl extends DefaultComponent implements VideoService
VideoService
.Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_VIDEO_CONVERSIONS_EP |
static String |
VIDEO_CONVERSIONS_EP |
Constructor and Description |
---|
VideoServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
activate(ComponentContext context)
Activates the component.
|
void |
clearProgressStatus(VideoConversionId id)
Clear the status of the video conversion identified by the given
id . |
TranscodedVideo |
convert(VideoConversionId id,
Video originalVideo,
String conversionName)
Convert the
originalVideo using the given conversionName . |
TranscodedVideo |
convert(Video originalVideo,
String conversionName)
Convert the
originalVideo using the given conversionName . |
void |
deactivate(ComponentContext context)
Deactivates the component.
|
Collection<VideoConversion> |
getAvailableVideoConversions()
Returns the available registered video conversions that can be run on a
Video document.
|
VideoConversionStatus |
getProgressStatus(VideoConversionId id)
Returns the status of the video conversion identified by the given
id . |
void |
launchAutomaticConversions(DocumentModel doc)
Launch all the registered automatic video conversions on the given
doc . |
void |
launchConversion(DocumentModel doc,
String conversionName)
Launch an asynchronously video conversion of the given
doc . |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
applicationStarted, getAdapter, registerExtension, unregisterExtension
public static final String VIDEO_CONVERSIONS_EP
public static final String DEFAULT_VIDEO_CONVERSIONS_EP
public void activate(ComponentContext context) throws Exception
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextException
- if an error occurs during activationpublic void deactivate(ComponentContext context) throws Exception
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextException
- if an error occurs during activationpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
registerContribution
in class DefaultComponent
Exception
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
unregisterContribution
in class DefaultComponent
Exception
public Collection<VideoConversion> getAvailableVideoConversions()
VideoService
getAvailableVideoConversions
in interface VideoService
public void launchConversion(DocumentModel doc, String conversionName)
VideoService
doc
.launchConversion
in interface VideoService
doc
- the video document to be convertedconversionName
- the video conversion to usepublic void launchAutomaticConversions(DocumentModel doc)
VideoService
doc
.launchAutomaticConversions
in interface VideoService
doc
- the video document to be convertedpublic TranscodedVideo convert(Video originalVideo, String conversionName)
VideoService
originalVideo
using the given conversionName
.convert
in interface VideoService
originalVideo
- the video to convertconversionName
- the video conversion to useTranscodedVideo
object of the converted video.public TranscodedVideo convert(VideoConversionId id, Video originalVideo, String conversionName)
VideoService
originalVideo
using the given conversionName
.convert
in interface VideoService
id
- unique identifier of the video conversion calling this method,
used for monitoring.originalVideo
- the video to convertconversionName
- the video conversion to useTranscodedVideo
object for the converted video.public VideoConversionStatus getProgressStatus(VideoConversionId id)
VideoService
id
.getProgressStatus
in interface VideoService
id
- unique identifier of the video conversionpublic void clearProgressStatus(VideoConversionId id)
VideoService
id
.clearProgressStatus
in interface VideoService
id
- unique identifier of the video conversionCopyright © 2011 Nuxeo SA. All Rights Reserved.