View Issue Details

IDProjectCategoryView StatusLast Update
0001560ardourfeaturespublic2008-11-21 00:00
Reportertimbyr Assigned Topaul  
PrioritylowSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Summary0001560: Conditionally compile CMT additions
DescriptionArdour supposedly has support for integrating with the Animatics AniComp server. I say supposedly because I have never tried it.

I'm attaching a patch that enables conditionally compiling the CMT code, it currently defaults to enabling it(no change).

This patch was part of the work done for the port to win32 as the CMT code in ardour does not compile on that platform and neither does the AniComp Server.
TagsNo tags attached.

Activities

2007-03-19 04:49

 

conditionally_compile_cmt_additions.patch (13,251 bytes)   
Index: gtk2_ardour/public_editor.h
===================================================================
--- gtk2_ardour/public_editor.h	(revision 1619)
+++ gtk2_ardour/public_editor.h	(working copy)
@@ -72,11 +72,6 @@
 	virtual void set_mouse_mode (Editing::MouseMode, bool force = false) = 0;
 	virtual void step_mouse_mode (bool next) = 0;
 	virtual Editing::MouseMode current_mouse_mode () = 0;
-	virtual void add_imageframe_time_axis(const std::string & track_name, void*)  = 0;
-	virtual void add_imageframe_marker_time_axis(const std::string & track_name, TimeAxisView* marked_track, void*)  = 0;
-	virtual void connect_to_image_compositor()  = 0;
-	virtual void scroll_timeaxis_to_imageframe_item(const TimeAxisViewItem* item)  = 0;
-	virtual TimeAxisView* get_named_time_axis(const std::string & name)  = 0;
 	virtual void consider_auditioning (boost::shared_ptr<ARDOUR::Region>) = 0;
 	virtual void set_show_waveforms (bool yn) = 0;
 	virtual bool show_waveforms() const = 0;
@@ -136,6 +131,14 @@
 	virtual void restore_editing_space() = 0;
 	virtual nframes_t edit_cursor_position(bool sync) = 0;
 
+#ifdef WITH_CMT
+	virtual void add_imageframe_time_axis(const std::string & track_name, void*)  = 0;
+	virtual void add_imageframe_marker_time_axis(const std::string & track_name, TimeAxisView* marked_track, void*)  = 0;
+	virtual void connect_to_image_compositor()  = 0;
+	virtual void scroll_timeaxis_to_imageframe_item(const TimeAxisViewItem* item)  = 0;
+	virtual TimeAxisView* get_named_time_axis(const std::string & name)  = 0;
+#endif
+
 	sigc::signal<void> ZoomFocusChanged;
 	sigc::signal<void> ZoomChanged;
 	sigc::signal<void> Resized;
@@ -173,6 +176,7 @@
 	virtual bool canvas_range_marker_bar_event (GdkEvent* event, ArdourCanvas::Item*) = 0;
 	virtual bool canvas_transport_marker_bar_event (GdkEvent* event, ArdourCanvas::Item*) = 0;
 
+#ifdef WITH_CMT
 	virtual bool canvas_imageframe_item_view_event(GdkEvent* event, ArdourCanvas::Item*,ImageFrameView*) = 0;
 	virtual bool canvas_imageframe_view_event(GdkEvent* event, ArdourCanvas::Item*,ImageFrameTimeAxis*) = 0;
 	virtual bool canvas_imageframe_start_handle_event(GdkEvent* event, ArdourCanvas::Item*,ImageFrameView*) = 0;
@@ -181,6 +185,7 @@
 	virtual bool canvas_markerview_item_view_event(GdkEvent* event, ArdourCanvas::Item*,MarkerView*) = 0;
 	virtual bool canvas_markerview_start_handle_event(GdkEvent* event, ArdourCanvas::Item*,MarkerView*) = 0;
 	virtual bool canvas_markerview_end_handle_event(GdkEvent* event, ArdourCanvas::Item*,MarkerView*) = 0;
+#endif
 
 	static PublicEditor* _instance;
 
Index: gtk2_ardour/editor_items.h
===================================================================
--- gtk2_ardour/editor_items.h	(revision 1619)
+++ gtk2_ardour/editor_items.h	(working copy)
@@ -33,7 +33,7 @@
 	FadeOutItem,
 	FadeOutHandleItem,
 	
-	/* <CMT Additions> */
+#ifdef WITH_CMT
 	MarkerViewItem,
 	MarkerTimeAxisItem,
 	MarkerViewHandleStartItem,
@@ -42,7 +42,7 @@
 	ImageFrameTimeAxisItem,
 	ImageFrameHandleStartItem,
 	ImageFrameHandleEndItem,
-	/* </CMT Additions> */
+#endif
 	
 	CrossfadeViewItem,
 	
