@tokunosuke-web

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

ラズパイのミラーリング

解決したいこと

今ラズパイで、スマホや他のパソコンからミラーリングができるようにするため、lazycastをインストールしてやろうとしてるのですが、lazycast のコードが 昔の FFmpeg 前提で書かれていて、今ラズパイに入ってる 新しい FFmpeg と噛み合ってないのでインストールを実行できず苦戦しています。
他にミラーリングの方法はあるか?
これを克服するにはどうすればいいか?
伺いたいです。

発生している問題・エラー

cd lazycast




make
make -C control/.
make[1]: ディレクトリ '/home/veta/lazycast/control' に入ります
make[1]: 'all' に対して行うべき事はありません.
make[1]: ディレクトリ '/home/veta/lazycast/control' から出ます
make -C h264/.
make[1]: ディレクトリ '/home/veta/lazycast/h264' に入ります
make[1]: 'all' に対して行うべき事はありません.
make[1]: ディレクトリ '/home/veta/lazycast/h264' から出ます
make -C player/.
make[1]: ディレクトリ '/home/veta/lazycast/player' に入ります
cc -DOMX_SKIP64BIT -I/opt/vc/include/ -I /opt/vc/include/interface/vmcs_host/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux  -I/opt/vc/include/interface/vcos/  -I /opt/vc/include/IL  -I/opt/vc/src/hello_pi/libs/ilclient  -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I./ -I/opt/vc/src/hello_pi/libs/ilclient -I/opt/vc/src/hello_pi/libs/vgfont   -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -Wall -g -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -Wno-psabi -I/opt/vc/include/ -I /opt/vc/include/interface/vmcs_host/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux  -I/opt/vc/include/interface/vcos/  -I /opt/vc/include/IL  -I/opt/vc/src/hello_pi/libs/ilclient  -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I./ -I/opt/vc/src/hello_pi/libs/ilclient -I/opt/vc/src/hello_pi/libs/vgfont -g -c player.c -o player.o -Wno-deprecated-declarations
player.c: In function ‘copy_into_buffer_and_empty’:
player.c:221:13: warning: unused variable ‘buff_size’ [-Wunused-variable]
  221 |         int buff_size = buff_header->nAllocLen;
      |             ^~~~~~~~~
player.c: In function ‘setup_demuxer’:
player.c:411:5: warning: implicit declaration of function ‘av_register_all’; did you mean ‘vc_cec_register_all’? [-Wimplicit-function-declaration]
  411 |     av_register_all();
      |     ^~~~~~~~~~~~~~~
      |     vc_cec_register_all
player.c:430:45: error: ‘AVStream’ has no member named ‘codec’
  430 |                 video_dec_ctx = video_stream->codec;
      |                                             ^~
player.c:432:49: error: ‘AVStream’ has no member named ‘codec’
  432 |                 img_width         = video_stream->codec->width;
      |                                                 ^~
player.c:433:49: error: ‘AVStream’ has no member named ‘codec’
  433 |                 img_height        = video_stream->codec->height;
      |                                                 ^~
player.c:434:49: error: ‘AVStream’ has no member named ‘codec’
  434 |                 extradata         = video_stream->codec->extradata;
      |                                                 ^~
player.c:435:49: error: ‘AVStream’ has no member named ‘codec’
  435 |                 extradatasize     = video_stream->codec->extradata_size;
      |                                                 ^~
player.c:447:67: error: ‘AVStream’ has no member named ‘codec’
  447 |           AVCodec *codec = avcodec_find_decoder(video_stream->codec->codec_id);
      |                                                             ^~

player.c:460:45: error: ‘AVStream’ has no member named ‘codec’
  460 |                 audio_dec_ctx = audio_stream->codec;
      |                                             ^~
player.c:463:67: error: ‘AVStream’ has no member named ‘codec’
  463 |           AVCodec *codec = avcodec_find_decoder(audio_stream->codec->codec_id);
      |                                                             ^~

player.c:470:64: warning: comparison of constant ‘0’ with boolean expression is always false [-Wbool-compare]
  470 |                 if (!avcodec_open2(codec_context, codec, NULL) < 0)
      |                                                                ^
