org.gstreamer
Class TagList

java.lang.Object
  extended by org.gstreamer.lowlevel.NativeValue
      extended by org.gstreamer.lowlevel.Handle
          extended by org.gstreamer.lowlevel.NativeObject
              extended by org.gstreamer.Structure
                  extended by org.gstreamer.TagList

public class TagList
extends Structure

List of tags and values used to describe media metadata.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.gstreamer.Structure
Structure.InvalidFieldException
 
Nested classes/interfaces inherited from class org.gstreamer.lowlevel.NativeObject
NativeObject.Initializer
 
Field Summary
 
Fields inherited from class org.gstreamer.lowlevel.NativeObject
defaultInit, LIFECYCLE, ownsHandle
 
Constructor Summary
TagList()
          Constructs a new empty tag list.
TagList(NativeObject.Initializer init)
          Creates a new instance of TagList
 
Method Summary
protected  void disposeNativeHandle(com.sun.jna.Pointer ptr)
           
 java.lang.Number getNumber(java.lang.String tag, int index)
          Gets a numeric tag from this list.
 java.lang.Number getNumber(Tag tag, int index)
          Gets a numeric tag from this list.
 java.lang.String getString(java.lang.String tag, int index)
          Gets a string tag from this list.
 java.lang.String getString(Tag tag, int index)
          Gets a string tag from this list.
 java.util.List<java.lang.String> getTagNames()
          Gets a list of all the tags contained in this list.
 java.lang.Object getValue(java.lang.String tag, int index)
          Gets data for a tag from this list.
 java.lang.Object getValue(Tag tag, int index)
          Gets data for a tag from this list.
 int getValueCount(java.lang.String tag)
          Gets the number of values of type tag stored in the list.
 java.util.List<java.lang.Object> getValues(java.lang.String tag)
          Gets all data values for a tag contained in this list.
 java.util.List<java.lang.Object> getValues(Tag tag)
          Gets all data values for a tag contained in this list.
 TagList merge(TagList list2, TagMergeMode mode)
          Merges this tag list and list2 into a new list.
 
Methods inherited from class org.gstreamer.Structure
copy, fixateFieldNearestInteger, fixateNearestInteger, fromString, getBoolean, getDouble, getFraction, getInteger, getName, getString, hasDoubleField, hasField, hasField, hasField, hasIntField, hasName, objectFor, removeField, removeFields, setDouble, setDoubleRange, setInteger, setIntegerRange, setName, toString
 
Methods inherited from class org.gstreamer.lowlevel.NativeObject
classFor, disown, dispose, equals, finalize, getNativeAddress, handle, hashCode, initializer, initializer, instanceFor, invalidate, isDisposed, nativeValue, objectFor, objectFor, objectFor
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TagList

public TagList(NativeObject.Initializer init)
Creates a new instance of TagList

Parameters:
init - internal initialization data.

TagList

public TagList()
Constructs a new empty tag list.

Method Detail

getValueCount

public int getValueCount(java.lang.String tag)
Gets the number of values of type tag stored in the list.

Parameters:
tag - the name of the tag to get the size of.
Returns:
the number of values for tag in this list.

getValues

public java.util.List<java.lang.Object> getValues(java.lang.String tag)
Gets all data values for a tag contained in this list.

Parameters:
tag - the name of the tag to retrieve.
Returns:
the data associated with tag.

getValues

public java.util.List<java.lang.Object> getValues(Tag tag)
Gets all data values for a tag contained in this list.

Parameters:
tag - the name of the tag to retrieve.
Returns:
the data associated with tag.

getValue

public java.lang.Object getValue(java.lang.String tag,
                                 int index)
Gets data for a tag from this list.

Parameters:
tag - the tag to retrieve.
index - which element of the array of data for this tag to retrieve.
Returns:
the data for the tag.

getValue

public java.lang.Object getValue(Tag tag,
                                 int index)
Gets data for a tag from this list.

Parameters:
tag - the tag to retrieve.
index - which element of the array of data for this tag to retrieve.
Returns:
the data for the tag.

getString

public java.lang.String getString(java.lang.String tag,
                                  int index)
Gets a string tag from this list.

Parameters:
tag - the tag to retrieve.
index - which element of the array of data for this tag to retrieve.
Returns:
the data for the tag.

getString

public java.lang.String getString(Tag tag,
                                  int index)
Gets a string tag from this list.

Parameters:
tag - the tag to retrieve.
index - which element of the array of data for this tag to retrieve.
Returns:
the data for the tag.

getNumber

public java.lang.Number getNumber(java.lang.String tag,
                                  int index)
Gets a numeric tag from this list.

Parameters:
tag - the tag to retrieve.
index - which element of the array of data for this tag to retrieve.
Returns:
the data for the tag.

getNumber

public java.lang.Number getNumber(Tag tag,
                                  int index)
Gets a numeric tag from this list.

Parameters:
tag - the tag to retrieve.
index - which element of the array of data for this tag to retrieve.
Returns:
the data for the tag.

getTagNames

public java.util.List<java.lang.String> getTagNames()
Gets a list of all the tags contained in this list.

Returns:
a list of tag names.

merge

public TagList merge(TagList list2,
                     TagMergeMode mode)
Merges this tag list and list2 into a new list. If list2 is null, a copy of this list is returned.

Parameters:
list2 - the other tag list to merge with this one.
mode - the TagMergeMode.
Returns:
a new tag list.

disposeNativeHandle

protected void disposeNativeHandle(com.sun.jna.Pointer ptr)
Overrides:
disposeNativeHandle in class Structure