Index: gtk2_ardour/SConscript
===================================================================
--- gtk2_ardour/SConscript	(revision 1619)
+++ gtk2_ardour/SConscript	(working copy)
@@ -100,7 +100,6 @@
 automation_pan_line.cc
 automation_time_axis.cc
 axis_view.cc
-canvas-imageframe.c
 canvas-simpleline.c
 simpleline.cc
 canvas-simplerect.c
@@ -122,7 +121,6 @@
 editor_edit_groups.cc
 editor_export_audio.cc
 editor_hscroller.cc
-editor_imageframe.cc
 editor_keyboard.cc
 editor_keys.cc
 editor_markers.cc
@@ -147,21 +145,12 @@
 ghostregion.cc
 gtk-custom-hruler.c
 gtk-custom-ruler.c
-imageframe.cc
-imageframe_socket_handler.cc
-imageframe_time_axis.cc
-imageframe_time_axis_group.cc
-imageframe_time_axis_view.cc
-imageframe_view.cc
 io_selector.cc
 keyboard.cc
 ladspa_pluginui.cc
 location_ui.cc
 main.cc
 marker.cc
-marker_time_axis.cc
-marker_time_axis_view.cc
-marker_view.cc
 mixer_strip.cc
 mixer_ui.cc
 new_session_dialog.cc
@@ -199,7 +188,6 @@
 time_selection.cc
 utils.cc
 version.cc
