「App:Library:LVGL:docs:3rd party libraries:FFmpeg support」の版間の差分

提供: robot-jp wiki
ナビゲーションに移動検索に移動
 
(同じ利用者による、間の3版が非表示)
1行目: 1行目:
 
https://docs.lvgl.io/8.2/libs/ffmpeg.html
 
https://docs.lvgl.io/8.2/libs/ffmpeg.html
 
__NOTOC__
 
__NOTOC__
 +
= FFmpeg support =
 
{| class="wikitable"
 
{| class="wikitable"
 
!英文
 
!英文
6行目: 7行目:
 
|-
 
|-
 
|
 
|
|
+
FFmpeg A complete, cross-platform solution to record, convert and stream audio and video.
 +
|FFmpeg オーディオとビデオの録音、変換、ストリーミングを行うための完全なクロスプラットフォームソリューションです。
 
|}
 
|}
 +
:[[App:Library:LVGL:docs:3rd party libraries|戻る : Previous]]
  
= FFmpeg support =
 
FFmpeg A complete, cross-platform solution to record, convert and stream audio and video.
 
  
 
== Install FFmpeg ==
 
== Install FFmpeg ==
 
+
{| class="wikitable"
 +
!英文
 +
!自動翻訳
 +
|-
 +
|
 
* Download FFmpeg from here
 
* Download FFmpeg from here
 
* <code style="color: #bb0000;">./configure --disable-all --disable-autodetect --disable-podpages --disable-asm --enable-avcodec --enable-avformat --enable-decoders --enable-encoders --enable-demuxers --enable-parsers --enable-protocol='file' --enable-swscale --enable-zlib</code>
 
* <code style="color: #bb0000;">./configure --disable-all --disable-autodetect --disable-podpages --disable-asm --enable-avcodec --enable-avformat --enable-decoders --enable-encoders --enable-demuxers --enable-parsers --enable-protocol='file' --enable-swscale --enable-zlib</code>
 
* <code style="color: #bb0000;">make</code>
 
* <code style="color: #bb0000;">make</code>
 
* <code style="color: #bb0000;">sudo make install</code>
 
* <code style="color: #bb0000;">sudo make install</code>
 +
|
 +
* ここからFFmpegをダウンロード
 +
* <code>./configure --disable-all --disable-autodetect --disable-podpages --disable-asm --enable-avcodec --enable-avformat --enable-decoders --enable-encoders --enable-demuxers --enable-parsers --enable-protocol='file' --enable-swscale --enable-zlib</code>
 +
* <code>make</code>
 +
* <code>sudo make install</code>
 +
|}
 +
:[[App:Library:LVGL:docs:3rd party libraries|戻る : Previous]]
 +
  
 
== Add FFmpeg to your project ==
 
== Add FFmpeg to your project ==
 +
{| class="wikitable"
 +
!英文
 +
!自動翻訳
 +
|-
 +
|
 +
* Add library: <code style="color: #bb0000;">FFmpeg</code> (for GCC: <code style="color: #bb0000;">-lavformat -lavcodec -lavutil -lswscale -lm -lz -lpthread</code>)
 +
|
 +
* ライブラリを追加: <code>FFmpeg</code>(GCCの場合<code>-lavformat -lavcodec -lavutil -lswscale -lm -lz -lpthread</code>:)
 +
|}
 +
:[[App:Library:LVGL:docs:3rd party libraries|戻る : Previous]]
  
* Add library: <code style="color: #bb0000;">FFmpeg</code> (for GCC: <code style="color: #bb0000;">-lavformat -lavcodec -lavutil -lswscale -lm -lz -lpthread</code>)
 
  
 
== Usage ==
 
== Usage ==
 +
{| class="wikitable"
 +
!英文
 +
!自動翻訳
 +
|-
 +
|
 
Enable <code style="color: #bb0000;">LV_USE_FFMPEG</code> in <code style="color: #bb0000;">lv_conf.h</code>.
 
Enable <code style="color: #bb0000;">LV_USE_FFMPEG</code> in <code style="color: #bb0000;">lv_conf.h</code>.
  
29行目: 56行目:
  
 
Note that, the FFmpeg extension doesn't use LVGL's file system. You can simply pass the path to the image or video as usual on your operating system or platform.
 
Note that, the FFmpeg extension doesn't use LVGL's file system. You can simply pass the path to the image or video as usual on your operating system or platform.
 +
|<code style="color: #bb0000;">lv_conf.h</code> で <code style="color: #bb0000;">LV_USE_FFMPEG</code> を有効化します。
 +
 +
以下の例を参照してください。
 +
 +
なお、FFmpeg拡張は、LVGLのファイルシステムを使用しません。画像やビデオのパスを渡すだけで、OSやプラットフォームは通常通りです。
 +
|}
 +
