Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.14.0 #17

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.mux</groupId>
<artifactId>mux-sdk-java</artifactId>
<version>0.13.0</version>
<version>0.14.0</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -58,7 +58,7 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:

```groovy
compile "com.mux:mux-sdk-java:0.13.0"
compile "com.mux:mux-sdk-java:0.14.0"
```

### Others
Expand All @@ -71,7 +71,7 @@ mvn clean package

Then manually install the following JARs:

* `target/mux-sdk-java-0.13.0.jar`
* `target/mux-sdk-java-0.14.0.jar`
* `target/lib/*.jar`

## Getting Started
Expand Down Expand Up @@ -99,7 +99,7 @@ public class Example {
accessToken.setPassword("YOUR PASSWORD");

AssetsApi apiInstance = new AssetsApi(defaultClient);
CreateAssetRequest createAssetRequest = {"input":[{"url":"https://muxed.s3.amazonaws.com/leds.mp4"}],"playback_policy":["public"],"encoding_tier":"baseline"}; // CreateAssetRequest |
CreateAssetRequest createAssetRequest = {"input":[{"url":"https://muxed.s3.amazonaws.com/leds.mp4"}],"playback_policy":["public"],"video_quality":"basic"}; // CreateAssetRequest |
try {
AssetResponse result = apiInstance.createAsset(createAssetRequest)
.execute();
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ plugins {
}

group = 'com.mux'
version = '0.13.0'
version = '0.14.0'

repositories {
mavenCentral()
Expand Down
12 changes: 11 additions & 1 deletion docs/Asset.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Name | Type | Description | Notes
**maxStoredResolution** | [**MaxStoredResolutionEnum**](#MaxStoredResolutionEnum) | This field is deprecated. Please use &#x60;resolution_tier&#x60; instead. The maximum resolution that has been stored for the asset. The asset may be delivered at lower resolutions depending on the device and bandwidth, however it cannot be delivered at a higher value than is stored. | [optional]
**resolutionTier** | [**ResolutionTierEnum**](#ResolutionTierEnum) | The resolution tier that the asset was ingested at, affecting billing for ingest &amp; storage. This field also represents the highest resolution tier that the content can be delivered at, however the actual resolution may be lower depending on the device, bandwidth, and exact resolution of the uploaded asset. | [optional]
**maxResolutionTier** | [**MaxResolutionTierEnum**](#MaxResolutionTierEnum) | Max resolution tier can be used to control the maximum &#x60;resolution_tier&#x60; your asset is encoded, stored, and streamed at. If not set, this defaults to &#x60;1080p&#x60;. | [optional]
**encodingTier** | [**EncodingTierEnum**](#EncodingTierEnum) | The encoding tier informs the cost, quality, and available platform features for the asset. By default the &#x60;smart&#x60; encoding tier is used. [See the guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) | [optional]
**encodingTier** | [**EncodingTierEnum**](#EncodingTierEnum) | This field is deprecated. Please use &#x60;video_quality&#x60; instead. The encoding tier informs the cost, quality, and available platform features for the asset. By default the &#x60;smart&#x60; encoding tier is used. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) | [optional]
**videoQuality** | [**VideoQualityEnum**](#VideoQualityEnum) | The video quality controls the cost, quality, and available platform features for the asset. By default the &#x60;plus&#x60; video quality is used. This field replaces the deprecated &#x60;encoding_tier&#x60; value. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) | [optional]
**maxStoredFrameRate** | **Double** | The maximum frame rate that has been stored for the asset. The asset may be delivered at lower frame rates depending on the device and bandwidth, however it cannot be delivered at a higher value than is stored. This field may return -1 if the frame rate of the input cannot be reliably determined. | [optional]
**aspectRatio** | **String** | The aspect ratio of the asset in the form of &#x60;width:height&#x60;, for example &#x60;16:9&#x60;. | [optional]
**playbackIds** | [**java.util.List&lt;PlaybackID&gt;**](PlaybackID.md) | An array of Playback ID objects. Use these to create HLS playback URLs. See [Play your videos](https://docs.mux.com/guides/play-your-videos) for more details. | [optional]
Expand Down Expand Up @@ -90,6 +91,15 @@ BASELINE | &quot;baseline&quot;



## Enum: VideoQualityEnum

Name | Value
---- | -----
BASIC | &quot;basic&quot;
PLUS | &quot;plus&quot;



## Enum: MasterAccessEnum

Name | Value
Expand Down
2 changes: 1 addition & 1 deletion docs/AssetsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class Example {
accessToken.setPassword("YOUR PASSWORD");

AssetsApi apiInstance = new AssetsApi(defaultClient);
CreateAssetRequest createAssetRequest = {"input":[{"url":"https://muxed.s3.amazonaws.com/leds.mp4"}],"playback_policy":["public"],"encoding_tier":"baseline"}; // CreateAssetRequest |
CreateAssetRequest createAssetRequest = {"input":[{"url":"https://muxed.s3.amazonaws.com/leds.mp4"}],"playback_policy":["public"],"video_quality":"basic"}; // CreateAssetRequest |
try {
AssetResponse result = apiInstance.createAsset(createAssetRequest)
.execute();
Expand Down
12 changes: 11 additions & 1 deletion docs/CreateAssetRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ Name | Type | Description | Notes
**masterAccess** | [**MasterAccessEnum**](#MasterAccessEnum) | Specify what level (if any) of support for master access. Master access can be enabled temporarily for your asset to be downloaded. See the [Download your videos guide](https://docs.mux.com/guides/enable-static-mp4-renditions) for more information. | [optional]
**test** | **Boolean** | Marks the asset as a test asset when the value is set to true. A Test asset can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test assets created. Test asset are watermarked with the Mux logo, limited to 10 seconds, deleted after 24 hrs. | [optional]
**maxResolutionTier** | [**MaxResolutionTierEnum**](#MaxResolutionTierEnum) | Max resolution tier can be used to control the maximum &#x60;resolution_tier&#x60; your asset is encoded, stored, and streamed at. If not set, this defaults to &#x60;1080p&#x60;. | [optional]
**encodingTier** | [**EncodingTierEnum**](#EncodingTierEnum) | The encoding tier informs the cost, quality, and available platform features for the asset. By default the &#x60;smart&#x60; encoding tier is used. [See the guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) | [optional]
**encodingTier** | [**EncodingTierEnum**](#EncodingTierEnum) | This field is deprecated. Please use &#x60;video_quality&#x60; instead. The encoding tier informs the cost, quality, and available platform features for the asset. By default the &#x60;smart&#x60; encoding tier is used. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) | [optional]
**videoQuality** | [**VideoQualityEnum**](#VideoQualityEnum) | The video quality controls the cost, quality, and available platform features for the asset. By default the &#x60;plus&#x60; video quality is used. This field replaces the deprecated &#x60;encoding_tier&#x60; value. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) | [optional]



Expand Down Expand Up @@ -60,3 +61,12 @@ BASELINE | &quot;baseline&quot;



## Enum: VideoQualityEnum

Name | Value
---- | -----
BASIC | &quot;basic&quot;
PLUS | &quot;plus&quot;



12 changes: 11 additions & 1 deletion docs/DeliveryReport.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Name | Type | Description | Notes
**assetState** | [**AssetStateEnum**](#AssetStateEnum) | The state of the asset. | [optional]
**assetDuration** | **Double** | The duration of the asset in seconds. | [optional]
**assetResolutionTier** | [**AssetResolutionTierEnum**](#AssetResolutionTierEnum) | The resolution tier that the asset was ingested at, affecting billing for ingest &amp; storage | [optional]
**assetEncodingTier** | [**AssetEncodingTierEnum**](#AssetEncodingTierEnum) | The encoding tier that the asset was ingested at. [See the encoding tiers guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) | [optional]
**assetEncodingTier** | [**AssetEncodingTierEnum**](#AssetEncodingTierEnum) | This field is deprecated. Please use &#x60;asset_video_quality&#x60; instead. The encoding tier that the asset was ingested at. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) | [optional]
**assetVideoQuality** | [**AssetVideoQualityEnum**](#AssetVideoQualityEnum) | The video quality that the asset was ingested at. This field replaces &#x60;asset_encoding_tier&#x60;. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) | [optional]
**deliveredSeconds** | **Double** | Total number of delivered seconds during this time window. | [optional]
**deliveredSecondsByResolution** | [**DeliveryReportDeliveredSecondsByResolution**](DeliveryReportDeliveredSecondsByResolution.md) | | [optional]

Expand Down Expand Up @@ -51,3 +52,12 @@ BASELINE | &quot;baseline&quot;



## Enum: AssetVideoQualityEnum

Name | Value
---- | -----
BASIC | &quot;basic&quot;
PLUS | &quot;plus&quot;



2 changes: 1 addition & 1 deletion gen/generator-config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"!!source": "https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/java.md",
"artifactVersion": "0.13.0",
"artifactVersion": "0.14.0",
"apiPackage": "com.mux.sdk",
"artifactDescription": "Mux SDK for Java",
"artifactId": "mux-sdk-java",
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/mux/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ private void init() {
json = new JSON();

// Set default User-Agent.
setUserAgent("Mux Java | 0.13.0");
setUserAgent("Mux Java | 0.14.0");

authentications = new HashMap<String, Authentication>();
}
Expand Down
84 changes: 80 additions & 4 deletions src/main/java/com/mux/sdk/models/Asset.java
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public MaxResolutionTierEnum read(final JsonReader jsonReader) throws IOExceptio
private MaxResolutionTierEnum maxResolutionTier;

/**
* The encoding tier informs the cost, quality, and available platform features for the asset. By default the &#x60;smart&#x60; encoding tier is used. [See the guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
* This field is deprecated. Please use &#x60;video_quality&#x60; instead. The encoding tier informs the cost, quality, and available platform features for the asset. By default the &#x60;smart&#x60; encoding tier is used. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
*/
@JsonAdapter(EncodingTierEnum.Adapter.class)
public enum EncodingTierEnum {
Expand Down Expand Up @@ -319,6 +319,57 @@ public EncodingTierEnum read(final JsonReader jsonReader) throws IOException {
@SerializedName(SERIALIZED_NAME_ENCODING_TIER)
private EncodingTierEnum encodingTier;

/**
* The video quality controls the cost, quality, and available platform features for the asset. By default the &#x60;plus&#x60; video quality is used. This field replaces the deprecated &#x60;encoding_tier&#x60; value. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
*/
@JsonAdapter(VideoQualityEnum.Adapter.class)
public enum VideoQualityEnum {
BASIC("basic"),

PLUS("plus");

private String value;

VideoQualityEnum(String value) {
this.value = value;
}

public String getValue() {
return value;
}

@Override
public String toString() {
return String.valueOf(value);
}

public static VideoQualityEnum fromValue(String value) {
for (VideoQualityEnum b : VideoQualityEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}

public static class Adapter extends TypeAdapter<VideoQualityEnum> {
@Override
public void write(final JsonWriter jsonWriter, final VideoQualityEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}

@Override
public VideoQualityEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return VideoQualityEnum.fromValue(value);
}
}
}

public static final String SERIALIZED_NAME_VIDEO_QUALITY = "video_quality";
@SerializedName(SERIALIZED_NAME_VIDEO_QUALITY)
private VideoQualityEnum videoQuality;

public static final String SERIALIZED_NAME_MAX_STORED_FRAME_RATE = "max_stored_frame_rate";
@SerializedName(SERIALIZED_NAME_MAX_STORED_FRAME_RATE)
private Double maxStoredFrameRate;
Expand Down Expand Up @@ -721,11 +772,11 @@ public Asset encodingTier(EncodingTierEnum encodingTier) {
}

/**
* The encoding tier informs the cost, quality, and available platform features for the asset. By default the &#x60;smart&#x60; encoding tier is used. [See the guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
* This field is deprecated. Please use &#x60;video_quality&#x60; instead. The encoding tier informs the cost, quality, and available platform features for the asset. By default the &#x60;smart&#x60; encoding tier is used. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
* @return encodingTier
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The encoding tier informs the cost, quality, and available platform features for the asset. By default the `smart` encoding tier is used. [See the guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)")
@ApiModelProperty(value = "This field is deprecated. Please use `video_quality` instead. The encoding tier informs the cost, quality, and available platform features for the asset. By default the `smart` encoding tier is used. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)")

public EncodingTierEnum getEncodingTier() {
return encodingTier;
Expand All @@ -737,6 +788,29 @@ public void setEncodingTier(EncodingTierEnum encodingTier) {
}


public Asset videoQuality(VideoQualityEnum videoQuality) {

this.videoQuality = videoQuality;
return this;
}

/**
* The video quality controls the cost, quality, and available platform features for the asset. By default the &#x60;plus&#x60; video quality is used. This field replaces the deprecated &#x60;encoding_tier&#x60; value. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
* @return videoQuality
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The video quality controls the cost, quality, and available platform features for the asset. By default the `plus` video quality is used. This field replaces the deprecated `encoding_tier` value. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)")

public VideoQualityEnum getVideoQuality() {
return videoQuality;
}


public void setVideoQuality(VideoQualityEnum videoQuality) {
this.videoQuality = videoQuality;
}


public Asset maxStoredFrameRate(Double maxStoredFrameRate) {

this.maxStoredFrameRate = maxStoredFrameRate;
Expand Down Expand Up @@ -1238,6 +1312,7 @@ public boolean equals(Object o) {
Objects.equals(this.resolutionTier, asset.resolutionTier) &&
Objects.equals(this.maxResolutionTier, asset.maxResolutionTier) &&
Objects.equals(this.encodingTier, asset.encodingTier) &&
Objects.equals(this.videoQuality, asset.videoQuality) &&
Objects.equals(this.maxStoredFrameRate, asset.maxStoredFrameRate) &&
Objects.equals(this.aspectRatio, asset.aspectRatio) &&
Objects.equals(this.playbackIds, asset.playbackIds) &&
Expand All @@ -1262,7 +1337,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(id, createdAt, status, duration, maxStoredResolution, resolutionTier, maxResolutionTier, encodingTier, maxStoredFrameRate, aspectRatio, playbackIds, tracks, errors, perTitleEncode, uploadId, isLive, passthrough, liveStreamId, master, masterAccess, mp4Support, sourceAssetId, normalizeAudio, staticRenditions, recordingTimes, nonStandardInputReasons, test, ingestType);
return Objects.hash(id, createdAt, status, duration, maxStoredResolution, resolutionTier, maxResolutionTier, encodingTier, videoQuality, maxStoredFrameRate, aspectRatio, playbackIds, tracks, errors, perTitleEncode, uploadId, isLive, passthrough, liveStreamId, master, masterAccess, mp4Support, sourceAssetId, normalizeAudio, staticRenditions, recordingTimes, nonStandardInputReasons, test, ingestType);
}

@Override
Expand All @@ -1277,6 +1352,7 @@ public String toString() {
sb.append(" resolutionTier: ").append(toIndentedString(resolutionTier)).append("\n");
sb.append(" maxResolutionTier: ").append(toIndentedString(maxResolutionTier)).append("\n");
sb.append(" encodingTier: ").append(toIndentedString(encodingTier)).append("\n");
sb.append(" videoQuality: ").append(toIndentedString(videoQuality)).append("\n");
sb.append(" maxStoredFrameRate: ").append(toIndentedString(maxStoredFrameRate)).append("\n");
sb.append(" aspectRatio: ").append(toIndentedString(aspectRatio)).append("\n");
sb.append(" playbackIds: ").append(toIndentedString(playbackIds)).append("\n");
Expand Down
Loading
Loading