public interface MediaObject extends KurentoObject
Base interface used to manage capabilities common to all Kurento elements. This includes both: MediaElement
and MediaPipeline
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.elemenType
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
MediaObject
. Its default value is the same as the ID.MediaObject
instance.
Modifier and Type | Method and Description |
---|---|
ListenerSubscription |
addErrorListener(EventListener<ErrorEvent> listener)
Add a
EventListener for event ErrorEvent . |
void |
addErrorListener(EventListener<ErrorEvent> listener,
Continuation<ListenerSubscription> cont)
Add a
EventListener for event ErrorEvent . |
void |
addTag(String key,
String value)
Adds a new tag to this
MediaObject . |
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 this
MediaObject . |
List<MediaObject> |
getChildren()
Get children of this
MediaObject . |
void |
getChildren(Continuation<List<MediaObject>> cont)
Get children of this
MediaObject . |
TFuture<List<MediaObject>> |
getChildren(Transaction tx)
Get children of this
MediaObject . |
List<MediaObject> |
getChilds()
Deprecated.
Get (Use children instead) children of this
MediaObject . |
void |
getChilds(Continuation<List<MediaObject>> cont)
Deprecated.
Get (Use children instead) children of this
MediaObject . |
TFuture<List<MediaObject>> |
getChilds(Transaction tx)
Deprecated.
Get (Use children instead) children of this
MediaObject . |
int |
getCreationTime()
Get
MediaObject creation time in seconds since Epoch. |
void |
getCreationTime(Continuation<Integer> cont)
Get
MediaObject creation time in seconds since Epoch. |
TFuture<Integer> |
getCreationTime(Transaction tx)
Get
MediaObject creation time in seconds since Epoch. |
String |
getId()
Get unique identifier of this
MediaObject . |
void |
getId(Continuation<String> cont)
Get unique identifier of this
MediaObject . |
TFuture<String> |
getId(Transaction tx)
Get unique identifier of this
MediaObject . |
MediaPipeline |
getMediaPipeline()
Get
MediaPipeline to which this MediaObject belongs. |
void |
getMediaPipeline(Continuation<MediaPipeline> cont)
Get
MediaPipeline to which this MediaObject belongs. |
TFuture<MediaPipeline> |
getMediaPipeline(Transaction tx)
Get
MediaPipeline to which this MediaObject belongs. |
String |
getName()
Get this
MediaObject 's name. |
void |
getName(Continuation<String> cont)
Get this
MediaObject 's name. |
TFuture<String> |
getName(Transaction tx)
Get this
MediaObject 's name. |
MediaObject |
getParent()
Get parent of this
MediaObject . |
void |
getParent(Continuation<MediaObject> cont)
Get parent of this
MediaObject . |
TFuture<MediaObject> |
getParent(Transaction tx)
Get parent of this
MediaObject . |
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 this
MediaObject . |
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 this
MediaObject . |
void |
removeErrorListener(ListenerSubscription listenerSubscription)
Remove a
ListenerSubscription for event ErrorEvent . |
void |
removeErrorListener(ListenerSubscription listenerSubscription,
Continuation<Void> cont)
Remove a
ListenerSubscription for event ErrorEvent . |
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 this
MediaObject 's name. |
void |
setName(String name,
Continuation<Void> cont)
Set this
MediaObject 's name. |
void |
setName(String name,
Transaction tx)
Set this
MediaObject '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.
|
isCommited, release, release, release, waitCommited, whenCommited, whenCommited
MediaPipeline getMediaPipeline()
MediaPipeline
to which this MediaObject
belongs. It returns itself when invoked for a pipeline object.void getMediaPipeline(Continuation<MediaPipeline> cont)
MediaPipeline
to which this MediaObject
belongs. It returns itself when invoked for a pipeline object.TFuture<MediaPipeline> getMediaPipeline(Transaction tx)
MediaPipeline
to which this MediaObject
belongs. It returns itself when invoked for a pipeline object.MediaObject getParent()
MediaObject
. The parent of a Hub
or a MediaElement
is its MediaPipeline
. A MediaPipeline
has no parent, so this property will be null.void getParent(Continuation<MediaObject> cont)
MediaObject
. The parent of a Hub
or a MediaElement
is its MediaPipeline
. A MediaPipeline
has no parent, so this property will be null.TFuture<MediaObject> getParent(Transaction tx)
MediaObject
. The parent of a Hub
or a MediaElement
is its MediaPipeline
. A MediaPipeline
has no parent, so this property will be null.String getId()
MediaObject
. 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
in interface KurentoObject
void getId(Continuation<String> cont)
MediaObject
. 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.TFuture<String> getId(Transaction tx)
MediaObject
. 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.List<MediaObject> getChilds()
MediaObject
.void getChilds(Continuation<List<MediaObject>> cont)
MediaObject
.TFuture<List<MediaObject>> getChilds(Transaction tx)
MediaObject
.List<MediaObject> getChildren()
MediaObject
.void getChildren(Continuation<List<MediaObject>> cont)
MediaObject
.TFuture<List<MediaObject>> getChildren(Transaction tx)
MediaObject
.String getName()
MediaObject
's name. This is just a comodity to simplify developers' life debugging, it is not used internally for indexing nor idenfiying the objects. By default, it's the object's ID.void getName(Continuation<String> cont)
MediaObject
's name. This is just a comodity to simplify developers' life debugging, it is not used internally for indexing nor idenfiying the objects. By default, it's the object's ID.TFuture<String> getName(Transaction tx)
MediaObject
's name. This is just a comodity to simplify developers' life debugging, it is not used internally for indexing nor idenfiying the objects. By default, it's the object's ID.void setName(String name)
MediaObject
's name. This is just a comodity to simplify developers' life debugging, it is not used internally for indexing nor idenfiying the objects. By default, it's the object's ID.void setName(String name, Continuation<Void> cont)
MediaObject
's name. This is just a comodity to simplify developers' life debugging, it is not used internally for indexing nor idenfiying the objects. By default, it's the object's ID.void setName(String name, Transaction tx)
MediaObject
's name. This is just a comodity to simplify developers' life debugging, it is not used internally for indexing nor idenfiying the objects. By default, it's the object's ID.boolean getSendTagsInEvents()
void getSendTagsInEvents(Continuation<Boolean> cont)
TFuture<Boolean> getSendTagsInEvents(Transaction tx)
void setSendTagsInEvents(boolean sendTagsInEvents)
void setSendTagsInEvents(boolean sendTagsInEvents, Continuation<Void> cont)
void setSendTagsInEvents(boolean sendTagsInEvents, Transaction tx)
int getCreationTime()
MediaObject
creation time in seconds since Epoch.void getCreationTime(Continuation<Integer> cont)
MediaObject
creation time in seconds since Epoch.TFuture<Integer> getCreationTime(Transaction tx)
MediaObject
creation time in seconds since Epoch.void addTag(String key, String value)
MediaObject
. If the tag is already present, it changes the value.key
- Tag name.value
- Value associated to this tag.void addTag(String key, String value, Continuation<Void> cont)
Continuation.onSuccess(F)
is called when the action is
done. If an error occurs, Continuation.onError(java.lang.Throwable)
is called.key
- Tag name.value
- Value associated to this tag.addTag(java.lang.String, java.lang.String)
void addTag(Transaction tx, String key, String value)
MediaObject
. If the tag is already present, it changes the value.key
- Tag name.value
- Value associated to this tag.void removeTag(String key)
key
- Tag name to be removedvoid removeTag(String key, Continuation<Void> cont)
Continuation.onSuccess(F)
is called when the action is
done. If an error occurs, Continuation.onError(java.lang.Throwable)
is called.key
- Tag name to be removedremoveTag(java.lang.String)
void removeTag(Transaction tx, String key)
key
- Tag name to be removedString getTag(String key)
key
- Tag key.void getTag(String key, Continuation<String> cont)
Continuation.onSuccess(F)
is called when the action is
done. If an error occurs, Continuation.onError(java.lang.Throwable)
is called.key
- Tag key.getTag(java.lang.String)
TFuture<String> getTag(Transaction tx, String key)
key
- Tag key.List<Tag> getTags()
MediaObject
.MediaObject
. *void getTags(Continuation<List<Tag>> cont)
Continuation.onSuccess(F)
is called when the action is
done. If an error occurs, Continuation.onError(java.lang.Throwable)
is called.getTags()
TFuture<List<Tag>> getTags(Transaction tx)
MediaObject
.MediaObject
. *ListenerSubscription addErrorListener(EventListener<ErrorEvent> listener)
EventListener
for event ErrorEvent
. Synchronous call.listener
- Listener to be called on ErrorEventvoid addErrorListener(EventListener<ErrorEvent> listener, Continuation<ListenerSubscription> cont)
EventListener
for event ErrorEvent
. Asynchronous call.
Calls Continuation<ListenerSubscription> when it has been added.listener
- Listener to be called on ErrorEventcont
- Continuation to be called when the listener is registeredvoid removeErrorListener(ListenerSubscription listenerSubscription)
ListenerSubscription
for event ErrorEvent
. Synchronous call.listenerSubscription
- Listener subscription to be removedvoid removeErrorListener(ListenerSubscription listenerSubscription, Continuation<Void> cont)
ListenerSubscription
for event ErrorEvent
. Asynchronous call.
Calls Continuation<Void> when it has been removed.listenerSubscription
- Listener subscription to be removedcont
- Continuation to be called when the listener is removedCopyright © 2018 Kurento. All rights reserved.