Subversion Repositories Kolibri OS

Rev

Rev 6438 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6438 Rev 6658
Line 112... Line 112...
112
struct decoder
112
struct decoder
113
{
113
{
114
    const char     *name;
114
    const char     *name;
115
    enum AVCodecID  codec_id;
115
    enum AVCodecID  codec_id;
-
 
116
    int             profile;
116
    enum AVPixelFormat pix_fmt;
117
    enum AVPixelFormat pix_fmt;
117
    int             width;
118
    int             width;
118
    int             height;
119
    int             height;
119
    AVFrame        *Frame;
120
    AVFrame        *Frame;
120
    vframe_t       *active_frame;
121
    vframe_t       *active_frame;
-
 
122
    vframe_t        vframes[16];
121
    void           *hwctx;
123
    int             nframes;
122
    int             is_hw:1;
124
    int             is_hw:1;
-
 
125
    int             has_surfaces:1;
123
    int             frame_reorder:1;
126
    int             frame_reorder:1;
124
    int             nframes;
127
    void          (*fini)(vst_t *vst);
125
    vframe_t        vframes[16];
-
 
126
};
128
};
Line -... Line 129...
-
 
129
 
-
 
130
typedef struct decoder* decoder_init_fn(vst_t *vst);
-
 
131
struct decoder* init_va_decoder(vst_t *vst);
127
 
132
 
128
struct vstate
133
struct vstate
129
{
134
{
130
    AVFormatContext *fCtx;              /* format context           */
135
    AVFormatContext *fCtx;              /* format context           */
131
    AVCodecContext  *vCtx;              /* video decoder context    */
136
    AVCodecContext  *vCtx;              /* video decoder context    */
132
    AVCodecContext  *aCtx;              /* audio decoder context    */
137
    AVCodecContext  *aCtx;              /* audio decoder context    */
133
    AVCodec         *vCodec;            /* video codec              */
138
    AVCodec         *vCodec;            /* video codec              */
134
    AVCodec         *aCodec;            /* audio codec              */
-
 
135
    enum AVCodecID  codec_id;
-
 
136
    int             codec_profile;
139
    AVCodec         *aCodec;            /* audio codec              */
137
    char            *input_file;
140
    char            *input_file;
138
    char            *input_name;
141
    char            *input_name;
139
    int             vStream;            /* video stream index       */
142
    int             vStream;            /* video stream index       */
140
    int             aStream;            /* audio stream index       */
143
    int             aStream;            /* audio stream index       */
Line 150... Line 153...
150
    mutex_t         input_lock;
153
    mutex_t         input_lock;
151
    mutex_t         output_lock;
154
    mutex_t         output_lock;
152
    struct list_head input_list;
155
    struct list_head input_list;
153
    struct list_head output_list;
156
    struct list_head output_list;
-
 
157
    struct list_head destructor_list;
Line 154... Line 158...
154
 
158
 
155
    struct decoder *decoder;
159
    struct decoder *decoder;
156
    int             snd_format;
160
    int             snd_format;
157
    volatile int    frames_count;
161
    volatile int    frames_count;
Line 166... Line 170...
166
#define DECODER_THREAD  1
170
#define DECODER_THREAD  1
167
#define AUDIO_THREAD    2
171
#define AUDIO_THREAD    2
168
#define VIDEO_THREAD    4
172
#define VIDEO_THREAD    4
Line 169... Line 173...
169
 
173
 
170
extern int threads_running;
174
extern volatile int threads_running;
Line 171... Line 175...
171
extern astream_t astream;
175
extern astream_t astream;
172
 
176
 
173
render_t *create_render(vst_t *vst, window_t *win, uint32_t flags);
177
render_t *create_render(vst_t *vst, window_t *win, uint32_t flags);
Line 215... Line 219...
215
#define ENTER()   printf("enter %s\n",__FUNCTION__)
219
#define ENTER()   printf("enter %s\n",__FUNCTION__)
216
#define LEAVE()   printf("leave %s\n",__FUNCTION__)
220
#define LEAVE()   printf("leave %s\n",__FUNCTION__)
217
#define FAIL()    printf("fail %s\n",__FUNCTION__)
221
#define FAIL()    printf("fail %s\n",__FUNCTION__)
Line -... Line 222...
-
 
222