Logo Search packages:      
Sourcecode: ardour version File versions  Download package

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

Handle image frame max duration enable constraint changes

Parameters:
msg the received message

Definition at line 1839 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_max_duration_active().

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 active = get_message_part(position,1,msg) ;
      bool max_duration_active = false ;
      
      if(active == "0")
      {
            max_duration_active = false ;
      }
      else if(active == "1")
      {
            max_duration_active = true ;
      }
      else
      {
            send_return_failure(std::string("Unknown Value used during enable max duration: ").append(active)) ;
            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_max_duration_active(max_duration_active, this) ;
            send_return_success() ;
      }
      else
      {
            send_return_failure(errmsg) ;
      }
}


Generated by  Doxygen 1.6.0   Back to index