这是播放器的第二个版本,实现了将视频嵌入到sdl窗口中,但那些按键也失去了反应,原因待查。 源码如下: #include #include #include #include #include static gboolean bus_callback(GstBus *bus, GstMessage *msg, gpointer data) { GMainLoop *loop = data; switch (GST_MESSAGE_TYPE(msg)) { case GST_MESSAGE_EOS: g_print("End-of-stream\n"); g_main_loop_quit(loop); ...
gcc -g -o My_tutorial03 My_tutorial03.c -lavutil -lavformat -lavcodec -lz -lavutil -lm -lswscale -lbz2 `sdl-config --libs --cflags` My_tutorial03.c: In function 'packet_queue_init': My_tutorial03.c:49: warning: assignment makes pointer from integer without a cast My_tutorial03.c: In function 'audio_decode_frame': My_tutorial03.c:120: warning: 'avcodec_decode_audio3' is deprecated (declared at /usr...
源码如下: #include #include //#include static gboolean bus_callback(GstBus *bus, GstMessage *msg, gpointer data) { GMainLoop *loop = data; switch (GST_MESSAGE_TYPE(msg)) { case GST_MESSAGE_EOS: g_print("End-of-stream\n"); g_main_loop_quit(loop); break; case GST_MESSAGE_ERROR: { gchar *debug; GError *err; gst_message_par...
Compiling on Linux Index 目录 Compiling on Linux Compiling sdl Compiling an sdl application using GCC I installed sdl from source but can't build or run sdl applications Compiling sdl Extract sdl, run configure and then make: tar zxvf sdl-1.2.7.tar.gz cd sdl-1.2.7 ./configure make make install You may also change how sdl gets compiled by adding options to ./configure. To display what optio...
Setting up sdl for g++ Last Updated 3/25/06 First thing you need to do is download sdl headers and binaries. You will find them on the sdl website, specifically on this page . Scroll Down to the Development Libraries section and download the Linux development library: Now run the RPM and let it do it's thing. Now create a source file with the following code: #include "sdl/sdl.h" int main( i...
Setting up sdl in Eclipse Last Updated 3/25/06 First thing you need to do is download sdl headers and binaries. You will find them on the sdl website, specifically on this page . Scroll Down to the Development Libraries section and download the Linux development library: Now run the RPM and let it do it's thing. Now start a new managed make project: After you've named your project and ever...
Setting up sdl in KDevelop Last Updated 2/20/06 First thing you need to do is download sdl headers and binaries. You will find them on the sdl website, specifically on this page . Scroll Down to the Development Libraries section and download the Linux development library: Now run the RPM and let it do it's thing. After the RPM installs itself, start up KDevelop and start a new project. Set...
Setting up sdl in Anjuta Last Updated 2/20/06 First thing you need to do is download sdl headers and binaries. You will find them on the sdl website, specifically on this page . Scroll Down to the Development Libraries section and download the Linux development library: Now run the RPM and let it do it's thing. After the RPM installs itself, start up Anjuta and start a new project. This wi...
Setting up sdl in Eclipse Last Updated 3/10/06 First thing you need to do is download sdl headers and binaries. You will find them on the sdl website, specifically on this page . Scroll Down to the Development Libraries section and download the MinGW32 development library Open gz archive and there should be a *.tar archive inside. Open the *.tar and there should be a folder side of that. Open th...
按照ffmpeg的官方指南,一步一步的做,前三步都可以。 做到第四步,运行tutorial04的时候,输入gcc -o tutorial04 tutorial04.c -lavformat -lavcodec -lz -lm -lswscale `sdl-config --cflags --libs` 报错:/usr/local/include/libavformat/avio.h:446:26: note: expected ‘struct AVIOContext *’ but argument is of type ‘struct AVIOContext **’ 求高手解答,非常感谢!