Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
from ._models_py3 import ContentKeyPolicyClearKeyConfiguration
from ._models_py3 import ContentKeyPolicyConfiguration
from ._models_py3 import ContentKeyPolicyFairPlayConfiguration
from ._models_py3 import ContentKeyPolicyFairPlayOfflineRentalConfiguration
from ._models_py3 import ContentKeyPolicyOpenRestriction
from ._models_py3 import ContentKeyPolicyOption
from ._models_py3 import ContentKeyPolicyPlayReadyConfiguration
Expand Down Expand Up @@ -181,6 +182,7 @@
from ._models import ContentKeyPolicyClearKeyConfiguration
from ._models import ContentKeyPolicyConfiguration
from ._models import ContentKeyPolicyFairPlayConfiguration
from ._models import ContentKeyPolicyFairPlayOfflineRentalConfiguration
from ._models import ContentKeyPolicyOpenRestriction
from ._models import ContentKeyPolicyOption
from ._models import ContentKeyPolicyPlayReadyConfiguration
Expand Down Expand Up @@ -383,6 +385,7 @@
'ContentKeyPolicyClearKeyConfiguration',
'ContentKeyPolicyConfiguration',
'ContentKeyPolicyFairPlayConfiguration',
'ContentKeyPolicyFairPlayOfflineRentalConfiguration',
'ContentKeyPolicyOpenRestriction',
'ContentKeyPolicyOption',
'ContentKeyPolicyPlayReadyConfiguration',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class ContentKeyPolicyFairPlayRentalAndLeaseKeyType(str, Enum):

unknown = "Unknown" #: Represents a ContentKeyPolicyFairPlayRentalAndLeaseKeyType that is unavailable in current API version.
undefined = "Undefined" #: Key duration is not specified.
dual_expiry = "DualExpiry" #: Dual expiry for offline rental.
persistent_unlimited = "PersistentUnlimited" #: Content key can be persisted with an unlimited duration
persistent_limited = "PersistentLimited" #: Content key can be persisted and the valid duration is limited by the Rental Duration value