player.c:470:64: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
player.c:470:21: note: add parentheses around left hand side expression to silence this warning
  470 |                 if (!avcodec_open2(codec_context, codec, NULL) < 0)
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                     (                                         )
player.c:481:45: error: ‘AVStream’ has no member named ‘codec’
  481 |                 audio_dec_ctx = audio_stream->codec;
      |                                             ^~
player.c:484:34: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  484 |                 AVCodec *codec = avcodec_find_decoder(AV_CODEC_ID_AAC);
      |                                  ^~~~~~~~~~~~~~~~~~~~
player.c:491:64: warning: comparison of constant ‘0’ with boolean expression is always false [-Wbool-compare]
  491 |                 if (!avcodec_open2(codec_context, codec, NULL) < 0)
      |                                                                ^
player.c:491:64: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
player.c:491:21: note: add parentheses around left hand side expression to silence this warning
  491 |                 if (!avcodec_open2(codec_context, codec, NULL) < 0)
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                     (                                         )
player.c: In function ‘setup_clockComponent’:
player.c:602:23: warning: unused variable ‘clock’ [-Wunused-variable]
  602 |     OMX_COMPONENTTYPE*clock = ilclient_get_handle(*clockComponent);
      |                       ^~~~~
player.c: In function ‘audioplay_get_latency’:
player.c:729:23: warning: variable ‘error’ set but not used [-Wunused-but-set-variable]
  729 |         OMX_ERRORTYPE error;
      |                       ^~~~~
player.c: In function ‘receivepkt’:
player.c:823:1: warning: no return statement in function returning non-void [-Wreturn-type]
  823 | }
      | ^
player.c: In function ‘addnullpacket’:
player.c:908:23: warning: variable ‘padpacket’ set but not used [-Wunused-but-set-variable]
  908 |         unsigned char padpacket[2048];
      |                       ^~~~~~~~~
player.c:904:13: warning: unused variable ‘err’ [-Wunused-variable]
  904 |         int err = 1000;
      |             ^~~
player.c: In function ‘main’:
player.c:1212:17: warning: implicit declaration of function ‘av_free_packet’; did you mean ‘av_get_packet’? [-Wimplicit-function-declaration]
 1212 |                 av_free_packet(&orig_pkt);
      |                 ^~~~~~~~~~~~~~
      |                 av_get_packet
player.c:1326:51: warning: passing argument 3 of ‘pthread_create’ from incompatible pointer type [-Wincompatible-pointer-types]
 1326 |                 if (pthread_create(&thread, NULL, receivepkt, oldnodecopy) != 0)
      |                                                   ^~~~~~~~~~
      |                                                   |
      |                                                   void * (*)(Nodetype *) {aka void * (*)(struct Node *)}
In file included from player.c:6:
/usr/include/pthread.h:204:36: note: expected ‘void * (*)(void *)’ but argument is of type ‘void * (*)(Nodetype *)’ {aka ‘void * (*)(struct Node *)’}
  204 |                            void *(*__start_routine) (void *),
      |                            ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
player.c:1360:45: warning: implicit declaration of function ‘avcodec_decode_audio4’; did you mean ‘avcodec_decode_subtitle2’? [-Wimplicit-function-declaration]
 1360 |                                 if (((err = avcodec_decode_audio4(codec_context, frame, &got_frame, &renderpkt)) < 0) ||
      |                                             ^~~~~~~~~~~~~~~~~~~~~
      |                                             avcodec_decode_subtitle2
make[1]: *** [Makefile.include:12: player.o] エラー 1
make[1]: ディレクトリ '/home/veta/lazycast/player' から出ます
make: *** [Makefile:5: player/.] エラー 2

または、問題・エラーが起きている画像をここにドラッグアンドドロップ

該当するソースコード


0 likes

1Answer

Select "Raspberry Pi OS (Legacy, 32-bit) A port of Debian Bullseye with security updates and desktop environment" when flashing the SD card. Debian Bookworm seems to cause some issues.

お使いの Raspberry Pi に インストールした OSは、この要件に合っているでしょうか?

0Like

Your answer might help someone💌