How to get GLFW window Id of FlutterWindow - flutter

I am trying to build a video player using flutter for Desktop. There is a video_player plugin available for iOS and Android, but not for Desktop. So, for the time being thought of trying to use gstreamer for decoding and hardware rendering in C++ code as back-end to flutter. The idea is to pass the Window Id of the flutter window to gstreamer's glimagesink plugin for rendering the video.
I am using the latest code from https://github.com/google/flutter-desktop-embedding as the base for my experiments. Below mentioned points are with reference to this repo.
In file flutter-desktop-embedding/example/linux/main.cc, FlutterWindowController object is created as shown below.
flutter::FlutterWindowController flutter_controller(icu_data_path);
This internally calls
FlutterDesktopInit();
While hovering the mouse pointer on the above method, VS code shows the following
bool FlutterDesktopInit()
Sets up the library's graphic context. Must be called before any other
methods.
Note: Internally, this library uses GLFW, which does not support multiple
copies within the same process. Internally this calls glfwInit, which will
fail if you have called glfwInit elsewhere in the process.
It is clear that FlutterDesktopInit() uses GLFW to create window. Checked whether I can get the window handle. But, no luck. I could only get the FlutterWindow object as shown below.
flutter::FlutterWindow *win = flutter_controller.window();
Appreciate if somebody can give some hint on how to get the GLFW window handle, which can be used with glimagesink.

You can't get references to any GLFW objects through that API. This is by design because, as the comment you quoted says, you can't have multiple copies of GLFW within the same process. GLFW is statically linked into the Linux Flutter embedding, so you can't use GLFW in the runner or a plugin.
Implementing a video player should be done using the texture APIs, which will be added for GLFW in this PR.

Related

Is there a way to retrieve information from a ui element that has the property IsControlElement = False? (Python + Appium + WinAppDriver)

Greetings and salutations!
I'm working on a UI automation project for a windows desktop app (FrameworkId: Win32)
Stack: Python (3.7) + Appium (1.15.1) + WinAppDriver (v1.1).
I have identified an element using Inspect.exe, but when I try to code, whatever I do I receive this error:
selenium.common.exceptions.NoSuchElementException: Message: An element could not be located on the page using the given search parameters.
The locator strategy I'm using is xpath:
self.driver.find_element_by_xpath("//*[#LocalizedControlType='text' and #IsControlElement='false']")
As you can see, Inspect.exe has shown that it has the property "IsControlElement='false'", but I cannot for the life of me "access" it via code.
I would also like to point out that any elements that had the IsControlElement='true' are properly found and I can "interact" with them.
Thank you very much for your help!
Source of issue
This is probably an issue within Microsoft's UI Automation implementation in .NET.
The property IsControlElement should have returned true while it didn't.
From my tests, it seems to be an issue somewhere within UIAutomationCore.dll.
I speculate that the root cause is that the automation implementation was targeted for accessibility in mind, and they have mistakenly ignored some controls which are NOT readable (Image, Geometry, etc.).
Workaround for some cases
Try to use UI control from a type that has a text.
if it's already a textual control, try to use a different textual control type. for example - in WPF project - use Label instead of TextBlock
if it's NOT a textual element, if possible, wrap the control in a textual element. in WPF projects you can use a <Label Padding="0"> as a wrapper.
Other things to consider
Try to use UIAComWrapper
Related issues
https://stackoverflow.com/a/46452431/426315
UIAutomation won't retrieve children of an element
UI Automation - #32770 (Dialog) shows in Insepct.exe but not in VisualUIAVerifyNative.exe
Side Note
Since you haven't specified which Python GUI library are you using, I was not able to provide examples for your library. Sorry.

Fluter/Dart code loading over network

Recently, I watched the first introduction of Flutter originally named Sky on Youtube https://www.youtube.com/watch?time_continue=10&v=PnIWl33YMwA .
At 1:54 Eric Seidel says something like this - This all is loaded over the network. Dart code of the network. What happenend to it in Flutter?
Is it possible to load Dart code like new versions directly over the network without using the AppStore?
I'm not sure Eric was talking about the data or the actual code. It does sound like he meant both.
It may have been possible to load code over the network because on these early days they shipped the dart VM on releases and code was JIT compiled. Since late 2015 Flutter moved to Dart's AOT compilation (see this video).
So no, it's not possible to update your flutter apps through the network.
This all is loaded over the network. Dart code of the network
After watching the video, I got the context of the line. It means the data getting fetched from the network and the code written is in the Dart rather than Java.

Can both image target and object target be added one single database in unity vuforia?

I am developing an android app where I have to train my app to recognize two images and four objects.I created one single database where I added all the images and objects target in vuforia developer site and created the unity package. Now neither image nor object is getting recognized.
Probably the problem is the same for objects and images.
I think you should share some more info about what your doing as well as some meaningful code implementing it.
W/O that, I would suggest:
verify that the database and trackables are loaded and active # runtime
if so, see in console that the trackables are tracked by Vuforia
if so, verify the code enabling your augmentations
Please confirm whether have run trough these steps already and what results you got. I can share some code and further tips once the issue is a little but more specific.
Regards

Trouble using PDF417-phonegap plugin for my Barcode Scanning Application

I am trying to create an application that reads information from a Driving license and gives the result based on that. I am using Ionic framework for my app and have integrated the PDF417- phonegap plugin by MicroBlink with my app.
I followed all the instructions given at:
https://github.com/skifaster/pdf417-phonegap/blob/29cc6d8/README.md
The app is now successfully reading information from barcode and displaying it in an alert box on my screen. But I cannot find where the alert box is being generated from.
I need to know where the scan result is stored so that I can process the information further.
Can someone please help me with this?
as first, I would suggest using original MicroBlink repository instead of forked one. Using original repository guarantees having latest features and updates.
Next, here you have an example how scan is performed from javascript and how data is returned in JS callback. The example implementation raises alert with returned data.

Coded UI - Add-ons

I'm using VS 2013 with CodedUI to automate UI tests on an application that is not built by my client (it's an implementation project). When inspecting the UI Control using inspect or coded UI, I see that the Automation ID keeps changing and I have no real way (beside position based) to capture my controls (the application is developed in Delphi).
So I'm wondering if there exist some library or add-ons (or something not even related to Coded UI and VS) that can help with this? For example some tools that can capture a screen shot of the control and then map it (the screenshot) to an Control Id that I will define and use that to automate?
Wow....I was able to find a way to do what I need using sikuli (http://www.sikuli.org/) checkout this post. Ill actually try it out tomorrow. But I found on the web (link below) that it`s possible.
From Coded UI we can call the sikuli script like that:
Process process = new Process();
ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.FileName = #"D:\Sikuli\ds.bat";
process.StartInfo = startInfo;
process.Start();
process.WaitForExit();
(code from) https://answers.launchpad.net/sikuli/+question/232233 , read this post guys!