org.mmbase.util.media.video
Class RawVideoDef

java.lang.Object
  |
  +--org.mmbase.util.media.video.RawVideoDef
All Implemented Interfaces:
java.lang.Comparable, CompareInterface, Sortable

public class RawVideoDef
extends java.lang.Object
implements java.lang.Comparable, CompareInterface, Sortable

The main function of this class is to provide a means to sort through a collection of RawVideo objects (from the rawvideos builder). MMObjectNodes can not easily be sorted (unless through sql querying). This class is, essentially, a wrapper that provides this sorting functionality.

Version:
$Id: RawVideoDef.java,v 1.8 2002/07/23 14:05:13 vpro Exp $
Author:
vpro

Field Summary
 int channels
          Rawvideo nr of channels, used for sorting
 java.lang.String cpu
          Deprecated. not used?
 int format
          Deprecated. should be retrieved from node reference
static int FORMAT_G2
          G2 (surestream) audio format
static int FORMAT_R5
          Real (.ra) audio format
 int id
          Rawvideo id, used for sorting
static int MAXCHANNELS
           
static int MAXSPEED
           
static int MINCHANNELS
           
static int MINSPEED
           
 int number
          Deprecated. should be retrieved from node reference
 int otype
          Deprecated. not used?
 java.lang.String owner
          Deprecated. not used?
 int speed
          Rawvideo speed, used for sorting
 int status
          Deprecated. should be retrieved from node reference
static int STATUS_BUSY
           
static int STATUS_DONE
           
static int STATUS_GEDAAN
          Deprecated. use STATUS_DONE
static int STATUS_ONDERWEG
          Deprecated. use STATUS_BUSY
static int STATUS_REQUEST
           
static int STATUS_VERZOEK
          Deprecated. use STATUS_REQUEST
 java.lang.String url
          Deprecated. should be retrieved from node reference
 
Constructor Summary
RawVideoDef(MMObjectNode node)
          Creates an instance of the sortable wrapper for an MMObjectNode.
 
Method Summary
 int compare(java.lang.Object thisO, java.lang.Object otherO)
          Deprecated. use compareTo(java.lang.Object) instead
 int compare(Sortable otherItem)
          Deprecated. use compareTo(java.lang.Object) instead
 int compareTo(java.lang.Object o)
          Compares this RawVideo object to the passed RawVideo object RawVideo objects are compared (and ordered) by their id, speed, and channel.
 boolean equals(java.lang.Object o)
          Compares whether this object and the passed object are the same
 java.lang.String getRealVideoUrl(scanpage sp)
          Retrieves the url for an raw audio, based on info in the format and url fields of a wrapped rawaudio node.
static java.util.Vector sort(java.util.Vector unsorted)
          Deprecated. use Collections.sort()
 java.lang.String toString()
          Returns a string representation of this object, for debugging purposes.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STATUS_VERZOEK

public static final int STATUS_VERZOEK
Deprecated. use STATUS_REQUEST


STATUS_REQUEST

public static final int STATUS_REQUEST

STATUS_ONDERWEG

public static final int STATUS_ONDERWEG
Deprecated. use STATUS_BUSY


STATUS_BUSY

public static final int STATUS_BUSY

STATUS_GEDAAN

public static final int STATUS_GEDAAN
Deprecated. use STATUS_DONE


STATUS_DONE

public static final int STATUS_DONE

FORMAT_R5

public static final int FORMAT_R5
Real (.ra) audio format

FORMAT_G2

public static final int FORMAT_G2
G2 (surestream) audio format

MINSPEED

public static final int MINSPEED

MAXSPEED

public static final int MAXSPEED

MINCHANNELS

public static final int MINCHANNELS

MAXCHANNELS

public static final int MAXCHANNELS

number

public int number
Deprecated. should be retrieved from node reference

Rawvideo object number

otype

public int otype
Deprecated. not used?

Rawvideo object type

owner

public java.lang.String owner
Deprecated. not used?

Rawvideo object owner

id

public int id
Rawvideo id, used for sorting

status

public int status
Deprecated. should be retrieved from node reference


format

public int format
Deprecated. should be retrieved from node reference

Rawvideo format, determines video url protocol

speed

public int speed
Rawvideo speed, used for sorting

channels

public int channels
Rawvideo nr of channels, used for sorting

url

public java.lang.String url
Deprecated. should be retrieved from node reference

Rawvideo url

cpu

public java.lang.String cpu
Deprecated. not used?

Rawvideo cpu (?)
Constructor Detail

RawVideoDef

public RawVideoDef(MMObjectNode node)
Creates an instance of the sortable wrapper for an MMObjectNode. This class copies a node's values to speed up the sorting process.
Parameters:
node - the node to wrap
Method Detail

compareTo

public int compareTo(java.lang.Object o)
Compares this RawVideo object to the passed RawVideo object RawVideo objects are compared (and ordered) by their id, speed, and channel.
Specified by:
compareTo in interface java.lang.Comparable
Parameters:
o - the object to compare this object to
Returns:
0 if the objects are the same, -1 if the passed object is greater than this object, 1 passed if the object is smaller than this object.
Since:
MMBase-1.6

equals

public boolean equals(java.lang.Object o)
Compares whether this object and the passed object are the same
Overrides:
equals in class java.lang.Object
Parameters:
o - the object to compare this object to
Returns:
true if the objects are the same, false otherwise
Since:
MMBase-1.6

compare

public int compare(Sortable otherItem)
Deprecated. use compareTo(java.lang.Object) instead

Compares this object to the passed object
Specified by:
compare in interface Sortable
Parameters:
otherItem - the object to compare this object to
Returns:
0 if the objects are the same, -1 if the passed object is greater than this object, 1 passed if the object is smaller than this object.

compare

public int compare(java.lang.Object thisO,
                   java.lang.Object otherO)
Deprecated. use compareTo(java.lang.Object) instead

Compares two objects
Specified by:
compare in interface CompareInterface
Parameters:
thisO - the first object to compare
otherO - the second object to compare
Returns:
0 if the objects are the same, -1 if the second object is greater than the first, 1 passed if the second object is smaller than the first.

sort

public static java.util.Vector sort(java.util.Vector unsorted)
Deprecated. use Collections.sort()

Sort vector with RawVideos

getRealVideoUrl

public java.lang.String getRealVideoUrl(scanpage sp)
Retrieves the url for an raw audio, based on info in the format and url fields of a wrapped rawaudio node.
Parameters:
sp - scanpage parameter.
Returns:
the stream's url, or null if the audio ahs not yet bene rendered or is of an unsupported format

toString

public java.lang.String toString()
Returns a string representation of this object, for debugging purposes.
Overrides:
toString in class java.lang.Object


MMBase build 1.6.5.20030923