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

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

Handle ImageFrameView Duration changes

Parameters:
msg the received message

Definition at line 1700 of file imageframe_socket_handler.cc.

References decompose_imageframe_item_desc(), get_message_part(), ImageFrameTimeAxisView::get_named_imageframe_group(), ImageFrameTimeAxisGroup::get_named_imageframe_item(), ImageFrameTimeAxis::get_view(), send_return_failure(), send_return_success(), ImageFrameView::set_duration(), and thePublicEditor.

Referenced by handle_item_update_message().

{
      int position = 6 ; // message type chars
      
      std::string track_id ;
      std::string scene_id ;
      std::string item_id ;
      int track_id_size ;
      int scene_id_size ;
      int item_id_size ;
      
      this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
      
      nframes_t duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
      position += ardourvis::TIME_VALUE_CHARS ;
      
      // get the named time axis
      ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(thePublicEditor.get_named_time_axis(track_id)) ;
      
      if(!ifta)
      {
            send_return_failure(std::string("No parent Image Track found : ").append(track_id)) ;
            return ;
      }
      
      // get the parent scene
      ImageFrameTimeAxisGroup* iftag = ifta->get_view()->get_named_imageframe_group(scene_id) ;
      if(!iftag)
      {
            send_return_failure(std::string("No parent Scene found : ").append(scene_id)) ;
            return ;
      }
      
      ImageFrameView* ifv = iftag->get_named_imageframe_item(item_id) ;
      
      if(!ifv)
      {
            send_return_failure(std::string("No Image Frame Item found : ").append(item_id)) ;
            return ;
      }
      
      ifv->set_duration(duration, this) ;
      send_return_success() ;
}


Generated by  Doxygen 1.6.0   Back to index