Expand Down Expand Up @@ -173,6 +174,7 @@ class EncoderNamedPreset(str, Enum):
adaptive_streaming = "AdaptiveStreaming" #: Produces a set of GOP aligned MP4 files with H.264 video and stereo AAC audio. Auto-generates a bitrate ladder based on the input resolution and bitrate. The auto-generated preset will never exceed the input resolution and bitrate. For example, if the input is 720p at 3 Mbps, output will remain 720p at best, and will start at rates lower than 3 Mbps. The output will have video and audio in separate MP4 files, which is optimal for adaptive streaming.
aac_good_quality_audio = "AACGoodQualityAudio" #: Produces a single MP4 file containing only stereo audio encoded at 192 kbps.
content_aware_encoding_experimental = "ContentAwareEncodingExperimental" #: Exposes an experimental preset for content-aware encoding. Given any input content, the service attempts to automatically determine the optimal number of layers, appropriate bitrate and resolution settings for delivery by adaptive streaming. The underlying algorithms will continue to evolve over time. The output will contain MP4 files with video and audio interleaved.
content_aware_encoding = "ContentAwareEncoding" #: Produces a set of GOP-aligned MP4s by using content-aware encoding. Given any input content, the service performs an initial lightweight analysis of the input content, and uses the results to determine the optimal number of layers, appropriate bitrate and resolution settings for delivery by adaptive streaming. This preset is particularly effective for low and medium complexity videos, where the output files will be at lower bitrates but at a quality that still delivers a good experience to viewers. The output will contain MP4 files with video and audio interleaved.
h264_multiple_bitrate1080p = "H264MultipleBitrate1080p" #: Produces a set of 8 GOP-aligned MP4 files, ranging from 6000 kbps to 400 kbps, and stereo AAC audio. Resolution starts at 1080p and goes down to 360p.
h264_multiple_bitrate720p = "H264MultipleBitrate720p" #: Produces a set of 6 GOP-aligned MP4 files, ranging from 3400 kbps to 400 kbps, and stereo AAC audio. Resolution starts at 720p and goes down to 360p.
h264_multiple_bitrate_sd = "H264MultipleBitrateSD" #: Produces a set of 5 GOP-aligned MP4 files, ranging from 1600kbps to 400 kbps, and stereo AAC audio. Resolution starts at 480p and goes down to 360p.
Expand Down
132 changes: 102 additions & 30 deletions sdk/media/azure-mgmt-media/azure/mgmt/media/models/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,22 +633,21 @@ class AudioAnalyzerPreset(Preset):
:param odatatype: Required. Constant filled by server.
:type odatatype: str
:param audio_language: The language for the audio payload in the input
using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). The list
of supported languages are English ('en-US' and 'en-GB'), Spanish ('es-ES'
and 'es-MX'), French ('fr-FR'), Italian ('it-IT'), Japanese ('ja-JP'),
Portuguese ('pt-BR'), Chinese ('zh-CN'), German ('de-DE'), Arabic ('ar-EG'
and 'ar-SY'), Russian ('ru-RU'), Hindi ('hi-IN'), and Korean ('ko-KR'). If
you know the language of your content, it is recommended that you specify
it. If the language isn't specified or set to null, automatic language
using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). If you
know the language of your content, it is recommended that you specify it.
If the language isn't specified or set to null, automatic language
detection will choose the first language detected and process with the
selected language for the duration of the file. This language detection
feature currently supports English, Chinese, French, German, Italian,
Japanese, Spanish, Russian, and Portuguese. It does not currently support
dynamically switching between languages after the first language is
detected. The automatic detection works best with audio recordings with
selected language for the duration of the file. It does not currently
support dynamically switching between languages after the first language
is detected. The automatic detection works best with audio recordings with
clearly discernable speech. If automatic detection fails to find the
language, transcription would fallback to 'en-US'."
language, transcription would fallback to 'en-US'." The list of supported
languages is available here:
https://go.microsoft.com/fwlink/?linkid=2109463
:type audio_language: str
:param experimental_options: Dictionary containing key value pairs for
parameters not exposed in the preset itself
:type experimental_options: dict[str, str]
"""

_validation = {
Expand All @@ -658,6 +657,7 @@ class AudioAnalyzerPreset(Preset):
_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'audio_language': {'key': 'audioLanguage', 'type': 'str'},
'experimental_options': {'key': 'experimentalOptions', 'type': '{str}'},
}

_subtype_map = {
Expand All @@ -667,6 +667,7 @@ class AudioAnalyzerPreset(Preset):
def __init__(self, **kwargs):
super(AudioAnalyzerPreset, self).__init__(**kwargs)
self.audio_language = kwargs.get('audio_language', None)
self.experimental_options = kwargs.get('experimental_options', None)
self.odatatype = '#Microsoft.Media.AudioAnalyzerPreset'


Expand Down Expand Up @@ -811,8 +812,8 @@ class BuiltInStandardEncoderPreset(Preset):
videos. Possible values include: 'H264SingleBitrateSD',
'H264SingleBitrate720p', 'H264SingleBitrate1080p', 'AdaptiveStreaming',
'AACGoodQualityAudio', 'ContentAwareEncodingExperimental',
'H264MultipleBitrate1080p', 'H264MultipleBitrate720p',
'H264MultipleBitrateSD'
'ContentAwareEncoding', 'H264MultipleBitrate1080p',
'H264MultipleBitrate720p', 'H264MultipleBitrateSD'
:type preset_name: str or ~azure.mgmt.media.models.EncoderNamedPreset
"""

Expand Down Expand Up @@ -1100,13 +1101,16 @@ class ContentKeyPolicyFairPlayConfiguration(ContentKeyPolicyConfiguration):
certificate in PKCS 12 (pfx) format (including private key).
:type fair_play_pfx: str
:param rental_and_lease_key_type: Required. The rental and lease key type.
Possible values include: 'Unknown', 'Undefined', 'PersistentUnlimited',
'PersistentLimited'
Possible values include: 'Unknown', 'Undefined', 'DualExpiry',
'PersistentUnlimited', 'PersistentLimited'
:type rental_and_lease_key_type: str or
~azure.mgmt.media.models.ContentKeyPolicyFairPlayRentalAndLeaseKeyType
:param rental_duration: Required. The rental duration. Must be greater
than or equal to 0.
:type rental_duration: long
:param offline_rental_configuration: Offline rental policy
:type offline_rental_configuration:
~azure.mgmt.media.models.ContentKeyPolicyFairPlayOfflineRentalConfiguration
"""

_validation = {
Expand All @@ -1125,6 +1129,7 @@ class ContentKeyPolicyFairPlayConfiguration(ContentKeyPolicyConfiguration):
'fair_play_pfx': {'key': 'fairPlayPfx', 'type': 'str'},
'rental_and_lease_key_type': {'key': 'rentalAndLeaseKeyType', 'type': 'str'},
'rental_duration': {'key': 'rentalDuration', 'type': 'long'},
'offline_rental_configuration': {'key': 'offlineRentalConfiguration', 'type': 'ContentKeyPolicyFairPlayOfflineRentalConfiguration'},
}

def __init__(self, **kwargs):
Expand All @@ -1134,9 +1139,37 @@ def __init__(self, **kwargs):
self.fair_play_pfx = kwargs.get('fair_play_pfx', None)
self.rental_and_lease_key_type = kwargs.get('rental_and_lease_key_type', None)
self.rental_duration = kwargs.get('rental_duration', None)
self.offline_rental_configuration = kwargs.get('offline_rental_configuration', None)
self.odatatype = '#Microsoft.Media.ContentKeyPolicyFairPlayConfiguration'


class ContentKeyPolicyFairPlayOfflineRentalConfiguration(Model):
"""ContentKeyPolicyFairPlayOfflineRentalConfiguration.

