~thopiekar/arm-mali/libvdpau-sunxi

« back to all changes in this revision

Viewing changes to device.c

  • Committer: Jens Kuske
  • Date: 2016-02-16 13:12:22 UTC
  • Revision ID: git-v1:685769372a8281bf67046a958883323aaf14d232
Use libcedrus

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#include <string.h>
21
21
#include <unistd.h>
22
22
#include <fcntl.h>
 
23
#include <cedrus/cedrus.h>
23
24
#include "vdpau_private.h"
24
 
#include "ve.h"
25
25
 
26
26
VdpStatus vdp_imp_device_create_x11(Display *display,
27
27
                                    int screen,
38
38
        dev->display = XOpenDisplay(XDisplayString(display));
39
39
        dev->screen = screen;
40
40
 
41
 
        if (!ve_open())
 
41
        dev->cedrus = cedrus_open();
 
42
        if (!dev->cedrus)
42
43
        {
43
44
                XCloseDisplay(dev->display);
44
45
                handle_destroy(*device);
45
46
                return VDP_STATUS_ERROR;
46
47
        }
47
48
 
 
49
        VDPAU_DBG("VE version 0x%04x opened", cedrus_get_ve_version(dev->cedrus));
 
50
 
48
51
        char *env_vdpau_osd = getenv("VDPAU_OSD");
49
52
        if (env_vdpau_osd && strncmp(env_vdpau_osd, "1", 1) == 0)
50
53
        {
68
71
 
69
72
        if (dev->osd_enabled)
70
73
                close(dev->g2d_fd);
71
 
        ve_close();
 
74
        cedrus_close(dev->cedrus);
72
75
        XCloseDisplay(dev->display);
73
76
 
74
77
        handle_destroy(device);