ati_hack only makes sense when PBOs are used, not with mesa_buffer.
[mplayer/glamo.git] / libaf / af_dummy.c
blob3136dbb00f8787fb95e0fb1c8e4b5593d123ff93
1 /* The name speaks for itself this filter is a dummy and will not blow
2 up regardless of what you do with it. */
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <string.h>
7 #include "af.h"
9 // Initialization and runtime control
10 static int control(struct af_instance_s* af, int cmd, void* arg)
12 switch(cmd){
13 case AF_CONTROL_REINIT:
14 memcpy(af->data,(af_data_t*)arg,sizeof(af_data_t));
15 af_msg(AF_MSG_VERBOSE,"[dummy] Was reinitialized: %iHz/%ich/%s\n",
16 af->data->rate,af->data->nch,af_fmt2str_short(af->data->format));
17 return AF_OK;
19 return AF_UNKNOWN;
22 // Deallocate memory
23 static void uninit(struct af_instance_s* af)
25 if(af->data)
26 free(af->data);
29 // Filter data through filter
30 static af_data_t* play(struct af_instance_s* af, af_data_t* data)
32 // Do something necessary to get rid of annoying warning during compile
33 if(!af)
34 af_msg(AF_MSG_ERROR,"EEEK: Argument af == NULL in af_dummy.c play().");
35 return data;
38 // Allocate memory and set function pointers
39 static int af_open(af_instance_t* af){
40 af->control=control;
41 af->uninit=uninit;
42 af->play=play;
43 af->mul=1;
44 af->data=malloc(sizeof(af_data_t));
45 if(af->data == NULL)
46 return AF_ERROR;
47 return AF_OK;
50 // Description of this filter
51 af_info_t af_info_dummy = {
52 "dummy",
53 "dummy",
54 "Anders",
55 "",
56 AF_FLAGS_REENTRANT,
57 af_open