Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AVA] Updated sdk to 1.1 #21326

Merged
merged 5 commits into from
Oct 26, 2021
Merged
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
10 changes: 8 additions & 2 deletions sdk/videoanalyzer/azure-media-videoanalyzer-edge/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Release History

## 1.0.0b2 (2021-05-24)
## 1.0.0b3 (2021-11-09)

- Updated title and description of the package and updates to readme
- Added device discovery and device detail request for ONVIF enabled devices.
- Added Remote Device Adapter configuration for ingesting video in a private network
- Added retention policy to VideoSink

## 1.0.0b2 (2021-05-19)

- Updated the title and description of the package.

## 1.0.0b1 (2021-05-19)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Azure Video Analyzer Edge client library for Python

Azure Video Analyzer provides a platform to build intelligent video applications that span the edge and the cloud. The platform offers the capability to capture, record, and analyze live video along with publishing the results, video and video analytics, to Azure services in the cloud or the edge. It is designed to be an extensible platform, enabling you to connect different video analysis edge modules (such as Cognitive services containers, custom edge modules built by you with open-source machine learning models or custom models trained with your own data) to it and use them to analyze live video without worrying about the complexity of building and running a live video pipeline.
Azure Video Analyzer is an [Azure Applied AI Service][applied-ai-service] that provides a platform for you to build intelligent video applications that can span both edge and cloud infrastructures. The platform offers the capability to capture, record, and analyze live video along with publishing the results, video and video analytics, to Azure services at the edge or in the cloud. It is designed to be an extensible platform, enabling you to connect different video inferencing edge modules such as Cognitive services modules, or custom inferencing modules that have been trained with your own data using either open-source machine learning or [Azure Machine Learning][machine-learning].

Use the client library for Video Analyzer Edge to:

Expand Down Expand Up @@ -28,6 +28,8 @@ pip install azure-media-videoanalyzer-edge

| SDK | Video Analyzer edge module |
|---|---|
| 1.0.0b3 | 1.1 |
| 1.0.0b2 | 1.0 |
| 1.0.0b1 | 1.0 |

### Creating a pipeline topology and making requests
Expand Down Expand Up @@ -148,3 +150,5 @@ additional questions or comments.
[iot-device-sdk]: https://pypi.org/project/azure-iot-device/
[iot-hub-sdk]: https://pypi.org/project/azure-iot-hub/
[github-page-issues]: https://github.com/Azure/azure-sdk-for-python/issues
[applied-ai-service]: https://azure.microsoft.com/product-categories/applied-ai-services/#services
[machine-learning]: https://azure.microsoft.com/services/machine-learning
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,12 @@ def _OverrideInstanceSetRequestSerialize(self):
return live_pipeline_body.serialize()

LivePipelineSetRequest.serialize = _OverrideInstanceSetRequestSerialize

def _OverrideRemoteDeviceAdapterSetRequestSerialize(self):
remote_device_adapter_body = RemoteDeviceAdapterSetRequestBody(name=self.remote_device_adapter.name)
remote_device_adapter_body.system_data = self.remote_device_adapter.system_data
remote_device_adapter_body.properties = self.remote_device_adapter.properties

return remote_device_adapter_body.serialize()

RemoteDeviceAdapterSetRequest.serialize = _OverrideRemoteDeviceAdapterSetRequestSerialize
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from azure.core.pipeline.transport import HttpRequest

def _convert_request(request, files=None):
data = request.content if not files else None
request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data)
if files:
request.set_formdata_body(files)
return request
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@
from ._models_py3 import CertificateSource
from ._models_py3 import CognitiveServicesVisionProcessor
from ._models_py3 import CredentialsBase
from ._models_py3 import DiscoveredOnvifDevice
from ._models_py3 import DiscoveredOnvifDeviceCollection
from ._models_py3 import EndpointBase
from ._models_py3 import ExtensionProcessorBase
from ._models_py3 import FileSink
from ._models_py3 import GrpcExtension
from ._models_py3 import GrpcExtensionDataTransfer
from ._models_py3 import H264Configuration
from ._models_py3 import HttpExtension
from ._models_py3 import HttpHeaderCredentials
from ._models_py3 import ImageFormatBmp
Expand All @@ -24,6 +27,7 @@
from ._models_py3 import ImageFormatRaw
from ._models_py3 import ImageProperties
from ._models_py3 import ImageScale
from ._models_py3 import IotHubDeviceConnection
from ._models_py3 import IotHubMessageSink
from ._models_py3 import IotHubMessageSource
from ._models_py3 import LineCrossingProcessor
Expand All @@ -37,6 +41,9 @@
from ._models_py3 import LivePipelineProperties
from ._models_py3 import LivePipelineSetRequest
from ._models_py3 import LivePipelineSetRequestBody
from ._models_py3 import MPEG4Configuration
from ._models_py3 import MediaProfile
from ._models_py3 import MediaUri
from ._models_py3 import MethodRequest
from ._models_py3 import MethodRequestEmptyBodyBase
from ._models_py3 import MotionDetectionProcessor
Expand All @@ -46,6 +53,12 @@
from ._models_py3 import NamedPolygonString
from ._models_py3 import NodeInput
from ._models_py3 import ObjectTrackingProcessor
from ._models_py3 import OnvifDevice
from ._models_py3 import OnvifDeviceDiscoverRequest
from ._models_py3 import OnvifDeviceGetRequest
from ._models_py3 import OnvifDns
from ._models_py3 import OnvifHostName
from ._models_py3 import OnvifSystemDateTime
from ._models_py3 import OutputSelector
from ._models_py3 import ParameterDeclaration
from ._models_py3 import ParameterDefinition
Expand All @@ -59,6 +72,16 @@
from ._models_py3 import PipelineTopologySetRequest
from ._models_py3 import PipelineTopologySetRequestBody
from ._models_py3 import ProcessorNodeBase
from ._models_py3 import RateControl
from ._models_py3 import RemoteDeviceAdapter
from ._models_py3 import RemoteDeviceAdapterCollection
from ._models_py3 import RemoteDeviceAdapterDeleteRequest
from ._models_py3 import RemoteDeviceAdapterGetRequest
from ._models_py3 import RemoteDeviceAdapterListRequest
from ._models_py3 import RemoteDeviceAdapterProperties
from ._models_py3 import RemoteDeviceAdapterSetRequest
from ._models_py3 import RemoteDeviceAdapterSetRequestBody
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't typically use model names that refer to REST terminology like Request or Body

from ._models_py3 import RemoteDeviceAdapterTarget
from ._models_py3 import RtspSource
from ._models_py3 import SamplingOptions
from ._models_py3 import SignalGateProcessor
Expand All @@ -80,22 +103,29 @@
from ._models_py3 import SpatialAnalysisPersonZoneCrossingOperation
from ._models_py3 import SpatialAnalysisPersonZoneCrossingZoneEvents
from ._models_py3 import SpatialAnalysisTypedOperationBase
from ._models_py3 import SymmetricKeyCredentials
from ._models_py3 import SystemData
from ._models_py3 import TlsEndpoint
from ._models_py3 import TlsValidationOptions
from ._models_py3 import UnsecuredEndpoint
from ._models_py3 import UsernamePasswordCredentials
from ._models_py3 import VideoCreationProperties
from ._models_py3 import VideoEncoderConfiguration
from ._models_py3 import VideoPublishingOptions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference between the suffixes "Configuration" vs "Options"? Should we align naming here?

