comparison src/flac113/plugin.c @ 517:5d05cefbf7ae trunk

[svn] - flac 113 plugin: get rid of old http options in ui
author giacomo
date Mon, 22 Jan 2007 09:20:08 -0800
parents 522acbb51ecc
children 221086196f89
comparison
equal deleted inserted replaced
516:522acbb51ecc 517:5d05cefbf7ae
234 flac_cfg.output.resolution.replaygain.noise_shaping = 1; 234 flac_cfg.output.resolution.replaygain.noise_shaping = 1;
235 235
236 if(!bmp_cfg_db_get_int(db, "flac", "output.resolution.replaygain.bps_out", &flac_cfg.output.resolution.replaygain.bps_out)) 236 if(!bmp_cfg_db_get_int(db, "flac", "output.resolution.replaygain.bps_out", &flac_cfg.output.resolution.replaygain.bps_out))
237 flac_cfg.output.resolution.replaygain.bps_out = 16; 237 flac_cfg.output.resolution.replaygain.bps_out = 16;
238 238
239 /* stream */
240
241 bmp_cfg_db_get_int(db, "flac", "stream.http_buffer_size", &flac_cfg.stream.http_buffer_size);
242 bmp_cfg_db_get_int(db, "flac", "stream.http_prebuffer", &flac_cfg.stream.http_prebuffer);
243 bmp_cfg_db_get_bool(db, "flac", "stream.save_http_stream", &flac_cfg.stream.save_http_stream);
244 if (!bmp_cfg_db_get_string(db, "flac", "stream.save_http_path", &flac_cfg.stream.save_http_path) ||
245 ! *flac_cfg.stream.save_http_path) {
246 /* TODO: Is this a memory leak ?? */
247 /*
248 if (flac_cfg.stream.save_http_path)
249 g_free (flac_cfg.stream.save_http_path);
250 */
251 flac_cfg.stream.save_http_path = homedir();
252 }
253 bmp_cfg_db_get_bool(db, "flac", "stream.cast_title_streaming", &flac_cfg.stream.cast_title_streaming);
254 bmp_cfg_db_get_bool(db, "flac", "stream.use_udp_channel", &flac_cfg.stream.use_udp_channel);
255
256 bmp_cfg_db_get_bool(db, NULL, "use_proxy", &flac_cfg.stream.use_proxy);
257 if(!bmp_cfg_db_get_string(db, NULL, "proxy_host", &flac_cfg.stream.proxy_host))
258 flac_cfg.stream.proxy_host = NULL;
259
260 bmp_cfg_db_get_string(db, NULL, "proxy_port", &tmp);
261 if (tmp != NULL)
262 flac_cfg.stream.proxy_port = atoi(tmp);
263
264 bmp_cfg_db_get_bool(db, NULL, "proxy_use_auth", &flac_cfg.stream.proxy_use_auth);
265 if(!bmp_cfg_db_get_string(db, NULL, "proxy_user", &flac_cfg.stream.proxy_user))
266 flac_cfg.stream.proxy_user = NULL;
267 if(!bmp_cfg_db_get_string(db, NULL, "proxy_pass", &flac_cfg.stream.proxy_pass))
268 flac_cfg.stream.proxy_pass = NULL;
269
270 bmp_cfg_db_close(db); 239 bmp_cfg_db_close(db);
271 decoder_ = FLAC__stream_decoder_new(); 240 decoder_ = FLAC__stream_decoder_new();
272 241
273 stream_data_.vfsfile = NULL; 242 stream_data_.vfsfile = NULL;
274 } 243 }
418 } 387 }
419 388
420 if (flac_cfg.title.user_char_set) { 389 if (flac_cfg.title.user_char_set) {
421 g_free(flac_cfg.title.user_char_set); 390 g_free(flac_cfg.title.user_char_set);
422 flac_cfg.title.user_char_set = NULL; 391 flac_cfg.title.user_char_set = NULL;
423 }
424
425 if (flac_cfg.stream.proxy_host) {
426 g_free(flac_cfg.stream.proxy_host);
427 flac_cfg.stream.proxy_host = NULL;
428 }
429
430 if (flac_cfg.stream.proxy_user) {
431 g_free(flac_cfg.stream.proxy_user);
432 flac_cfg.stream.proxy_user = NULL;
433
434 }
435
436 if (flac_cfg.stream.proxy_pass) {
437 g_free(flac_cfg.stream.proxy_pass);
438 flac_cfg.stream.proxy_pass = NULL;
439 } 392 }
440 393
441 safe_decoder_delete_(decoder_); 394 safe_decoder_delete_(decoder_);
442 decoder_ = 0; 395 decoder_ = 0;
443 } 396 }