All required parameters must be populated in order to send to Azure.

:param playback_duration_seconds: Required. Playback duration
:type playback_duration_seconds: long
:param storage_duration_seconds: Required. Storage duration
:type storage_duration_seconds: long
"""

_validation = {
'playback_duration_seconds': {'required': True},
'storage_duration_seconds': {'required': True},
}

_attribute_map = {
'playback_duration_seconds': {'key': 'playbackDurationSeconds', 'type': 'long'},
'storage_duration_seconds': {'key': 'storageDurationSeconds', 'type': 'long'},
}

def __init__(self, **kwargs):
super(ContentKeyPolicyFairPlayOfflineRentalConfiguration, self).__init__(**kwargs)
self.playback_duration_seconds = kwargs.get('playback_duration_seconds', None)
self.storage_duration_seconds = kwargs.get('storage_duration_seconds', None)


class ContentKeyPolicyRestriction(Model):
"""Base class for Content Key Policy restrictions. A derived class must be
used to create a restriction.
Expand Down Expand Up @@ -2098,6 +2131,9 @@ class FaceDetectorPreset(Preset):
video may not be detected. Possible values include: 'SourceResolution',
'StandardDefinition'
:type resolution: str or ~azure.mgmt.media.models.AnalysisResolution
:param experimental_options: Dictionary containing key value pairs for
parameters not exposed in the preset itself
:type experimental_options: dict[str, str]
"""

_validation = {
Expand All @@ -2107,11 +2143,13 @@ class FaceDetectorPreset(Preset):
_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'resolution': {'key': 'resolution', 'type': 'str'},
'experimental_options': {'key': 'experimentalOptions', 'type': '{str}'},
}

def __init__(self, **kwargs):
super(FaceDetectorPreset, self).__init__(**kwargs)
self.resolution = kwargs.get('resolution', None)
self.experimental_options = kwargs.get('experimental_options', None)
self.odatatype = '#Microsoft.Media.FaceDetectorPreset'


Expand Down Expand Up @@ -2814,6 +2852,12 @@ class Job(ProxyResource):
:param correlation_data: Customer provided key, value pairs that will be
returned in Job and JobOutput state events.
:type correlation_data: dict[str, str]
:ivar start_time: The UTC date and time at which this Job began
processing.
:vartype start_time: datetime
:ivar end_time: The UTC date and time at which this Job finished
processing.
:vartype end_time: datetime
"""

_validation = {
Expand All @@ -2825,6 +2869,8 @@ class Job(ProxyResource):
'input': {'required': True},
'last_modified': {'readonly': True},
'outputs': {'required': True},
'start_time': {'readonly': True},
'end_time': {'readonly': True},
}

_attribute_map = {
Expand All @@ -2839,6 +2885,8 @@ class Job(ProxyResource):
'outputs': {'key': 'properties.outputs', 'type': '[JobOutput]'},
'priority': {'key': 'properties.priority', 'type': 'str'},
'correlation_data': {'key': 'properties.correlationData', 'type': '{str}'},
'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'},
'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'},
}

def __init__(self, **kwargs):
Expand All @@ -2851,6 +2899,8 @@ def __init__(self, **kwargs):
self.outputs = kwargs.get('outputs', None)
self.priority = kwargs.get('priority', None)
self.correlation_data = kwargs.get('correlation_data', None)
self.start_time = None
self.end_time = None


