Bug 28513 - Add strongly typed properties to get/set QTCaptureConnection attributes
Summary: Add strongly typed properties to get/set QTCaptureConnection attributes
Status: RESOLVED NOT_ON_ROADMAP
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: Master
Hardware: All All
: Lowest enhancement
Target Milestone: master
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-03-27 21:52 UTC by Timothy Risi
Modified: 2017-05-15 21:39 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_ON_ROADMAP

Description Timothy Risi 2015-03-27 21:52:30 UTC
Currently you have to call the GetAttribute with an NSString key for the attribute you want to get and cast the result to the proper type (or SetAttribute with an NSObject and the NSString key).  From Rustam's comment on 27708:

We can provide typed properties for each attribute.

From QTKit.h:
// NSArray of NSNumbers representing power for each audio channel in dB
QTKIT_EXTERN NSString * const
QTCaptureConnectionAudioAveragePowerLevelsAttribute;  

We can bind this attribute like this:
double[] AudioAveragePowerLevels {
 get {
  // call GetAttribute
  // convert NSArray to double[]
 }
 set {
  // convert double[] to NSArray
  // call SetAttribute
 }
}
Comment 1 Sebastien Pouliot 2017-03-09 01:52:08 UTC
IIRC QTKit headers were removed with Xcode 8.x - that makes them bad candidates to include in future versions (unless a specific use case can't be covered without it).
Comment 2 Sebastien Pouliot 2017-05-15 21:39:37 UTC
QuickTime was removed from Xcode 8+ and we won't be adding or updating bindings for it.