-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
play gstreamer videosink in flutter #2
Comments
From my research, the video displaying can be achieved using platform-view, and it's platform-specific, and the flutter team has documented this, for example on Android: https://docs.flutter.dev/platform-integration/android/platform-views |
Progress update: So what we need to do on Android:
|
I will have a look at it this weekend. Will keep you updated. |
Before this issue, what this repo has done is set up communication between Dart and C ( we don't have C to Dart yet): graph
a[Dart] --> b[C]
With a new plugin graph
langA[Dart] --> langB[C]
langA --> langC[Kotlin]
What we need is to let Kotlin communicate with C, so that we can get the address of graph
langA[Dart] --> langB[C]
langA --> langC[Kotlin]
langC --> langB
Now I think this is doable, and I just pushed it to branch videodisplay, haven't tried anything further yet, but this looks promising. |
Awesome! I am sorry I am very busy with work. Will look more into it when I find the time. |
I got it working! gst-launch-1.0 -v videotestsrc ! autovideosink If you want to check what changes were made, please compare the branch And I will keep trying to make it work on all other platforms, and by then, I will make videos on them. |
After some investigation, making it work on other platforms seems more difficult than I thought, so I did a bit of clean-up, that should get you started, and if you want to have an easier time developing and debugging, you can open the android folder of the app project with Android Studio, so that you get functions and macros hint from android studio. |
awesome! it worked for me. |
Hi Fengjiongmax,
Again thank you for all the help. I have been trying to use your project and adapt it in order to play a video with gstreamer videosink.
However, I am not able to get it to work. I have replaced the audio sink with a video sink and the audio test src, with the video test src, I am able to compile and startup the application. However the problem is, the video sink needs to be linked to a widget in order to play and show the video. I have tried to look into existing projects, where they suggest e.g., using a Texture widget and link the texture id, however I don't get how to do this.
There is also a tutorial on the gstreamer website how to create a gst video in c code, but this is not with flutter, I have diffeculties how to translate this tutorial and use it in a flutter project with ffi plugins https://gstreamer.freedesktop.org/documentation/tutorials/android/video.html?gi-language=c#a-video-surface-on-android-c-code
My question, do you have any tips in which direction I should look to link the video sink with a widget in flutter, such that it plays the video?
Hope you could help me out, maybe this would also be an interesting follow up video tutorial on YT, when we have a solution.
The text was updated successfully, but these errors were encountered: