~ubuntu-branches/ubuntu/natty/vlc/natty

« back to all changes in this revision

Viewing changes to modules/codec/avcodec/va.h

  • Committer: Bazaar Package Importer
  • Author(s): Benjamin Drung
  • Date: 2010-06-25 01:09:16 UTC
  • mfrom: (1.1.30 upstream)
  • Revision ID: james.westby@ubuntu.com-20100625010916-asxhep2mutg6g6pd
Tags: 1.1.0-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - build and install the libx264 plugin
  - add Xb-Npp header to vlc package
  - Add apport hook to include more vlc dependencies in bug reports
* Drop xulrunner patches.
* Drop 502_xulrunner_191.diff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************************
 
2
 * va.h: Video Acceleration API for avcodec
 
3
 *****************************************************************************
 
4
 * Copyright (C) 2009 Laurent Aimar
 
5
 * $Id: 6cb5bf48148d30795ebdd87e922141b71c3c6025 $
 
6
 *
 
7
 * Authors: Laurent Aimar <fenrir_AT_ videolan _DOT_ org>
 
8
 *
 
9
 * This program is free software; you can redistribute it and/or modify
 
10
 * it under the terms of the GNU General Public License as published by
 
11
 * the Free Software Foundation; either version 2 of the License, or
 
12
 * (at your option) any later version.
 
13
 *
 
14
 * This program is distributed in the hope that it will be useful,
 
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
 * GNU General Public License for more details.
 
18
 *
 
19
 * You should have received a copy of the GNU General Public License
 
20
 * along with this program; if not, write to the Free Software
 
21
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 
22
 *****************************************************************************/
 
23
 
 
24
#ifndef _VLC_VA_H
 
25
#define _VLC_VA_H 1
 
26
 
 
27
typedef struct vlc_va_t vlc_va_t;
 
28
struct vlc_va_t {
 
29
    char *description;
 
30
 
 
31
    int  (*setup)(vlc_va_t *, void **hw, vlc_fourcc_t *output,
 
32
                  int width, int height);
 
33
    int  (*get)(vlc_va_t *, AVFrame *frame);
 
34
    void (*release)(vlc_va_t *, AVFrame *frame);
 
35
    int  (*extract)(vlc_va_t *, picture_t *dst, AVFrame *src);
 
36
    void (*close)(vlc_va_t *);
 
37
};
 
38
 
 
39
static inline int vlc_va_Setup(vlc_va_t *va, void **hw, vlc_fourcc_t *output,
 
40
                                int width, int height)
 
41
{
 
42
    return va->setup(va, hw, output, width, height);
 
43
}
 
44
static inline int vlc_va_Get(vlc_va_t *va, AVFrame *frame)
 
45
{
 
46
    return va->get(va, frame);
 
47
}
 
48
static inline void vlc_va_Release(vlc_va_t *va, AVFrame *frame)
 
49
{
 
50
    va->release(va, frame);
 
51
}
 
52
static inline int vlc_va_Extract(vlc_va_t *va, picture_t *dst, AVFrame *src)
 
53
{
 
54
    return va->extract(va, dst, src);
 
55
}
 
56
static inline void vlc_va_Delete(vlc_va_t *va)
 
57
{
 
58
    va->close(va);
 
59
}
 
60
 
 
61
vlc_va_t *vlc_va_NewVaapi(int codec_id);
 
62
vlc_va_t *vlc_va_NewDxva2(vlc_object_t *log, int codec_id);
 
63
 
 
64
#endif
 
65