-visual_time_axis.cc
 waveview.cc
 """)
 
@@ -243,6 +231,25 @@
 	extra_sources += vst_files
 	gtkardour.Append (CCFLAGS="-DVST_SUPPORT", CPPPATH="#libs/fst")
 
+cmt_files=Split("""
+canvas-imageframe.c
+editor_imageframe.cc
+imageframe.cc
+imageframe_socket_handler.cc
+imageframe_time_axis.cc
+imageframe_time_axis_group.cc
+imageframe_time_axis_view.cc
+imageframe_view.cc
+marker_time_axis.cc
+marker_time_axis_view.cc
+marker_view.cc
+visual_time_axis.cc
+""")
+
+if env['CMT']:
+	extra_sources += cmt_files
+	gtkardour.Append (CCFLAGS="-DWITH_CMT")
+
 if gtkardour['AUDIOUNITS']:
     extra_sources += audiounit_files
     gtkardour.Append(CCFLAGS='-DHAVE_AUDIOUNITS')
Index: gtk2_ardour/editor_canvas.cc
===================================================================
--- gtk2_ardour/editor_canvas.cc	(revision 1619)
+++ gtk2_ardour/editor_canvas.cc	(working copy)
@@ -28,11 +28,9 @@
 #include "waveview.h"
 #include "simplerect.h"
 #include "simpleline.h"
-#include "imageframe.h"
 #include "waveview_p.h"
 #include "simplerect_p.h"
 #include "simpleline_p.h"
-#include "imageframe_p.h"
 #include "canvas_impl.h"
 #include "editing.h"
 #include "rgb_macros.h"
@@ -40,6 +38,11 @@
 #include "time_axis_view.h"
 #include "audio_time_axis.h"
 
+#ifdef WITH_CMT
+#include "imageframe.h"
+#include "imageframe_p.h"
+#endif
+
 #include "i18n.h"
 
 using namespace std;
@@ -61,7 +64,10 @@
 GType gnome_canvas_simpleline_get_type(void);
 GType gnome_canvas_simplerect_get_type(void);
 GType gnome_canvas_waveview_get_type(void);
+
+#ifdef WITH_CMT
 GType gnome_canvas_imageframe_get_type(void);
+#endif
 
 }
 
@@ -72,14 +78,21 @@
 	Glib::wrap_register(gnome_canvas_simpleline_get_type(), &Gnome::Canvas::SimpleLine_Class::wrap_new);
 	Glib::wrap_register(gnome_canvas_simplerect_get_type(), &Gnome::Canvas::SimpleRect_Class::wrap_new);
 	Glib::wrap_register(gnome_canvas_waveview_get_type(), &Gnome::Canvas::WaveView_Class::wrap_new);
+
+#ifdef WITH_CMT
 	Glib::wrap_register(gnome_canvas_imageframe_get_type(), &Gnome::Canvas::ImageFrame_Class::wrap_new);
-	
+#endif
+
 	// Register the gtkmm gtypes:
 
 	(void) Gnome::Canvas::WaveView::get_type();
 	(void) Gnome::Canvas::SimpleLine::get_type();
 	(void) Gnome::Canvas::SimpleRect::get_type();
+
+#ifdef WITH_CMT
 	(void) Gnome::Canvas::ImageFrame::get_type();
+#endif
+
 } 
 
 void
Index: gtk2_ardour/editor_mouse.cc
===================================================================
--- gtk2_ardour/editor_mouse.cc	(revision 1619)
+++ gtk2_ardour/editor_mouse.cc	(working copy)
@@ -563,7 +563,7 @@
 					start_rubberband_select (item, event);
 					break;
 					
-				/* <CMT Additions> */
+#ifdef WITH_CMT
 				case ImageFrameHandleStartItem:
 					imageframe_start_handle_op(item, event) ;
 					return(true) ;
@@ -580,16 +580,13 @@
 					markerview_item_end_handle_op(item, event) ;
 					return(true) ;
 					break ;
-				/* </CMT Additions> */
-				
-				/* <CMT Additions> */
 				case MarkerViewItem:
 					start_markerview_grab(item, event) ;
 					break ;
 				case ImageFrameItem:
 					start_imageframe_grab(item, event) ;
 					break ;
-				/* </CMT Additions> */
+#endif
 
 				case MarkerBarItem:
 					
@@ -937,7 +934,7 @@
 				popup_track_context_menu (1, event->button.time, item_type, false, where);
 				break;
 
-			/* <CMT Additions> */
+#ifdef WITH_CMT
 			case ImageFrameItem:
 				popup_imageframe_edit_menu(1, event->button.time, item, true) ;
 				break ;
@@ -950,7 +947,7 @@
 			case MarkerTimeAxisItem:
 				popup_marker_time_axis_edit_menu(1, event->button.time, item, false) ;
 				break ;
-			/* <CMT Additions> */
+#endif
 
 				
 			default:
@@ -1231,12 +1228,13 @@
 
 	case StartSelectionTrimItem:
 	case EndSelectionTrimItem:
-	/* <CMT Additions> */
+
+#ifdef WITH_CMT
 	case ImageFrameHandleStartItem:
 	case ImageFrameHandleEndItem:
 	case MarkerViewHandleStartItem:
 	case MarkerViewHandleEndItem:
-	/* </CMT Additions> */
+#endif
 
 		if (is_drawable()) {
 			track_canvas.get_window()->set_cursor (*trimmer_cursor);
@@ -1386,12 +1384,14 @@
 	case EndSelectionTrimItem:
 	case EditCursorItem:
 	case PlayheadCursorItem:
-	/* <CMT Additions> */
+
+#ifdef WITH_CMT
 	case ImageFrameHandleStartItem:
 	case ImageFrameHandleEndItem:
 	case MarkerViewHandleStartItem:
 	case MarkerViewHandleEndItem:
-	/* </CMT Additions> */
+#endif
+
 		if (is_drawable()) {
 			track_canvas.get_window()->set_cursor (*current_canvas_cursor);
 		}
@@ -1557,12 +1557,14 @@
 	case PanAutomationLineItem:
 	case FadeInHandleItem:
 	case FadeOutHandleItem:
-	/* <CMT Additions> */
+
+#ifdef WITH_CMT
 	case ImageFrameHandleStartItem:
 	case ImageFrameHandleEndItem:
 	case MarkerViewHandleStartItem:
 	case MarkerViewHandleEndItem:
-	/* </CMT Additions> */
+#endif
+
 	  if (drag_info.item && (event->motion.state & Gdk::BUTTON1_MASK ||
 				 (event->motion.state & Gdk::BUTTON2_MASK))) {
 		  if (!from_autoscroll) {
Index: gtk2_ardour/editor.cc
===================================================================
--- gtk2_ardour/editor.cc	(revision 1619)
+++ gtk2_ardour/editor.cc	(working copy)
@@ -80,9 +80,9 @@
 
 #include "i18n.h"
 
-/* <CMT Additions> */
+#ifdef WITH_CMT
 #include "imageframe_socket_handler.h"
-/* </CMT Additions> */
+#endif
 
 using namespace std;
 using namespace sigc;
@@ -204,9 +204,9 @@
 	  automation_mode_button (_("mode")),
 	  global_automation_button (_("automation")),
 
-	  /* <CMT Additions> */
+#ifdef WITH_CMT
 	  image_socket_listener(0),
-	  /* </CMT Additions> */
+#endif
 
 	  /* nudge */
 
@@ -737,7 +737,7 @@
 
 Editor::~Editor()
 {
-	/* <CMT Additions> */
+#ifdef WITH_CMT
 	if(image_socket_listener)
 	{
 		if(image_socket_listener->is_connected())
@@ -748,7 +748,7 @@
 		delete image_socket_listener ;
 		image_socket_listener = 0 ;
 	}
-	/* </CMT Additions> */
+#endif
 }
 
 void
Index: gtk2_ardour/ardour_ui_ed.cc
===================================================================
--- gtk2_ardour/ardour_ui_ed.cc	(revision 1619)
+++ gtk2_ardour/ardour_ui_ed.cc	(working copy)
@@ -107,7 +107,7 @@
 	ActionManager::session_sensitive_actions.push_back (act);
 
 	
-	/* <CMT Additions> */
+#ifdef WITH_CMT
 
 	PathScanner scanner;
 	vector<string*>* results = scanner (getenv ("PATH"), "AniComp", false, false);
@@ -120,7 +120,7 @@
 		delete results;
 	}
 
-	/* </CMT Additions> */
+#endif
 
 	act = ActionManager::register_action (main_actions, X_("Snapshot"), _("Snapshot"),  mem_fun(*this, &ARDOUR_UI::snapshot_session));
 	ActionManager::session_sensitive_actions.push_back (act);
Index: gtk2_ardour/editor.h
===================================================================
--- gtk2_ardour/editor.h	(revision 1619)
+++ gtk2_ardour/editor.h	(working copy)
@@ -103,7 +103,7 @@
 class AnalysisWindow;
 #endif
 
-/* <CMT Additions> */
+#ifdef WITH_CMT
 class ImageFrameView;
 class ImageFrameTimeAxisView;
 class ImageFrameTimeAxis;
@@ -111,7 +111,7 @@
 class MarkerView ;
 class ImageFrameSocketHandler ;
 class TimeAxisViewItem ;
-/* </CMT Additions> */
+#endif
 
 
 class Editor : public PublicEditor
@@ -142,12 +142,16 @@
 	void step_mouse_mode (bool next);
 	Editing::MouseMode current_mouse_mode () { return mouse_mode; }
 
+#ifdef WITH_CMT
+	
 	void add_imageframe_time_axis(const std::string & track_name, void*) ;
 	void add_imageframe_marker_time_axis(const std::string & track_name, TimeAxisView* marked_track, void*) ;
 	void connect_to_image_compositor() ;
 	void scroll_timeaxis_to_imageframe_item(const TimeAxisViewItem* item) ;
 	TimeAxisView* get_named_time_axis(const std::string & name) ;
 
+#endif
+
 	void consider_auditioning (boost::shared_ptr<ARDOUR::Region>);
 	void hide_a_region (boost::shared_ptr<ARDOUR::Region>);
 	void remove_a_region (boost::shared_ptr<ARDOUR::Region>);
@@ -1728,7 +1732,7 @@
 
 	bool _xfade_visibility;
 	
-	/* <CMT Additions> */
+#ifdef WITH_CMT
 	void handle_new_imageframe_time_axis_view(const string & track_name, void* src) ;
 	void handle_new_imageframe_marker_time_axis_view(const string & track_name, TimeAxisView* marked_track) ;
 
@@ -1767,7 +1771,7 @@
 	void popup_marker_time_axis_edit_menu(int button, int32_t time, ArdourCanvas::Item* ifv, bool with_frame) ;
 
 	ImageFrameSocketHandler* image_socket_listener ;
-	/* </CMT Additions> */
+#endif
 
 	void toggle_xfade_active (boost::weak_ptr<ARDOUR::Crossfade>);
 	void toggle_xfade_length (boost::weak_ptr<ARDOUR::Crossfade>);
Index: SConstruct
===================================================================
--- SConstruct	(revision 1619)
+++ SConstruct	(working copy)
@@ -45,7 +45,8 @@
     BoolOption('VERSIONED', 'Add revision information to ardour/gtk executable name inside the build directory', 0),
     BoolOption('VST', 'Compile with support for VST', 0),
     BoolOption('GPROFILE', 'Compile with support for gprofile (Developers only)', 0),
-    BoolOption('TRANZPORT', 'Compile with support for Frontier Designs (if libusb is available)', 1)
+    BoolOption('TRANZPORT', 'Compile with support for Frontier Designs (if libusb is available)', 1),
+    BoolOption('CMT', 'Compile with support for CMT Additions', 1)
 )
 
 #----------------------------------------------------------------------

timbyr

2007-05-11 02:59

developer   ~0003923

This patch was committed to svn trunk as r1833

Issue History

Date Modified Username Field Change
2007-03-19 04:49 timbyr New Issue
2007-03-19 04:49 timbyr File Added: conditionally_compile_cmt_additions.patch
2007-03-19 06:25 timbyr Relationship added related to 0001483
2007-04-07 03:33 paul Status new => assigned
2007-04-07 03:33 paul Assigned To => paul
2007-05-11 02:59 timbyr Status assigned => resolved
2007-05-11 02:59 timbyr Resolution open => fixed
2007-05-11 02:59 timbyr Note Added: 0003923
2007-07-18 03:32 timbyr Relationship deleted related to 0001483
2008-11-21 00:00 seablade Status resolved => closed