void stream_encoder::set_config(const dsp_preset&p_data){ edcastGlobals*cfg=(edcastGlobals*)p_data.get_data(); config->currentBitrate=cfg->currentBitrate; config->currentSamplerate=cfg->currentSamplerate; config->currentChannels=cfg->currentChannels; config->currentSamplerate=cfg->currentSamplerate; config->gOggBitQualFlag=cfg->gOggBitQualFlag; config->gReconnectSec=cfg->gReconnectSec; config->gShoutcastFlag=cfg->gShoutcastFlag; config->gIcecast2Flag=cfg->gIcecast2Flag; config->gPubServ=cfg->gPubServ; strcpy(config->gEncodeType,cfg->gEncodeType); strcpy(config->gOggQuality,cfg->gOggQuality); strcpy(config->gMountpoint,cfg->gMountpoint); strcpy(config->gPassword,cfg->gPassword); strcpy(config->gServer, cfg->gServer); strcpy(config->gPort, cfg->gPort); strcpy(config->gServerType,cfg->gServerType); strcpy(config->gServDesc,cfg->gServDesc); strcpy(config->gServName,cfg->gServName); strcpy(config->gServGenre,cfg->gServGenre); strcpy(config->gServURL,cfg->gServURL); strcpy(config->gServAIM,cfg->gServAIM); strcpy(config->gServICQ,cfg->gServICQ); strcpy(config->gServIRC,cfg->gServIRC); // disconnect(); // connect(); }
bool stream_encoder::can_attach(const dsp_preset&p_data){ edcastGlobals*cfg=(edcastGlobals*)p_data.get_data(); bool hax=true; hax&=!strcmp(config->gMountpoint,cfg->gMountpoint); hax&=!strcmp(config->gPassword,cfg->gPassword); hax&=!strcmp(config->gServer,cfg->gServer); hax&=!strcmp(config->gPort,cfg->gPort); return hax; }
bool dsp_entry_v2::show_config_popup(dsp_preset & p_data,HWND p_parent) { PFC_ASSERT(p_data.get_owner() == get_guid()); dsp_preset_impl temp(p_data); show_config_popup_v2(p_data,p_parent,dsp_preset_edit_callback_impl(temp)); PFC_ASSERT(temp.get_owner() == get_guid()); if (temp == p_data) return false; p_data = temp; return true; }
bool dsp_rate_entry::instantiate(service_ptr_t<dsp>& p_out, const dsp_preset& p_preset) { bool ret = false; if (p_preset.get_owner() == get_guid()) { t_dsp_rate_params params; params.set_data(p_preset); p_out = reinterpret_cast<dsp*>(new service_impl_t<dsp_rate>(params)); ret = p_out.is_valid(); } return ret; }
void dsp_entry::g_show_config_popup_v2(const dsp_preset & p_preset,HWND p_parent,dsp_preset_edit_callback & p_callback) { service_ptr_t<dsp_entry> entry; if (g_get_interface(entry,p_preset.get_owner())) { service_ptr_t<dsp_entry_v2> entry_v2; if (entry->service_query_t(entry_v2)) { entry_v2->show_config_popup_v2(p_preset,p_parent,p_callback); } else { dsp_preset_impl temp(p_preset); if (entry->show_config_popup(temp,p_parent)) p_callback.on_preset_changed(temp); } } }
bool dsp_entry::g_instantiate(service_ptr_t<dsp> & p_out,const dsp_preset & p_preset) { service_ptr_t<dsp_entry> ptr; if (!g_get_interface(ptr,p_preset.get_owner())) return false; return ptr->instantiate(p_out,p_preset); }
bool dsp_entry::g_show_config_popup(dsp_preset & p_preset,HWND p_parent) { service_ptr_t<dsp_entry> entry; if (!g_get_interface(entry,p_preset.get_owner())) return false; return entry->show_config_popup(p_preset,p_parent); }
bool dsp_entry::g_have_config_popup(const dsp_preset & p_preset) { return g_have_config_popup(p_preset.get_owner()); }