Skip to content

Commit 936a7e3

Browse files
author
markjrzhang
committed
add media processing parameter
1 parent a51f47b commit 936a7e3

File tree

5 files changed

+35
-17
lines changed

5 files changed

+35
-17
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [5.6.95]
9+
- add media processing parameter
10+
811
## [5.6.93]
912
- update ImageAuditing API
1013

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>com.qcloud</groupId>
66
<artifactId>cos_api</artifactId>
7-
<version>5.6.93</version>
7+
<version>5.6.95</version>
88
<packaging>jar</packaging>
99
<name>cos-java-sdk</name>
1010
<description>java sdk for qcloud cos</description>

src/main/java/com/qcloud/cos/demo/ci/JobDemo.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public static void createMediaJobs(COSClient client) throws UnsupportedEncodingE
4646
request.getOperation().getOutput().setObject("2.mp4");
4747
request.setQueueId("p9900025e4ec44b5e8225e70a52170834");
4848
request.setCallBack("https://cloud.tencent.com/xxx");
49+
// request.setCallBackFormat("json");
4950
//3.调用接口,获取任务响应对象
5051
MediaJobResponse response = client.createMediaJobs(request);
5152
System.out.println(response);

src/main/java/com/qcloud/cos/model/ciModel/job/MediaJobsRequest.java

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ public class MediaJobsRequest extends CIServiceRequest implements Serializable {
6262
*/
6363
private String callBack;
6464

65+
/**
66+
* 回调类型 json / xml 默认为xml
67+
*/
68+
private String callBackFormat;
69+
6570

6671
public String getBucketName() {
6772
return bucketName;
@@ -173,23 +178,31 @@ public void setCallBack(String callBack) {
173178
this.callBack = callBack;
174179
}
175180

181+
public String getCallBackFormat() {
182+
return callBackFormat;
183+
}
184+
185+
public void setCallBackFormat(String callBackFormat) {
186+
this.callBackFormat = callBackFormat;
187+
}
188+
176189
@Override
177190
public String toString() {
178-
final StringBuilder sb = new StringBuilder("MediaJobsRequest{");
179-
sb.append("bucketName='").append(bucketName).append('\'');
180-
sb.append(", queueId='").append(queueId).append('\'');
181-
sb.append(", tag='").append(tag).append('\'');
182-
sb.append(", orderByTime='").append(orderByTime).append('\'');
183-
sb.append(", nextToken='").append(nextToken).append('\'');
184-
sb.append(", size=").append(size);
185-
sb.append(", states='").append(states).append('\'');
186-
sb.append(", startCreationTime='").append(startCreationTime).append('\'');
187-
sb.append(", endCreationTime='").append(endCreationTime).append('\'');
188-
sb.append(", jobId='").append(jobId).append('\'');
189-
sb.append(", input=").append(input);
190-
sb.append(", operation=").append(operation);
191-
sb.append(", callBack='").append(callBack).append('\'');
192-
sb.append('}');
193-
return sb.toString();
191+
return "MediaJobsRequest{" +
192+
"bucketName='" + bucketName + '\'' +
193+
", queueId='" + queueId + '\'' +
194+
", tag='" + tag + '\'' +
195+
", orderByTime='" + orderByTime + '\'' +
196+
", nextToken='" + nextToken + '\'' +
197+
", size=" + size +
198+
", states='" + states + '\'' +
199+
", startCreationTime='" + startCreationTime + '\'' +
200+
", endCreationTime='" + endCreationTime + '\'' +
201+
", jobId='" + jobId + '\'' +
202+
", input=" + input +
203+
", operation=" + operation +
204+
", callBack='" + callBack + '\'' +
205+
", callBackFormat='" + callBackFormat + '\'' +
206+
'}';
194207
}
195208
}

src/main/java/com/qcloud/cos/model/ciModel/xml/CIMediaXmlFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ private static void addCommonParams(XmlWriter xml, MediaJobsRequest request) {
288288
xml.start("BucketName").value(request.getBucketName()).end();
289289
xml.start("QueueId").value(request.getQueueId()).end();
290290
addIfNotNull(xml, "CallBack", request.getCallBack());
291+
addIfNotNull(xml, "CallBackFormat", request.getCallBackFormat());
291292
}
292293
}
293294

0 commit comments

Comments
 (0)