from ._models_py3 import VideoResolution
from ._models_py3 import VideoSink
except (SyntaxError, ImportError):
from ._models import CertificateSource # type: ignore
from ._models import CognitiveServicesVisionProcessor # type: ignore
from ._models import CredentialsBase # type: ignore
from ._models import DiscoveredOnvifDevice # type: ignore
from ._models import DiscoveredOnvifDeviceCollection # type: ignore
from ._models import EndpointBase # type: ignore
from ._models import ExtensionProcessorBase # type: ignore
from ._models import FileSink # type: ignore
from ._models import GrpcExtension # type: ignore
from ._models import GrpcExtensionDataTransfer # type: ignore
from ._models import H264Configuration # type: ignore
from ._models import HttpExtension # type: ignore
from ._models import HttpHeaderCredentials # type: ignore
from ._models import ImageFormatBmp # type: ignore
Expand All @@ -105,6 +135,7 @@
from ._models import ImageFormatRaw # type: ignore
from ._models import ImageProperties # type: ignore
from ._models import ImageScale # type: ignore
from ._models import IotHubDeviceConnection # type: ignore
from ._models import IotHubMessageSink # type: ignore
from ._models import IotHubMessageSource # type: ignore
from ._models import LineCrossingProcessor # type: ignore
Expand All @@ -118,6 +149,9 @@
from ._models import LivePipelineProperties # type: ignore
from ._models import LivePipelineSetRequest # type: ignore
from ._models import LivePipelineSetRequestBody # type: ignore
from ._models import MPEG4Configuration # type: ignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is typically the way we capitalize acronyms...

from ._models import MediaProfile # type: ignore
from ._models import MediaUri # type: ignore
from ._models import MethodRequest # type: ignore
from ._models import MethodRequestEmptyBodyBase # type: ignore
from ._models import MotionDetectionProcessor # type: ignore
Expand All @@ -127,6 +161,12 @@
from ._models import NamedPolygonString # type: ignore
from ._models import NodeInput # type: ignore
from ._models import ObjectTrackingProcessor # type: ignore
from ._models import OnvifDevice # type: ignore
from ._models import OnvifDeviceDiscoverRequest # type: ignore
from ._models import OnvifDeviceGetRequest # type: ignore
from ._models import OnvifDns # type: ignore
from ._models import OnvifHostName # type: ignore
from ._models import OnvifSystemDateTime # type: ignore
from ._models import OutputSelector # type: ignore
from ._models import ParameterDeclaration # type: ignore
from ._models import ParameterDefinition # type: ignore
Expand All @@ -140,6 +180,16 @@
from ._models import PipelineTopologySetRequest # type: ignore
from ._models import PipelineTopologySetRequestBody # type: ignore
from ._models import ProcessorNodeBase # type: ignore
from ._models import RateControl # type: ignore
from ._models import RemoteDeviceAdapter # type: ignore
from ._models import RemoteDeviceAdapterCollection # type: ignore
from ._models import RemoteDeviceAdapterDeleteRequest # type: ignore
from ._models import RemoteDeviceAdapterGetRequest # type: ignore
from ._models import RemoteDeviceAdapterListRequest # type: ignore
from ._models import RemoteDeviceAdapterProperties # type: ignore
from ._models import RemoteDeviceAdapterSetRequest # type: ignore
from ._models import RemoteDeviceAdapterSetRequestBody # type: ignore
from ._models import RemoteDeviceAdapterTarget # type: ignore
from ._models import RtspSource # type: ignore
from ._models import SamplingOptions # type: ignore
from ._models import SignalGateProcessor # type: ignore
Expand All @@ -161,21 +211,28 @@
from ._models import SpatialAnalysisPersonZoneCrossingOperation # type: ignore
from ._models import SpatialAnalysisPersonZoneCrossingZoneEvents # type: ignore
from ._models import SpatialAnalysisTypedOperationBase # type: ignore
from ._models import SymmetricKeyCredentials # type: ignore
from ._models import SystemData # type: ignore
from ._models import TlsEndpoint # type: ignore
from ._models import TlsValidationOptions # type: ignore
from ._models import UnsecuredEndpoint # type: ignore
from ._models import UsernamePasswordCredentials # type: ignore
from ._models import VideoCreationProperties # type: ignore
from ._models import VideoEncoderConfiguration # type: ignore
from ._models import VideoPublishingOptions # type: ignore
from ._models import VideoResolution # type: ignore
from ._models import VideoSink # type: ignore

