Mercurial > audlegacy-plugins
comparison src/vorbis/vorbis.c @ 1078:094fa3026e3d trunk
[svn] - vorbis: transition to plugin API v2
author | nenolod |
---|---|
date | Thu, 24 May 2007 16:14:36 -0700 |
parents | 18dd1dd2d232 |
children | c1e1c894fa0b |
comparison
equal
deleted
inserted
replaced
1077:247737fdf8ce | 1078:094fa3026e3d |
---|---|
96 gchar *vorbis_fmts[] = { "ogg", "ogm", NULL }; | 96 gchar *vorbis_fmts[] = { "ogg", "ogm", NULL }; |
97 | 97 |
98 InputPlugin vorbis_ip = { | 98 InputPlugin vorbis_ip = { |
99 NULL, | 99 NULL, |
100 NULL, | 100 NULL, |
101 NULL, /* description */ | 101 "Ogg Vorbis Audio Plugin", /* description */ |
102 vorbis_init, /* init */ | 102 vorbis_init, /* init */ |
103 vorbis_aboutbox, /* aboutbox */ | 103 vorbis_aboutbox, /* aboutbox */ |
104 vorbis_configure, /* configure */ | 104 vorbis_configure, /* configure */ |
105 vorbis_check_file, /* is_our_file */ | 105 vorbis_check_file, /* is_our_file */ |
106 NULL, | 106 NULL, |
124 NULL, | 124 NULL, |
125 NULL, | 125 NULL, |
126 vorbis_check_fd, | 126 vorbis_check_fd, |
127 vorbis_fmts, | 127 vorbis_fmts, |
128 }; | 128 }; |
129 | |
130 InputPlugin *vorbis_iplist[] = { &vorbis_ip, NULL }; | |
131 | |
132 DECLARE_PLUGIN(vorbis, NULL, NULL, vorbis_iplist, NULL, NULL, NULL, NULL); | |
129 | 133 |
130 static OggVorbis_File vf; | 134 static OggVorbis_File vf; |
131 | 135 |
132 static GThread *thread; | 136 static GThread *thread; |
133 static int vorbis_is_streaming = 0; | 137 static int vorbis_is_streaming = 0; |
135 static volatile int seekneeded = -1; | 139 static volatile int seekneeded = -1; |
136 static int samplerate, channels; | 140 static int samplerate, channels; |
137 GMutex *vf_mutex; | 141 GMutex *vf_mutex; |
138 | 142 |
139 gchar **vorbis_tag_encoding_list = NULL; | 143 gchar **vorbis_tag_encoding_list = NULL; |
140 | |
141 InputPlugin * | |
142 get_iplugin_info(void) | |
143 { | |
144 vorbis_ip.description = g_strdup_printf(_("Ogg Vorbis Audio Plugin")); | |
145 return &vorbis_ip; | |
146 } | |
147 | 144 |
148 static int | 145 static int |
149 vorbis_check_file(char *filename) | 146 vorbis_check_file(char *filename) |
150 { | 147 { |
151 VFSFile *stream; | 148 VFSFile *stream; |