Skip to content

Commit 2e04197

Browse files
committed
publish jdcloud-sdk-python 1.6.51
1 parent e2e22b1 commit 2e04197

8 files changed

Lines changed: 59 additions & 22 deletions

File tree

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
更新历史
22
---------------------------------------------------------------------
3-
API版本:0.4.7
3+
API版本:0.4.9
44

55
| 发布时间 | 版本号 | 更新 | 说明
66
| ---------------| -----------|-----------|---------|
7-
| 2018-03-31 | 0.2.1 | 按照规范修改;增加参数taskID |按照规范修改;增加参数taskID
8-
| 2018-04-28 | 0.3.6 | 完善description |完善description
9-
| 2018-08-23 |0.3.7 | 增加接口总述及面向对象;修改截图接口描述 |增加接口总述及面向对象;修改截图接口描述
10-
| 2019-03-07 |0.4.1 | 增加图片样式分隔符接口 |增加图片样式分隔符接口
11-
| 2019-05-29 |0.4.5 | 增加图片样式接口 |增加图片样式接口
12-
| 2020-02-12 |0.4.6 | 增加转码相关接口 |增加接口:提交转码作业/查询转码作业列表
13-
| 2020-03-03 |0.4.7 | 增加转码模板相关接口;<br>更新提交转码作业部分字段文档描述;<br>修改转码作业查询结果部分字段;|
7+
| 2018-03-31 | 0.2.1 | 按照规范修改;增加参数taskID | 按照规范修改;增加参数taskID
8+
| 2018-04-28 | 0.3.6 | 完善description | 完善description
9+
| 2018-08-23 | 0.3.7 | 增加接口总述及面向对象;修改截图接口描述 | 增加接口总述及面向对象;修改截图接口描述
10+
| 2019-03-07 | 0.4.1 | 增加图片样式分隔符接口 | 增加图片样式分隔符接口
11+
| 2019-05-29 | 0.4.5 | 增加图片样式接口 | 增加图片样式接口
12+
| 2020-02-12 | 0.4.6 | 增加转码相关接口 | 增加接口:提交转码作业/查询转码作业列表
13+
| 2020-03-03 | 0.4.7 | 增加转码模板相关接口;<br>更新提交转码作业部分字段文档描述;<br>修改转码作业查询结果部分字段;| -
14+
| 2020-03-04 | 0.4.8 | 修改部分字段的约束限定与文档描述;| 涉及字段:rcmode, hlsKey, sampleRate
15+
| 2020-03-18 | 0.4.9 | 转码模板新增hlsKeyEncodeType支持;提交转码作业时,新增附加参数additionalProperties支持| -

jdcloud_sdk/services/mps/apis/SubmitTranscodeJobRequest.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def __init__(self, parameters, header=None, version="v1"):
3232

3333
class SubmitTranscodeJobParameters(object):
3434

