Interface MediaObject
-
- All Superinterfaces:
KurentoObject
- All Known Subinterfaces:
AlphaBlending
,BaseRtpEndpoint
,Composite
,Dispatcher
,DispatcherOneToMany
,Endpoint
,FaceOverlayFilter
,Filter
,GenericMediaElement
,GStreamerFilter
,HttpEndpoint
,HttpPostEndpoint
,Hub
,HubPort
,ImageOverlayFilter
,MediaElement
,MediaPipeline
,Mixer
,OpenCVFilter
,PassThrough
,PlayerEndpoint
,RecorderEndpoint
,RtpEndpoint
,SdpEndpoint
,ServerManager
,SessionEndpoint
,UriEndpoint
,WebRtcEndpoint
,ZBarFilter
public interface MediaObject extends KurentoObject
Base interface used to manage capabilities common to all Kurento elements.Properties
-
id: unique identifier assigned to this
MediaObject
at instantiation time.MediaPipeline
IDs are generated with a GUID followed by suffix_kurento.MediaPipeline
.MediaElement
IDs are also a GUID with suffix_kurento.{ElementType}
and prefixed by parent's ID.- MediaPipeline ID example
-
907cac3a-809a-4bbe-a93e-ae7e944c5cae_kurento.MediaPipeline
- MediaElement ID example
-
907cac3a-809a-4bbe-a93e-ae7e944c5cae_kurento.MediaPipeline/403da25a-805b-4cf1-8c55-f190588e6c9b_kurento.WebRtcEndpoint
-
name: free text intended to provide a friendly name for this
MediaObject
. Its default value is the same as the ID. -
tags: key-value pairs intended for applications to associate metadata
to this
MediaObject
instance.
Events
-
ErrorEvent
: reports asynchronous error events. It is recommended to always subscribe a listener to this event, as regular error from the pipeline will be notified through it, instead of through an exception when invoking a method.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ListenerSubscription
addErrorListener(EventListener<ErrorEvent> listener)
Add aEventListener
for eventErrorEvent
.void
addErrorListener(EventListener<ErrorEvent> listener, Continuation<ListenerSubscription> cont)
Add aEventListener
for eventErrorEvent
.void
addTag(String key, String value)
Adds a new tag to thisMediaObject
.void
addTag(String key, String value, Continuation<Void> cont)
Asynchronous version of addTag:Continuation.onSuccess(F)
is called when the action is done.void
addTag(Transaction tx, String key, String value)
Adds a new tag to thisMediaObject
.List<MediaObject>
getChildren()
Get Children of thisMediaObject
.void
getChildren(Continuation<List<MediaObject>> cont)
Get Children of thisMediaObject
.TFuture<List<MediaObject>>
getChildren(Transaction tx)
Get Children of thisMediaObject
.int
getCreationTime()
GetMediaObject
creation time in seconds since Epoch.void
getCreationTime(Continuation<Integer> cont)
GetMediaObject
creation time in seconds since Epoch.TFuture<Integer>
getCreationTime(Transaction tx)
GetMediaObject
creation time in seconds since Epoch.String
getId()
Get Unique identifier of thisMediaObject
.void
getId(Continuation<String> cont)
Get Unique identifier of thisMediaObject
.TFuture<String>
getId(Transaction tx)
Get Unique identifier of thisMediaObject
.MediaPipeline
getMediaPipeline()
GetMediaPipeline
to which thisMediaObject
belongs.void
getMediaPipeline(Continuation<MediaPipeline> cont)
GetMediaPipeline
to which thisMediaObject
belongs.TFuture<MediaPipeline>
getMediaPipeline(Transaction tx)
GetMediaPipeline
to which thisMediaObject
belongs.String
getName()
Get ThisMediaObject
's name.void
getName(Continuation<String> cont)
Get ThisMediaObject
's name.TFuture<String>
getName(Transaction tx)
Get ThisMediaObject
's name.MediaObject
getParent()
Get Parent of thisMediaObject
.void
getParent(Continuation<MediaObject> cont)
Get Parent of thisMediaObject
.TFuture<MediaObject>
getParent(Transaction tx)
Get Parent of thisMediaObject
.boolean
getSendTagsInEvents()
Get Flag activating or deactivating sending the element's tags in fired events.void
getSendTagsInEvents(Continuation<Boolean> cont)
Get Flag activating or deactivating sending the element's tags in fired events.TFuture<Boolean>
getSendTagsInEvents(Transaction tx)
Get Flag activating or deactivating sending the element's tags in fired events.String
getTag(String key)
Returns the value of given tag, or MEDIA_OBJECT_TAG_KEY_NOT_FOUND if tag is not defined.void
getTag(String key, Continuation<String> cont)
Asynchronous version of getTag:Continuation.onSuccess(F)
is called when the action is done.TFuture<String>
getTag(Transaction tx, String key)
Returns the value of given tag, or MEDIA_OBJECT_TAG_KEY_NOT_FOUND if tag is not defined.List<Tag>
getTags()
Returns all tags attached to thisMediaObject
.void
getTags(Continuation<List<Tag>> cont)
Asynchronous version of getTags:Continuation.onSuccess(F)
is called when the action is done.TFuture<List<Tag>>
getTags(Transaction tx)
Returns all tags attached to thisMediaObject
.void
removeErrorListener(ListenerSubscription listenerSubscription)
Remove aListenerSubscription
for eventErrorEvent
.void
removeErrorListener(ListenerSubscription listenerSubscription, Continuation<Void> cont)
Remove aListenerSubscription
for eventErrorEvent
.void
removeTag(String key)
Removes an existing tag.void
removeTag(String key, Continuation<Void> cont)
Asynchronous version of removeTag:Continuation.onSuccess(F)
is called when the action is done.void
removeTag(Transaction tx, String key)
Removes an existing tag.void
setName(String name)
Set ThisMediaObject
's name.void
setName(String name, Continuation<Void> cont)
Set ThisMediaObject
's name.void
setName(String name, Transaction tx)
Set ThisMediaObject
's name.void
setSendTagsInEvents(boolean sendTagsInEvents)
Set Flag activating or deactivating sending the element's tags in fired events.void
setSendTagsInEvents(boolean sendTagsInEvents, Continuation<Void> cont)
Set Flag activating or deactivating sending the element's tags in fired events.void
setSendTagsInEvents(boolean sendTagsInEvents, Transaction tx)
Set Flag activating or deactivating sending the element's tags in fired events.-
Methods inherited from interface org.kurento.client.KurentoObject
addEventListener, invoke, isCommited, release, release, release, removeEventListener, waitCommited, whenCommited, whenCommited
-
-
-
-
Method Detail
-
getMediaPipeline
MediaPipeline getMediaPipeline()
GetMediaPipeline
to which thisMediaObject
belongs. It returns itself when invoked for a pipeline object.
-
getMediaPipeline
void getMediaPipeline(Continuation<MediaPipeline> cont)
GetMediaPipeline
to which thisMediaObject
belongs. It returns itself when invoked for a pipeline object.
-
getMediaPipeline
TFuture<MediaPipeline> getMediaPipeline(Transaction tx)
GetMediaPipeline
to which thisMediaObject
belongs. It returns itself when invoked for a pipeline object.
-
getParent
MediaObject getParent()
Get Parent of thisMediaObject
.The parent of a
Hub
or aMediaElement
is itsMediaPipeline
. AMediaPipeline
has no parent, so this property will be null.
-
getParent
void getParent(Continuation<MediaObject> cont)
Get Parent of thisMediaObject
.The parent of a
Hub
or aMediaElement
is itsMediaPipeline
. AMediaPipeline
has no parent, so this property will be null.
-
getParent
TFuture<MediaObject> getParent(Transaction tx)
Get Parent of thisMediaObject
.The parent of a
Hub
or aMediaElement
is itsMediaPipeline
. AMediaPipeline
has no parent, so this property will be null.
-
getId
String getId()
Get Unique identifier of thisMediaObject
.It's a synthetic identifier composed by a GUID and
MediaObject
type. The ID is prefixed with the parent ID when the object has parent: ID_parent/ID_media-object.- Specified by:
getId
in interfaceKurentoObject
-
getId
void getId(Continuation<String> cont)
Get Unique identifier of thisMediaObject
.It's a synthetic identifier composed by a GUID and
MediaObject
type. The ID is prefixed with the parent ID when the object has parent: ID_parent/ID_media-object.
-
getId
TFuture<String> getId(Transaction tx)
Get Unique identifier of thisMediaObject
.It's a synthetic identifier composed by a GUID and
MediaObject
type. The ID is prefixed with the parent ID when the object has parent: ID_parent/ID_media-object.
-
getChildren
List<MediaObject> getChildren()
Get Children of thisMediaObject
.
-
getChildren
void getChildren(Continuation<List<MediaObject>> cont)
Get Children of thisMediaObject
.
-
getChildren
TFuture<List<MediaObject>> getChildren(Transaction tx)
Get Children of thisMediaObject
.
-
getName
String getName()
Get ThisMediaObject
's name.This is just sugar to simplify developers' life debugging, it is not used internally for indexing nor identifying the objects. By default, it's the object's ID.
-
getName
void getName(Continuation<String> cont)
Get ThisMediaObject
's name.This is just sugar to simplify developers' life debugging, it is not used internally for indexing nor identifying the objects. By default, it's the object's ID.
-
getName
TFuture<String> getName(Transaction tx)
Get ThisMediaObject
's name.This is just sugar to simplify developers' life debugging, it is not used internally for indexing nor identifying the objects. By default, it's the object's ID.
-
setName
void setName(String name)
Set ThisMediaObject
's name.This is just sugar to simplify developers' life debugging, it is not used internally for indexing nor identifying the objects. By default, it's the object's ID.
-
setName
void setName(String name, Continuation<Void> cont)
Set ThisMediaObject
's name.This is just sugar to simplify developers' life debugging, it is not used internally for indexing nor identifying the objects. By default, it's the object's ID.
-
setName
void setName(String name, Transaction tx)
Set ThisMediaObject
's name.This is just sugar to simplify developers' life debugging, it is not used internally for indexing nor identifying the objects. By default, it's the object's ID.
-
getSendTagsInEvents
boolean getSendTagsInEvents()
Get Flag activating or deactivating sending the element's tags in fired events.
-
getSendTagsInEvents
void getSendTagsInEvents(Continuation<Boolean> cont)
Get Flag activating or deactivating sending the element's tags in fired events.
-
getSendTagsInEvents
TFuture<Boolean> getSendTagsInEvents(Transaction tx)
Get Flag activating or deactivating sending the element's tags in fired events.
-
setSendTagsInEvents
void setSendTagsInEvents(boolean sendTagsInEvents)
Set Flag activating or deactivating sending the element's tags in fired events.
-
setSendTagsInEvents
void setSendTagsInEvents(boolean sendTagsInEvents, Continuation<Void> cont)
Set Flag activating or deactivating sending the element's tags in fired events.
-
setSendTagsInEvents
void setSendTagsInEvents(boolean sendTagsInEvents, Transaction tx)
Set Flag activating or deactivating sending the element's tags in fired events.
-
getCreationTime
int getCreationTime()
GetMediaObject
creation time in seconds since Epoch.
-
getCreationTime
void getCreationTime(Continuation<Integer> cont)
GetMediaObject
creation time in seconds since Epoch.
-
getCreationTime
TFuture<Integer> getCreationTime(Transaction tx)
GetMediaObject
creation time in seconds since Epoch.
-
addTag
void addTag(String key, String value)
Adds a new tag to thisMediaObject
. If the tag is already present, it changes the value.- Parameters:
key
- Tag name.value
- Value associated to this tag.
-
addTag
void addTag(String key, String value, Continuation<Void> cont)
Asynchronous version of addTag:Continuation.onSuccess(F)
is called when the action is done. If an error occurs,Continuation.onError(java.lang.Throwable)
is called.- Parameters:
key
- Tag name.value
- Value associated to this tag.- See Also:
addTag(java.lang.String, java.lang.String)
-
addTag
void addTag(Transaction tx, String key, String value)
Adds a new tag to thisMediaObject
. If the tag is already present, it changes the value.- Parameters:
key
- Tag name.value
- Value associated to this tag.
-
removeTag
void removeTag(String key)
Removes an existing tag. Exists silently with no error if tag is not defined.- Parameters:
key
- Tag name to be removed
-
removeTag
void removeTag(String key, Continuation<Void> cont)
Asynchronous version of removeTag:Continuation.onSuccess(F)
is called when the action is done. If an error occurs,Continuation.onError(java.lang.Throwable)
is called.- Parameters:
key
- Tag name to be removed- See Also:
removeTag(java.lang.String)
-
removeTag
void removeTag(Transaction tx, String key)
Removes an existing tag. Exists silently with no error if tag is not defined.- Parameters:
key
- Tag name to be removed
-
getTag
String getTag(String key)
Returns the value of given tag, or MEDIA_OBJECT_TAG_KEY_NOT_FOUND if tag is not defined.- Parameters:
key
- Tag key.- Returns:
- The value associated to the given key. *
-
getTag
void getTag(String key, Continuation<String> cont)
Asynchronous version of getTag:Continuation.onSuccess(F)
is called when the action is done. If an error occurs,Continuation.onError(java.lang.Throwable)
is called.- Parameters:
key
- Tag key.- See Also:
getTag(java.lang.String)
-
getTag
TFuture<String> getTag(Transaction tx, String key)
Returns the value of given tag, or MEDIA_OBJECT_TAG_KEY_NOT_FOUND if tag is not defined.- Parameters:
key
- Tag key.- Returns:
- The value associated to the given key. *
-
getTags
List<Tag> getTags()
Returns all tags attached to thisMediaObject
.- Returns:
- An array containing all key-value pairs associated with this
MediaObject
. *
-
getTags
void getTags(Continuation<List<Tag>> cont)
Asynchronous version of getTags:Continuation.onSuccess(F)
is called when the action is done. If an error occurs,Continuation.onError(java.lang.Throwable)
is called.- See Also:
getTags()
-
getTags
TFuture<List<Tag>> getTags(Transaction tx)
Returns all tags attached to thisMediaObject
.- Returns:
- An array containing all key-value pairs associated with this
MediaObject
. *
-
addErrorListener
ListenerSubscription addErrorListener(EventListener<ErrorEvent> listener)
Add aEventListener
for eventErrorEvent
. Synchronous call.- Parameters:
listener
- Listener to be called on ErrorEvent- Returns:
- ListenerSubscription for the given Listener
-
addErrorListener
void addErrorListener(EventListener<ErrorEvent> listener, Continuation<ListenerSubscription> cont)
Add aEventListener
for eventErrorEvent
. Asynchronous call. Calls Continuation<ListenerSubscription> when it has been added.- Parameters:
listener
- Listener to be called on ErrorEventcont
- Continuation to be called when the listener is registered
-
removeErrorListener
void removeErrorListener(ListenerSubscription listenerSubscription)
Remove aListenerSubscription
for eventErrorEvent
. Synchronous call.- Parameters:
listenerSubscription
- Listener subscription to be removed
-
removeErrorListener
void removeErrorListener(ListenerSubscription listenerSubscription, Continuation<Void> cont)
Remove aListenerSubscription
for eventErrorEvent
. Asynchronous call. Calls Continuation<Void> when it has been removed.- Parameters:
listenerSubscription
- Listener subscription to be removedcont
- Continuation to be called when the listener is removed
-
-