class JobError(Model):
Expand Down Expand Up @@ -3172,6 +3222,12 @@ class JobOutput(Model):
JobOutput within the Job. Note that this index is the same as the relative
index of the corresponding TransformOutput within its Transform.
:type label: str
:ivar start_time: The UTC date and time at which this Job Output began
processing.
:vartype start_time: datetime
:ivar end_time: The UTC date and time at which this Job Output finished
processing.
:vartype end_time: datetime
:param odatatype: Required. Constant filled by server.
:type odatatype: str
"""
Expand All @@ -3180,6 +3236,8 @@ class JobOutput(Model):
'error': {'readonly': True},
'state': {'readonly': True},
'progress': {'readonly': True},
'start_time': {'readonly': True},
'end_time': {'readonly': True},
'odatatype': {'required': True},
}

Expand All @@ -3188,6 +3246,8 @@ class JobOutput(Model):
'state': {'key': 'state', 'type': 'str'},
'progress': {'key': 'progress', 'type': 'int'},
'label': {'key': 'label', 'type': 'str'},
'start_time': {'key': 'startTime', 'type': 'iso-8601'},
'end_time': {'key': 'endTime', 'type': 'iso-8601'},
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
}

Expand All @@ -3201,6 +3261,8 @@ def __init__(self, **kwargs):
self.state = None
self.progress = None
self.label = kwargs.get('label', None)
self.start_time = None
self.end_time = None
self.odatatype = None


Expand Down Expand Up @@ -3237,6 +3299,12 @@ class JobOutputAsset(JobOutput):
JobOutput within the Job. Note that this index is the same as the relative
index of the corresponding TransformOutput within its Transform.
:type label: str
:ivar start_time: The UTC date and time at which this Job Output began
processing.
:vartype start_time: datetime
:ivar end_time: The UTC date and time at which this Job Output finished
processing.
:vartype end_time: datetime
:param odatatype: Required. Constant filled by server.
:type odatatype: str
:param asset_name: Required. The name of the output Asset.
Expand All @@ -3247,6 +3315,8 @@ class JobOutputAsset(JobOutput):
'error': {'readonly': True},
'state': {'readonly': True},
'progress': {'readonly': True},
'start_time': {'readonly': True},
'end_time': {'readonly': True},
'odatatype': {'required': True},
'asset_name': {'required': True},
}
Expand All @@ -3256,6 +3326,8 @@ class JobOutputAsset(JobOutput):
'state': {'key': 'state', 'type': 'str'},
'progress': {'key': 'progress', 'type': 'int'},
'label': {'key': 'label', 'type': 'str'},
'start_time': {'key': 'startTime', 'type': 'iso-8601'},
'end_time': {'key': 'endTime', 'type': 'iso-8601'},
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'asset_name': {'key': 'assetName', 'type': 'str'},
}
Expand Down Expand Up @@ -5401,22 +5473,21 @@ class VideoAnalyzerPreset(AudioAnalyzerPreset):
:param odatatype: Required. Constant filled by server.
:type odatatype: str
:param audio_language: The language for the audio payload in the input
using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). The list
of supported languages are English ('en-US' and 'en-GB'), Spanish ('es-ES'
and 'es-MX'), French ('fr-FR'), Italian ('it-IT'), Japanese ('ja-JP'),
Portuguese ('pt-BR'), Chinese ('zh-CN'), German ('de-DE'), Arabic ('ar-EG'
and 'ar-SY'), Russian ('ru-RU'), Hindi ('hi-IN'), and Korean ('ko-KR'). If
you know the language of your content, it is recommended that you specify
it. If the language isn't specified or set to null, automatic language
using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). If you
know the language of your content, it is recommended that you specify it.
If the language isn't specified or set to null, automatic language
detection will choose the first language detected and process with the
selected language for the duration of the file. This language detection
feature currently supports English, Chinese, French, German, Italian,
Japanese, Spanish, Russian, and Portuguese. It does not currently support
dynamically switching between languages after the first language is
detected. The automatic detection works best with audio recordings with
selected language for the duration of the file. It does not currently
support dynamically switching between languages after the first language
is detected. The automatic detection works best with audio recordings with
clearly discernable speech. If automatic detection fails to find the
language, transcription would fallback to 'en-US'."
language, transcription would fallback to 'en-US'." The list of supported
languages is available here:
https://go.microsoft.com/fwlink/?linkid=2109463
:type audio_language: str
:param experimental_options: Dictionary containing key value pairs for
parameters not exposed in the preset itself
:type experimental_options: dict[str, str]
:param insights_to_extract: Defines the type of insights that you want the
service to generate. The allowed values are 'AudioInsightsOnly',
'VideoInsightsOnly', and 'AllInsights'. The default is AllInsights. If you
Expand All @@ -5437,6 +5508,7 @@ class VideoAnalyzerPreset(AudioAnalyzerPreset):
_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'audio_language': {'key': 'audioLanguage', 'type': 'str'},
'experimental_options': {'key': 'experimentalOptions', 'type': '{str}'},
'insights_to_extract': {'key': 'insightsToExtract', 'type': 'str'},
}

Expand Down
Loading