【正文】
tifier=youraccountnameamp。)Server: MicrosoftIIS/xmsrequestid: 0a262141e5394fa6b5d680cdf26d3ff6XContentTypeOptions: nosniffDataServiceVersion: 。%3a%2f%%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=%3a%2f%%2famp。nb%3Acid%3AUUID%3Aaa5bfdd9900a431daea7fffb0b24f36b39。nb%3Acid%3AUUID%3Aaa5bfdd9900a431daea7fffb0b24f36b39。HMACSHA256=XQs5T%2fEfdO39%2f0Z9%2fBBkA12%2bbUUEY21YyefWXuRYZlY%3dHost: ContentLength: 27Expect: 100continue{ Name : NewJSONAsset }Create the assets Response:HTTP/ 201 CreatedCacheControl: nocacheContentLength: 1353ContentType: application/json。用REST 風(fēng)格 API 插入 Assets:插入Asset的步驟:1. Create an Asset 2. Encrypt an Asset3. Upload a file to blob storage the Asset: 創(chuàng)建Asset什么是Asset?an asset is a container for multiple types or sets of objects in Media Services, including video, audio, images, thumbnail collections, text tracks, and closed caption files.POST ContentType: application/json。odata=verboseAccept: application/json。 path=/。odata=verboseAcceptEncodingGzip,deflate對(duì)資源,服務(wù)可能不壓縮而直接返回AcceptLanguage“en”人類可讀的語言AcceptCharsetCharset type like UTF8字符集,默認(rèn)UTF8XHTTPMethodHTTP Method通過隧道方式,允許通過GET方法實(shí)現(xiàn)防火墻等不支持的PUT/DELETE方法 ContentTypeContent type PUT/POST 中實(shí)體的類型clientrequestidString呼叫方定義的標(biāo)記本次請(qǐng)求,如有必要,返回時(shí)也可以帶此信息媒體服務(wù)支持的響應(yīng)頭部(可選):HeaderTypeValuerequestidString服務(wù)端產(chǎn)生的的代表本次操作的標(biāo)識(shí)clientrequestidString請(qǐng)求方帶來的標(biāo)識(shí)DateRFC 1123 date請(qǐng)求處理時(shí)的時(shí)間ContentTypeVaries響應(yīng)實(shí)體的類型ContentEncodingVariesGzip or deflate Identify Windows Azure Media Services EntitiesMedia Services的命名機(jī)制nb:type:scheme:SSID例子:nb:cid:UUID:0234c75e7b624d819373d869478a6643type: is the type of content idenetifier。例如:現(xiàn)場(chǎng)編碼內(nèi)容,然后將其上傳到媒體服務(wù)以便轉(zhuǎn)碼為多種格式并通過第三方CDN交付。開發(fā)者可以利用從 Azure開發(fā)者網(wǎng)站上下載的REST、APIs、.net、或SDKs構(gòu)建自動(dòng)上傳、編碼、發(fā)送視頻的工作流。涵蓋具有 HTMLFlash 和 Silverlight 的 Windows Windows phone、Xbox、iOS 和 Android 設(shè)備。windows Azure提供的功能網(wǎng)站,虛擬機(jī),云服務(wù),大型數(shù)據(jù),媒體,移動(dòng)服務(wù)。微軟Windows Azure官方宣傳 Guthrie表示,構(gòu)建一個(gè)媒體的分布式平臺(tái),為不同設(shè)備和客戶端設(shè)置不同代碼和視頻流是非常復(fù)雜的任務(wù),需要軟、硬件的連接,配置和維護(hù)。從上傳媒體到分發(fā)內(nèi)容,媒體服務(wù)提供了一系列預(yù)生成,使用就緒,第一方和第三方組件,可以組合這些組件以滿足您的特定需求。 PPTV ATN平臺(tái)能將世界各地的內(nèi)容商將自己的內(nèi)容上傳到ATN平臺(tái)上,并授權(quán)給各國/地區(qū)的服務(wù)運(yùn)營商使用,同時(shí)服務(wù)運(yùn)營商不需要昂貴的初期投入資本,就可以迅速整合各類視頻資源,快速實(shí)現(xiàn)內(nèi)容定制,定價(jià)及廣告運(yùn)作和收費(fèi)電視的推送。client_secret:AccountKey,密碼。Issuer=%3a%2f%2f %2famp。ExpiresOn=1335602357amp。Audience=urn%3aWindowsAzureMediaServicesamp。XAspNetVersion: XPoweredBy: Date: Fri, 27 Apr 2012 22:39:18 GMT{d:{__metadata:{id:(39。)/Locators}},ContentKeys:{__deferred:{uri:(39。odata=verboseAccept: application/json。odata=verbose。),type:},Id:nb:pid:UUID:94763883537a41c0a0974e3f755bbeab,Created:\/Date(1335920371136)\/,LastModified:\/Date(1335920371136)\/,Name:NewUploadPolicy,DurationInMinutes:300,Permissions:2}}step2. Get The Upload URL 獲得上傳的URL為了獲取真實(shí)上傳URL,必須創(chuàng)建一個(gè)定位器。Issuer=%3a%2f%%2famp。),uri:(39。Delete the upload Locator to revoke write access to your Asset’s blobstorage container。Audience=urn%3aWindowsAzureMediaServicesamp。urn%3aSubscriptionId=2f84471db1ae4e75aa09010f0fc0cf5bamp。%3a%2f%%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=%3a%2f%%2famp。%3a%2f%%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=%3a%2f%%2famp。Audience=urn%3aWindowsAzureMediaServicesamp。ExpiresOn=1334275521amp。Issuer=%3a%2f%%2famp。ExpiresOn=1334275521amp。Audience=urn%3aWindowsAzureMediaServicesamp。nb%3Ajid%3AUUID%3A40dc7bef6bd922479f3dd80bc257d71539。)/Tasks}},OutputMediaAssets:{__deferred:{uri:(39。%3a%2f%%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=%3a%2f%%2famp。charset=utf8Location: (39。nb%3Ajid%3AUUID%3Ab21b1baf8cee734e9f1ab0f12b06e2d539。odata=verboseAccept: application/json。odata=verbose。%3a%2f%%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=%3a%2f%%2famp。%3a%2f%%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=%3a%2f%%2famp。%3a%2f%%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=%3a%2f%%2famp。)/TaskTemplates HTTP/GET $select=State HTTP/GET $filter=startswith(Name,%2039。%3a%2f%%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=%3a%2f%%2famp。odata=verboseDataServiceVersion: MaxDataServiceVersion: xmsversion。ExpiresOn=1337083279amp。) HTTP/3. Updating entities通過HTTP MERGE請(qǐng)求來跟新實(shí)體相關(guān)的信息MERGE (39。ExpiresOn=1337078831amp。ExpiresOn=1337067658amp。ExpiresOn=1336908753amp。XAspNetVersion: XPoweredBy: Date: Sun, 13 May 2012 05:16:53 GMT{d:{State:2}}4. Cancel a JobGET 39。urn%3aSubscriptionId=2f84471db1ae4e75aa09010f0fc0cf5bamp。nb%3Ajid%3AUUID%3Ab21b1baf8cee734e9f1ab0f12b06e2d539。)Server: MicrosoftIIS/xmsrequestid: 82feb593ee7445db85c524c0a7600f2dXContentTypeOptions: nosniffDataServiceVersion: 。ExpiresOn=1336908022amp。)/OutputMediaAssets}},InputMediaAssets:{__deferred:{uri:(39。XAspNetVersion: XPoweredBy: Date: Fri, 11 May 2012 21:32:40 GMT{d:{__metadata:{id:(39。Issuer=%3a%2f%%2famp。HMACSHA256=GxdBb%2fmEyN7iHdNxbawawHRftLhPFFqxX1JZckuv3hY%3dHost: Process Asset with the Media Services REST APIJobs: 作業(yè)。nb:mid:UUID:5c77f186414f8b48823117f9264e204839。HMACSHA256=GxdBb%2fmEyN7iHdNxbawawHRftLhPFFqxX1JZckuv3hY%3dHost: ContentLength: 572Expect: 100continue{Id : nb:kid:UUID:316d14d4b6034d90b8db0fede8aa48f8, ContentKeyType : 1, EncryptedContentKey : Y4NPej7heOFa2vsd8ZEOcjjpu/qOq3RJ6GRfxa8CCwtAM83d6J2mKOeQFUmMyVXUSsBCCOdufmieTKi+hOUtNAbyNM4lY4AXI537b9GaY8oSeje0NGU8+QCOuf7jGdRac5B9uIk7WwD76RAJnqyep6U/OdvQV4RLvvZ9w7nO4bY8RHaUaLxC2u4aIRRaZtLu5rm8GKBPy87OzQVXNgnLM01I8s3Z4wJ3i7jXqkknDy4VkIyLBSQvIvUzxYHeNdMVWDmS+jPN9ScVmolUwGzH1A23td8UWFHOjTjXHLjNm5Yq+7MIOoaxeMlKPYXRFKofRY8Qh5o5tqvycSAJ9KUqfg==, ProtectionKeyId : 7D9BB04D9D0A4A24800CADBFEF232689E048F69C, ProtectionKeyType : 1, Checksum : TfXtjCIlq1Y= }5. Create the IngestManifestFiles for each AssetPOST ContentType: application/json。Issuer=%3a%2f%%2famp。ExpiresOn=1334275521amp。ExpiresOn=1334275521amp。Audience=urn%3