|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.brightcove.proserve.mediaapi.wrapper.apiobjects.Rendition
public class Rendition
Represents a Rendition object to/from the Media API.
From the Brightcove documentation on 2010/08/15 (http://support.brightcove.com/en/docs/media-api-objects-reference):
The Rendition object represents one of the dynamic delivery renditions of a video. A Video should have not more than 10 Renditions. For more information, see Using dynamic delivery and Creating videos for dynamic delivery.
property name | type | read only? | description |
---|---|---|---|
url | String | yes | The URL of the rendition file. |
controllerType | enum | no | [Optional — required for live streaming only] Depending on your CDN, one of the following values: LIMELIGHT_LIVE or AKAMAI_LIVE. |
encodingRate | int | yes | The rendition's encoding rate, in bits per second. |
frameHeight | int | yes | The rendition's display height, in pixels. |
frameWidth | int | yes | The rendition's display width, in pixels. |
size | long | yes | Required. The file size of the rendition, in bytes. |
remoteUrl | string | no | Required, for remote assets. The complete path to the file hosted on the remote server. If the file is served using progressive download, then you must include the file name and extension for the file. You can also use a URL that re-directs to a URL that includes the file name and extension. If the file is served using Flash streaming, use the remoteStreamName attribute to provide the stream name. |
remoteStreamName | string | no | [Optional - required for streaming remote assets only] A stream name for Flash streaming appended to the value of the remoteUrl property. |
videoDuration | long | no | Required. The length of the remote video asset in milliseconds. |
videoCodec | enum | no | Required. Valid values are SORENSON, ON2, and H264. |
Constructor Summary | |
---|---|
Rendition()
Default Constructor. |
|
Rendition(java.lang.String json)
Constructor using JSON string. |
Method Summary | |
---|---|
java.lang.Boolean |
getAudioOnly()
Gets whether or not this rendition is audio only. |
ControllerTypeEnum |
getControllerType()
Gets the Controller Type for this Rendition. |
java.lang.String |
getDisplayName()
Gets the display name for this Rendition. |
java.lang.Integer |
getEncodingRate()
Gets the encoding rate for this Rendition. |
java.lang.Integer |
getFrameHeight()
Gets the frame height for this Rendition in pixels. |
java.lang.Integer |
getFrameWidth()
Gets the frame width for this Rendition in pixels. |
java.lang.Long |
getId()
|
java.lang.String |
getReferenceId()
|
java.lang.String |
getRemoteStreamName()
Gets the remote stream name attribute for this Rendition. |
java.lang.String |
getRemoteUrl()
Gets the remote URL attribute for this asset. |
java.lang.Long |
getSize()
Gets the file size of this Rendition in bytes. |
java.lang.Long |
getUploadTimestampMillis()
|
java.lang.String |
getUrl()
Gets the URL for this Rendition. |
VideoCodecEnum |
getVideoCodec()
Gets the video codec for this Rendition. |
java.lang.String |
getVideoContainer()
|
java.lang.Long |
getVideoDuration()
Gets the length of the video asset. |
void |
initAll()
Sets all variables to null. |
void |
setAudioOnly(java.lang.Boolean audioOnly)
Sets whether or not this rendition is audio only. |
void |
setControllerType(ControllerTypeEnum controllerType)
Sets the Controller Type for this Rendition. |
void |
setDisplayName(java.lang.String displayName)
Sets the display name for this Rendition. |
void |
setEncodingRate(java.lang.Integer encodingRate)
Sets the encoding rate for this Rendition. |
void |
setFrameHeight(java.lang.Integer frameHeight)
Sets the frame height for this Rendition in pixels. |
void |
setFrameWidth(java.lang.Integer frameWidth)
Sets the frame width for this Rendition in pixels. |
void |
setId(java.lang.Long id)
|
void |
setReferenceId(java.lang.String referenceId)
|
void |
setRemoteStreamName(java.lang.String remoteStreamName)
Sets the remote stream name attribute for this Rendition. |
void |
setRemoteUrl(java.lang.String remoteUrl)
Sets the remote URL attribute for this asset. |
void |
setSize(java.lang.Long size)
Sets the file size of this Rendition in bytes. |
void |
setUploadTimestampMillis(java.lang.Long uploadTimestampMillis)
|
void |
setUrl(java.lang.String url)
Sets the URL for this Rendition. |
void |
setVideoCodec(VideoCodecEnum videoCodec)
Sets the video codec for this Rendition. |
void |
setVideoContainer(java.lang.String videoContainer)
|
void |
setVideoDuration(java.lang.Long videoDuration)
Sets the length of the video asset. |
JSONObject |
toJson()
Converts the rendition into a JSON object suitable for use with the Media API |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Rendition()
Default Constructor.
All fields set to null to start - required fields must be set before calling Write Media API.
public Rendition(java.lang.String json) throws JSONException
Constructor using JSON string.
Given a JSON string from the Media API, attempts to construct a new Rendition object and fill out all of the fields defined. All other fields will be null.
JSONException
Method Detail |
---|
public void initAll()
Sets all variables to null.
public java.lang.String getUrl()
Gets the URL for this Rendition.
The URL of the rendition file.
public void setUrl(java.lang.String url)
Sets the URL for this Rendition.
The URL of the rendition file.
url
- String representing the Rendition URLpublic ControllerTypeEnum getControllerType()
Gets the Controller Type for this Rendition.
The Controller Type of the rendition file.
public void setControllerType(ControllerTypeEnum controllerType)
Sets the Controller Type for this Rendition.
[Optional — required for live streaming only] Depending on your CDN, one of the following values: LIMELIGHT_LIVE or AKAMAI_LIVE.
controllerType
- Enumeration value for the controller typepublic java.lang.Integer getEncodingRate()
Gets the encoding rate for this Rendition.
The rendition's encoding rate, in bits per second.
public void setEncodingRate(java.lang.Integer encodingRate)
Sets the encoding rate for this Rendition.
The rendition's encoding rate, in bits per second.
encodingRate
- Encoding rate for this Rendition, in bits/secondpublic java.lang.String getDisplayName()
Gets the display name for this Rendition.
The display name of the rendition file.
public void setDisplayName(java.lang.String displayName)
Sets the display name for this Rendition.
The display name of the rendition file.
displayName
- public java.lang.Integer getFrameHeight()
Gets the frame height for this Rendition in pixels.
The rendition's display height, in pixels.
public void setFrameHeight(java.lang.Integer frameHeight)
Sets the frame height for this Rendition in pixels.
The rendition's display height, in pixels.
frameHeight
- Frame height for this Rendition in pixelspublic java.lang.Integer getFrameWidth()
Gets the frame width for this Rendition in pixels.
The rendition's display width, in pixels.
public void setFrameWidth(java.lang.Integer frameWidth)
Sets the frame width for this Rendition in pixels.
The rendition's display width, in pixels.
frameWidth
- Frame width for this Rendition in pixelspublic java.lang.Long getSize()
Gets the file size of this Rendition in bytes.
Required. The file size of the rendition, in bytes.
public void setSize(java.lang.Long size)
Sets the file size of this Rendition in bytes.
Required. The file size of the rendition, in bytes.
size
- File size in bytes for this Renditionpublic java.lang.String getRemoteUrl()
Gets the remote URL attribute for this asset.
Required, for remote assets. The complete path to the file hosted on the remote server. If the file is served using progressive download, then you must include the file name and extension for the file. You can also use a URL that re-directs to a URL that includes the file name and extension. If the file is served using Flash streaming, use the remoteStreamName attribute to provide the stream name.
public void setRemoteUrl(java.lang.String remoteUrl)
Sets the remote URL attribute for this asset.
Required, for remote assets. The complete path to the file hosted on the remote server. If the file is served using progressive download, then you must include the file name and extension for the file. You can also use a URL that re-directs to a URL that includes the file name and extension. If the file is served using Flash streaming, use the remoteStreamName attribute to provide the stream name.
remoteUrl
- Remote URL attribute for this asset as a Stringpublic java.lang.String getRemoteStreamName()
Gets the remote stream name attribute for this Rendition.
[Optional - required for streaming remote assets only] A stream name for Flash streaming appended to the value of the remoteUrl property.
public void setRemoteStreamName(java.lang.String remoteStreamName)
Sets the remote stream name attribute for this Rendition.
[Optional - required for streaming remote assets only] A stream name for Flash streaming appended to the value of the remoteUrl property.
remoteStreamName
- Remote stream namepublic java.lang.Long getVideoDuration()
Gets the length of the video asset.
Required. The length of the remote video asset in milliseconds.
public void setVideoDuration(java.lang.Long videoDuration)
Sets the length of the video asset.
Required. The length of the remote video asset in milliseconds.
videoDuration
- the length of the video asset in millisecondspublic VideoCodecEnum getVideoCodec()
Gets the video codec for this Rendition.
Required. Valid values are SORENSON, ON2, and H264.
public void setVideoCodec(VideoCodecEnum videoCodec)
Sets the video codec for this Rendition.
Required. Valid values are SORENSON, ON2, and H264.
videoCodec
- Video codec for this Renditionpublic java.lang.Boolean getAudioOnly()
Gets whether or not this rendition is audio only.
public void setAudioOnly(java.lang.Boolean audioOnly)
Sets whether or not this rendition is audio only.
audioOnly
- True if the rendition is audio only, else falsepublic java.lang.Long getId()
public void setId(java.lang.Long id)
public java.lang.String getReferenceId()
public void setReferenceId(java.lang.String referenceId)
public java.lang.Long getUploadTimestampMillis()
public void setUploadTimestampMillis(java.lang.Long uploadTimestampMillis)
public java.lang.String getVideoContainer()
public void setVideoContainer(java.lang.String videoContainer)
public JSONObject toJson() throws JSONException
Converts the rendition into a JSON object suitable for use with the Media API
JSONException
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |