You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/communication-services/includes/public-preview-include-document.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,5 +8,5 @@ ms.custom: private_preview
8
8
---
9
9
> [!IMPORTANT]
10
10
> Functionality described in this document is currently in public preview.
11
-
> This preview version is provided without a service-level agreement, and it's not recommended for production workloads. Certain features might not be supported or might have constrained capabilities.
11
+
> This preview version is provided without a service-level agreement, and we don't recommend it for production workloads. Certain features might not be supported or might have constrained capabilities.
12
12
> For more information, see [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/).
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/voice-video-calling/includes/raw-media/raw-media-access-android.md
+38-30Lines changed: 38 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: Quickstart - Add RAW media access to your app (Android)
2
+
title: Quickstart - Add raw media access to your app (Android)
3
3
titleSuffix: An Azure Communication Services quickstart
4
-
description: In this quickstart, you'll learn how to add raw media access calling capabilities to your app using Azure Communication Services.
4
+
description: In this quickstart, you'll learn how to add raw media access calling capabilities to your app by using Azure Communication Services.
In this quickstart, you'll learn how to implement raw media access using the Azure Communication Services Calling SDK for Android.
20
-
21
-
The Azure Communication Services Calling SDK offers APIs allowing apps to generate their own video frames to send to remote participants.
17
+
In this quickstart, you'll learn how to implement raw media access by using the Azure Communication Services Calling SDK for Android.
22
18
23
-
This quick start builds upon [QuickStart: Add 1:1 video calling to your app](../../get-started-with-video-calling.md?pivots=platform-android) for Android.
19
+
The Azure Communication Services Calling SDK offers APIs that allow apps to generate their own video frames to send to remote participants in a call.
24
20
21
+
This quickstart builds on [Quickstart: Add 1:1 video calling to your app](../../get-started-with-video-calling.md?pivots=platform-android) for Android.
25
22
26
-
## Virtual video stream overview
23
+
## Overview of virtual video streams
27
24
28
-
Since the app will be generating the video frames, the app must inform the Azure Communication Services Calling SDK about the video formats the app is capable of generating. This is required to allow the Azure Communication Services Calling SDK to pick the best video format configuration given the network conditions at any giving time.
25
+
Because the app will generate the video frames, the app must inform the Azure Communication Services Calling SDK about the video formats that the app can generate. This information allows the Azure Communication Services Calling SDK to pick the best video format configuration for the network conditions at that time.
29
26
30
-
The app must register a delegate to get notified about when it should start or stop producing video frames. The delegate event will inform the app which video format is more appropriate for the current network conditions.
27
+
The app must register a delegate to get notified about when it should start or stop producing video frames. The delegate event will inform the app which video format is most appropriate for the current network conditions.
31
28
32
29
### Supported video resolutions
33
30
34
-
| Aspect Ratio| Resolution | Maximum FPS |
31
+
| Aspect ratio| Resolution | Maximum FPS |
35
32
| :--: | :-: | :-: |
36
33
| 16x9 | 1080p | 30 |
37
34
| 16x9 | 720p | 30 |
@@ -46,9 +43,11 @@ The app must register a delegate to get notified about when it should start or s
46
43
| 4x3 | QVGA (320x240) | 15 |
47
44
| 4x3 | 212x160 | 15 |
48
45
49
-
The following is an overview of the steps required to create a virtual video stream.
46
+
### Steps to create a virtual video stream
47
+
48
+
1. Create an array of `VideoFormat` with the video formats that the app supports. It's fine to have only one video format supported, but at least one of the provided video formats must be of the `VideoFrameKind::VideoSoftware` type.
50
49
51
-
1. Create an array of `VideoFormat` with the video formats supported by the app. It is fine to have only one video format supported, but at least one of the provided video formats must be of the `VideoFrameKind::VideoSoftware` type. When multiple formats are provided, the order of the format in the list doesn't influence or prioritize which one will be used. The selected format is based on external factors like network bandwidth.
50
+
When multiple formats are provided, the order of the format in the list doesn't influence or prioritize which one will be used. The criteria for format selection are based on external factors like network bandwidth.
3.Subscribe to `RawOutgoingVideoStreamOptions::addOnOutgoingVideoStreamStateChangedListener` delegate. This delegate will inform the state of the current stream, it's important that you don't send frames if the state is no equal to `OutgoingVideoStreamState.STARTED`.
73
+
3.Subscribe to the `RawOutgoingVideoStreamOptions::addOnOutgoingVideoStreamStateChangedListener` delegate. This delegate will inform the state of the current stream. Don't send frames if the state is not equal to `OutgoingVideoStreamState.STARTED`.
@@ -82,7 +81,9 @@ The following is an overview of the steps required to create a virtual video str
82
81
});
83
82
```
84
83
85
-
4.Make sure the `RawOutgoingVideoStreamOptions::addOnVideoFrameSenderChangedListener` delegate is defined. This delegate will inform its listener about events requiring the app to start or stop producing video frames. Inthis quick start, `mediaFrameSender` is used as trigger to let the app know when it's time to start generating frames. Feel free to use any mechanism in your app as a trigger.
84
+
4. Make sure the `RawOutgoingVideoStreamOptions::addOnVideoFrameSenderChangedListener` delegate is defined. This delegate will inform its listener about events that require the app to start or stop producing video frames.
85
+
86
+
This quickstart uses `mediaFrameSender` as a trigger to let the app know when it's time to start generating frames. Feel free to use any mechanism in your app as a trigger.
86
87
87
88
```java
88
89
privateVideoFrameSender mediaFrameSender;
@@ -93,16 +94,21 @@ The following is an overview of the steps required to create a virtual video str
93
94
});
94
95
```
95
96
96
-
5. Create an instance of `VirtualRawOutgoingVideoStream` using the `RawOutgoingVideoStreamOptions` we created previously
97
+
5.Create an instance of `VirtualRawOutgoingVideoStream` by using the `RawOutgoingVideoStreamOptions` instance that you created previously.
7. Once outgoingVideoStreamState is equal to `OutgoingVideoStreamState.STARTED` create and instance of `FrameGenerator` class this will start a non-UI thread and will send frames, call `FrameGenerator.SetVideoFrameSender` each time we get an updated `VideoFrameSender` on the previous delegate, cast the `VideoFrameSender` to the appropriate type defined by the `VideoFrameKind` property of `VideoFormat`. For example, cast it to `SoftwareBasedVideoFrameSender` and then call the `send` method according to the number of planes defined by the VideoFormat.
105
-
After that, create the ByteBuffer backing the video frame if needed. Then, update the content of the video frame. Finally, send the video frame to other participants with the `sendFrame` API.
105
+
6.After `outgoingVideoStreamState` is equal to `OutgoingVideoStreamState.STARTED`, create an instance of the `FrameGenerator` class.
106
+
107
+
This step starts a non-UI thread and sends frames. It will call `FrameGenerator.SetVideoFrameSender` each time you get an updated `VideoFrameSender` instance on the previous delegate. It will also cast `VideoFrameSender` to the appropriate type defined by the `VideoFrameKind` property of `VideoFormat`.
108
+
109
+
For example, cast `VideoFrameSender` to `SoftwareBasedVideoFrameSender`.Then, call the `send` method according to the number of planes that `VideoFormat` defines.
110
+
111
+
After that, create the byte buffer that backs the video frame if needed. Then, update the content of the video frame. Finally, send the video frame to other participants by using the `sendFrame` API.
@@ -214,36 +220,38 @@ After that, create the ByteBuffer backing the video frame if needed. Then, updat
214
220
}
215
221
```
216
222
217
-
## Screen share video stream overview
223
+
## Overview of screen share video streams
218
224
219
-
Repeat steps `1 to 4` from the previous VirtualRawOutgoingVideoStream tutorial.
225
+
Repeat steps 1 to 4 from the previous [Steps to create a virtual video stream](#steps-to-create-a-virtual-video-stream) procedure.
220
226
221
-
Since the Android system generates the frames, you must implement your own foreground service to capture the frames and send them through using our Azure Communication Services Calling API
227
+
Because the Android system generates the frames, you must implement your own foreground service to capture the frames and send them by using theAzureCommunicationServicesCallingAPI.
222
228
223
229
### Supported video resolutions
224
230
225
-
| Aspect Ratio | Resolution | Maximum FPS |
231
+
|Aspectratio|Resolution|MaximumFPS|
226
232
|:--:|:-:|:-:|
227
233
|Anything|Anything|30|
228
234
229
-
The following is an overview of the steps required to create a screen share video stream.
235
+
### Stepsto create a screen share video stream
230
236
231
-
1. Add this permission to your `Manifest.xml` file inside your Android project
237
+
1.Addthis permission to your *Manifest.xml* file inside your Android project.
3. Request needed permissions for screen capture on Android, once this method is called Android will call automatically `onActivityResult` containing the request code we've sent and the result of the operation, expect `Activity.RESULT_OK` if the permission has been provided by the user if so attach the screenShareRawOutgoingVideoStream to the call and start your own foreground service to capture the frames.
246
-
251
+
3.Request needed permissions for screen capture on Android. Afterthis method is called, Android will automatically call `onActivityResult`, which contains the request code that you sent and the result of the operation.
252
+
253
+
Expect `Activity.RESULT_OK` if the user has provided the permission. If so, attach `screenShareRawOutgoingVideoStream` to the call and start your own foreground service to capture the frames.
254
+
247
255
```java
248
256
publicvoidGetScreenSharePermissions() {
249
257
@@ -277,7 +285,7 @@ The following is an overview of the steps required to create a screen share vide
277
285
}
278
286
```
279
287
280
-
4.Once you receive a frame on your foreground service send it through using the `VideoFrameSender` provided
288
+
4.After you receive a frame on your foreground service, send it by using the provided `VideoFrameSender` information.
0 commit comments