from ._azure_video_analyzerfor_edge_enums import (
GrpcExtensionDataTransferMode,
H264Profile,
ImageFormatRawPixelFormat,
ImageScaleMode,
LivePipelineState,
MPEG4Profile,
MotionDetectionSensitivity,
ObjectTrackingAccuracy,
OnvifSystemDateTimeType,
OutputSelectorOperator,
OutputSelectorProperty,
ParameterType,
Expand All @@ -184,17 +241,21 @@
SpatialAnalysisPersonCountEventTrigger,
SpatialAnalysisPersonDistanceEventTrigger,
SpatialAnalysisPersonZoneCrossingEventType,
VideoEncoding,
)

__all__ = [
'CertificateSource',
'CognitiveServicesVisionProcessor',
'CredentialsBase',
'DiscoveredOnvifDevice',
'DiscoveredOnvifDeviceCollection',
'EndpointBase',
'ExtensionProcessorBase',
'FileSink',
'GrpcExtension',
'GrpcExtensionDataTransfer',
'H264Configuration',
'HttpExtension',
'HttpHeaderCredentials',
'ImageFormatBmp',
Expand All @@ -204,6 +265,7 @@
'ImageFormatRaw',
'ImageProperties',
'ImageScale',
'IotHubDeviceConnection',
'IotHubMessageSink',
'IotHubMessageSource',
'LineCrossingProcessor',
Expand All @@ -217,6 +279,9 @@
'LivePipelineProperties',
'LivePipelineSetRequest',
'LivePipelineSetRequestBody',
'MPEG4Configuration',
'MediaProfile',
'MediaUri',
'MethodRequest',
'MethodRequestEmptyBodyBase',
'MotionDetectionProcessor',
Expand All @@ -226,6 +291,12 @@
'NamedPolygonString',
'NodeInput',
'ObjectTrackingProcessor',
'OnvifDevice',
'OnvifDeviceDiscoverRequest',
'OnvifDeviceGetRequest',
'OnvifDns',
'OnvifHostName',
'OnvifSystemDateTime',
'OutputSelector',
'ParameterDeclaration',
'ParameterDefinition',
Expand All @@ -239,6 +310,16 @@
'PipelineTopologySetRequest',
'PipelineTopologySetRequestBody',
'ProcessorNodeBase',
'RateControl',
'RemoteDeviceAdapter',
'RemoteDeviceAdapterCollection',
'RemoteDeviceAdapterDeleteRequest',
'RemoteDeviceAdapterGetRequest',
'RemoteDeviceAdapterListRequest',
'RemoteDeviceAdapterProperties',
'RemoteDeviceAdapterSetRequest',
'RemoteDeviceAdapterSetRequestBody',
'RemoteDeviceAdapterTarget',
'RtspSource',
'SamplingOptions',
'SignalGateProcessor',
Expand All @@ -260,19 +341,26 @@
'SpatialAnalysisPersonZoneCrossingOperation',
'SpatialAnalysisPersonZoneCrossingZoneEvents',
'SpatialAnalysisTypedOperationBase',
'SymmetricKeyCredentials',
'SystemData',
'TlsEndpoint',
'TlsValidationOptions',
'UnsecuredEndpoint',
'UsernamePasswordCredentials',
'VideoCreationProperties',
'VideoEncoderConfiguration',
'VideoPublishingOptions',
'VideoResolution',
'VideoSink',
'GrpcExtensionDataTransferMode',
'H264Profile',
'ImageFormatRawPixelFormat',
'ImageScaleMode',
'LivePipelineState',
'MPEG4Profile',
'MotionDetectionSensitivity',
'ObjectTrackingAccuracy',
'OnvifSystemDateTimeType',
'OutputSelectorOperator',
'OutputSelectorProperty',
'ParameterType',
Expand All @@ -281,4 +369,5 @@
'SpatialAnalysisPersonCountEventTrigger',
'SpatialAnalysisPersonDistanceEventTrigger',
'SpatialAnalysisPersonZoneCrossingEventType',
'VideoEncoding',
]
Loading