public class VideoServiceImpl extends DefaultComponent implements VideoService
VideoService
.Modifier and Type | Field and Description |
---|---|
protected AutomaticVideoConversionContributionHandler |
automaticVideoConversions |
protected Configuration |
configuration |
static String |
CONFIGURATION_EP |
static String |
DEFAULT_VIDEO_CONVERSIONS_EP |
protected static org.apache.commons.logging.Log |
log |
static String |
VIDEO_CONVERSIONS_EP |
protected VideoConversionContributionHandler |
videoConversions |
lastModified
Constructor and Description |
---|
VideoServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
activate(ComponentContext context)
Activates the component.
|
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.
|
Configuration |
getConfiguration() |
VideoConversionStatus |
getProgressStatus(String repositoryName,
String docId,
String conversionName)
Returns the status of the video conversion with the given conversion name on the given document.
|
VideoConversion |
getVideoConversion(String conversionName) |
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) |
getAdapter, getLastModified, registerExtension, setLastModified, setModifiedNow, start, stop, unregisterExtension
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applicationStarted, getApplicationStartedOrder
protected static final org.apache.commons.logging.Log log
public static final String VIDEO_CONVERSIONS_EP
public static final String DEFAULT_VIDEO_CONVERSIONS_EP
public static final String CONFIGURATION_EP
protected VideoConversionContributionHandler videoConversions
protected AutomaticVideoConversionContributionHandler automaticVideoConversions
protected Configuration configuration
public VideoServiceImpl()
public void activate(ComponentContext context)
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextpublic void deactivate(ComponentContext context)
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
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 VideoConversionStatus getProgressStatus(String repositoryName, String docId, String conversionName)
VideoService
getProgressStatus
in interface VideoService
public VideoConversion getVideoConversion(String conversionName)
getVideoConversion
in interface VideoService
public Configuration getConfiguration()
getConfiguration
in interface VideoService
Copyright © 2017 Nuxeo. All rights reserved.