随笔分类 - linux
摘要:还是基于Gstreamer的,在Linux下的比较简单的媒体播放器,代码如下:main.c/*
*main.c *Simple media player based on Gstreamer and GTK
*/
#include <gst/gst.h>
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
#include <gst/interfaces/xoverlay.h>
#include <string.h> #include "main.h" static GtkWidg
阅读全文
摘要:安装Gstreamer插件,配置好环境,代码如下:/*myplayer.c*/
#include <gtk/gtk.h>
#include <gst/gst.h>
#include <signal.h>
#include <string.h> GstElement *pipeline, *source,*decoder,*sink;
GMainLoop *loop = NULL; //暂停恢复开关按钮回调
void toggle_button_callback(GtkWidget *widget,gpointer data)
{ if(gtk_t
阅读全文
浙公网安备 33010602011771号