Subversion Repositories Kolibri OS

Rev

Rev 6121 | Rev 6135 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6121 Rev 6133
Line 1... Line 1...
1
#include 
1
#include 
2
#include "pixlib3.h"
2
#include 
-
 
3
#include "list.h"
Line 3... Line 4...
3
 
4
 
4
#define BLACK_MAGIC_SOUND
5
#define BLACK_MAGIC_SOUND
Line 5... Line 6...
5
#define BLACK_MAGIC_VIDEO
6
#define BLACK_MAGIC_VIDEO
Line 16... Line 17...
16
#define HAS_BOTTOM      (1<<3)
17
#define HAS_BOTTOM      (1<<3)
17
 
18
 
Line 18... Line 19...
18
typedef struct
19
typedef struct
19
{
20
{
-
 
21
    struct list_head list;
20
    enum AVPixelFormat format;
22
    enum AVPixelFormat format;
21
    AVPicture     picture;
23
    AVPicture     picture;
-
 
24
    planar_t*     planar;
-
 
25
    int           is_hw_pic;
22
    int           planar;
26
    int           index;
23
    double        pts;
27
    double        pts;
-
 
28
    double        pkt_pts;
-
 
29
    double        pkt_dts;
24
    volatile int  ready;
30
    volatile int  ready;
25
}vframe_t;
31
}vframe_t;
Line 26... Line 32...
26
 
32
 
27
struct render
33
struct render
Line 51... Line 57...
51
    enum{
57
    enum{
52
      EMPTY, INIT }state;
58
      EMPTY, INIT }state;
53
    enum win_state win_state;
59
    enum win_state win_state;
54
 
60
 
Line 55... Line 61...
55
    void (*draw)(render_t *render, AVPicture *picture);
61
    void (*draw)(render_t *render, vframe_t *vframe);
56
};
62
};
Line 57... Line 63...
57
 
63
 
58
enum player_state
64
enum player_state
59
{
65
{
Line 103... Line 109...
103
 
109
 
Line 104... Line 110...
104
int put_packet(queue_t *q, AVPacket *pkt);
110
int put_packet(queue_t *q, AVPacket *pkt);
105
int get_packet(queue_t *q, AVPacket *pkt);
111
int get_packet(queue_t *q, AVPacket *pkt);
Line -... Line 112...
-
 
112
 
106
 
113
#define HWDEC_NUM_SURFACES  16
107
struct vstate
114
struct vstate
108
{
115
{
109
    AVFormatContext *fCtx;      /* format context           */
116
    AVFormatContext *fCtx;          /* format context           */
110
    AVCodecContext  *vCtx;      /* video decoder context    */
117
    AVCodecContext  *vCtx;          /* video decoder context    */
Line 117... Line 124...
117
    queue_t         q_video;    /* video packets queue      */
124
    queue_t         q_video;        /* video packets queue      */
118
    queue_t         q_audio;    /* audio packets queue      */
125
    queue_t         q_audio;        /* audio packets queue      */
Line 119... Line 126...
119
 
126
 
-
 
127
    mutex_t         gpu_lock;       /* gpu access lock. libdrm not yet thread safe :( */
Line 120... Line 128...
120
    mutex_t         gpu_lock;   /* gpu access lock. libdrm not yet thread safe :( */
128
    mutex_t         decoder_lock;
121
 
129
 
-
 
130
    mutex_t         input_lock;
-
 
131
    mutex_t         output_lock;
-
 
132
    struct list_head input_list;
122
    vframe_t        vframe[4];  /* decoder workset          */
133
    struct list_head output_list;
123
    int             vfx;        /* index of decoded frame   */
134
 
124
    int             dfx;        /* index of renderd frame   */
135
    vframe_t       *decoder_frame;
125
    void           *hwCtx;      /* hardware context         */
136
    void           *hwCtx;          /* hardware context         */
Line 163... Line 174...
163
    "int $0x40"
174
    "int $0x40"
164
    ::"a"(68),"b"(14),"c"(event));
175
    ::"a"(68),"b"(14),"c"(event));
165
}
176
}
166
 
177
 
Line 167... Line 178...
167
void va_convert_picture(vst_t *vst, int width, int height, AVPicture *pic);
178
void va_create_planar(vst_t *vst, vframe_t *vframe);
Line 168... Line 179...
168
 
179
 
169
int init_fontlib();
180
int init_fontlib();