Aautomix::Aautomix(QIID qiid, char *name, AeffectInfo *info, Acapsule *capsule) : Aeffect(qiid, name, info, capsule) { image[0]=new Abitmap(getVideoWidth(), getVideoHeight()); image[1]=new Abitmap(getVideoWidth(), getVideoHeight()); front=new AautomixFront(qiid, "automix front", this, 48); front->setTooltips("automix"); back=new AautomixBack(qiid, "automix back", this, 48); back->setTooltips("automix"); settings(false); }
Aflashp::Aflashp(QIID qiid, char *name, AeffectInfo *info, Acapsule *capsule) : Aeffect(qiid, name, info, capsule) { swf=null; init(); // global init text=strdup("ELEKTRONIKA LIVE"); front=new AflashFront(qiid, "flash front", this, 50); front->setTooltips("flash module"); back=new AflashBack(qiid, "flash back", this, 50); back->setTooltips("flash module"); //wflash=new Awflash(this, "flash", 400, 0, getVideoWidth(), getVideoHeight()); initSWF(getVideoWidth(), getVideoHeight()); if(swf) { swf->SetMenu(false); { long v=swf->FlashVersion(); if(v<70000) { char str[1024]; sprintf(str, "current flash version %x.%x [need 7.0 or more, please upgrade, visit macromedia.com]", (v>>16), (v&0xffff)); delete(swf); swf=null; front->notify(front, nyERROR, (dword)str); } } }
void Afframe::settings(bool emergency) { if(imagedata) free(imagedata); imagedata=(byte*)malloc(getVideoWidth()*getVideoHeight()*3+32000); { AfframeFront *front=(AfframeFront *)this->front; front->notify(front->feffect, nyCHANGE, 0); } }
void Aexample::action(double time, double dtime, double beat, double dbeat) { int w=getVideoWidth(); int h=getVideoHeight(); float l=((AexampleFront *)front)->level->get(); dword cl=((AexampleFront *)front)->color0->get(); dword cc=((AexampleFront *)front)->color1->get(); dword cr=((AexampleFront *)front)->color2->get(); Asample *snd=((AexampleBack *)back)->in; Avideo *vin=((AexampleBack *)back)->vin; Avideo *out=((AexampleBack *)back)->out; sword smp[64*2]; sword bas[64*2]; sword med[64*2]; sword tre[64*2]; int nget=0; l=(l<0.5f)?(l*2.f):((l-0.5f)*10.f+1.f); if(snd->isConnected()) { snd->enter(__FILE__,__LINE__); snd->skip(maxi(snd->avaible()-64, 0)); nget=snd->getBuffer(smp, bas, med, tre, 64); snd->leave(); } out->enter(__FILE__,__LINE__); vin->enter(__FILE__,__LINE__); { Abitmap *b=out->getBitmap(); Abitmap *bin=vin->getBitmap(); if(b) { int nx=b->w>>2; int ny=b->h>>1; int v=0; if(bin) { bin->flags|=bitmapGLOBALALPHA; bin->alpha=0.05f; b->set(0, 0, bin, bitmapDEFAULT, bitmapDEFAULT); } else b->boxfa(0, 0, b->w, b->h, 0xff000000, 0.05f); setBox(b, v+=nx, ny, bas, nget, cl, l); setBox(b, v+=nx, ny, med, nget, cc, l); setBox(b, v+=nx, ny, tre, nget, cr, l); } } vin->leave(); out->leave(); }
bool open( const tjs_char *filename ) { if( wmv_encoder_ ) delete wmv_encoder_; wmv_encoder_ = new CWMVEncoder(); video_tick_ = 0; video_tick_per_frame_ = 10000000LL * (QWORD)getVideoTimeScale()/ (QWORD)getVideoTimeRate(); wmv_encoder_->SetVideoQuality( getVideoQuality() ); wmv_encoder_->SetMaxKeyFrameSpacing( getSecondPerKey() ); wmv_encoder_->SetVideoWidth( getVideoWidth() ); wmv_encoder_->SetVideoHeight( getVideoHeight() ); wmv_encoder_->SetVideoScale( getVideoTimeScale() ); wmv_encoder_->SetVideoRate( getVideoTimeRate() ); HRESULT hr = S_OK; if( FAILED( hr = wmv_encoder_->Initial( filename ) ) ) { SAFE_DELETE( wmv_encoder_ ); return false; } if( FAILED( hr = wmv_encoder_->Start() ) ) { SAFE_DELETE( wmv_encoder_ ); return false; } return true; }
void Aautomix::settings(bool emergency) { int i; for(i=0; i<2; i++) image[i]->size(getVideoWidth(), getVideoHeight()); }
void Awmp::settings(bool emergency) { dt->createDC(getVideoWidth(), getVideoHeight()); }