mirror of
https://github.com/sony/flutter-elinux-plugins.git
synced 2025-08-26 11:33:10 +08:00
video_player: update README (#71)
Signed-off-by: Hidenori Matsubayashi <Hidenori.Matsubayashi@gmail.com>
This commit is contained in:

committed by
GitHub

parent
c3df5143cc
commit
0c1388ec55
@ -9,8 +9,7 @@ The implementation of the Video Player plugin for flutter elinux. APIs are desig
|
||||
This plugin uses [GStreamer](https://gstreamer.freedesktop.org/) internally.
|
||||
|
||||
```Shell
|
||||
$ sudo apt install libglib2.0-dev
|
||||
$ sudo apt install libgstreamer1.0-dev
|
||||
$ sudo apt install libglib2.0-dev libgstreamer1.0-dev
|
||||
# Install as needed.
|
||||
$ sudo apt install libgstreamer-plugins-base1.0-dev \
|
||||
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
|
||||
@ -31,23 +30,35 @@ dependencies:
|
||||
```
|
||||
|
||||
### Source code
|
||||
|
||||
Import `video_player` in your Dart code:
|
||||
```dart
|
||||
import 'package:video_player/video_player.dart';
|
||||
```
|
||||
|
||||
### Customize for your target devices
|
||||
If you this plugin on your target devices, you will need to customize the pipeline in the source file.So, replace the `videoconvert` element with a H/W accelerated element of your target device to perform well.
|
||||
|
||||
#### default:
|
||||
playbin uri=<file> video-sink="videoconvert ! video/x-raw,format=RGBA ! fakesink"
|
||||
|
||||
#### e.g. customization for i.MX 8M platforms:
|
||||
playbin uri=<file> video-sink="imxvideoconvert_g2d ! video/x-raw,format=RGBA ! fakesink"
|
||||
|
||||
### Enable GstEGLImage
|
||||
|
||||
If GstEGLImage is enabled on your target device, adding the following code to `<user's project>/elinux/CMakeLists.txt` may improve playback performance.
|
||||
|
||||
```
|
||||
add_definitions(-DUSE_EGL_IMAGE_DMABUF)
|
||||
set(USE_EGL_IMAGE_DMABUF "on")
|
||||
```
|
||||
|
||||
### Customize for your target devices
|
||||
|
||||
To improve the performance of this plugin, you will need to customize the pipeline in the source file. Please modify the source file and replace the `videoconvert` element with a H/W accelerated element of your target device to perform well.
|
||||
|
||||
`bool GstVideoPlayer::CreatePipeline()` in packages/video_player/elinux/gst_video_player.cc
|
||||
|
||||
#### default:
|
||||
|
||||
```
|
||||
playbin uri=<file> video-sink="videoconvert ! video/x-raw,format=RGBA ! fakesink"
|
||||
```
|
||||
|
||||
#### i.MX 8M platforms:
|
||||
|
||||
```
|
||||
playbin uri=<file> video-sink="imxvideoconvert_g2d ! video/x-raw,format=RGBA ! fakesink"
|
||||
```
|
||||
|
Reference in New Issue
Block a user