void InputManager::UpdateRecord() { if( hasInput() ) { emit recordingStateChanged( var_GetBool( p_input, "record" ) ); } }
void InputManager::UpdateAout() { if( hasInput() ) { /* TODO */ } }
void InputManager::requestArtUpdate( input_item_t *p_item ) { bool b_current_item = false; if ( !p_item && hasInput() ) { /* default to current item */ p_item = input_GetItem( p_input ); b_current_item = true; } if ( p_item ) { /* check if it has already been enqueued */ if ( p_item->p_meta ) { int status = vlc_meta_GetStatus( p_item->p_meta ); if ( status & ( ITEM_ART_NOTFOUND|ITEM_ART_FETCHED ) ) return; } playlist_AskForArtEnqueue( pl_Get(p_intf), p_item ); /* No input will signal the cover art to update, * let's do it ourself */ if ( b_current_item ) UpdateArt(); else emit artChanged( p_item ); } }
void InputManager::UpdateVout() { if( hasInput() ) { /* Get current vout lists from input */ size_t i_vout; vout_thread_t **pp_vout; if( input_Control( p_input, INPUT_GET_VOUTS, &pp_vout, &i_vout ) ) { i_vout = 0; pp_vout = NULL; } /* */ emit voutListChanged( pp_vout, i_vout ); /* */ bool b_old_video = b_video; b_video = i_vout > 0; if( !!b_old_video != !!b_video ) emit voutChanged( b_video ); /* Release the vout list */ for( size_t i = 0; i < i_vout; i++ ) vlc_object_release( (vlc_object_t*)pp_vout[i] ); free( pp_vout ); } }
void InputManager::requestArtUpdate( input_item_t *p_item, bool b_forced ) { bool b_current_item = false; if ( !p_item && hasInput() ) { /* default to current item */ p_item = input_GetItem( p_input ); b_current_item = true; } if ( p_item ) { /* check if it has already been enqueued */ if ( p_item->p_meta && !b_forced ) { int status = vlc_meta_GetStatus( p_item->p_meta ); if ( status & ( ITEM_ART_NOTFOUND|ITEM_ART_FETCHED ) ) return; } libvlc_ArtRequest( p_intf->p_libvlc, p_item, (b_forced) ? META_REQUEST_OPTION_SCOPE_ANY : META_REQUEST_OPTION_NONE ); /* No input will signal the cover art to update, * let's do it ourself */ if ( b_current_item ) UpdateArt(); else emit artChanged( p_item ); } }
void InputManager::sectionMenu() { if( hasInput() ) { var_TriggerCallback( p_input, "menu-title" ); } }
void InputManager::UpdateEPG() { if( hasInput() ) { emit epgChanged(); } }
void FlipController::apply(osg::StateSet* stateset, osg::NodeVisitor* nv) { if (hasInput() && mDelta != 0) { int curTexture = int(getInputValue(nv) / mDelta) % mTextures.size(); stateset->setTextureAttribute(mTexSlot, mTextures[curTexture]); } }
QString JsInputSplitter::input() const { Q_ASSERT(hasInput()); QString result; foreach (const QString& line, m_input) result += line; return result; }
/* Set the transparency on teletext */ void InputManager::telexSetTransparency( bool b_transparentTelextext ) { if( hasInput() && p_input_vbi ) { var_SetBool( p_input_vbi, "vbi-opaque", !b_transparentTelextext ); emit teletextTransparencyActivated( b_transparentTelextext ); } }
void InputManager::reverse() { if( hasInput() ) { float f_rate_ = var_GetFloat( p_input, "rate" ); var_SetFloat( p_input, "rate", -f_rate_ ); } }
void InputManager::UpdateProgramEvent() { if( hasInput() ) { bool b_scrambled = var_GetBool( p_input, "program-scrambled" ); emit encryptionChanged( b_scrambled ); } }
/* User togglePlayPause */ void InputManager::togglePlayPause() { if( hasInput() ) { int state = var_GetInteger( p_input, "state" ); state = ( state != PLAYING_S ) ? PLAYING_S : PAUSE_S; var_SetInteger( p_input, "state", state ); } }
void InputManager::jumpBwd() { int i_interval = var_InheritInteger( p_input, "short-jump-size" ); if( i_interval > 0 && hasInput() ) { mtime_t val = -CLOCK_FREQ * i_interval; var_SetTime( p_input, "time-offset", val ); } }
void InputManager::sectionNext() { if( hasInput() ) { int i_type = var_Type( p_input, "next-chapter" ); var_TriggerCallback( p_input, (i_type & VLC_VAR_TYPE) != 0 ? "next-chapter":"next-title" ); } }
void VisController::operator() (osg::Node* node, osg::NodeVisitor* nv) { if (hasInput()) { bool vis = calculate(getInputValue(nv)); // Leave 0x1 enabled for UpdateVisitor, so we can make ourselves visible again in the future from this update callback node->setNodeMask(vis ? ~0 : 0x1); } traverse(node, nv); }
bool InputManager::hasAudio() { if( hasInput() ) { vlc_value_t val; var_Change( p_input, "audio-es", VLC_VAR_CHOICESCOUNT, &val, NULL ); return val.i_int > 0; } return false; }
void ParticleSystemController::operator() (osg::Node* node, osg::NodeVisitor* nv) { if (hasInput()) { osgParticle::ParticleProcessor* emitter = static_cast<osgParticle::ParticleProcessor*>(node); float time = getInputValue(nv); emitter->setEnabled(time >= mEmitStart && time < mEmitStop); } traverse(node, nv); }
void AlphaController::apply(osg::StateSet *stateset, osg::NodeVisitor *nv) { if (hasInput()) { float value = mData.interpKey(getInputValue(nv)); osg::Material* mat = static_cast<osg::Material*>(stateset->getAttribute(osg::StateAttribute::MATERIAL)); osg::Vec4f diffuse = mat->getDiffuse(osg::Material::FRONT_AND_BACK); diffuse.a() = value; mat->setDiffuse(osg::Material::FRONT_AND_BACK, diffuse); } }
void MaterialColorController::apply(osg::StateSet *stateset, osg::NodeVisitor *nv) { if (hasInput()) { osg::Vec3f value = mData.interpKey(getInputValue(nv)); osg::Material* mat = static_cast<osg::Material*>(stateset->getAttribute(osg::StateAttribute::MATERIAL)); osg::Vec4f diffuse = mat->getDiffuse(osg::Material::FRONT_AND_BACK); diffuse.set(value.x(), value.y(), value.z(), diffuse.a()); mat->setDiffuse(osg::Material::FRONT_AND_BACK, diffuse); } }
void Q3DMPRViewer::setWindowLevel(double window, double level) { if (hasInput()) { // Amb un n'hi ha prou ja que cada vtkImagePlaneWidget comparteix la mateixa LUT m_axialImagePlaneWidget->SetWindowLevel(window, level); } else { DEBUG_LOG("Intentant posar un window level sense donar un input abans"); } }
void InputManager::UpdateCaching() { if(!hasInput()) return; float f_newCache = var_GetFloat ( p_input, "cache" ); if( f_newCache != f_cache ) { f_cache = f_newCache; /* Update cache */ emit cachingChanged( f_cache ); } }
void AquariaCheckBox::onUpdate(float dt) { AquariaGuiElement::updateMovement(dt); if (!hasInput()) { RenderObject::onUpdate(dt); } else { CheckBox::onUpdate(dt); } }
void KeyframeController::operator() (osg::Node* node, osg::NodeVisitor* nv) { if (hasInput()) { osg::MatrixTransform* trans = static_cast<osg::MatrixTransform*>(node); osg::Matrix mat = trans->getMatrix(); float time = getInputValue(nv); NodeUserData* userdata = static_cast<NodeUserData*>(trans->getUserDataContainer()->getUserObject(0)); Nif::Matrix3& rot = userdata->mRotationScale; bool setRot = false; if(!mRotations.empty()) { mat.setRotate(mRotations.interpKey(time)); setRot = true; } else if (!mXRotations.empty() || !mYRotations.empty() || !mZRotations.empty()) { mat.setRotate(getXYZRotation(time)); setRot = true; } else { // no rotation specified, use the previous value from the UserData for (int i=0;i<3;++i) for (int j=0;j<3;++j) mat(j,i) = rot.mValues[i][j]; // NB column/row major difference } if (setRot) // copy the new values back to the UserData for (int i=0;i<3;++i) for (int j=0;j<3;++j) rot.mValues[i][j] = mat(j,i); // NB column/row major difference float& scale = userdata->mScale; if(!mScales.empty()) scale = mScales.interpKey(time); for (int i=0;i<3;++i) for (int j=0;j<3;++j) mat(i,j) *= scale; if(!mTranslations.empty()) mat.setTrans(mTranslations.interpKey(time)); trans->setMatrix(mat); } traverse(node, nv); }
void InputManager::requestArtUpdate() { if( hasInput() ) { playlist_AskForArtEnqueue( pl_Get(p_intf), input_GetItem( p_input ) ); } else { /* No input will signal the cover art to update, * let's do it ourself */ UpdateArt(); } }
/* Set a new Teletext Page */ void InputManager::telexSetPage( int page ) { if( hasInput() && p_input_vbi ) { const int i_teletext_es = var_GetInteger( p_input, "teletext-es" ); if( i_teletext_es >= 0 ) { var_SetInteger( p_input_vbi, "vbi-page", page ); emit newTelexPageSet( page ); } } }
void AquariaGuiQuad::update(float dt) { // super hacky if (hasInput()) { Quad::update(dt); } else { updateMovement(dt); Quad::onUpdate(dt); } }
void InputBuf::doAllInput(LLParser &outputvia) { while (blockRead()) { while (hasInput()) { doInput(outputvia); } } if (_bp != _buf) { if (_left < 1) extend(); *_bp++ = '\n'; doInput(outputvia); } }
void InputManager::UpdateArt() { QString url; if( hasInput() ) url = decodeArtURL( input_GetItem( p_input ) ); /* the art hasn't changed, no need to update */ if(artUrl == url) return; /* Update Art meta */ artUrl = url; emit artChanged( artUrl ); }
void AquariaSlider::onUpdate(float dt) { if (!hasInput()) { inputTimer = inputDelay = 0; AquariaGuiElement::updateMovement(dt); RenderObject::onUpdate(dt); } else { if (!doSliderInput(dt)) AquariaGuiElement::updateMovement(dt); Slider::onUpdate(dt); } }