Mercurial > mplayer.hg
annotate libaf/af_dummy.c @ 29310:c35891e664af
replace "g" asm constraint by "erm" since "g" allows 64bit immediates while
the operator (cmp) using the "g"-constrained operand doesn't support 64bit
immediates.
Original thread:
date: Tue, Jun 2, 2009 at 11:31 AM
subject: [PATCH] Fix MPlayer to compile on Darwin/x86_86
author | gpoirier |
---|---|
date | Sun, 07 Jun 2009 14:42:43 +0000 |
parents | 0f1b5b68af32 |
children | 8fa2f43cb760 |
rev | line source |
---|---|
28229
72d0b1444141
Replace informal license notices by standard license header
diego
parents:
24888
diff
changeset
|
1 /* |
72d0b1444141
Replace informal license notices by standard license header
diego
parents:
24888
diff
changeset
|
2 * The name speaks for itself. This filter is a dummy and will |
72d0b1444141
Replace informal license notices by standard license header
diego
parents:
24888
diff
changeset
|
3 * not blow up regardless of what you do with it. |
72d0b1444141
Replace informal license notices by standard license header
diego
parents:
24888
diff
changeset
|
4 * |
72d0b1444141
Replace informal license notices by standard license header
diego
parents:
24888
diff
changeset
|
5 * This file is part of MPlayer. |
72d0b1444141
Replace informal license notices by standard license header
diego
parents:
24888
diff
changeset
|
6 * |
72d0b1444141
Replace informal license notices by standard license header
diego
parents:
24888
diff
changeset
|
7 * MPlayer is free software; you can redistribute it and/or modify |
72d0b1444141
Replace informal license notices by standard license header
diego
parents:
24888
diff
changeset
|
8 * it under the terms of the GNU General Public License as published by |
72d0b1444141
Replace informal license notices by standard license header
diego
parents:
24888
diff
changeset
|
9 * the Free Software Foundation; either version 2 of the License, or |
72d0b1444141
Replace informal license notices by standard license header
diego
parents:
24888
diff
changeset
|
10 * (at your option) any later version. |
72d0b1444141
Replace informal license notices by standard license header
diego
parents:
24888
diff
changeset
|
11 * |
72d0b1444141
Replace informal license notices by standard license header
diego
parents:
24888
diff
changeset
|
12 * MPlayer is distributed in the hope that it will be useful, |
72d0b1444141
Replace informal license notices by standard license header
diego
parents:
24888
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
72d0b1444141
Replace informal license notices by standard license header
diego
parents:
24888
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
72d0b1444141
Replace informal license notices by standard license header
diego
parents:
24888
diff
changeset
|
15 * GNU General Public License for more details. |
72d0b1444141
Replace informal license notices by standard license header
diego
parents:
24888
diff
changeset
|
16 * |
72d0b1444141
Replace informal license notices by standard license header
diego
parents:
24888
diff
changeset
|
17 * You should have received a copy of the GNU General Public License along |
72d0b1444141
Replace informal license notices by standard license header
diego
parents:
24888
diff
changeset
|
18 * with MPlayer; if not, write to the Free Software Foundation, Inc., |
72d0b1444141
Replace informal license notices by standard license header
diego
parents:
24888
diff
changeset
|
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
72d0b1444141
Replace informal license notices by standard license header
diego
parents:
24888
diff
changeset
|
20 */ |
72d0b1444141
Replace informal license notices by standard license header
diego
parents:
24888
diff
changeset
|
21 |
7568 | 22 #include <stdio.h> |
23 #include <stdlib.h> | |
24 #include <string.h> | |
25 | |
26 #include "af.h" | |
27 | |
28 // Initialization and runtime control | |
29 static int control(struct af_instance_s* af, int cmd, void* arg) | |
30 { | |
31 switch(cmd){ | |
32 case AF_CONTROL_REINIT: | |
33 memcpy(af->data,(af_data_t*)arg,sizeof(af_data_t)); | |
29049 | 34 mp_msg(MSGT_AFILTER, MSGL_V, "[dummy] Was reinitialized: %iHz/%ich/%s\n", |
14816 | 35 af->data->rate,af->data->nch,af_fmt2str_short(af->data->format)); |
7568 | 36 return AF_OK; |
37 } | |
38 return AF_UNKNOWN; | |
39 } | |
40 | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
29049
diff
changeset
|
41 // Deallocate memory |
7568 | 42 static void uninit(struct af_instance_s* af) |
43 { | |
44 if(af->data) | |
45 free(af->data); | |
46 } | |
47 | |
48 // Filter data through filter | |
49 static af_data_t* play(struct af_instance_s* af, af_data_t* data) | |
50 { | |
51 // Do something necessary to get rid of annoying warning during compile | |
52 if(!af) | |
29049 | 53 mp_msg(MSGT_AFILTER, MSGL_ERR, "EEEK: Argument af == NULL in af_dummy.c play()."); |
7568 | 54 return data; |
55 } | |
56 | |
57 // Allocate memory and set function pointers | |
22746
fd6f824ef894
Rename open to af_open so as not to conflict with a previous header definition.
diego
parents:
14816
diff
changeset
|
58 static int af_open(af_instance_t* af){ |
7568 | 59 af->control=control; |
60 af->uninit=uninit; | |
61 af->play=play; | |
24888 | 62 af->mul=1; |
7568 | 63 af->data=malloc(sizeof(af_data_t)); |
64 if(af->data == NULL) | |
65 return AF_ERROR; | |
66 return AF_OK; | |
67 } | |
68 | |
69 // Description of this filter | |
70 af_info_t af_info_dummy = { | |
71 "dummy", | |
72 "dummy", | |
73 "Anders", | |
74 "", | |
7615 | 75 AF_FLAGS_REENTRANT, |
22746
fd6f824ef894
Rename open to af_open so as not to conflict with a previous header definition.
diego
parents:
14816
diff
changeset
|
76 af_open |
7568 | 77 }; |