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
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
Modifier and TypeMethodDescriptionaddErrorListener
(EventListener<ErrorEvent> listener) Add aEventListener
for eventErrorEvent
.void
addErrorListener
(EventListener<ErrorEvent> listener, Continuation<ListenerSubscription> cont) Add aEventListener
for eventErrorEvent
.void
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
.Get Children of thisMediaObject
.void
getChildren
(Continuation<List<MediaObject>> cont) Get Children of thisMediaObject
.Get Children of thisMediaObject
.int
GetMediaObject
creation time in seconds since Epoch.void
getCreationTime
(Continuation<Integer> cont) GetMediaObject
creation time in seconds since Epoch.GetMediaObject
creation time in seconds since Epoch.getId()
Get Unique identifier of thisMediaObject
.void
getId
(Continuation<String> cont) Get Unique identifier of thisMediaObject
.getId
(Transaction tx) Get Unique identifier of thisMediaObject
.GetMediaPipeline
to which thisMediaObject
belongs.void
GetMediaPipeline
to which thisMediaObject
belongs.GetMediaPipeline
to which thisMediaObject
belongs.getName()
Get ThisMediaObject
's name.void
getName
(Continuation<String> cont) Get ThisMediaObject
's name.getName
(Transaction tx) Get ThisMediaObject
's name.Get Parent of thisMediaObject
.void
getParent
(Continuation<MediaObject> cont) Get Parent of thisMediaObject
.getParent
(Transaction tx) Get Parent of thisMediaObject
.boolean
Get Flag activating or deactivating sending the element's tags in fired events.void
Get Flag activating or deactivating sending the element's tags in fired events.Get Flag activating or deactivating sending the element's tags in fired events.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.getTag
(Transaction tx, String key) Returns the value of given tag, or MEDIA_OBJECT_TAG_KEY_NOT_FOUND if tag is not defined.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.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
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
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 Details
-
getMediaPipeline
MediaPipeline getMediaPipeline()GetMediaPipeline
to which thisMediaObject
belongs. It returns itself when invoked for a pipeline object. -
getMediaPipeline
GetMediaPipeline
to which thisMediaObject
belongs. It returns itself when invoked for a pipeline object. -
getMediaPipeline
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
Get Parent of thisMediaObject
.The parent of a
Hub
or aMediaElement
is itsMediaPipeline
. AMediaPipeline
has no parent, so this property will be null. -
getParent
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
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
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
Get Children of thisMediaObject
. -
getChildren
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
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
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
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
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
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
Get Flag activating or deactivating sending the element's tags in fired events. -
getSendTagsInEvents
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
Set Flag activating or deactivating sending the element's tags in fired events. -
setSendTagsInEvents
Set Flag activating or deactivating sending the element's tags in fired events. -
getCreationTime
int getCreationTime()GetMediaObject
creation time in seconds since Epoch. -
getCreationTime
GetMediaObject
creation time in seconds since Epoch. -
getCreationTime
GetMediaObject
creation time in seconds since Epoch. -
addTag
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
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
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
Removes an existing tag. Exists silently with no error if tag is not defined.- Parameters:
key
- Tag name to be removed
-
removeTag
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
Removes an existing tag. Exists silently with no error if tag is not defined.- Parameters:
key
- Tag name to be removed
-
getTag
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
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
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
Returns all tags attached to thisMediaObject
.- Returns:
- An array containing all key-value pairs associated with this
MediaObject
. *
-
getTags
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
Returns all tags attached to thisMediaObject
.- Returns:
- An array containing all key-value pairs associated with this
MediaObject
. *
-
addErrorListener
Add aEventListener
for eventErrorEvent
. Synchronous call.- Parameters:
listener
- Listener to be called on ErrorEvent- Returns:
- ListenerSubscription for the given Listener
-
addErrorListener
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
Remove aListenerSubscription
for eventErrorEvent
. Synchronous call.- Parameters:
listenerSubscription
- Listener subscription to be removed
-
removeErrorListener
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
-