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
However, this method does not appear to exist. 1>TestFile.cs(55,25): Error CS1061 : 'AVPlayerItemVideoOutput' does not contain a definition for 'CopyPixelBuffer' and no accessible extension method 'CopyPixelBuffer' accepting a first argument of type 'AVPlayerItemVideoOutput' could be found (are you missing a using directive or an assembly reference?)
Using Rider to drill into the class, there does appear to be a method called "WeakCopyPixelBuffer" which returns an IntPtr but this method is protected and thus inaccessible.
Steps to Reproduce
Create a net9.0-macos project
Create an AVPlayerItemVideoOutput and attempt to invoke CopyPixelBuffer, eg videoOutput = new AVPlayerItemVideoOutput(); CMTime itemTime = videoOutput.GetItemTime((double)DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond); // CACurrentMediaTime()? videoOutput.CopyPixelBuffer(itemTime, null);
Apple platform
iOS, macOS
Framework version
net9.0-*
Affected platform version
9.0.100
Description
In Objective C, AVPlayerItemVideoOutput has a method called "CopyPixelBuffer", and the documentation suggests a similar version exists in C#:
https://learn.microsoft.com/en-us/dotnet/api/avfoundation.avplayeritemvideooutput.copypixelbuffer?view=xamarin-ios-sdk-12#avfoundation-avplayeritemvideooutput-copypixelbuffer(coremedia-cmtime-coremedia-cmtime@)
However, this method does not appear to exist.
1>TestFile.cs(55,25): Error CS1061 : 'AVPlayerItemVideoOutput' does not contain a definition for 'CopyPixelBuffer' and no accessible extension method 'CopyPixelBuffer' accepting a first argument of type 'AVPlayerItemVideoOutput' could be found (are you missing a using directive or an assembly reference?)
Using Rider to drill into the class, there does appear to be a method called "WeakCopyPixelBuffer" which returns an IntPtr but this method is protected and thus inaccessible.
Steps to Reproduce
videoOutput = new AVPlayerItemVideoOutput(); CMTime itemTime = videoOutput.GetItemTime((double)DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond); // CACurrentMediaTime()? videoOutput.CopyPixelBuffer(itemTime, null);
Did you find any workaround?
None so far.
I did find this in the repo:
xamarin-macios/src/AVFoundation/AVPlayer.cs
Line 20 in d8fba3b
And tried to replicate it with reflection, but it appears to call a constructor for CVPixelBuffer which doesn't exist?
Relevant log output
No response
The text was updated successfully, but these errors were encountered: