Skip to content

Commit

Permalink
[Media] Updating swagger link (#16052)
Browse files Browse the repository at this point in the history
* added lva sdk package

* updated swagger link and regenerated

* removed old sdk
  • Loading branch information
hivyas authored Jan 9, 2021
1 parent da63ca7 commit 0e5384e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1626,25 +1626,22 @@ class MediaGraphSignalGateProcessor(MediaGraphProcessor):
:param activation_evaluation_window: The period of time over which the gate gathers input
events before evaluating them.
:type activation_evaluation_window: str
:param activation_signal_offset: Required. Signal offset once the gate is activated (can be
negative). It is an offset between the time the event is received, and the timestamp of the
first media sample (eg. video frame) that is allowed through by the gate.
:param activation_signal_offset: Signal offset once the gate is activated (can be negative). It
is an offset between the time the event is received, and the timestamp of the first media
sample (eg. video frame) that is allowed through by the gate.
:type activation_signal_offset: str
:param minimum_activation_time: Required. The minimum period for which the gate remains open in
the absence of subsequent triggers (events).
:param minimum_activation_time: The minimum period for which the gate remains open in the
absence of subsequent triggers (events).
:type minimum_activation_time: str
:param maximum_activation_time: Required. The maximum period for which the gate remains open in
the presence of subsequent events.
:param maximum_activation_time: The maximum period for which the gate remains open in the
presence of subsequent events.
:type maximum_activation_time: str
"""

_validation = {
'type': {'required': True},
'name': {'required': True},
'inputs': {'required': True},
'activation_signal_offset': {'required': True},
'minimum_activation_time': {'required': True},
'maximum_activation_time': {'required': True},
}

_attribute_map = {
Expand All @@ -1664,9 +1661,9 @@ def __init__(
super(MediaGraphSignalGateProcessor, self).__init__(**kwargs)
self.type = '#Microsoft.Media.MediaGraphSignalGateProcessor' # type: str
self.activation_evaluation_window = kwargs.get('activation_evaluation_window', None)
self.activation_signal_offset = kwargs['activation_signal_offset']
self.minimum_activation_time = kwargs['minimum_activation_time']
self.maximum_activation_time = kwargs['maximum_activation_time']
self.activation_signal_offset = kwargs.get('activation_signal_offset', None)
self.minimum_activation_time = kwargs.get('minimum_activation_time', None)
self.maximum_activation_time = kwargs.get('maximum_activation_time', None)


class MediaGraphSystemData(msrest.serialization.Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1763,25 +1763,22 @@ class MediaGraphSignalGateProcessor(MediaGraphProcessor):
:param activation_evaluation_window: The period of time over which the gate gathers input
events before evaluating them.
:type activation_evaluation_window: str
:param activation_signal_offset: Required. Signal offset once the gate is activated (can be
negative). It is an offset between the time the event is received, and the timestamp of the
first media sample (eg. video frame) that is allowed through by the gate.
:param activation_signal_offset: Signal offset once the gate is activated (can be negative). It
is an offset between the time the event is received, and the timestamp of the first media
sample (eg. video frame) that is allowed through by the gate.
:type activation_signal_offset: str
:param minimum_activation_time: Required. The minimum period for which the gate remains open in
the absence of subsequent triggers (events).
:param minimum_activation_time: The minimum period for which the gate remains open in the
absence of subsequent triggers (events).
:type minimum_activation_time: str
:param maximum_activation_time: Required. The maximum period for which the gate remains open in
the presence of subsequent events.
:param maximum_activation_time: The maximum period for which the gate remains open in the
presence of subsequent events.
:type maximum_activation_time: str
"""

_validation = {
'type': {'required': True},
'name': {'required': True},
'inputs': {'required': True},
'activation_signal_offset': {'required': True},
'minimum_activation_time': {'required': True},
'maximum_activation_time': {'required': True},
}

_attribute_map = {
Expand All @@ -1799,10 +1796,10 @@ def __init__(
*,
name: str,
inputs: List["MediaGraphNodeInput"],
activation_signal_offset: str,
minimum_activation_time: str,
maximum_activation_time: str,
activation_evaluation_window: Optional[str] = None,
activation_signal_offset: Optional[str] = None,
minimum_activation_time: Optional[str] = None,
maximum_activation_time: Optional[str] = None,
**kwargs
):
super(MediaGraphSignalGateProcessor, self).__init__(name=name, inputs=inputs, **kwargs)
Expand Down
9 changes: 5 additions & 4 deletions sdk/media/azure-media-analytics-edge/samples/sample_lva.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from azure.iot.hub.models import CloudToDeviceMethod, CloudToDeviceMethodResult
from datetime import time

device_id = "device-name"
module_d = "module-name"
connection_string = "connection-string"
device_id = "lva-sample-device"
module_d = "mediaedge"
connection_string = "HostName=lvasamplehubcx5a4jgbixyvg.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=/53Qw6ifN0ka4so72a1gVEhmyiz5fLb9iw+oWoyoQxk="
graph_instance_name = "graphInstance1"
graph_topology_name = "graphTopology1"
graph_url = "rtsp://sample-url-from-camera"
Expand All @@ -17,7 +17,7 @@ def build_graph_topology():
graph_properties = MediaGraphTopologyProperties()
graph_properties.description = "Continuous video recording to an Azure Media Services Asset"
user_name_param = MediaGraphParameterDeclaration(name="rtspUserName",type="String",default="dummyusername")
password_param = MediaGraphParameterDeclaration(name="rtspPassword",type="String",default="dummypassword")
password_param = MediaGraphParameterDeclaration(name="rtspPassword",type="SecretString",default="dummypassword")
url_param = MediaGraphParameterDeclaration(name="rtspUrl",type="String",default="rtsp://www.sample.com")

source = MediaGraphRtspSource(name="rtspSource", endpoint=MediaGraphUnsecuredEndpoint(url="${rtspUrl}",credentials=MediaGraphUsernamePasswordCredentials(username="${rtspUserName}",password="${rtspPassword}")))
Expand All @@ -32,6 +32,7 @@ def build_graph_topology():

def build_graph_instance():
url_param = MediaGraphParameterDefinition(name="rtspUrl", value=graph_url)
pass_param = MediaGraphParameterDefinition(name="rtspPassword", value='testpass')
graph_instance_properties = MediaGraphInstanceProperties(description="Sample graph description", topology_name=graph_topology_name, parameters=[url_param])

graph_instance = MediaGraphInstance(name=graph_instance_name, properties=graph_instance_properties)
Expand Down
2 changes: 1 addition & 1 deletion sdk/media/azure-media-analytics-edge/swagger/autorest.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ autorest --v3 --python
## Settings

```yaml
require: https://github.com/Azure/azure-rest-api-specs/blob/297b7526f051e08f3a430b50daadd356ba74c6e2/specification/mediaservices/data-plane/readme.md
require: https://github.com/Azure/azure-rest-api-specs/blob/14732a2d9802c98cb8fea52800853874529c5f8e/specification/mediaservices/data-plane/readme.md
output-folder: ../azure/media/analyticsedge/_generated
namespace: azure.media.analyticsedge
no-namespace-folders: true
Expand Down

0 comments on commit 0e5384e

Please sign in to comment.