annotate vidix/vidixlib.c @ 22857:77def5093daf

switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
author ben
date Sun, 01 Apr 2007 11:06:06 +0000
parents fa99b3d31d13
children 441582f3ed87
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
1 /*
dcc632dd2097 preliminary version
nick
parents:
diff changeset
2 * vidixlib.c
dcc632dd2097 preliminary version
nick
parents:
diff changeset
3 * VIDIXLib - Library for VIDeo Interface for *niX
dcc632dd2097 preliminary version
nick
parents:
diff changeset
4 * This interface is introduced as universal one to MPEG decoder,
dcc632dd2097 preliminary version
nick
parents:
diff changeset
5 * BES == Back End Scaler and YUV2RGB hw accelerators.
dcc632dd2097 preliminary version
nick
parents:
diff changeset
6 * In the future it may be expanded up to capturing and audio things.
dcc632dd2097 preliminary version
nick
parents:
diff changeset
7 * Main goal of this this interface imlpementation is providing DGA
dcc632dd2097 preliminary version
nick
parents:
diff changeset
8 * everywhere where it's possible (unlike X11 and other).
dcc632dd2097 preliminary version
nick
parents:
diff changeset
9 * Copyright 2002 Nick Kurshev
dcc632dd2097 preliminary version
nick
parents:
diff changeset
10 * Licence: GPL
dcc632dd2097 preliminary version
nick
parents:
diff changeset
11 * This interface is based on v4l2, fbvid.h, mga_vid.h projects
dcc632dd2097 preliminary version
nick
parents:
diff changeset
12 * and personally my ideas.
dcc632dd2097 preliminary version
nick
parents:
diff changeset
13 * NOTE: This interface is introduces as APP interface.
dcc632dd2097 preliminary version
nick
parents:
diff changeset
14 * Don't use it for driver.
dcc632dd2097 preliminary version
nick
parents:
diff changeset
15 * It provides multistreaming. This mean that APP can handle
dcc632dd2097 preliminary version
nick
parents:
diff changeset
16 * several streams simultaneously. (Example: Video capturing and video
dcc632dd2097 preliminary version
nick
parents:
diff changeset
17 * playback or capturing, video playback, audio encoding and so on).
dcc632dd2097 preliminary version
nick
parents:
diff changeset
18 */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
19 #include <stdlib.h>
dcc632dd2097 preliminary version
nick
parents:
diff changeset
20 #include <stdio.h>
dcc632dd2097 preliminary version
nick
parents:
diff changeset
21 #include <errno.h>
dcc632dd2097 preliminary version
nick
parents:
diff changeset
22 #include <string.h>
dcc632dd2097 preliminary version
nick
parents:
diff changeset
23
dcc632dd2097 preliminary version
nick
parents:
diff changeset
24 #include "vidixlib.h"
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
25 #include "drivers.h"
21372
1767c271d710 Remove bswap.h, use libavutil/bswap.h instead.
diego
parents: 21371
diff changeset
26 #include "../config.h"
1767c271d710 Remove bswap.h, use libavutil/bswap.h instead.
diego
parents: 21371
diff changeset
27 #include "../libavutil/common.h"
21507
fa99b3d31d13 Hack around libavutil/bswap.h compilation problems due to always_inline undefined.
reimar
parents: 21372
diff changeset
28 #include "../mpbswap.h"
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
29
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
30 extern unsigned int vdlGetVersion( void )
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
31 {
dcc632dd2097 preliminary version
nick
parents:
diff changeset
32 return VIDIX_VERSION;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
33 }
dcc632dd2097 preliminary version
nick
parents:
diff changeset
34
3995
0d9de811e312 minor interface changing
nick
parents: 3991
diff changeset
35 VDL_HANDLE vdlOpen(const char *path,const char *name,unsigned cap,int verbose)
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
36 {
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
37 VDXContext *ctx;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
38
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
39 if (!(ctx = malloc (sizeof (VDXContext))))
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
40 return NULL;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
41 memset (ctx, 0, sizeof (VDXContext));
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
42
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
43 /* register all drivers */
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
44 vidix_register_all_drivers ();
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
45
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
46 if (!vidix_find_driver (ctx, name, cap, verbose))
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
47 {
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
48 free (ctx);
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
49 return NULL;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
50 }
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
51
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
52 if (verbose)
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
53 printf ("vidixlib: will use %s driver\n", ctx->drv->name);
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
54
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
55 if (!ctx->drv || !ctx->drv->init)
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
56 {
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
57 if (verbose)
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
58 printf ("vidixlib: Can't init driver\n");
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
59 free (ctx);
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
60 return NULL;
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
61 }
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
62
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
63 if (verbose)
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
64 printf ("vidixlib: Attempt to initialize driver at: %p\n",
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
65 ctx->drv->init);
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
66
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
67 if (ctx->drv->init () !=0)
4011
ca163699151f lazy loader works better ;)
nick
parents: 4008
diff changeset
68 {
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
69 if (verbose)
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
70 printf ("vidixlib: Can't init driver\n");
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
71 free (ctx);
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
72 return NULL;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
73 }
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
74
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
75 if (verbose)
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
76 printf("vidixlib: '%s'successfully loaded\n", ctx->drv->name);
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
77
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
78 return ctx;
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
79 }
dcc632dd2097 preliminary version
nick
parents:
diff changeset
80
dcc632dd2097 preliminary version
nick
parents:
diff changeset
81 void vdlClose(VDL_HANDLE stream)
dcc632dd2097 preliminary version
nick
parents:
diff changeset
82 {
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
83 VDXContext *ctx;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
84
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
85 ctx = (VDXContext *) stream;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
86 if (ctx->drv->destroy)
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
87 ctx->drv->destroy ();
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
88
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
89 memset (ctx, 0, sizeof (VDXContext)); /* <- it's not stupid */
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
90 free (ctx);
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
91 }
dcc632dd2097 preliminary version
nick
parents:
diff changeset
92
dcc632dd2097 preliminary version
nick
parents:
diff changeset
93 int vdlGetCapability(VDL_HANDLE handle, vidix_capability_t *cap)
dcc632dd2097 preliminary version
nick
parents:
diff changeset
94 {
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
95 VDXContext *ctx;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
96
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
97 ctx = (VDXContext *) handle;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
98 return ctx->drv->get_caps (cap);
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
99 }
dcc632dd2097 preliminary version
nick
parents:
diff changeset
100
4539
fcd6e49cb3cc mplayer has swapped RGB's fourcc :(
nick
parents: 4509
diff changeset
101 #define MPLAYER_IMGFMT_RGB (('R'<<24)|('G'<<16)|('B'<<8))
fcd6e49cb3cc mplayer has swapped RGB's fourcc :(
nick
parents: 4509
diff changeset
102 #define MPLAYER_IMGFMT_BGR (('B'<<24)|('G'<<16)|('R'<<8))
fcd6e49cb3cc mplayer has swapped RGB's fourcc :(
nick
parents: 4509
diff changeset
103 #define MPLAYER_IMGFMT_RGB_MASK 0xFFFFFF00
fcd6e49cb3cc mplayer has swapped RGB's fourcc :(
nick
parents: 4509
diff changeset
104
4547
nick
parents: 4539
diff changeset
105 static uint32_t normalize_fourcc(uint32_t fourcc)
4539
fcd6e49cb3cc mplayer has swapped RGB's fourcc :(
nick
parents: 4509
diff changeset
106 {
fcd6e49cb3cc mplayer has swapped RGB's fourcc :(
nick
parents: 4509
diff changeset
107 if((fourcc & MPLAYER_IMGFMT_RGB_MASK) == (MPLAYER_IMGFMT_RGB|0) ||
fcd6e49cb3cc mplayer has swapped RGB's fourcc :(
nick
parents: 4509
diff changeset
108 (fourcc & MPLAYER_IMGFMT_RGB_MASK) == (MPLAYER_IMGFMT_BGR|0))
fcd6e49cb3cc mplayer has swapped RGB's fourcc :(
nick
parents: 4509
diff changeset
109 return bswap_32(fourcc);
fcd6e49cb3cc mplayer has swapped RGB's fourcc :(
nick
parents: 4509
diff changeset
110 else return fourcc;
fcd6e49cb3cc mplayer has swapped RGB's fourcc :(
nick
parents: 4509
diff changeset
111 }
fcd6e49cb3cc mplayer has swapped RGB's fourcc :(
nick
parents: 4509
diff changeset
112
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
113 int vdlQueryFourcc(VDL_HANDLE handle,vidix_fourcc_t *f)
dcc632dd2097 preliminary version
nick
parents:
diff changeset
114 {
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
115 VDXContext *ctx;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
116
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
117 ctx = (VDXContext *) handle;
4547
nick
parents: 4539
diff changeset
118 f->fourcc = normalize_fourcc(f->fourcc);
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
119 return ctx->drv->query_fourcc (f);
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
120 }
dcc632dd2097 preliminary version
nick
parents:
diff changeset
121
3995
0d9de811e312 minor interface changing
nick
parents: 3991
diff changeset
122 int vdlConfigPlayback(VDL_HANDLE handle,vidix_playback_t *p)
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
123 {
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
124 VDXContext *ctx;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
125
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
126 ctx = (VDXContext *) handle;
4547
nick
parents: 4539
diff changeset
127 p->fourcc = normalize_fourcc(p->fourcc);
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
128 return ctx->drv->config_playback (p);
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
129 }
dcc632dd2097 preliminary version
nick
parents:
diff changeset
130
dcc632dd2097 preliminary version
nick
parents:
diff changeset
131 int vdlPlaybackOn(VDL_HANDLE handle)
dcc632dd2097 preliminary version
nick
parents:
diff changeset
132 {
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
133 VDXContext *ctx;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
134
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
135 ctx = (VDXContext *) handle;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
136 return ctx->drv->playback_on ();
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
137 }
dcc632dd2097 preliminary version
nick
parents:
diff changeset
138
dcc632dd2097 preliminary version
nick
parents:
diff changeset
139 int vdlPlaybackOff(VDL_HANDLE handle)
dcc632dd2097 preliminary version
nick
parents:
diff changeset
140 {
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
141 VDXContext *ctx;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
142
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
143 ctx = (VDXContext *) handle;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
144 return ctx->drv->playback_off ();
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
145 }
dcc632dd2097 preliminary version
nick
parents:
diff changeset
146
dcc632dd2097 preliminary version
nick
parents:
diff changeset
147 int vdlPlaybackFrameSelect(VDL_HANDLE handle, unsigned frame_idx )
dcc632dd2097 preliminary version
nick
parents:
diff changeset
148 {
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
149 VDXContext *ctx;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
150
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
151 ctx = (VDXContext *) handle;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
152 if (ctx->drv->frame_sel)
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
153 return ctx->drv->frame_sel (frame_idx);
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
154
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
155 return ENOSYS;
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
156 }
dcc632dd2097 preliminary version
nick
parents:
diff changeset
157
dcc632dd2097 preliminary version
nick
parents:
diff changeset
158 int vdlPlaybackGetEq(VDL_HANDLE handle, vidix_video_eq_t * e)
dcc632dd2097 preliminary version
nick
parents:
diff changeset
159 {
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
160 VDXContext *ctx;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
161
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
162 ctx = (VDXContext *) handle;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
163 if (ctx->drv->get_eq)
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
164 return ctx->drv->get_eq (e);
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
165
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
166 return ENOSYS;
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
167 }
dcc632dd2097 preliminary version
nick
parents:
diff changeset
168
dcc632dd2097 preliminary version
nick
parents:
diff changeset
169 int vdlPlaybackSetEq(VDL_HANDLE handle, const vidix_video_eq_t * e)
dcc632dd2097 preliminary version
nick
parents:
diff changeset
170 {
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
171 VDXContext *ctx;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
172
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
173 ctx = (VDXContext *) handle;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
174 if (ctx->drv->set_eq)
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
175 return ctx->drv->set_eq (e);
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
176
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
177 return ENOSYS;
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
178 }
dcc632dd2097 preliminary version
nick
parents:
diff changeset
179
dcc632dd2097 preliminary version
nick
parents:
diff changeset
180 int vdlPlaybackCopyFrame(VDL_HANDLE handle, const vidix_dma_t * f)
dcc632dd2097 preliminary version
nick
parents:
diff changeset
181 {
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
182 VDXContext *ctx;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
183
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
184 ctx = (VDXContext *) handle;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
185 if (ctx->drv->copy_frame)
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
186 return ctx->drv->copy_frame (f);
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
187
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
188 return ENOSYS;
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
189 }
4070
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4011
diff changeset
190
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4011
diff changeset
191 int vdlGetGrKeys(VDL_HANDLE handle, vidix_grkey_t * k)
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4011
diff changeset
192 {
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
193 VDXContext *ctx;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
194
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
195 ctx = (VDXContext *) handle;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
196 if (ctx->drv->get_gkey)
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
197 return ctx->drv->get_gkey (k);
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
198
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
199 return ENOSYS;
4070
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4011
diff changeset
200 }
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4011
diff changeset
201
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4011
diff changeset
202 int vdlSetGrKeys(VDL_HANDLE handle, const vidix_grkey_t * k)
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4011
diff changeset
203 {
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
204 VDXContext *ctx;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
205
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
206 ctx = (VDXContext *) handle;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
207 if (ctx->drv->set_gkey)
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
208 return ctx->drv->set_gkey (k);
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
209
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
210 return ENOSYS;
4070
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4011
diff changeset
211 }
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
212
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
213 int vdlPlaybackGetDeint(VDL_HANDLE handle, vidix_deinterlace_t * d)
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
214 {
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
215 VDXContext *ctx;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
216
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
217 ctx = (VDXContext *) handle;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
218 if (ctx->drv->get_deint)
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
219 return ctx->drv->get_deint (d);
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
220
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
221 return ENOSYS;
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
222 }
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
223
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
224 int vdlPlaybackSetDeint(VDL_HANDLE handle, const vidix_deinterlace_t * d)
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
225 {
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
226 VDXContext *ctx;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
227
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
228 ctx = (VDXContext *) handle;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
229 if (ctx->drv->set_deint)
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
230 return ctx->drv->set_deint (d);
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
231
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
232 return ENOSYS;
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
233 }
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
234
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
235 int vdlQueryNumOemEffects(VDL_HANDLE handle, unsigned * number )
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
236 {
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
237 VDXContext *ctx;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
238
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
239 ctx = (VDXContext *) handle;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
240 if (ctx->drv->get_num_fx)
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
241 return ctx->drv->get_num_fx (number);
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
242
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
243 return ENOSYS;
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
244 }
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
245
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
246 int vdlGetOemEffect(VDL_HANDLE handle, vidix_oem_fx_t * f)
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
247 {
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
248 VDXContext *ctx;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
249
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
250 ctx = (VDXContext *) handle;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
251 if (ctx->drv->get_fx)
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
252 return ctx->drv->get_fx (f);
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
253
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
254 return ENOSYS;
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
255 }
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
256
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
257 int vdlSetOemEffect(VDL_HANDLE handle, const vidix_oem_fx_t * f)
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
258 {
22857
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
259 VDXContext *ctx;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
260
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
261 ctx = (VDXContext *) handle;
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
262 if (ctx->drv->set_fx)
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
263 return ctx->drv->set_fx (f);
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
264
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents: 21507
diff changeset
265 return ENOSYS;
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
266 }