diff --git a/VERSION b/VERSION index 4b85d1dea..446a93e6a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.2112 \ No newline at end of file +1.36.2113 \ No newline at end of file diff --git a/live/CMakeLists.txt b/live/CMakeLists.txt index 6aa078db1..a5d9fe67e 100644 --- a/live/CMakeLists.txt +++ b/live/CMakeLists.txt @@ -699,6 +699,8 @@ set(live_public_header_model include/alibabacloud/live/model/PlayChoosenShowResult.h include/alibabacloud/live/model/PublishLiveStagingConfigToProductionRequest.h include/alibabacloud/live/model/PublishLiveStagingConfigToProductionResult.h + include/alibabacloud/live/model/PutRecordStorageLifeCycleRequest.h + include/alibabacloud/live/model/PutRecordStorageLifeCycleResult.h include/alibabacloud/live/model/QueryLiveDomainMultiStreamListRequest.h include/alibabacloud/live/model/QueryLiveDomainMultiStreamListResult.h include/alibabacloud/live/model/QueryMessageAppRequest.h @@ -1562,6 +1564,8 @@ set(live_src src/model/PlayChoosenShowResult.cc src/model/PublishLiveStagingConfigToProductionRequest.cc src/model/PublishLiveStagingConfigToProductionResult.cc + src/model/PutRecordStorageLifeCycleRequest.cc + src/model/PutRecordStorageLifeCycleResult.cc src/model/QueryLiveDomainMultiStreamListRequest.cc src/model/QueryLiveDomainMultiStreamListResult.cc src/model/QueryMessageAppRequest.cc diff --git a/live/include/alibabacloud/live/LiveClient.h b/live/include/alibabacloud/live/LiveClient.h index 11d78ee28..51303a963 100644 --- a/live/include/alibabacloud/live/LiveClient.h +++ b/live/include/alibabacloud/live/LiveClient.h @@ -700,6 +700,8 @@ #include "model/PlayChoosenShowResult.h" #include "model/PublishLiveStagingConfigToProductionRequest.h" #include "model/PublishLiveStagingConfigToProductionResult.h" +#include "model/PutRecordStorageLifeCycleRequest.h" +#include "model/PutRecordStorageLifeCycleResult.h" #include "model/QueryLiveDomainMultiStreamListRequest.h" #include "model/QueryLiveDomainMultiStreamListResult.h" #include "model/QueryMessageAppRequest.h" @@ -1908,6 +1910,9 @@ namespace AlibabaCloud typedef Outcome PublishLiveStagingConfigToProductionOutcome; typedef std::future PublishLiveStagingConfigToProductionOutcomeCallable; typedef std::function&)> PublishLiveStagingConfigToProductionAsyncHandler; + typedef Outcome PutRecordStorageLifeCycleOutcome; + typedef std::future PutRecordStorageLifeCycleOutcomeCallable; + typedef std::function&)> PutRecordStorageLifeCycleAsyncHandler; typedef Outcome QueryLiveDomainMultiStreamListOutcome; typedef std::future QueryLiveDomainMultiStreamListOutcomeCallable; typedef std::function&)> QueryLiveDomainMultiStreamListAsyncHandler; @@ -3203,6 +3208,9 @@ namespace AlibabaCloud PublishLiveStagingConfigToProductionOutcome publishLiveStagingConfigToProduction(const Model::PublishLiveStagingConfigToProductionRequest &request)const; void publishLiveStagingConfigToProductionAsync(const Model::PublishLiveStagingConfigToProductionRequest& request, const PublishLiveStagingConfigToProductionAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; PublishLiveStagingConfigToProductionOutcomeCallable publishLiveStagingConfigToProductionCallable(const Model::PublishLiveStagingConfigToProductionRequest& request) const; + PutRecordStorageLifeCycleOutcome putRecordStorageLifeCycle(const Model::PutRecordStorageLifeCycleRequest &request)const; + void putRecordStorageLifeCycleAsync(const Model::PutRecordStorageLifeCycleRequest& request, const PutRecordStorageLifeCycleAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + PutRecordStorageLifeCycleOutcomeCallable putRecordStorageLifeCycleCallable(const Model::PutRecordStorageLifeCycleRequest& request) const; QueryLiveDomainMultiStreamListOutcome queryLiveDomainMultiStreamList(const Model::QueryLiveDomainMultiStreamListRequest &request)const; void queryLiveDomainMultiStreamListAsync(const Model::QueryLiveDomainMultiStreamListRequest& request, const QueryLiveDomainMultiStreamListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; QueryLiveDomainMultiStreamListOutcomeCallable queryLiveDomainMultiStreamListCallable(const Model::QueryLiveDomainMultiStreamListRequest& request) const; diff --git a/live/include/alibabacloud/live/model/AddCustomLiveStreamTranscodeRequest.h b/live/include/alibabacloud/live/model/AddCustomLiveStreamTranscodeRequest.h index a946cba96..62599cd19 100644 --- a/live/include/alibabacloud/live/model/AddCustomLiveStreamTranscodeRequest.h +++ b/live/include/alibabacloud/live/model/AddCustomLiveStreamTranscodeRequest.h @@ -52,6 +52,8 @@ public: void setBitrateWithSource(const std::string &bitrateWithSource); std::string getDomain() const; void setDomain(const std::string &domain); + bool getDeInterlaced() const; + void setDeInterlaced(bool deInterlaced); std::string get_Template() const; void set_Template(const std::string &_template); std::string getLazy() const; @@ -95,6 +97,7 @@ private: std::string extWithSource_; std::string bitrateWithSource_; std::string domain_; + bool deInterlaced_; std::string _template_; std::string lazy_; std::string kmsKeyExpireInterval_; diff --git a/live/include/alibabacloud/live/model/DescribeLiveStreamTranscodeInfoResult.h b/live/include/alibabacloud/live/model/DescribeLiveStreamTranscodeInfoResult.h index 3ce62a879..6b7b44bb9 100644 --- a/live/include/alibabacloud/live/model/DescribeLiveStreamTranscodeInfoResult.h +++ b/live/include/alibabacloud/live/model/DescribeLiveStreamTranscodeInfoResult.h @@ -49,6 +49,7 @@ namespace AlibabaCloud int height; std::string rtsFlag; int audioChannelNum; + bool deInterlaced; int width; int audioRate; std::string audioCodec; diff --git a/live/include/alibabacloud/live/model/PutRecordStorageLifeCycleRequest.h b/live/include/alibabacloud/live/model/PutRecordStorageLifeCycleRequest.h new file mode 100644 index 000000000..2c382936e --- /dev/null +++ b/live/include/alibabacloud/live/model/PutRecordStorageLifeCycleRequest.h @@ -0,0 +1,48 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LIVE_MODEL_PUTRECORDSTORAGELIFECYCLEREQUEST_H_ +#define ALIBABACLOUD_LIVE_MODEL_PUTRECORDSTORAGELIFECYCLEREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Live { +namespace Model { +class ALIBABACLOUD_LIVE_EXPORT PutRecordStorageLifeCycleRequest : public RpcServiceRequest { +public: + PutRecordStorageLifeCycleRequest(); + ~PutRecordStorageLifeCycleRequest(); + std::vector getStreamIds() const; + void setStreamIds(const std::vector &streamIds); + long getUnixTimestamp() const; + void setUnixTimestamp(long unixTimestamp); + std::string getTag() const; + void setTag(const std::string &tag); + +private: + std::vector streamIds_; + long unixTimestamp_; + std::string tag_; +}; +} // namespace Model +} // namespace Live +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_LIVE_MODEL_PUTRECORDSTORAGELIFECYCLEREQUEST_H_ diff --git a/live/include/alibabacloud/live/model/PutRecordStorageLifeCycleResult.h b/live/include/alibabacloud/live/model/PutRecordStorageLifeCycleResult.h new file mode 100644 index 000000000..7e69b8e12 --- /dev/null +++ b/live/include/alibabacloud/live/model/PutRecordStorageLifeCycleResult.h @@ -0,0 +1,53 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_LIVE_MODEL_PUTRECORDSTORAGELIFECYCLERESULT_H_ +#define ALIBABACLOUD_LIVE_MODEL_PUTRECORDSTORAGELIFECYCLERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Live + { + namespace Model + { + class ALIBABACLOUD_LIVE_EXPORT PutRecordStorageLifeCycleResult : public ServiceResult + { + public: + + + PutRecordStorageLifeCycleResult(); + explicit PutRecordStorageLifeCycleResult(const std::string &payload); + ~PutRecordStorageLifeCycleResult(); + std::string getMsg()const; + int getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string msg_; + int code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_LIVE_MODEL_PUTRECORDSTORAGELIFECYCLERESULT_H_ \ No newline at end of file diff --git a/live/include/alibabacloud/live/model/TagLiveResourcesRequest.h b/live/include/alibabacloud/live/model/TagLiveResourcesRequest.h index 69a2fa88a..684c6a72d 100644 --- a/live/include/alibabacloud/live/model/TagLiveResourcesRequest.h +++ b/live/include/alibabacloud/live/model/TagLiveResourcesRequest.h @@ -29,8 +29,8 @@ namespace Model { class ALIBABACLOUD_LIVE_EXPORT TagLiveResourcesRequest : public RpcServiceRequest { public: struct Tag { - std::string key; std::string value; + std::string key; }; TagLiveResourcesRequest(); ~TagLiveResourcesRequest(); diff --git a/live/include/alibabacloud/live/model/UpdateCustomLiveStreamTranscodeRequest.h b/live/include/alibabacloud/live/model/UpdateCustomLiveStreamTranscodeRequest.h index f30d74466..f58cb0185 100644 --- a/live/include/alibabacloud/live/model/UpdateCustomLiveStreamTranscodeRequest.h +++ b/live/include/alibabacloud/live/model/UpdateCustomLiveStreamTranscodeRequest.h @@ -30,75 +30,78 @@ class ALIBABACLOUD_LIVE_EXPORT UpdateCustomLiveStreamTranscodeRequest : public R public: UpdateCustomLiveStreamTranscodeRequest(); ~UpdateCustomLiveStreamTranscodeRequest(); - std::string get_Template() const; - void set_Template(const std::string &_template); std::string getResWithSource() const; void setResWithSource(const std::string &resWithSource); - std::string getLazy() const; - void setLazy(const std::string &lazy); std::string getGop() const; void setGop(const std::string &gop); std::string getAudioCodec() const; void setAudioCodec(const std::string &audioCodec); - std::string getRegionId() const; - void setRegionId(const std::string ®ionId); - std::string getTemplateType() const; - void setTemplateType(const std::string &templateType); - std::string getAudioProfile() const; - void setAudioProfile(const std::string &audioProfile); int getHeight() const; void setHeight(int height); std::string getApp() const; void setApp(const std::string &app); - std::string getEncryptParameters() const; - void setEncryptParameters(const std::string &encryptParameters); - int getAudioChannelNum() const; - void setAudioChannelNum(int audioChannelNum); int getProfile() const; void setProfile(int profile); - int getFPS() const; - void setFPS(int fPS); long getOwnerId() const; void setOwnerId(long ownerId); std::string getExtWithSource() const; void setExtWithSource(const std::string &extWithSource); std::string getBitrateWithSource() const; void setBitrateWithSource(const std::string &bitrateWithSource); + std::string getDomain() const; + void setDomain(const std::string &domain); + bool getDeInterlaced() const; + void setDeInterlaced(bool deInterlaced); + std::string get_Template() const; + void set_Template(const std::string &_template); + std::string getLazy() const; + void setLazy(const std::string &lazy); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::string getTemplateType() const; + void setTemplateType(const std::string &templateType); + std::string getAudioProfile() const; + void setAudioProfile(const std::string &audioProfile); + std::string getEncryptParameters() const; + void setEncryptParameters(const std::string &encryptParameters); + int getAudioChannelNum() const; + void setAudioChannelNum(int audioChannelNum); + int getFPS() const; + void setFPS(int fPS); int getAudioRate() const; void setAudioRate(int audioRate); std::string getFpsWithSource() const; void setFpsWithSource(const std::string &fpsWithSource); int getAudioBitrate() const; void setAudioBitrate(int audioBitrate); - std::string getDomain() const; - void setDomain(const std::string &domain); int getWidth() const; void setWidth(int width); int getVideoBitrate() const; void setVideoBitrate(int videoBitrate); private: - std::string _template_; std::string resWithSource_; - std::string lazy_; std::string gop_; std::string audioCodec_; - std::string regionId_; - std::string templateType_; - std::string audioProfile_; int height_; std::string app_; - std::string encryptParameters_; - int audioChannelNum_; int profile_; - int fPS_; long ownerId_; std::string extWithSource_; std::string bitrateWithSource_; + std::string domain_; + bool deInterlaced_; + std::string _template_; + std::string lazy_; + std::string regionId_; + std::string templateType_; + std::string audioProfile_; + std::string encryptParameters_; + int audioChannelNum_; + int fPS_; int audioRate_; std::string fpsWithSource_; int audioBitrate_; - std::string domain_; int width_; int videoBitrate_; }; diff --git a/live/src/LiveClient.cc b/live/src/LiveClient.cc index 8652c98fd..d2afd19f1 100644 --- a/live/src/LiveClient.cc +++ b/live/src/LiveClient.cc @@ -12255,6 +12255,42 @@ LiveClient::PublishLiveStagingConfigToProductionOutcomeCallable LiveClient::publ return task->get_future(); } +LiveClient::PutRecordStorageLifeCycleOutcome LiveClient::putRecordStorageLifeCycle(const PutRecordStorageLifeCycleRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return PutRecordStorageLifeCycleOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return PutRecordStorageLifeCycleOutcome(PutRecordStorageLifeCycleResult(outcome.result())); + else + return PutRecordStorageLifeCycleOutcome(outcome.error()); +} + +void LiveClient::putRecordStorageLifeCycleAsync(const PutRecordStorageLifeCycleRequest& request, const PutRecordStorageLifeCycleAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, putRecordStorageLifeCycle(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +LiveClient::PutRecordStorageLifeCycleOutcomeCallable LiveClient::putRecordStorageLifeCycleCallable(const PutRecordStorageLifeCycleRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->putRecordStorageLifeCycle(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + LiveClient::QueryLiveDomainMultiStreamListOutcome LiveClient::queryLiveDomainMultiStreamList(const QueryLiveDomainMultiStreamListRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/live/src/model/AddCustomLiveStreamTranscodeRequest.cc b/live/src/model/AddCustomLiveStreamTranscodeRequest.cc index 0cc40843e..5017a433a 100644 --- a/live/src/model/AddCustomLiveStreamTranscodeRequest.cc +++ b/live/src/model/AddCustomLiveStreamTranscodeRequest.cc @@ -124,6 +124,15 @@ void AddCustomLiveStreamTranscodeRequest::setDomain(const std::string &domain) { setParameter(std::string("Domain"), domain); } +bool AddCustomLiveStreamTranscodeRequest::getDeInterlaced() const { + return deInterlaced_; +} + +void AddCustomLiveStreamTranscodeRequest::setDeInterlaced(bool deInterlaced) { + deInterlaced_ = deInterlaced; + setParameter(std::string("DeInterlaced"), deInterlaced ? "true" : "false"); +} + std::string AddCustomLiveStreamTranscodeRequest::get_Template() const { return _template_; } diff --git a/live/src/model/DescribeLiveStreamTranscodeInfoResult.cc b/live/src/model/DescribeLiveStreamTranscodeInfoResult.cc index bdc0b2416..cfe28c20f 100644 --- a/live/src/model/DescribeLiveStreamTranscodeInfoResult.cc +++ b/live/src/model/DescribeLiveStreamTranscodeInfoResult.cc @@ -88,6 +88,8 @@ void DescribeLiveStreamTranscodeInfoResult::parse(const std::string &payload) domainTranscodeListObject.customTranscodeParameters.audioProfile = customTranscodeParametersNode["AudioProfile"].asString(); if(!customTranscodeParametersNode["ResWithSource"].isNull()) domainTranscodeListObject.customTranscodeParameters.resWithSource = customTranscodeParametersNode["ResWithSource"].asString(); + if(!customTranscodeParametersNode["DeInterlaced"].isNull()) + domainTranscodeListObject.customTranscodeParameters.deInterlaced = customTranscodeParametersNode["DeInterlaced"].asString() == "true"; auto encryptParametersNode = value["EncryptParameters"]; if(!encryptParametersNode["EncryptType"].isNull()) domainTranscodeListObject.encryptParameters.encryptType = encryptParametersNode["EncryptType"].asString(); diff --git a/live/src/model/PutRecordStorageLifeCycleRequest.cc b/live/src/model/PutRecordStorageLifeCycleRequest.cc new file mode 100644 index 000000000..9652908b5 --- /dev/null +++ b/live/src/model/PutRecordStorageLifeCycleRequest.cc @@ -0,0 +1,56 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Live::Model::PutRecordStorageLifeCycleRequest; + +PutRecordStorageLifeCycleRequest::PutRecordStorageLifeCycleRequest() + : RpcServiceRequest("live", "2016-11-01", "PutRecordStorageLifeCycle") { + setMethod(HttpRequest::Method::Post); +} + +PutRecordStorageLifeCycleRequest::~PutRecordStorageLifeCycleRequest() {} + +std::vector PutRecordStorageLifeCycleRequest::getStreamIds() const { + return streamIds_; +} + +void PutRecordStorageLifeCycleRequest::setStreamIds(const std::vector &streamIds) { + streamIds_ = streamIds; + for(int dep1 = 0; dep1 != streamIds.size(); dep1++) { + setBodyParameter(std::string("StreamIds") + "." + std::to_string(dep1 + 1), streamIds[dep1]); + } +} + +long PutRecordStorageLifeCycleRequest::getUnixTimestamp() const { + return unixTimestamp_; +} + +void PutRecordStorageLifeCycleRequest::setUnixTimestamp(long unixTimestamp) { + unixTimestamp_ = unixTimestamp; + setBodyParameter(std::string("UnixTimestamp"), std::to_string(unixTimestamp)); +} + +std::string PutRecordStorageLifeCycleRequest::getTag() const { + return tag_; +} + +void PutRecordStorageLifeCycleRequest::setTag(const std::string &tag) { + tag_ = tag; + setBodyParameter(std::string("Tag"), tag); +} + diff --git a/live/src/model/PutRecordStorageLifeCycleResult.cc b/live/src/model/PutRecordStorageLifeCycleResult.cc new file mode 100644 index 000000000..d69e79d9e --- /dev/null +++ b/live/src/model/PutRecordStorageLifeCycleResult.cc @@ -0,0 +1,58 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Live; +using namespace AlibabaCloud::Live::Model; + +PutRecordStorageLifeCycleResult::PutRecordStorageLifeCycleResult() : + ServiceResult() +{} + +PutRecordStorageLifeCycleResult::PutRecordStorageLifeCycleResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +PutRecordStorageLifeCycleResult::~PutRecordStorageLifeCycleResult() +{} + +void PutRecordStorageLifeCycleResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Code"].isNull()) + code_ = std::stoi(value["Code"].asString()); + if(!value["Msg"].isNull()) + msg_ = value["Msg"].asString(); + +} + +std::string PutRecordStorageLifeCycleResult::getMsg()const +{ + return msg_; +} + +int PutRecordStorageLifeCycleResult::getCode()const +{ + return code_; +} + diff --git a/live/src/model/TagLiveResourcesRequest.cc b/live/src/model/TagLiveResourcesRequest.cc index e2cca2a71..4dff70151 100644 --- a/live/src/model/TagLiveResourcesRequest.cc +++ b/live/src/model/TagLiveResourcesRequest.cc @@ -43,8 +43,8 @@ void TagLiveResourcesRequest::setTag(const std::vector