From d234427c3111fcf6e2181d0af1a0706f9847416a Mon Sep 17 00:00:00 2001 From: David Baelde Date: Tue, 3 Jul 2012 22:19:17 +0200 Subject: [PATCH] Document most ~name parameters. Don't make them mandatory yet in case some optional operators have been forgotten. A few names could be improved but it's already much better than the default "src" in so many places. --- src/analyze/analyze_rms.ml | 2 +- src/io/gstreamer_io.ml | 2 +- src/io/udp_io.ml | 2 +- src/operators/add.ml | 2 +- src/operators/append.ml | 2 +- src/operators/biquad_filter.ml | 2 +- src/operators/chord.ml | 2 +- src/operators/clip.ml | 6 +++--- src/operators/comb.ml | 2 +- src/operators/compand.ml | 2 +- src/operators/compress.ml | 2 +- src/operators/compress_exp.ml | 2 +- src/operators/delay.ml | 2 +- src/operators/echo.ml | 2 +- src/operators/filter.ml | 2 +- src/operators/fir_filter.ml | 2 +- src/operators/flanger.ml | 2 +- src/operators/iir_filter.ml | 2 +- src/operators/insert_metadata.ml | 4 ++-- src/operators/ladspa_op.ml | 4 ++-- src/operators/map_metadata.ml | 2 +- src/operators/map_op.ml | 2 +- src/operators/midi_routing.ml | 8 ++++---- src/operators/mixing_table.ml | 2 +- src/operators/ms_stereo.ml | 2 +- src/operators/noblank.ml | 8 ++++---- src/operators/normalize.ml | 2 +- src/operators/on_metadata.ml | 2 +- src/operators/on_track.ml | 2 +- src/operators/pan.ml | 2 +- src/operators/pitch.ml | 2 +- src/operators/prepend.ml | 2 +- src/operators/setvol.ml | 6 +++--- src/operators/smartcross.ml | 2 +- src/operators/soundtouch_op.ml | 2 +- src/operators/st_bpm.ml | 2 +- src/operators/store_metadata.ml | 2 +- src/operators/time_warp.ml | 2 +- src/operators/video_effects.ml | 2 +- src/operators/video_fade.ml | 4 ++-- src/operators/video_image.ml | 2 +- src/operators/video_text.ml | 2 +- src/sources/alsa_in.ml | 2 +- src/sources/bjack_in.ml | 2 +- src/sources/external_input.ml | 2 +- src/synth/dssi_op.ml | 2 +- src/synth/synth_op.ml | 2 +- src/tools/harbor.ml | 2 +- src/tools/start_stop.ml | 2 +- src/visualization/midimeter.ml | 2 +- src/visualization/video_volume.ml | 2 +- src/visualization/vis_volume.ml | 2 +- 52 files changed, 65 insertions(+), 65 deletions(-) diff --git a/src/analyze/analyze_rms.ml b/src/analyze/analyze_rms.ml index 1d427be083..cb5820b6e2 100644 --- a/src/analyze/analyze_rms.ml +++ b/src/analyze/analyze_rms.ml @@ -22,7 +22,7 @@ class rms ~kind ~window_length ~update source = object (self) - inherit Source.operator kind [source] + inherit Source.operator ~name:"rms" kind [source] method stype = source#stype method is_ready = source#is_ready diff --git a/src/io/gstreamer_io.ml b/src/io/gstreamer_io.ml index cd3d924fb9..4cdc79d036 100644 --- a/src/io/gstreamer_io.ml +++ b/src/io/gstreamer_io.ml @@ -45,7 +45,7 @@ class v4l_input v4l_version p kind = in let vfps = Lazy.force Frame.video_rate in object (self) - inherit Source.active_source kind as active_source + inherit Source.active_source ~name:"input.v4l" kind as active_source inherit [I.t array] IoRing.input ~nb_blocks ~blank as ioring method private set_clock = diff --git a/src/io/udp_io.ml b/src/io/udp_io.ml index 0e35a1fe1c..47798bb826 100644 --- a/src/io/udp_io.ml +++ b/src/io/udp_io.ml @@ -74,7 +74,7 @@ class input ~kind ~hostname ~port ~decoder_factory ~bufferize = let log = (fun x -> !log_ref x) in object (self) - inherit Source.source kind + inherit Source.source ~name:"input.udp" kind inherit Generated.source (Generator.create ~log ~kind ~overfull:(`Drop_old max_ticks) `Undefined) diff --git a/src/operators/add.ml b/src/operators/add.ml index 4032f3fde9..fa0e9e6f00 100644 --- a/src/operators/add.ml +++ b/src/operators/add.ml @@ -42,7 +42,7 @@ let get_again s buf = * is used to add either as an overlay or as a tiling. *) class add ~kind ~renorm (sources: (int*source) list) video_init video_loop = object (self) - inherit operator kind (List.map snd sources) as super + inherit operator ~name:"add" kind (List.map snd sources) as super (* We want the sources at the beginning of the list to * have their metadatas copied to the output stream, so direction diff --git a/src/operators/append.ml b/src/operators/append.ml index 55490b3a28..9f118a9e4a 100644 --- a/src/operators/append.ml +++ b/src/operators/append.ml @@ -24,7 +24,7 @@ open Source class append ~kind ~insert_missing ~merge source f = object (self) - inherit operator kind [source] + inherit operator ~name:"append" kind [source] val mutable state = `Idle diff --git a/src/operators/biquad_filter.ml b/src/operators/biquad_filter.ml index edb3d1a8cf..d2bf6a1f67 100644 --- a/src/operators/biquad_filter.ml +++ b/src/operators/biquad_filter.ml @@ -28,7 +28,7 @@ class biquad ~kind (source:source) filter_type freq fparam db_gain = let channels = (Frame.type_of_kind kind).Frame.audio in let samplerate = Frame.audio_of_seconds 1. in object (self) - inherit operator kind [source] as super + inherit operator ~name:"biquad_filter" kind [source] as super val effect = new Audio.Effect.biquad_filter channels samplerate filter_type ~gain:db_gain freq fparam diff --git a/src/operators/chord.ml b/src/operators/chord.ml index b18d7e7ab5..9f8205e7b9 100644 --- a/src/operators/chord.ml +++ b/src/operators/chord.ml @@ -43,7 +43,7 @@ let note_of_string s = note_of_string s - 12 class chord ~kind metadata_name (source:source) = object (self) - inherit operator kind [source] as super + inherit operator ~name:"chord" kind [source] as super method stype = source#stype diff --git a/src/operators/clip.ml b/src/operators/clip.ml index 4c21cd3c68..5542df3393 100644 --- a/src/operators/clip.ml +++ b/src/operators/clip.ml @@ -22,9 +22,9 @@ open Source -class echo ~kind (source:source) vmin vmax = +class clip ~kind (source:source) vmin vmax = object (self) - inherit operator kind [source] as super + inherit operator ~name:"clip" kind [source] as super method stype = source#stype method remaining = source#remaining @@ -57,4 +57,4 @@ let () = Lang.to_float (f "max"), Lang.to_source (f "") in - new echo ~kind src vmin vmax) + new clip ~kind src vmin vmax) diff --git a/src/operators/comb.ml b/src/operators/comb.ml index a5531d1549..afa57c2ef0 100644 --- a/src/operators/comb.ml +++ b/src/operators/comb.ml @@ -28,7 +28,7 @@ class comb ~kind (source:source) delay feedback = let past_len = Frame.audio_of_seconds delay in let channels = (Frame.type_of_kind kind).Frame.audio in object (self) - inherit operator kind [source] as super + inherit operator ~name:"comb" kind [source] as super method stype = source#stype diff --git a/src/operators/compand.ml b/src/operators/compand.ml index 7ef5c6f93a..9b55c079dc 100644 --- a/src/operators/compand.ml +++ b/src/operators/compand.ml @@ -24,7 +24,7 @@ open Source class compand ~kind (source:source) mu = object (self) - inherit operator kind [source] as super + inherit operator ~name:"compand" kind [source] as super method stype = source#stype diff --git a/src/operators/compress.ml b/src/operators/compress.ml index 0d6cf6b8ac..93c355a550 100644 --- a/src/operators/compress.ml +++ b/src/operators/compress.ml @@ -28,7 +28,7 @@ class compress ~kind (source:source) attack release threshold ratio knee rms_win let channels = (Frame.type_of_kind kind).Frame.audio in let samplerate = Lazy.force Frame.audio_rate in object (self) - inherit operator kind [source] as super + inherit operator ~name:"compress" kind [source] as super val effect = new Audio.Effect.compress ~attack:(attack ()) ~release:(release ()) ~threshold:(threshold ()) ~ratio:(ratio ()) ~knee:(knee ()) ~rms_window ~gain:(gain ()) channels samplerate diff --git a/src/operators/compress_exp.ml b/src/operators/compress_exp.ml index 75041f30bd..3c48766fac 100644 --- a/src/operators/compress_exp.ml +++ b/src/operators/compress_exp.ml @@ -24,7 +24,7 @@ open Source class compress ~kind (source:source) mu = object (self) - inherit operator kind [source] as super + inherit operator ~name:"compress" kind [source] as super method stype = source#stype diff --git a/src/operators/delay.ml b/src/operators/delay.ml index 36704fafcf..4b299d0e12 100644 --- a/src/operators/delay.ml +++ b/src/operators/delay.ml @@ -27,7 +27,7 @@ open Source class delay ~kind ~initial (source:source) delay = object (self) - inherit operator kind [source] as super + inherit operator ~name:"delay" kind [source] as super method stype = Fallible method remaining = source#remaining diff --git a/src/operators/echo.ml b/src/operators/echo.ml index 96c4e962e2..a4d72466df 100644 --- a/src/operators/echo.ml +++ b/src/operators/echo.ml @@ -25,7 +25,7 @@ open Source class echo ~kind (source:source) delay feedback ping_pong = let channels = (Frame.type_of_kind kind).Frame.audio in object (self) - inherit operator kind [source] as super + inherit operator ~name:"echo" kind [source] as super method stype = source#stype method remaining = source#remaining diff --git a/src/operators/filter.ml b/src/operators/filter.ml index 0bf6646ba7..bacf9b2b3c 100644 --- a/src/operators/filter.ml +++ b/src/operators/filter.ml @@ -30,7 +30,7 @@ class filter ~kind (source:source) freq q wet mode = let channels = (Frame.type_of_kind kind).Frame.audio in let rate = float (Lazy.force Frame.audio_rate) in object (self) - inherit operator kind [source] as super + inherit operator ~name:"filter" kind [source] as super method stype = source#stype method remaining = source#remaining diff --git a/src/operators/fir_filter.ml b/src/operators/fir_filter.ml index c0ab6373f3..d5c72dd031 100644 --- a/src/operators/fir_filter.ml +++ b/src/operators/fir_filter.ml @@ -28,7 +28,7 @@ let pi = 3.14159265358979323846 class fir ~kind (source:source) freq beta numcoeffs = let channels = (Frame.type_of_kind kind).Frame.audio in object (self) - inherit operator kind [source] as super + inherit operator ~name:"fir_filter" kind [source] as super (* Needed to compute RC *) val f1 = (1. -. beta) *. (freq /. (float_of_int (Frame.audio_of_seconds 1.))) diff --git a/src/operators/flanger.ml b/src/operators/flanger.ml index 0cc6a267fb..2e203ac601 100644 --- a/src/operators/flanger.ml +++ b/src/operators/flanger.ml @@ -28,7 +28,7 @@ class flanger ~kind (source:source) delay freq feedback phase = let past_len = Frame.audio_of_seconds delay in let channels = (Frame.type_of_kind kind).Frame.audio in object (self) - inherit operator kind [source] as super + inherit operator ~name:"flanger" kind [source] as super method stype = source#stype diff --git a/src/operators/iir_filter.ml b/src/operators/iir_filter.ml index b32a343caa..1df113d022 100644 --- a/src/operators/iir_filter.ml +++ b/src/operators/iir_filter.ml @@ -33,7 +33,7 @@ class iir ~kind (source:source) let channels = (Frame.type_of_kind kind).Frame.audio in let rate = float (Frame.audio_of_seconds 1.) in object (self) - inherit operator kind [source] as super + inherit operator ~name:"iir_filter" kind [source] as super (* Params *) val raw_alpha1 = freq1 /. rate diff --git a/src/operators/insert_metadata.ml b/src/operators/insert_metadata.ml index 3265f3cc5d..4d3b660a09 100644 --- a/src/operators/insert_metadata.ml +++ b/src/operators/insert_metadata.ml @@ -26,7 +26,7 @@ exception Error class insert_metadata ~kind source = object (self) - inherit operator kind [source] as super + inherit operator ~name:"insert_metadata" kind [source] as super method stype = source#stype method is_ready = source#is_ready @@ -94,7 +94,7 @@ let () = * Currently used by the switch classes. *) class replay ~kind meta src = object (self) - inherit operator kind [src] + inherit operator ~name:"replay_metadata" kind [src] val mutable first = true diff --git a/src/operators/ladspa_op.ml b/src/operators/ladspa_op.ml index 19211852a6..5345b9f039 100644 --- a/src/operators/ladspa_op.ml +++ b/src/operators/ladspa_op.ml @@ -50,7 +50,7 @@ let port_t d p = class virtual base ~kind source = object - inherit operator kind [source] as super + inherit operator ~name:"ladspa" kind [source] as super method stype = source#stype @@ -63,7 +63,7 @@ end class virtual base_nosource ~kind = object - inherit source kind + inherit source ~name:"ladspa" kind method stype = Infallible diff --git a/src/operators/map_metadata.ml b/src/operators/map_metadata.ml index bab8aba4ad..157102decf 100644 --- a/src/operators/map_metadata.ml +++ b/src/operators/map_metadata.ml @@ -24,7 +24,7 @@ open Source class map_metadata ~kind source rewrite_f insert_missing update strip = object (self) - inherit operator kind [source] + inherit operator ~name:"map_metadata" kind [source] method stype = source#stype method is_ready = source#is_ready diff --git a/src/operators/map_op.ml b/src/operators/map_op.ml index dda5d89fed..ff2e5b1441 100644 --- a/src/operators/map_op.ml +++ b/src/operators/map_op.ml @@ -24,7 +24,7 @@ open Source class map ~kind source f = object (self) - inherit operator kind [source] as super + inherit operator ~name:"audio.map" kind [source] as super method stype = source#stype method remaining = source#remaining diff --git a/src/operators/midi_routing.ml b/src/operators/midi_routing.ml index 0eeb834b43..5b1e5a39e8 100644 --- a/src/operators/midi_routing.ml +++ b/src/operators/midi_routing.ml @@ -22,9 +22,9 @@ open Source -class virtual base ~kind (source:source) = +class virtual base ~kind ~name (source:source) = object (self) - inherit operator kind [source] as super + inherit operator ~name kind [source] as super method stype = source#stype @@ -37,7 +37,7 @@ end class merge ~kind (source:source) out = object (self) - inherit base ~kind (source) + inherit base ~kind (source) ~name:"midi.merge_all" method private get_frame buf = let offset = MFrame.position buf in @@ -51,7 +51,7 @@ end class remove ~kind (source:source) t = object (self) - inherit base ~kind (source) + inherit base ~kind (source) ~name:"midi.remove" method private get_frame buf = let offset = MFrame.position buf in diff --git a/src/operators/mixing_table.ml b/src/operators/mixing_table.ml index b806475b2d..19bc6bf038 100644 --- a/src/operators/mixing_table.ml +++ b/src/operators/mixing_table.ml @@ -25,7 +25,7 @@ open Source class mixing ~kind source = let n = Array.length source in object (self) - inherit operator kind (Array.to_list source) as super + inherit operator ~name:"mix" kind (Array.to_list source) as super initializer assert (n>0) diff --git a/src/operators/ms_stereo.ml b/src/operators/ms_stereo.ml index cc88437525..0c58db45f8 100644 --- a/src/operators/ms_stereo.ml +++ b/src/operators/ms_stereo.ml @@ -26,7 +26,7 @@ type mode = Encode | Decode class msstereo ~kind (source:source) mode width = object (self) - inherit operator kind [source] as super + inherit operator ~name:"stereo.ms.encode" kind [source] as super method stype = source#stype method is_ready = source#is_ready diff --git a/src/operators/noblank.ml b/src/operators/noblank.ml index 58bd2c784b..0c301d3c29 100644 --- a/src/operators/noblank.ml +++ b/src/operators/noblank.ml @@ -56,7 +56,7 @@ end class on_blank ~kind ~length ~threshold ~track_sensitive ~on_blank ~on_noise source = object (self) - inherit operator kind [source] + inherit operator ~name:"on_blank" kind [source] inherit base ~length ~threshold as base val mutable in_blank = true @@ -94,7 +94,7 @@ let log = Dtools.Log.make ["noblank"] class skip ~kind ~length ~threshold ~track_sensitive source = object (self) - inherit operator kind [source] + inherit operator ~name:"skip_blank" kind [source] inherit base ~length ~threshold as base method stype = source#stype @@ -122,7 +122,7 @@ end class strip ~kind ~length ~threshold ~track_sensitive source = object (self) - inherit active_operator kind [source] + inherit active_operator ~name:"strip_blank" kind [source] inherit base ~length ~threshold as base val mutable stripping = false @@ -168,7 +168,7 @@ end class eat ~kind ~at_beginning ~length ~threshold ~track_sensitive source = object (self) - inherit operator kind [source] as super + inherit operator ~name:"eat_blank" kind [source] as super inherit base ~length ~threshold as base val mutable stripping = false diff --git a/src/operators/normalize.ml b/src/operators/normalize.ml index 5bc9ddbdb8..eb5028bd96 100644 --- a/src/operators/normalize.ml +++ b/src/operators/normalize.ml @@ -34,7 +34,7 @@ class normalize ~kind (source:source) let channels = (Frame.type_of_kind kind).Frame.audio in let rmsi = Frame.audio_of_seconds window in object (self) - inherit operator kind [source] as super + inherit operator ~name:"normalize" kind [source] as super (** Current squares of RMS. *) val rms = Array.make channels 0. diff --git a/src/operators/on_metadata.ml b/src/operators/on_metadata.ml index 73c8ee2fe4..2674787976 100644 --- a/src/operators/on_metadata.ml +++ b/src/operators/on_metadata.ml @@ -22,7 +22,7 @@ class on_metadata ~kind f s = object (self) - inherit Source.operator kind [s] + inherit Source.operator ~name:"on_metadata" kind [s] method stype = s#stype method is_ready = s#is_ready diff --git a/src/operators/on_track.ml b/src/operators/on_track.ml index 59e8d840e5..f13d100e8f 100644 --- a/src/operators/on_track.ml +++ b/src/operators/on_track.ml @@ -22,7 +22,7 @@ class on_track ~kind f s = object - inherit Source.operator kind [s] + inherit Source.operator ~name:"on_track" kind [s] method stype = s#stype method is_ready = s#is_ready diff --git a/src/operators/pan.ml b/src/operators/pan.ml index 4fcbdcba19..a150cdab64 100644 --- a/src/operators/pan.ml +++ b/src/operators/pan.ml @@ -26,7 +26,7 @@ let pi = 3.14159265358979323846 class pan ~kind (source:source) phi phi_0 = object (self) - inherit operator kind [source] as super + inherit operator ~name:"pan" kind [source] as super method stype = source#stype method is_ready = source#is_ready diff --git a/src/operators/pitch.ml b/src/operators/pitch.ml index 240ab66415..fb96ca81ab 100644 --- a/src/operators/pitch.ml +++ b/src/operators/pitch.ml @@ -61,7 +61,7 @@ class pitch ~kind every length freq_min freq_max (source:source) = let channels = (Frame.type_of_kind kind).Frame.audio in let length = Frame.audio_of_seconds length in object (self) - inherit operator kind [source] as super + inherit operator ~name:"pitch" kind [source] as super val ring = Ringbuffer.create channels (2 * length) diff --git a/src/operators/prepend.ml b/src/operators/prepend.ml index 1ef598acbf..ee207e8ca5 100644 --- a/src/operators/prepend.ml +++ b/src/operators/prepend.ml @@ -24,7 +24,7 @@ open Source class prepend ~kind ~merge source f = object (self) - inherit operator kind [source] + inherit operator ~name:"prepend" kind [source] val mutable state = `Idle diff --git a/src/operators/setvol.ml b/src/operators/setvol.ml index ba365aa46a..d3fca13350 100644 --- a/src/operators/setvol.ml +++ b/src/operators/setvol.ml @@ -22,9 +22,9 @@ open Source -class setvol ~kind (source:source) override_field coeff = +class amplify ~kind (source:source) override_field coeff = object (self) - inherit operator kind [source] as super + inherit operator ~name:"amplify" kind [source] as super val mutable override = None @@ -87,4 +87,4 @@ let () = let s = Lang.to_source (Lang.assoc "" 2 p) in let o = Lang.to_string (Lang.assoc "override" 1 p) in let o = if o = "" then None else Some (String.lowercase o) in - new setvol ~kind s o c) + new amplify ~kind s o c) diff --git a/src/operators/smartcross.ml b/src/operators/smartcross.ml index bb9a0b46e8..42f53202df 100644 --- a/src/operators/smartcross.ml +++ b/src/operators/smartcross.ml @@ -33,7 +33,7 @@ class cross ~kind (s:source) ~conservative ~active transition = let channels = float (Frame.type_of_kind kind).Frame.audio in object (self) - inherit source kind as super + inherit source ~name:"smart_cross" kind as super (* This actually depends on [f], we have to trust the user here. *) method stype = s#stype diff --git a/src/operators/soundtouch_op.ml b/src/operators/soundtouch_op.ml index 26e6c4b903..0ca285296b 100644 --- a/src/operators/soundtouch_op.ml +++ b/src/operators/soundtouch_op.ml @@ -24,7 +24,7 @@ open Source class soundtouch ~kind (source:source) rate tempo pitch = object (self) - inherit operator kind [source] as super + inherit operator ~name:"soundtouch" kind [source] as super val st = Soundtouch.make ((Frame.type_of_kind kind).Frame.audio) (Lazy.force Frame.audio_rate) diff --git a/src/operators/st_bpm.ml b/src/operators/st_bpm.ml index 0ca20ef5fa..32b389721e 100644 --- a/src/operators/st_bpm.ml +++ b/src/operators/st_bpm.ml @@ -24,7 +24,7 @@ open Source class bpm ~kind (source:source) every = object (self) - inherit operator kind [source] as super + inherit operator ~name:"bpm" kind [source] as super method stype = source#stype method is_ready = source#is_ready diff --git a/src/operators/store_metadata.ml b/src/operators/store_metadata.ml index ce86a59451..4c213bdca2 100644 --- a/src/operators/store_metadata.ml +++ b/src/operators/store_metadata.ml @@ -22,7 +22,7 @@ class store ~kind n s = object (self) - inherit Source.operator kind [s] as super + inherit Source.operator ~name:"store_metadata" kind [s] as super method stype = s#stype method is_ready = s#is_ready diff --git a/src/operators/time_warp.ml b/src/operators/time_warp.ml index 4af7d1700f..4518eee4a6 100644 --- a/src/operators/time_warp.ml +++ b/src/operators/time_warp.ml @@ -51,7 +51,7 @@ struct (** The source which produces data by reading the buffer. *) class producer ~kind source c = object (self) - inherit Source.source kind + inherit Source.source kind ~name:"warp_prod" method stype = Source.Fallible diff --git a/src/operators/video_effects.ml b/src/operators/video_effects.ml index 0579415aa9..14c2183784 100644 --- a/src/operators/video_effects.ml +++ b/src/operators/video_effects.ml @@ -26,7 +26,7 @@ module Img = Image.RGBA32 class effect ~kind effect (source:source) = object (self) - inherit operator kind [source] as super + inherit operator ~name:"video.effect" kind [source] as super method stype = source#stype diff --git a/src/operators/video_fade.ml b/src/operators/video_fade.ml index b279574f09..c184355126 100644 --- a/src/operators/video_fade.ml +++ b/src/operators/video_fade.ml @@ -31,7 +31,7 @@ class fade_in ~kind ?(meta="liq_video_fade_in") ?(initial=false) duration fader fadefun source = object (self) - inherit operator kind [source] as super + inherit operator ~name:"video.fade.in" kind [source] as super method stype = source#stype method is_ready = source#is_ready @@ -89,7 +89,7 @@ end class fade_out ~kind ?(meta="liq_video_fade_out") ?(final=false) duration fader fadefun source = object (self) - inherit operator kind [source] as super + inherit operator ~name:"video.fade.out" kind [source] as super method stype = if final then Fallible else source#stype method abort_track = source#abort_track diff --git a/src/operators/video_image.ml b/src/operators/video_image.ml index 168ad7aeb6..6e4254abd9 100644 --- a/src/operators/video_image.ml +++ b/src/operators/video_image.ml @@ -36,7 +36,7 @@ let read_PPM ?alpha fname = * we handle any number of channels. *) class image kind fname duration width height x y alpha meta source = object (self) - inherit operator kind [source] as super + inherit operator ~name:"video.add_image" kind [source] as super method stype = source#stype diff --git a/src/operators/video_text.ml b/src/operators/video_text.ml index a7a239d9cd..1982182d57 100644 --- a/src/operators/video_text.ml +++ b/src/operators/video_text.ml @@ -30,7 +30,7 @@ class text ~kind let video_height = Lazy.force Frame.video_height in let video_width = Lazy.force Frame.video_width in object (self) - inherit operator kind [source] as super + inherit operator ~name:"video.add_text" kind [source] as super method stype = source#stype diff --git a/src/sources/alsa_in.ml b/src/sources/alsa_in.ml index e6bdac1f1a..1347150bff 100644 --- a/src/sources/alsa_in.ml +++ b/src/sources/alsa_in.ml @@ -36,7 +36,7 @@ class mic ~kind ~clock_safe device = let nb_blocks = Alsa_settings.conf_buffer_length#get in let blank () = Array.init buffer_chans (fun _ -> Array.make buffer_length 0.) in object (self) - inherit active_source kind as active_source + inherit active_source ~name:"input.alsa" kind as active_source inherit [float array array] IoRing.input ~nb_blocks ~blank as ioring method private set_clock = diff --git a/src/sources/bjack_in.ml b/src/sources/bjack_in.ml index 18e27b6668..5a349bfa67 100644 --- a/src/sources/bjack_in.ml +++ b/src/sources/bjack_in.ml @@ -37,7 +37,7 @@ class jack_in ~kind ~clock_safe ~nb_blocks ~server = String.make (samples_per_frame * channels * bytes_per_sample) '0' in object (self) - inherit active_source kind as active_source + inherit active_source ~name:"input.jack" kind as active_source inherit [string] IoRing.input ~nb_blocks ~blank as ioring method set_clock = diff --git a/src/sources/external_input.ml b/src/sources/external_input.ml index f1dad07989..0a305f197d 100644 --- a/src/sources/external_input.ml +++ b/src/sources/external_input.ml @@ -43,7 +43,7 @@ class external_input ~kind ~restart ~bufferize ~channels let abg = Generator.create ~log ~kind `Audio in let priority = Tutils.Non_blocking in object (self) - inherit Source.source kind + inherit Source.source ~name:"input.external" kind inherit Generated.source abg ~empty_on_abort:false ~bufferize val mutable should_stop = false diff --git a/src/synth/dssi_op.ml b/src/synth/dssi_op.ml index 915df07770..b168978988 100644 --- a/src/synth/dssi_op.ml +++ b/src/synth/dssi_op.ml @@ -53,7 +53,7 @@ let all_chans = 16 (* chan = None means synth all channels *) class dssi ~kind ?chan plugin descr outputs params source = object (self) - inherit operator kind [source] as super + inherit operator ~name:"dssi" kind [source] as super method stype = source#stype diff --git a/src/synth/synth_op.ml b/src/synth/synth_op.ml index 1d15afd9ba..292213a7e9 100644 --- a/src/synth/synth_op.ml +++ b/src/synth/synth_op.ml @@ -24,7 +24,7 @@ open Source class synth ~kind (synth:Synth.synth) (source:source) chan volume = object (self) - inherit operator kind [source] as super + inherit operator ~name:"synth" kind [source] as super initializer synth#set_volume volume diff --git a/src/tools/harbor.ml b/src/tools/harbor.ml index 81b37d9253..622b22841d 100644 --- a/src/tools/harbor.ml +++ b/src/tools/harbor.ml @@ -63,7 +63,7 @@ let log = Log.make [ "harbor" ] (* Define what we need as a source *) class virtual source ~kind = object (self) - inherit Source.source kind + inherit Source.source ~name:"input.harbor" kind method virtual relay : string -> (string * string) list -> Unix.file_descr -> unit method virtual insert_metadata : (string, string) Hashtbl.t -> unit diff --git a/src/tools/start_stop.ml b/src/tools/start_stop.ml index cb93391458..71e8925435 100644 --- a/src/tools/start_stop.ml +++ b/src/tools/start_stop.ml @@ -149,7 +149,7 @@ class virtual input ~name ~source_kind ~content_kind ~(on_start:unit->unit) ~(on_stop:unit->unit) ~fallible ~autostart = object (self) - inherit Source.active_source content_kind + inherit Source.active_source ~name:source_kind content_kind inherit base ~name ~source_kind ~interactive:fallible ~on_start ~on_stop ~autostart diff --git a/src/visualization/midimeter.ml b/src/visualization/midimeter.ml index 71b0c56f3b..46b1d91664 100644 --- a/src/visualization/midimeter.ml +++ b/src/visualization/midimeter.ml @@ -24,7 +24,7 @@ open Source class midimeter ~kind source = object - inherit operator kind [source] as super + inherit operator ~name:"midimeter" kind [source] as super method stype = source#stype method is_ready = source#is_ready diff --git a/src/visualization/video_volume.ml b/src/visualization/video_volume.ml index 8aff3777e5..d4deb3a053 100644 --- a/src/visualization/video_volume.ml +++ b/src/visualization/video_volume.ml @@ -35,7 +35,7 @@ class visu ~kind source = let width = Lazy.force Frame.video_width in let height = Lazy.force Frame.video_height in object (self) - inherit operator kind [source] as super + inherit operator ~name:"video.volume" kind [source] as super method stype = source#stype method is_ready = source#is_ready diff --git a/src/visualization/vis_volume.ml b/src/visualization/vis_volume.ml index 33794c6131..4f4776cd86 100644 --- a/src/visualization/vis_volume.ml +++ b/src/visualization/vis_volume.ml @@ -31,7 +31,7 @@ let f_group_size = float group_size class vumeter ~kind source = let channels = (Frame.type_of_kind kind).Frame.audio in object (self) - inherit operator kind [source] as super + inherit operator ~name:"visu.volume" kind [source] as super method stype = source#stype method is_ready = source#is_ready