- 博客(0)
- 资源 (6)
- 收藏
- 关注
LINUX下MP3播放器代码
MP3 播放器的所有代码都在里面!
#include"PlayUI.h"
extern PlayList *pl;
extern GstElement *GstPlay;
extern string strsong;
extern gchar *temp;
gboolean my_bus_callback(GstBus *bus, GstMessage *msg, gpointer data)
{
GMainLoop *loop = (GMainLoop *)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 *error;
gst_message_parse_error(msg, &error, &debug);
g_free(debug);
g_printerr("ERROR:%s\n", error->message);
g_error_free(error);
g_main_loop_quit(loop);
break;
}
case GST_MESSAGE_TAG:
{
GstTagList *tags;
gchar *title;
gchar *artist;
gst_message_parse_tag(msg,&tags);
if(gst_tag_list_get_string(tags,GST_TAG_TITLE,&title) && gst_tag_list_get_string(tags,GST_TAG_ARTIST,&artist))
{
gui_update_metadata(title,artist);
cout<<temp<<endl;
}
gst_tag_list_free(tags);
break;
}
default:
break;
}
return TRUE;
};
2013-12-17
ARM MP3播放器代码
ARM下的MP3播放器代码
#include <string.h>
//#include <stdlib.h>
#include <math.h>
#include "common.h"
//extern FILE *file_p;
extern frame_params fr_ps;
extern unsigned int frameNum;
Bit_stream_struc bs;
unsigned short *mp3_dat;
2013-12-17
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人