Logo Search packages:      
Sourcecode: ardour version File versions

void ImageFrameSocketHandler::handle_imageframe_position_lock_update ( const char *  msg  )  [private]

Handle ImageFrameView Position Lock Constraint changes

Parameters:
msg the received message

Definition at line 1751 of file imageframe_socket_handler.cc.

References decompose_imageframe_item_desc(), get_imageframe_view_from_desc(), get_message_part(), send_return_failure(), send_return_success(), and TimeAxisViewItem::set_position_locked().

Referenced by handle_item_update_message().

{
      int position = 6 ; // message type chars
      
      std::string track_id ;
      std::string group_id ;
      std::string item_id ;
      int track_id_size ;
      int group_id_size ;
      int item_id_size ;
      
      this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
      
      std::string pos_lock = get_message_part(position,1,msg) ;
      bool pos_lock_active = false ;
      
      if(pos_lock == "0")
      {
            pos_lock_active = false ;
      }
      else if(pos_lock == "1")
      {
            pos_lock_active = true ;
      }
      else
      {
            send_return_failure(std::string("Unknown Value used during Position Loack: ").append(pos_lock)) ;
            return ;
      }
      
      position += 1 ;
      
      int errcode ;
      std::string errmsg ;
      ImageFrameView* ifv = get_imageframe_view_from_desc(track_id, group_id, item_id, errcode, errmsg) ;
      if(ifv)
      {
            ifv->set_position_locked(pos_lock_active, this) ;
            send_return_success() ;
      }
      else
      {
            send_return_failure(errmsg) ;
      }
}


Generated by  Doxygen 1.6.0   Back to index