:[[App:Library:LVGL:docs:3rd party libraries|戻る : Previous]]
 +
  
 
== Example ==
 
== Example ==
 +
{| class="wikitable"
 +
!英文
 +
!自動翻訳
 +
|-
 +
|
 
=== Decode image ===
 
=== Decode image ===
 
[[file:LVGL docs 3rdPartyLibs FFmpeg 01.png|link=https://docs.lvgl.io/8.2/libs/ffmpeg.html#decode-image]]
 
[[file:LVGL docs 3rdPartyLibs FFmpeg 01.png|link=https://docs.lvgl.io/8.2/libs/ffmpeg.html#decode-image]]
 
+
|
----
+
|-
 +
|
 
=== Decode video ===
 
=== Decode video ===
 
[[file:LVGL docs 3rdPartyLibs FFmpeg 01.png|link=https://docs.lvgl.io/8.2/libs/ffmpeg.html#decode-video]]
 
[[file:LVGL docs 3rdPartyLibs FFmpeg 01.png|link=https://docs.lvgl.io/8.2/libs/ffmpeg.html#decode-video]]
 +
|
 +
|}
 +
:[[App:Library:LVGL:docs:3rd party libraries|戻る : Previous]]
  
----
 
  
 
== API ==
 
== API ==
 +
{| class="wikitable"
 +
!英文
 +
!自動翻訳
 +
|-
 +
|
 
Enums
 
Enums
  
enum lv_ffmpeg_player_cmd_t  
+
<span style="background-color:#e7f2fa;color:#2980b9;">enum lv_ffmpeg_player_cmd_t </span>
 
: ''Values:''
 
: ''Values:''
:; enumerator LV_FFMPEG_PLAYER_CMD_START  
+
:; <span style="background-color: #eeeeee;">enumerator LV_FFMPEG_PLAYER_CMD_START </span>
 
::
 
::
:; enumerator LV_FFMPEG_PLAYER_CMD_STOP  
+
:; <span style="background-color: #eeeeee;">enumerator LV_FFMPEG_PLAYER_CMD_STOP </span>
 
::
 
::
:; enumerator LV_FFMPEG_PLAYER_CMD_PAUSE  
+
:; <span style="background-color: #eeeeee;">enumerator LV_FFMPEG_PLAYER_CMD_PAUSE </span>
 
::
 
::
:; enumerator LV_FFMPEG_PLAYER_CMD_RESUME  
+
:; <span style="background-color: #eeeeee;">enumerator LV_FFMPEG_PLAYER_CMD_RESUME </span>
 
::
 
::
:; enumerator _LV_FFMPEG_PLAYER_CMD_LAST  
+
:; <span style="background-color: #eeeeee;">enumerator _LV_FFMPEG_PLAYER_CMD_LAST </span>
 
::
 
::
  
 
Functions
 
Functions
  
void lv_ffmpeg_init(void)  
+
<span style="background-color:#e7f2fa;color:#2980b9;">void lv_ffmpeg_init(void) </span>
 
: Register FFMPEG image decoder
 
: Register FFMPEG image decoder
  
int lv_ffmpeg_get_frame_num(const char *path)  
+
<span style="background-color:#e7f2fa;color:#2980b9;">int lv_ffmpeg_get_frame_num(const char *path) </span>
 
: Get the number of frames contained in the file
 
: Get the number of frames contained in the file
 
:; Parameters
 
:; Parameters
68行目: 116行目:
 
:: Number of frames, less than 0 means failed
 
:: Number of frames, less than 0 means failed
  
lv_obj_t *lv_ffmpeg_player_create(lv_obj_t *parent)  
+
<span style="background-color:#e7f2fa;color:#2980b9;">lv_obj_t *lv_ffmpeg_player_create(lv_obj_t *parent) </span>
 
: Create ffmpeg_player object
 
: Create ffmpeg_player object
 
:; Parameters
 
:; Parameters
75行目: 123行目:
 
:: pointer to the created ffmpeg_player
 
:: pointer to the created ffmpeg_player
  
lv_res_t lv_ffmpeg_player_set_src(lv_obj_t *obj, const char *path)  
+
<span style="background-color:#e7f2fa;color:#2980b9;">lv_res_t lv_ffmpeg_player_set_src(lv_obj_t *obj, const char *path) </span>
 
: Set the path of the file to be played
 
: Set the path of the file to be played
 
:; Parameters
 
:; Parameters
83行目: 131行目:
 
:: LV_RES_OK: no error; LV_RES_INV: can't get the info.
 
:: LV_RES_OK: no error; LV_RES_INV: can't get the info.
  
void lv_ffmpeg_player_set_cmd(lv_obj_t *obj, lv_ffmpeg_player_cmd_t cmd)  
+
<span style="background-color:#e7f2fa;color:#2980b9;">void lv_ffmpeg_player_set_cmd(lv_obj_t *obj, lv_ffmpeg_player_cmd_t cmd) </span>
 
: Set command control video player
 
: Set command control video player
 
:; Parameters
 
:; Parameters
89行目: 137行目:
 
::* cmd -- control commands
 
::* cmd -- control commands
  
void lv_ffmpeg_player_set_auto_restart(lv_obj_t *obj, bool en)  
+
<span style="background-color:#e7f2fa;color:#2980b9;">void lv_ffmpeg_player_set_auto_restart(lv_obj_t *obj, bool en) </span>
 
: Set the video to automatically replay
 
: Set the video to automatically replay
 
:; Parameters
 
:; Parameters
97行目: 145行目:
 
Variables
 
Variables
  
const lv_obj_class_t lv_ffmpeg_player_class  
+
<span style="background-color:#e7f2fa;color:#2980b9;">const lv_obj_class_t lv_ffmpeg_player_class </span>
 
:
 
:
  
struct lv_ffmpeg_player_t  
+
<span style="background-color:#e7f2fa;color:#2980b9;">struct lv_ffmpeg_player_t </span>
 
: Public Members
 
: Public Members
:; lv_img_t img  
+
:; <span style="background-color: #eeeeee;">lv_img_t img </span>
 +
::
 +
:; <span style="background-color: #eeeeee;">lv_timer_t *timer </span>
 +
::
 +
:; <span style="background-color: #eeeeee;">lv_img_dsc_t imgdsc </span>
 +
::
 +
:; <span style="background-color: #eeeeee;">bool auto_restart </span>
 +
::
 +
:; <span style="background-color: #eeeeee;">struct ffmpeg_context_s *ffmpeg_ctx</span>
 +
|
 +
 
 +
 
 +
列挙型
 +
 
 +
<span style="background-color:#e7f2fa;color:#2980b9;">列挙型lv_ffmpeg_player_cmd_t</span>
 +
 
 +
: ''値:''
 +
:; <span style="background-color: #eeeeee;">列挙子LV_FFMPEG_PLAYER_CMD_START</span>
 +
::
 +
:; <span style="background-color: #eeeeee;">列挙子LV_FFMPEG_PLAYER_CMD_STOP</span>
 
::
 
::
:; lv_timer_t *timer
+
:; <span style="background-color: #eeeeee;">列挙子LV_FFMPEG_PLAYER_CMD_PAUSE</span>
 
::
 
::
:; lv_img_dsc_t imgdsc
+
:; <span style="background-color: #eeeeee;">列挙子LV_FFMPEG_PLAYER_CMD_RESUME</span>
 
::
 
::
:; bool auto_restart
+
:; <span style="background-color: #eeeeee;">列挙子_LV_FFMPEG_PLAYER_CMD_LAST</span>
 
::
 
::
:; struct ffmpeg_context_s *ffmpeg_ctx
 
  
 +
機能
 +
 +
<span style="background-color:#e7f2fa;color:#2980b9;">void lv_ffmpeg_init(void)</span>
 +
 +
: FFMPEG画像デコーダーを登録する
 +
 +
<span style="background-color:#e7f2fa;color:#2980b9;">int lv_ffmpeg_get_frame_num(const char * path)</span>
 +
 +
: ファイルに含まれるフレーム数を取得します
 +
:; パラメーター
 +
:: パス-画像またはビデオファイル名
 +
:; 戻り値
 +
:: フレーム数、0未満は失敗したことを意味します
 +
 +
<span style="background-color:#e7f2fa;color:#2980b9;">lv_obj_t * lv_ffmpeg_player_create(lv_obj_t * parent)</span>
  
 +
: ffmpeg_playerオブジェクトを作成します
 +
:; パラメーター
 +
:: parent-オブジェクトへのポインタ。新しいプレーヤーの親になります
 +
:; 戻り値
 +
:: 作成されたffmpeg_playerへのポインター
  
 +
<span style="background-color:#e7f2fa;color:#2980b9;">lv_res_t lv_ffmpeg_player_set_src(lv_obj_t * obj、const char * path)</span>
  
 +
: 再生するファイルのパスを設定します
 +
:; パラメーター
 +
::* obj-ffmpeg_playerオブジェクトへのポインター
 +
::* パス-ビデオファイルのパス
 +
:; 戻り値
 +
:: LV_RES_OK:エラーなし。LV_RES_INV:情報を取得できません。
  
 +
<span style="background-color:#e7f2fa;color:#2980b9;">void lv_ffmpeg_player_set_cmd(lv_obj_t * obj、lv_ffmpeg_player_cmd_t cmd)</span>
  
 +
: コマンドコントロールビデオプレーヤーを設定する
 +
:; パラメーター
 +
::* obj-ffmpeg_playerオブジェクトへのポインター
 +
::* cmd-制御コマンド
 +
 +
<span style="background-color:#e7f2fa;color:#2980b9;">void lv_ffmpeg_player_set_auto_restart(lv_obj_t * obj、bool en)</span>
 +
 +
: 自動的に再生されるようにビデオを設定する
 +
:; パラメーター
 +
::* obj-ffmpeg_playerオブジェクトへのポインター
 +
::* en --true:自動再起動を有効にします
 +
 +
変数
 +
 +
<span style="background-color:#e7f2fa;color:#2980b9;">const lv_obj_class_t lv_ffmpeg_player_class</span>
 +
 +
:
 +
 +
<span style="background-color:#e7f2fa;color:#2980b9;">struct lv_ffmpeg_player_t</span>
 +
 +
: パブリックメンバー
 +
:; <span style="background-color: #eeeeee;">lv_img_t img</span>
 +
::
 +
:; <span style="background-color: #eeeeee;">lv_timer_t * timer</span>
 +
::
 +
:; <span style="background-color: #eeeeee;">lv_img_dsc_t imgdsc</span>
 +
::
 +
:; <span style="background-color: #eeeeee;">bool auto_restart</span>
 +
::
 +
:; <span style="background-color: #eeeeee;">struct ffmpeg_context_s * ffmpeg_ctx</span>
 +
|}
  
  
  
----
 
 
:[[App:Library:LVGL:docs:3rd party libraries|戻る : Previous]]
 
:[[App:Library:LVGL:docs:3rd party libraries|戻る : Previous]]

2022年6月29日 (水) 17:44時点における最新版

https://docs.lvgl.io/8.2/libs/ffmpeg.html

FFmpeg support

英文 自動翻訳

FFmpeg A complete, cross-platform solution to record, convert and stream audio and video.

FFmpeg オーディオとビデオの録音、変換、ストリーミングを行うための完全なクロスプラットフォームソリューションです。
戻る : Previous


Install FFmpeg

英文 自動翻訳
  • Download FFmpeg from here
  • ./configure --disable-all --disable-autodetect --disable-podpages --disable-asm --enable-avcodec --enable-avformat --enable-decoders --enable-encoders --enable-demuxers --enable-parsers --enable-protocol='file' --enable-swscale --enable-zlib
  • make
  • sudo make install
  • ここからFFmpegをダウンロード
  • ./configure --disable-all --disable-autodetect --disable-podpages --disable-asm --enable-avcodec --enable-avformat --enable-decoders --enable-encoders --enable-demuxers --enable-parsers --enable-protocol='file' --enable-swscale --enable-zlib
  • make
  • sudo make install
戻る : Previous


Add FFmpeg to your project

英文 自動翻訳
  • Add library: FFmpeg (for GCC: -lavformat -lavcodec -lavutil -lswscale -lm -lz -lpthread)
  • ライブラリを追加: FFmpeg(GCCの場合-lavformat -lavcodec -lavutil -lswscale -lm -lz -lpthread:)
戻る : Previous


Usage

英文 自動翻訳

Enable LV_USE_FFMPEG in lv_conf.h.

See the examples below.

Note that, the FFmpeg extension doesn't use LVGL's file system. You can simply pass the path to the image or video as usual on your operating system or platform.

lv_conf.hLV_USE_FFMPEG を有効化します。

以下の例を参照してください。

なお、FFmpeg拡張は、LVGLのファイルシステムを使用しません。画像やビデオのパスを渡すだけで、OSやプラットフォームは通常通りです。

戻る : Previous


Example

英文 自動翻訳

Decode image

LVGL docs 3rdPartyLibs FFmpeg 01.png

Decode video

LVGL docs 3rdPartyLibs FFmpeg 01.png

戻る : Previous


API

英文 自動翻訳

Enums

enum lv_ffmpeg_player_cmd_t

Values:
enumerator LV_FFMPEG_PLAYER_CMD_START
enumerator LV_FFMPEG_PLAYER_CMD_STOP
enumerator LV_FFMPEG_PLAYER_CMD_PAUSE
enumerator LV_FFMPEG_PLAYER_CMD_RESUME
enumerator _LV_FFMPEG_PLAYER_CMD_LAST

Functions

void lv_ffmpeg_init(void)

Register FFMPEG image decoder

int lv_ffmpeg_get_frame_num(const char *path)

Get the number of frames contained in the file
Parameters
path -- image or video file name
Returns
Number of frames, less than 0 means failed

lv_obj_t *lv_ffmpeg_player_create(lv_obj_t *parent)

Create ffmpeg_player object
Parameters
parent -- pointer to an object, it will be the parent of the new player
Returns
pointer to the created ffmpeg_player

lv_res_t lv_ffmpeg_player_set_src(lv_obj_t *obj, const char *path)

Set the path of the file to be played
Parameters
  • obj -- pointer to a ffmpeg_player object
  • path -- video file path
Returns
LV_RES_OK: no error; LV_RES_INV: can't get the info.

void lv_ffmpeg_player_set_cmd(lv_obj_t *obj, lv_ffmpeg_player_cmd_t cmd)

Set command control video player
Parameters
  • obj -- pointer to a ffmpeg_player object
  • cmd -- control commands

void lv_ffmpeg_player_set_auto_restart(lv_obj_t *obj, bool en)

Set the video to automatically replay
Parameters
  • obj -- pointer to a ffmpeg_player object
  • en -- true: enable the auto restart

Variables

const lv_obj_class_t lv_ffmpeg_player_class

struct lv_ffmpeg_player_t

Public Members
lv_img_t img
lv_timer_t *timer
lv_img_dsc_t imgdsc
bool auto_restart
struct ffmpeg_context_s *ffmpeg_ctx


列挙型

列挙型lv_ffmpeg_player_cmd_t

値:
列挙子LV_FFMPEG_PLAYER_CMD_START
列挙子LV_FFMPEG_PLAYER_CMD_STOP
列挙子LV_FFMPEG_PLAYER_CMD_PAUSE
列挙子LV_FFMPEG_PLAYER_CMD_RESUME
列挙子_LV_FFMPEG_PLAYER_CMD_LAST

機能

void lv_ffmpeg_init(void)

FFMPEG画像デコーダーを登録する

int lv_ffmpeg_get_frame_num(const char * path)

ファイルに含まれるフレーム数を取得します
パラメーター
パス-画像またはビデオファイル名
戻り値
フレーム数、0未満は失敗したことを意味します

lv_obj_t * lv_ffmpeg_player_create(lv_obj_t * parent)

ffmpeg_playerオブジェクトを作成します
パラメーター
parent-オブジェクトへのポインタ。新しいプレーヤーの親になります
戻り値
作成されたffmpeg_playerへのポインター

lv_res_t lv_ffmpeg_player_set_src(lv_obj_t * obj、const char * path)

再生するファイルのパスを設定します
パラメーター
  • obj-ffmpeg_playerオブジェクトへのポインター
  • パス-ビデオファイルのパス
戻り値
LV_RES_OK:エラーなし。LV_RES_INV:情報を取得できません。

void lv_ffmpeg_player_set_cmd(lv_obj_t * obj、lv_ffmpeg_player_cmd_t cmd)

コマンドコントロールビデオプレーヤーを設定する
パラメーター
  • obj-ffmpeg_playerオブジェクトへのポインター
  • cmd-制御コマンド

void lv_ffmpeg_player_set_auto_restart(lv_obj_t * obj、bool en)

自動的に再生されるようにビデオを設定する
パラメーター
  • obj-ffmpeg_playerオブジェクトへのポインター
  • en --true:自動再起動を有効にします

変数

const lv_obj_class_t lv_ffmpeg_player_class

struct lv_ffmpeg_player_t

パブリックメンバー
lv_img_t img
lv_timer_t * timer
lv_img_dsc_t imgdsc
bool auto_restart
struct ffmpeg_context_s * ffmpeg_ctx


戻る : Previous