35-
def __init__(self, accessKey, secretKey, endpoint, bucket, objectKey, templateIds, outputConfig):
35+
def __init__(self, accessKey, secretKey, endpoint, bucket, objectKey, templateIds, outputConfig, ):
3636
"""
3737
:param accessKey: 输入对象存储 accessKey,必须参数
3838
:param secretKey: 输入对象存储 accessKey,必须参数
@@ -51,10 +51,27 @@ def __init__(self, accessKey, secretKey, endpoint, bucket, objectKey, templateId
5151
self.title = None
5252
self.templateIds = templateIds
5353
self.outputConfig = outputConfig
54+
self.additionalProperties = None
5455

5556
def setTitle(self, title):
5657
"""
5758
:param title: (Optional) 输入视频标题,可选参数,默认会从 objectKey 中截取
5859
"""
5960
self.title = title
6061

62+
def setAdditionalProperties(self, additionalProperties):
63+
"""
64+
:param additionalProperties: (Optional) 附加参数,JSON格式的字符串。除非清楚了解其用途和用法,请勿使用此字段。
65+
若参数在本次作业提交所关联的模板中,存在相同用途的对应字段,则该属性值会覆盖模板中的对应字段;
66+
若参数在本次作业提交所关联的模板中,不存在相同用途的对应字段,则该属性值会作为补充设置,用于生产任务;
67+
有特殊说明的除外。
68+
当前支持的附加参数:
69+
- hls.encrypt.key - HLS加密公钥,对应于转码模板中 encryption.hlsKey 字段
70+
- hls.encrypt.keyUrl - HLS加密公钥地址,对应于转码模板中 encryption.hlsKeyUrl 字段
71+
- hls.encrypt.encodeType - HLS加密公钥编码方式,对应于转码模板中 encryption.hlsKeyEncodeType 字段
72+
特殊说明:
73+
- HLS加密相关参数,具有完整性要求,故 hls.encrypt 命名空间下的附加参数,依赖于 hls.encrypt.key 参数的设置情况。若设置 hls.encrypt.key 参数,则命名空间 hls.encrypt 下的其他参数也须同时设置;否则,其他参数会被忽略。
74+
75+
"""
76+
self.additionalProperties = additionalProperties
77+

jdcloud_sdk/services/mps/client/MpsClient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ def __init__(self, credential, config=None, logger=None):
2626
if config is None:
2727
config = Config('mps.jdcloud-api.com')
2828

29-
super(MpsClient, self).__init__(credential, config, 'mps', '0.4.7', logger)
29+
super(MpsClient, self).__init__(credential, config, 'mps', '0.4.9', logger)

jdcloud_sdk/services/mps/models/AudioStreamSettings.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919

2020
class AudioStreamSettings(object):
2121

22-
def __init__(self, codec, bitrate, sampleRate, channels=None, comfortable=None):
22+
def __init__(self, codec, bitrate, sampleRate=None, channels=None, comfortable=None):
2323
"""
2424
:param codec: 音频编码。取值范围:aac 。目前仅支持 acc
2525
:param bitrate: 音频目标码率。取值范围:[8, 1000],单位为 Kbps
26-
:param sampleRate: 音频采样率。取值范围:22050、24000、32000、44100、48000、64000、88200、96000
27-
当容器封装格式为 flv 时,只支持 22050、44100
26+
:param sampleRate: (Optional) 音频采样率。
27+
若容器封装格式为 flv ,该字段为必须参数,其取值范围:22050、44100
28+
若容器封装格式不为 flv ,则此字段为非必须参数,未设置时,与源文件音频采样率保持一致,若设置值,其取值范围:22050、24000、32000、44100、48000、64000、88200、96000
2829
2930
:param channels: (Optional) 音频声道数。取值范围:1、2 。默认值为 2
3031
:param comfortable: (Optional) 是否开启舒适音频。取值范围:true、false,默认值为 true

jdcloud_sdk/services/mps/models/EncryptionSettings.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,19 @@
1919

2020
class EncryptionSettings(object):
2121

22-
def __init__(self, hlsKey=None, hlsKeyUrl=None):
22+
def __init__(self, hlsKey=None, hlsKeyUrl=None, hlsKeyEncodeType=None):
2323
"""
24-
:param hlsKey: (Optional) 加密Key。HLS AES129KEY,必须为 16 个 ASCII 可打印字符
24+
:param hlsKey: (Optional) HLS加密公钥,按指定编码方式编码
25+
必须为 16 字节值,按照 hlsKeyEncodeType 所指定的编码方式进行编码后的字符串
2526
26-
:param hlsKeyUrl: (Optional) 加密Key地址。必须为合法的HTTP地址。
27-
若 hleKey 已设置,表示开启 HLS 加密,其时该参数必须
27+
:param hlsKeyUrl: (Optional) HLS加密公钥地址,仅支持HTTP(s)地址
28+
若 hlsKey 已设置,则表示开启 HLS 加密,此时为必须参数
29+
30+
:param hlsKeyEncodeType: (Optional) HLS加密公钥编码方式。取值范围:base16, base32, base64
31+
若 hlsKey 已设置,则表示开启 HLS 加密,此时为必须参数
2832
2933
"""
3034

3135
self.hlsKey = hlsKey
3236
self.hlsKeyUrl = hlsKeyUrl
37+
self.hlsKeyEncodeType = hlsKeyEncodeType

jdcloud_sdk/services/mps/models/SubmitTranscodeJobRequestInfo.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
class SubmitTranscodeJobRequestInfo(object):
2121

22-
def __init__(self, accessKey, secretKey, endpoint, bucket, objectKey, templateIds, outputConfig, title=None):
22+
def __init__(self, accessKey, secretKey, endpoint, bucket, objectKey, templateIds, outputConfig, title=None, additionalProperties=None):
2323
"""
2424
:param accessKey: 输入对象存储 accessKey,必须参数
2525
:param secretKey: 输入对象存储 accessKey,必须参数
@@ -29,6 +29,17 @@ def __init__(self, accessKey, secretKey, endpoint, bucket, objectKey, templateId
2929
:param title: (Optional) 输入视频标题,可选参数,默认会从 objectKey 中截取
3030
:param templateIds: 转码模板ID集合,必须参数,非空集合
3131
:param outputConfig: 输出配置,必须参数
32+
:param additionalProperties: (Optional) 附加参数,JSON格式的字符串。除非清楚了解其用途和用法,请勿使用此字段。
33+
若参数在本次作业提交所关联的模板中,存在相同用途的对应字段,则该属性值会覆盖模板中的对应字段;
34+
若参数在本次作业提交所关联的模板中,不存在相同用途的对应字段,则该属性值会作为补充设置,用于生产任务;
35+
有特殊说明的除外。
36+
当前支持的附加参数:
37+
- hls.encrypt.key - HLS加密公钥,对应于转码模板中 encryption.hlsKey 字段
38+
- hls.encrypt.keyUrl - HLS加密公钥地址,对应于转码模板中 encryption.hlsKeyUrl 字段
39+
- hls.encrypt.encodeType - HLS加密公钥编码方式,对应于转码模板中 encryption.hlsKeyEncodeType 字段
40+
特殊说明:
41+
- HLS加密相关参数,具有完整性要求,故 hls.encrypt 命名空间下的附加参数,依赖于 hls.encrypt.key 参数的设置情况。若设置 hls.encrypt.key 参数,则命名空间 hls.encrypt 下的其他参数也须同时设置;否则,其他参数会被忽略。
42+
3243
"""
3344

3445
self.accessKey = accessKey
@@ -39,3 +50,4 @@ def __init__(self, accessKey, secretKey, endpoint, bucket, objectKey, templateId
3950
self.title = title
4051
self.templateIds = templateIds
4152
self.outputConfig = outputConfig
53+
self.additionalProperties = additionalProperties

jdcloud_sdk/services/mps/models/VideoStreamSettings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@ class VideoStreamSettings(object):
2222
def __init__(self, codec, rcmode=None, rateFactor=None, bitrate=None, frameRate=None, width=None, height=None):
2323
"""
2424
:param codec: 视频编码。取值范围:h264、h265
25-
:param rcmode: (Optional) 码率质量控制模式。取值范围:
25+
:param rcmode: (Optional) 码率控制模式。取值范围:
2626
crf - 恒定码率系数模式。设置此模式时,rateFactor 生效,bitrate 会被忽略
2727
abr - 平均码率模式。设置此模式时,bitrate 生效,rateFactor 会被忽略
2828
默认值为 abr
2929
30-
:param rateFactor: (Optional) 码率质量控制因子。取值范围:[0, 51],支持2位小数的浮点数
30+
:param rateFactor: (Optional) 码率控制因子。取值范围:[0, 51],支持2位小数的浮点数
3131
当 codec 为 h264 时,默认值为 23;当 codec 为 h265 时,默认值为 28
3232
3333
:param bitrate: (Optional) 视频码率。取值范围:[128, 10000],单位为 Kbps
3434
3535
:param frameRate: (Optional) 视频帧率。取值范围:[1, 60],单位为 fps
36-
未设置时,与源文件帧率保持一致
36+
未设置时,与源文件视频帧率保持一致
3737
3838
:param width: (Optional) 视频输出宽度。取值范围:[128, 4096] 整数。单位为 px
3939
未设置时,若 height 也未设置值,则 width 和 height 与原视频保持一致;若 height 设置值,则 width 按照原视频的分辨率等比缩放

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
setup(
1111
name='jdcloud_sdk',
12-
version="1.6.50",
12+
version="1.6.51",
1313
long_description=long_description,
1414
long_description_content_type="text/markdown",
1515
author='JDCloud API Gateway Team',

0 commit comments

Comments
 (0)