xref: /OK3568_Linux_fs/app/forlinx/flapp/src/plugins/allwinner/music/common/commonfunction.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*!
2  * @file src/commonfunction.h
3  * Copyright (c) 2018
4  * @brief des
5  * detailed des
6  *
7  * @date 2018
8  * @author lee
9  */
10 #ifndef COMMONFUNCTION_H
11 #define COMMONFUNCTION_H
12 #include <QString>
13 #include <QWidget>
14 #include <QDebug>
15 //for linux operation
16 #include <stdio.h>
17 #include <stdlib.h>
18 #include <unistd.h>
19 #include <fcntl.h>
20 //for media
21 #include "AutPlayer.h"
22 #include "outputCtrl.h"
23 #include "mediaInfo.h"
24 using namespace android;
25 
26 enum PLAYSTATE{
27     PLAYING = 1,
28     PAUSEED = 2,
29     STOPPED = 3,
30     PREPARED = 4,
31     PREPARING = 5,
32     SEEKING = 6
33 };
34 
35 class CommonFunction
36 {
37 public:
38     CommonFunction();
39     bool fileExistOrNot(QString path);
40     bool video_support_or_not(QWidget* parent_widget,QString path);
41     QString print_info(unsigned char tmp[],int tmp2);
42     int autCb_func(int32_t msgType, void *user,void* data,int len);
43 };
44 
45 QString getTimeStr(qint64 x,qint64 range);
46 int autCb_func(int msgType, void *user,void* data,int len);
47 QString UTF82GBK(const QString &inStr);
48 
49 #endif // COMMONFUNCTION_H
50