Status Update
Comments
me...@google.com <me...@google.com> #2
I can’t record screen using Media Projection API for my android app on Chrome OS (ver. 98.0.4758.51 (Platform version: 14388.27.0)) which is a fixed version.
The recording result is always black image.
Confirmation environment
Chromebook: Lenovo IdeaPad Flex550i Chromebook 82B80018JP
Chrome OS ver. 98.0.4758.51 (Platform version: 14388.27.0) (beta channel)
Android OS ver. 11
What is the expected behavior?
The entire screen of Chromebook can be recorded using the Media Projection API.
What went wrong?
The recording result is always black image.
In what version will it be fixed?
al...@itg.co.uk <al...@itg.co.uk> #3
Can you reproduce the black capture with the Media > MediaProjection activity of the ApiDemos APK?
de...@hgv.it <de...@hgv.it> #4
I made a sample using MediaProjection API and confirmed that permission dialog where you can preview / select the screen to share.
I will provide the sample.
This is the project link:
Please check the video to see how it was confirmed.
This is the operation.
1. Launch the ScreenCapture app
2. Allow storage access.
3. Press the START button to display the permissions dialog.
4. Press the SHARE button to start the screen capture and display the captured image.
5. It will continue to be saved as a jpeg file until you press the stop button.
6. Press the stop button to check the saved file.
Storage location
case Android OS ver. 9: Downloads folder
case Android OS ver. 11: Picture folder
◆Expected result
・ChromeOS ver. 97.0.4692.102, Android OS ver. 9
Video:「osver_9704692102_android9.webm」
The above video is the operation on Android 9 chromebook.
Please make it possible to capture the entire screen even on an Android 11 chromebook, as in the video above.
◆The following are both bad cases.
・ ChromeOS ver.97.0.4692.102, Android OS ver. 11
Video:「osver_9704692102_android11.webm」
I can only capture the screen of the Android app.
・ ChromeOS ver.98.0.475867 beta channel, Android OS ver. 11
Video:「osver_980475867_android11.webm」
I can't capture anything.
> Can you reproduce the black capture with the Media > MediaProjection activity of the ApiDemos APK?
I installed the below ApiDemos APK and checked the operation, but there was no corresponding function.
I reviewed the below source code of ApiDemos ’s MediaProjection API.
I think the usage of MediaProjection API is wrong.
Android 10 and above requires the MediaProjection API to be used in the service.
The ApiDemos code wasn't using the service.
Therefore, it cannot be confirmed on the Chromebook(Android11).
Please tell me the correct sample.
Or, check out the sample source code we provided and tell us how to capture the entire screen on your Android 11 Chromebook.
The sample is in mediaprojectionsample.zip.
ki...@google.com <ki...@google.com>
ki...@google.com <ki...@google.com> #5
The Android 11 chrome book is on the market, so this issue is bothering users of our product.
Specifically, there is the problem that the Chromebook screen cannot be mirrored to some display in the education market.
Please resolve this issue as soon as possible.
ia...@gmail.com <ia...@gmail.com> #6
Model: Acer Spin CP713-2W
Chrome OS version: 103.0.5060.114
au...@threatkey.com <au...@threatkey.com> #7
(Sorry about the delay; lots of competing priorities.)
Thanks for the sample code. It appears our M98 fixes were partial in that they fixed the case where the virtual display is piped to an output surface for scanning out (which is what ApiDemos
does), but not to an ImageReader
or video encoder. The problem is that, on some devices, ARCVM allocates buffers with opaque metadata (DRM format modifier, e.g. tiled or compressed) that cannot be decoded in Android.
IIUC, Gralloc should guarantee linear RGBA_8888
for non-planar HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED
. Tao, does that sound right? More context in
ma...@yapily.com <ma...@yapily.com> #8
sa...@river.com <sa...@river.com> #9
sa...@gmail.com <sa...@gmail.com> #10
aj...@fubo.tv <aj...@fubo.tv> #11
Re #7 & #9: I completely missed this due a weird copybara
email filter added...until being assigned. I'm not familiar with the media pieces involved here. I can share my understanding based on the aosp bits (publicly available) here. Per IMPLEMENTATION_DEFINED
/**
* A format indicating that the choice of format is entirely up to the
* allocator.
*
* The allocator should examine the usage bits passed in when allocating a
* buffer with this format, and it should derive the pixel format from
* those usage flags. This format must never be used with any of the
* BufferUsage::CPU_* usage flags.
*
* Even when the internally chosen format has an alpha component, the
* clients must assume the alpha vlaue to be 1.0.
*
* The interpretation of the component values is defined by the dataspace.
*/
IMPLEMENTATION_DEFINED = 0x22,
So at least ImageReader direct cpu readback for the IMPLEMENTATION_DEFINED
format is invalid usage. There must involve a bliter in between those 2. e.g. camera -> gpu (egl/vulkan) or hw blit (to an explicit format) -> image reader.
Scaning throught this entire thread, I'm not sure how IMPLEMENTATION_DEFINED
gets involved here...maybe I missed something since I'm not familiar with media projection api.
My understanding of the screen capture flow is: layers of the on-screen apps => SurfaceFlinger gl render engine => virtual display fb surface
. For protected content (and camera preview?), recording to black is intended behavior. For others, if something black is shown, it's less likely IMPLEMENTATION_DEFINED
format from the app layer.
Side suggestions: it's better to file an internal issue for investigation to avoid more folks sharing infos on this public issue tracker, and use the newly filed issue as the blocker for related issues.
tu...@gmail.com <tu...@gmail.com> #12
MadiaProjection API produces black screen on some ChromeOS / Chromebooks when called from inside an Android App.
[Deleted User] <[Deleted User]> #13
jo...@river.com <jo...@river.com> #14
The app "Screen Mirroring for Roku" on Google Play is still broken on Chromebooks with Android 11.
More specific: ImageReader.OnImageAvailableListener->onImageAvailable(ImageReader reader) produces a black image which leads to a black screen displayed on the connected Roku device.
It does not matter if the app is in "phone", "tablet" or "resizable" window mode on the chromebook.
Here is a video. You will need a Roku device to reproduce the issue:
The app is available on Google Play as free or pro version. Both versions are affected:
Free:
Pro:
I am not sure if AnyDesk/ScreenShot X use a different approach to capture the android screen.
Please note that the same app is working without any issues on Chromebooks with Android 9.
si...@google.com <si...@google.com>
si...@google.com <si...@google.com>
ro...@gisc.sony.com <ro...@gisc.sony.com> #15
eu...@freshcut.gg <eu...@freshcut.gg> #16
si...@gmail.com <si...@gmail.com> #17
ka...@sabre.com <ka...@sabre.com> #18
We have taken the version number 109.0.5414.125 from the Chromebook Settings -> "About ChromeOS" -> "Google ChromeOS" -> "Version xxx.x..." , so we thought this is the actual ChromeOS version and we also thought it is always synced with the Chrome Browser version. I would suggest that this gets changed to avoid confusing developers and users.
We will update here when we have the real ChromeOS version from the device.
Thank you also for the hint about the "not connected to WIFI" popup when connected via ethernet. This is something we missed when we added compatibilty for ChromeOS, as our chromebooks do not have ethernet ports. We will consider this for the next update.
fl...@akeneo.com <fl...@akeneo.com> #19
vg...@brainfinance.com <vg...@brainfinance.com> #20
le...@cbc.ca <le...@cbc.ca> #21
ma...@enveloprisk.com <ma...@enveloprisk.com> #22
To clarify, the last test that resulted in black screen was on platform "15236.80.0 (Official Build) stable-channel octopus", so we tested the wrong version.
The workaround HardwareBuffer.USAGE_GPU_COLOR_OUTPUT on "15236.80.0 (Official Build) stable-channel octopus" fixes the black screen but another problem remains: The image produced by imageReader only contains the screen of Android. The surrounding ChromeOS screen is still black.
On the new platform "15350.0.0 (official build) dev-channel octopus" everything works perfectly. The screen is completely mirrored, without black screen.
So we will wait until this version is rolled out. Thank you very much for your support.
Re #18+19:
We have prepared a fix for "Screen Mirroring for Roku" to address the issue with "not connected to WIFI" popup on ethernet connected Chromebooks and Android devices. The fix will be rolled out with the next app update.
Description
I tried using the pubsub emulator with filtered subscriptions. But it seems that filters are ignored, and messages are sent to all subscribers for the topic. I created topic and subscriptions using nodejs sdk, and when I try to fetch the created subscriptions from the pubsub emulator, I can see that filter is set.
I have been using filters in GCP Pub/Sub without any issues, all though I have only used gcloud command line tool to create subscriptions, and not nodejs sdk.
I can’t really find any info regarding whether the emulator supports filters or not. Buthttps://cloud.google.com/pubsub/docs/emulator doesn’t mention lacking support under “known limitations” section.
I know that filter support in Pubsub is in “beta”, but I also used beta command for running the emulator (
gcloud beta emulators pubsub
), so my best guess is that filters should be supported. So therefor I file this as an issue.If it’s a missing feature, I think “known limitations” should be updated.