Skip to content

bc-lee/test-flutter-android-texture

Repository files navigation

Test Flutter Android Texture

This Flutter application demonstrates and investigates rendering bugs related to Android textures and video playback on specific devices. It renders OpenGL ES textures on the Android native side and displays them via the Flutter Texture widget, leveraging Pigeon for platform communication.

Core Structure

  • Initialization: Flutter app initializes VideoRenderer which, via Pigeon, prompts Android native code to create a TextureRegistry.SurfaceProducer and an associated native VideoRenderer object.
  • Start Rendering: Flutter calls _renderApi.startRender(textureId) (via Pigeon).
  • Native Rendering: Android's RenderManager and TriangleRenderer begin periodically rendering frames to the SurfaceProducer associated with the textureId.
  • Display: Flutter's VideoView displays the continuously updated texture using the Texture widget.

How to Run

  1. Clone the repository:
    git clone <repository_url>
    cd test-flutter-android-texture
  2. Get Flutter packages:
    flutter pub get
  3. Generate Pigeon code:
    ./scripts/init.sh
  4. Run the application:
    flutter run
    (Or open the project in your IDE and run it.)

License

MIT

except third_party/webrtc which is copied from https://webrtc.googlesource.com/src/+/fb1f65a8d1e3f915d16a22aeda0e2f389e7fa879 and licensed under BSD-3-Clause. Modified code not to call any native methods to simplfy this projct's usage.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks