Skip to content

Commit

Permalink
Merge pull request #132 from Azure/dev
Browse files Browse the repository at this point in the history
3.5.2.0 Release
  • Loading branch information
gtrifonov committed Nov 5, 2015
2 parents fa207ce + a53ec35 commit 198f7a0
Show file tree
Hide file tree
Showing 22 changed files with 370 additions and 36 deletions.
4 changes: 2 additions & 2 deletions .nuget/windowsazure.mediaservices.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>windowsazure.mediaservices</id>
<version>3.4.0.0</version>
<version>3.5.2.0</version>
<title>Windows Azure Media Services .NET SDK</title>
<authors>Microsoft Corporation</authors>
<owners>Microsoft Corporation</owners>
<licenseUrl>http://go.microsoft.com/fwlink/?LinkID=272666&amp;clcid=0x409</licenseUrl>
<projectUrl>http://aka.ms/wamsmsdn</projectUrl>
<iconUrl>http://nimbuspmteam.blob.core.windows.net/nuget/Media Services 150.png</iconUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>This package contains Windows Azure Media Service library 3.4.0.0 for .NET.</description>
<description>This package contains Windows Azure Media Service library 3.5.2.0 for .NET.</description>
<releaseNotes>For more information, please check our forum: http://social.msdn.microsoft.com/Forums/en-US/MediaServices/threads

For MSDN documentation please visit http://aka.ms/wamsmsdn
Expand Down
2 changes: 1 addition & 1 deletion build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<Target Name="Build" DependsOnTargets="RestorePackages;Clean;BuildDebug;BuildRelease" />

<!-- Publish any build artificates to the Publish directory -->
<Target Name="Publish" DependsOnTargets="UnitTestRun">
<Target Name="Publish" DependsOnTargets="Build">

<!-- Copy code artifacts -->
<Message Importance="high" Text="Publishing ..." ContinueOnError="false" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.4.0.0")]
[assembly: AssemblyFileVersion("3.4.0.0")]
[assembly: AssemblyVersion("3.5.2.0")]
[assembly: AssemblyFileVersion("3.5.2.0")]
[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.MediaServices.Client.Tests.Scenario")]
[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.MediaServices.Client.Tests.Unit")]
[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.MediaServices.Client.Tests.Common")]
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.4.0.0")]
[assembly: AssemblyFileVersion("3.4.0.0")]
[assembly: AssemblyVersion("3.5.2.0")]
[assembly: AssemblyFileVersion("3.5.2.0")]
//For delay signing specify PublicKey for each friendly assembly
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Microsoft.WindowsAzure.MediaServices.Client.Tests.Scenario, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Microsoft.WindowsAzure.MediaServices.Client.Tests.Unit, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.4.0.0")]
[assembly: AssemblyFileVersion("3.4.0.0")]
[assembly: AssemblyVersion("3.5.2.0")]
[assembly: AssemblyFileVersion("3.5.2.0")]
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.4.0.0")]
[assembly: AssemblyFileVersion("3.4.0.0")]
[assembly: AssemblyVersion("3.5.2.0")]
[assembly: AssemblyFileVersion("3.5.2.0")]
//For delay signing specify PublicKey for each friendly assembly
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Microsoft.WindowsAzure.MediaServices.Client.Tests.Scenario, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Microsoft.WindowsAzure.MediaServices.Client.Tests.Unit, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ public enum ContentKeyDeliveryType
/// <summary>
/// Use MPEG Baseline HTTP key protocol.
/// </summary>
BaselineHttp
BaselineHttp,

/// <summary>
/// Use Widevine license server.
/// </summary>
Widevine
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
//-----------------------------------------------------------------------
// <copyright file="ContentKeySpecs.cs" company="Microsoft">Copyright 2014 Microsoft Corporation</copyright>
// <license>
// 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.
// </license>

using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace Microsoft.WindowsAzure.MediaServices.Client.Widevine
{
[JsonConverter(typeof(StringEnumConverter))]
public enum Hdcp
{
HDCP_NONE,
HDCP_V1,
HDCP_V2
}

public class RequiredOutputProtection
{
/// <summary>
/// Indicates whether HDCP is required.
/// </summary>
public Hdcp hdcp { get; set; }
}

/// <summary>
/// See Widevine Modular DRM Proxy Integration documentation.
/// </summary>
public class ContentKeySpecs
{
/// <summary>
/// A track type name.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string track_type { get; set; }

/// <summary>
/// Unique identifier for the key.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string key_id { get; set; }

/// <summary>
/// Defines client robustness requirements for playback.
/// 1 - Software-based whitebox crypto is required.
/// 2 - Software crypto and an obfuscated decoder is required.
/// 3 - The key material and crypto operations must be performed
/// within a hardware backed trusted execution environment.
/// 4 - The crypto and decoding of content must be performed within
/// a hardware backed trusted execution environment.
/// 5 - The crypto, decoding and all handling of the media (compressed
/// and uncompressed) must be handled within a hardware backed trusted
/// execution environment.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public int? security_level { get; set; }

/// <summary>
/// Indicates whether HDCP V1 or V2 is required or not.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public RequiredOutputProtection required_output_protection { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
//-----------------------------------------------------------------------
// <copyright file="WidevineMessage.cs" company="Microsoft">Copyright 2014 Microsoft Corporation</copyright>
// <license>
// 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.
// </license>

using System;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace Microsoft.WindowsAzure.MediaServices.Client.Widevine
{
[JsonConverter(typeof(StringEnumConverter))]
public enum AllowedTrackTypes { SD_ONLY, SD_HD }

/// <summary>
/// See Widevine Modular DRM Proxy Integration documentation.
/// </summary>
public class WidevineMessage
{
/// <summary>
/// Controls which content keys should be included in a license.
/// Only one of allowed_track_types and content_key_specs can be specified.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public AllowedTrackTypes? allowed_track_types { get; set; }

/// <summary>
/// A finer grained control on what content keys to return.
/// Only one of allowed_track_types and content_key_specs can be specified.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public ContentKeySpecs[] content_key_specs { get; set; }

/// <summary>
/// Policy settings for this license. In the event this asset has
/// a pre-defined policy, these specified values will be used.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public object policy_overrides { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,10 @@ public enum AssetDeliveryPolicyConfigurationKey
/// The initialization vector to use for envelope encryption.
/// </summary>
EnvelopeEncryptionIV,

/// <summary>
/// Widevine DRM acquisition url
/// </summary>
WidevineLicenseAcquisitionUrl
}
}
2 changes: 2 additions & 0 deletions src/net/Client/DynamicEncryption/AssetDeliveryProtocol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public enum AssetDeliveryProtocol
/// </summary>
Hds = 0x8,

ProgressiveDownload = 0x10,

/// <summary>
/// Include all protocols.
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions src/net/Client/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("3.4.0.0")]
[assembly: AssemblyFileVersion("3.4.0.0")]
[assembly: AssemblyVersion("3.5.2.0")]
[assembly: AssemblyFileVersion("3.5.2.0")]
[assembly: NeutralResourcesLanguage("en-US")]

//For delay signing specify PublicKey for each friendly assembly
Expand Down
4 changes: 2 additions & 2 deletions src/net/Client/Properties/DelaySign_AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("3.4.0.0")]
[assembly: AssemblyFileVersion("3.4.0.0")]
[assembly: AssemblyVersion("3.5.2.0")]
[assembly: AssemblyFileVersion("3.5.2.0")]
[assembly: NeutralResourcesLanguage("en-US")]

//For delay signing specify PublicKey for each friendly assembly
Expand Down
4 changes: 3 additions & 1 deletion src/net/Client/SDK.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@
<Compile Include="ContentKeyAuthorization\IContentKeyAuthorizationPolicyOption.cs" />
<Compile Include="ContentKeyAuthorization\Templates\AGCandColorStripeRestriction.cs" />
<Compile Include="ContentKeyAuthorization\Templates\AsymmetricTokenVerificationKey.cs" />
<Compile Include="ContentKeyAuthorization\Templates\ContentKeySpecs.cs" />
<Compile Include="ContentKeyAuthorization\Templates\EncodeUtilities.cs" />
<Compile Include="ContentKeyAuthorization\Templates\ErrorMessages.Designer.cs">
<AutoGen>True</AutoGen>
Expand All @@ -212,6 +213,7 @@
<Compile Include="ContentKeyAuthorization\Templates\TokenType.cs" />
<Compile Include="ContentKeyAuthorization\Templates\TokenVerificationKey.cs" />
<Compile Include="ContentKeyAuthorization\Templates\UnknownOutputPassingOptions.cs" />
<Compile Include="ContentKeyAuthorization\Templates\WidevineMessage.cs" />
<Compile Include="ContentKeyAuthorization\Templates\X509CertTokenVerificationKey.cs" />
<Compile Include="DynamicEncryption\AssetData.cs" />
<Compile Include="DynamicEncryption\AssetDeliveryPolicyCollection.cs" />
Expand Down Expand Up @@ -563,7 +565,7 @@
<OverwriteReadOnlyOutputFiles>true</OverwriteReadOnlyOutputFiles>
</PropertyGroup>
<PropertyGroup Label="SlowCheetah">
<SlowCheetahToolsPath>$([System.IO.Path]::GetFullPath( $(MSBuildProjectDirectory)\..\..\..\packages\SlowCheetah.2.5.10.3\tools\))</SlowCheetahToolsPath>
<SlowCheetahToolsPath>$([System.IO.Path]::GetFullPath( $(MSBuildProjectDirectory)\..\..\..\packages\2.5.14\tools\))</SlowCheetahToolsPath>
<SlowCheetah_EnableImportFromNuGet Condition=" '$(SC_EnableImportFromNuGet)'=='' ">true</SlowCheetah_EnableImportFromNuGet>
<SlowCheetah_NuGetImportPath Condition=" '$(SlowCheetah_NuGetImportPath)'=='' ">$([System.IO.Path]::GetFullPath( $(MSBuildProjectDirectory)\Properties\SlowCheetah\SlowCheetah.Transforms.targets ))</SlowCheetah_NuGetImportPath>
<SlowCheetahTargets Condition=" '$(SlowCheetah_EnableImportFromNuGet)'=='true' and Exists('$(SlowCheetah_NuGetImportPath)') ">$(SlowCheetah_NuGetImportPath)</SlowCheetahTargets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,46 @@ public void EnvelopeAssetDeliveryPolicyTestAttach()
asset.Delete();
}

[TestMethod]
[TestCategory("ClientSDK")]
[Owner("ClientSDK")]
[TestCategory("Bvt")]
public void ProgressiveAssetDeliveryPolicyTestAttach()
{
var asset = _mediaContext.Assets.Create("Asset for EnvelopeAssetDeliveryPolicyTestAttach", AssetCreationOptions.None);


IAssetDeliveryPolicy policy = _mediaContext.AssetDeliveryPolicies.Create("", AssetDeliveryPolicyType.NoDynamicEncryption,AssetDeliveryProtocol.ProgressiveDownload,null);


asset.DeliveryPolicies.Add(policy);

asset = _mediaContext.Assets.Where(a => a.Id == asset.Id).Single();
var check = asset.DeliveryPolicies[0];
// Assert.AreEqual(policy.Id, check.Id);
Assert.AreEqual(1, asset.DeliveryPolicies.Count);

List<IAssetDeliveryPolicy> policies = asset.DeliveryPolicies.ToList();
foreach (IAssetDeliveryPolicy current in policies)
{
asset.DeliveryPolicies.Remove(current);
current.Delete();
}

asset.Delete();
}



[TestMethod]
[TestCategory("ClientSDK")]
[Owner("ClientSDK")]
[TestCategory("Bvt")]
public void ListAllPolicies()
{
var policies = _mediaContext.AssetDeliveryPolicies.ToList();
}

[TestMethod]
[TestCategory("ClientSDK")]
[Owner("ClientSDK")]
Expand Down
Loading

0 comments on commit 198f7a0

Please sign in to comment.