azure-sdk-for-ios icon indicating copy to clipboard operation
azure-sdk-for-ios copied to clipboard

Discrepancies in the Raw Media Access Guide for iOS SDK v2.4.0

Open rouzbeh-abadi opened this issue 2 years ago • 2 comments

I'm currently working on an iOS project that involves the integration of the raw outgoing video feature using Azure Communication Services SDK v2.4.0. As I was following the Raw Media Access guide, I've run into some inconsistencies between the guide and the actual SDK.

First off, there's the VideoFormat class. In the guide, it's set up like this:

let videoFormat = VideoFormat()
videoFormat.width = 1280
videoFormat.height = 720
videoFormat.pixelFormat = .nv12
videoFormat.videoFrameKind = .videoSoftware
videoFormat.framesPerSecond = 30
videoFormat.stride1 = 1280
videoFormat.stride2 = 1280

But in the SDK v2.4.0, it's renamed as VideoStreamFormat and the videoFrameKind property is missing. Here's what the SDK has:

NS_SWIFT_NAME(VideoStreamFormat)
@interface ACSVideoStreamFormat : NSObject
-(nonnull instancetype)init;
@property int width;
@property int height;
@property ACSVideoStreamResolution resolution;
@property ACSVideoStreamPixelFormat pixelFormat;
@property float framesPerSecond;
@property int stride1;
@property int stride2;
@property int stride3;
@end

Though this isn't ideal, it's not a roadblock as it still allows me to proceed with the integration.

However, I hit a major snag when it came to RawOutgoingVideoStreamOptionsDelegate. The guide suggests:

var options = RawOutgoingVideoStreamOptions()
options.videoFormats = videoFormats
options.delegate = self

But, RawOutgoingVideoStreamOptionsDelegate doesn't seem to exist in the SDK, and RawOutgoingVideoStreamOptions doesn't even have a delegate property. Here's the SDK:

NS_SWIFT_NAME(RawOutgoingVideoStreamOptions)
@interface ACSRawOutgoingVideoStreamOptions : NSObject
-(nonnull instancetype)init;
@property (copy, nonnull) NSArray<ACSVideoStreamFormat *> * formats;
@end

Moreover, as I continue to work through the guide, I've noticed other key parts are missing

Is there a more recent version of the guide that matches up with the SDK v2.4.0? Or perhaps these features have been replaced or renamed in this version of the SDK? Any guidance on this issue would be greatly appreciated.

BTW, I downloaded the v2.4.0 from here

Thanks

rouzbeh-abadi avatar May 30 '23 16:05 rouzbeh-abadi

@raosanat can you take a look?

tjprescott avatar May 30 '23 16:05 tjprescott

Hello again,

As I mentioned in my previous post here, I'm currently working with Azure Communication Services SDK v2.4.0 for an iOS project and have encountered some challenges regarding the Raw Outgoing Video feature.

After piecing together some information from the source code of version 2.3 beta 4, it's become apparent that the Raw Media Access guide might have been written based on that version. Unfortunately, some key components in the guide no longer appear to be accessible or have been renamed in the 2.4.0 version.

In order to address this, I've posted a detailed explanation of my current approach on StackOverflow, which I believe should be the correct way to handle this according to the information available. I would greatly appreciate it if you could review it and provide insight on whether my assumptions are correct or suggest an updated approach.

Here's the link to the StackOverflow post: Issues with Video Frame Transmission in AzureCommunicationCalling using Raw Media Stream

Thanks in advance for your help!

rouzbeh-abadi avatar May 31 '23 16:05 rouzbeh-abadi

@rouzbeh-abadi sorry for missing out on the original comment at the time, since then the apis have been updated and guides and documentation were as well. So latest version should be up-to-date :)

lucianopa-msft avatar May 22 '24 16:05 lucianopa-msft