[Pkg-ocaml-maint-commits] [SCM] liquidsoap packaging branch, master, updated. debian/0.9.2-1-2-g90d5e34

Romain Beauxis toots at rastageeks.org
Thu Mar 25 17:20:36 UTC 2010


The following commit has been merged in the master branch:
commit 837c49358f252e02508b98e170fa98a03b23b5e1
Author: Romain Beauxis <toots at rastageeks.org>
Date:   Thu Mar 25 11:52:47 2010 -0500

    Prepared new upload

diff --git a/debian/changelog b/debian/changelog
index cb5eb0c..87f2cab 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+liquidsoap (0.9.2-2) unstable; urgency=low
+
+  * Patched liquidsoap to build against ocaml-theora 0.2.0~svn6618
+  Closes: #574628
+  * Fixed SDL output code, added libsdl-ocaml-dev in build-dep to
+    enable SDL output.
+  Closes: #574625 
+
+ -- Romain Beauxis <toots at rastageeks.org>  Thu, 25 Mar 2010 11:45:29 -0500
+
 liquidsoap (0.9.2-1) unstable; urgency=low
 
   * New upstream release.
diff --git a/debian/control b/debian/control
index b4b26b7..d94377e 100644
--- a/debian/control
+++ b/debian/control
@@ -12,11 +12,11 @@ Build-Depends: cdbs (>= 0.4.53), debhelper (>= 7.0.1), ocaml-nox, dh-ocaml (>= 0
   libalsa-ocaml-dev (>= 0.1.4) [!kfreebsd-i386 !hurd-i386 !kfreebsd-amd64], 
   libpcre-ocaml-dev, libladspa-ocaml-dev (>= 0.1.2), sox,
   libsoundtouch-ocaml-dev (>= 0.1.5), liblastfm-ocaml-dev (>= 0.2.0),
-  libspeex-ocaml-dev (>= 0.1.2), libgavl-ocaml-dev (>= 0.1.2), libtheora-ocaml-dev (>= 0.1.2), 
+  libspeex-ocaml-dev (>= 0.1.2), libgavl-ocaml-dev (>= 0.1.2), libtheora-ocaml-dev (>= 0.2.0~svn6618), 
   libportaudio-ocaml-dev (>= 0.1.3), libpulse-ocaml-dev (>= 0.1.1), 
   libsamplerate-ocaml-dev (>= 0.1.1), libxmlplaylist-ocaml-dev (>= 0.1.2), 
-  libmagic-ocaml-dev (>= 0.3.6), libbjack-ocaml-dev (>= 0.1.3)
-Standards-Version: 3.8.3
+  libmagic-ocaml-dev (>= 0.3.6), libbjack-ocaml-dev (>= 0.1.3), libsdl-ocaml-dev
+Standards-Version: 3.8.4
 Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/liquidsoap.git
 Vcs-Browser: http://git.debian.org/?p=pkg-ocaml-maint/packages/liquidsoap.git
 Homepage: http://savonet.sourceforge.net/
diff --git a/debian/control.in b/debian/control.in
index 95f0416..a63a1d7 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -12,11 +12,11 @@ Build-Depends: @cdbs@,
   libalsa-ocaml-dev (>= 0.1.4) [!kfreebsd-i386 !hurd-i386 !kfreebsd-amd64], 
   libpcre-ocaml-dev, libladspa-ocaml-dev (>= 0.1.2), sox,
   libsoundtouch-ocaml-dev (>= 0.1.5), liblastfm-ocaml-dev (>= 0.2.0),
-  libspeex-ocaml-dev (>= 0.1.2), libgavl-ocaml-dev (>= 0.1.2), libtheora-ocaml-dev (>= 0.1.2), 
+  libspeex-ocaml-dev (>= 0.1.2), libgavl-ocaml-dev (>= 0.1.2), libtheora-ocaml-dev (>= 0.2.0~svn6618), 
   libportaudio-ocaml-dev (>= 0.1.3), libpulse-ocaml-dev (>= 0.1.1), 
   libsamplerate-ocaml-dev (>= 0.1.1), libxmlplaylist-ocaml-dev (>= 0.1.2), 
-  libmagic-ocaml-dev (>= 0.3.6), libbjack-ocaml-dev (>= 0.1.3)
-Standards-Version: 3.8.3
+  libmagic-ocaml-dev (>= 0.3.6), libbjack-ocaml-dev (>= 0.1.3), libsdl-ocaml-dev
+Standards-Version: 3.8.4
 Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/liquidsoap.git
 Vcs-Browser: http://git.debian.org/?p=pkg-ocaml-maint/packages/liquidsoap.git
 Homepage: http://savonet.sourceforge.net/
diff --git a/debian/patches/fix_sdl_output.patch b/debian/patches/fix_sdl_output.patch
new file mode 100644
index 0000000..0b7728a
--- /dev/null
+++ b/debian/patches/fix_sdl_output.patch
@@ -0,0 +1,53 @@
+Index: liquidsoap/src/outputs/sdl_out.ml
+===================================================================
+--- liquidsoap.orig/src/outputs/sdl_out.ml	2009-10-30 15:35:23.000000000 -0500
++++ liquidsoap/src/outputs/sdl_out.ml	2010-03-25 11:49:50.000000000 -0500
+@@ -25,7 +25,7 @@
+ 
+ let chunksize = 4096
+ 
+-class output source start =
++class output ~infallible ~autostart ~on_start ~on_stop source =
+   (*
+   let channels = Fmt.channels () in
+   let samples_per_frame = Fmt.samples_per_frame () in
+@@ -36,7 +36,8 @@
+   let video_width = Fmt.video_width () in
+   let video_height = Fmt.video_height () in
+ object (self)
+-  inherit Output.output ~name:"sdl" ~kind:"output.sdl" source start
++  inherit Output.output ~infallible ~on_start ~on_stop
++                  ~name:"sdl" ~kind:"output.sdl" source autostart
+ 
+   initializer
+     (* TODO: do not initialize twice *)
+@@ -106,15 +107,25 @@
+ 
+ let () =
+   Lang.add_operator "output.sdl"
+-    [ "start",
++    (Output.proto @ [ "start",
+       Lang.bool_t, Some (Lang.bool true),
+       Some "Start output on operator initialization." ;
+ 
+       "", Lang.source_t, None, None
+-    ]
++    ])
+     ~category:Lang.Output
+     ~descr:"Display a video using SDL."
+     (fun p _ ->
+-       let start = Lang.to_bool (List.assoc "start" p) in
++       let autostart = Lang.to_bool (List.assoc "start" p) in
++       let infallible = not (Lang.to_bool (List.assoc "fallible" p)) in
++       let on_start =
++         let f = List.assoc "on_start" p in
++           fun () -> ignore (Lang.apply f [])
++       in
++       let on_stop =
++         let f = List.assoc "on_stop" p in
++           fun () -> ignore (Lang.apply f [])
++       in
+        let source = List.assoc "" p in
+-         ((new output source start):>Source.source))
++         ((new output ~infallible ~autostart ~on_start ~on_stop 
++                        source):>Source.source))
diff --git a/debian/patches/magic_follow_symlink.patch b/debian/patches/magic_follow_symlink.patch
new file mode 100644
index 0000000..59f02a8
--- /dev/null
+++ b/debian/patches/magic_follow_symlink.patch
@@ -0,0 +1,13 @@
+Index: liquidsoap/configure
+===================================================================
+--- liquidsoap.orig/configure	2010-03-25 11:51:47.000000000 -0500
++++ liquidsoap/configure	2010-03-25 11:52:03.000000000 -0500
+@@ -5306,7 +5306,7 @@
+ else
+     w_MAGIC=yes
+     cat >> src/configure.ml <<EOCONF
+-let magic_cookie = Magic.create ~flags:[Magic.Mime] []
++let magic_cookie = Magic.create ~flags:[Magic.Mime; Magic.Symlink] []
+ let file_mime s = Some (Magic.file magic_cookie s)
+ let data_mime ?len s = Some (Magic.buffer magic_cookie ?len s)
+ EOCONF
diff --git a/debian/patches/move_portaudio_low_in_in.patch b/debian/patches/move_portaudio_low_in_in.patch
index 6312883..95b367d 100644
--- a/debian/patches/move_portaudio_low_in_in.patch
+++ b/debian/patches/move_portaudio_low_in_in.patch
@@ -1,7 +1,7 @@
 Index: liquidsoap/scripts/utils.liq
 ===================================================================
---- liquidsoap.orig/scripts/utils.liq	2009-10-30 15:10:08.000000000 -0500
-+++ liquidsoap/scripts/utils.liq	2009-10-30 15:10:34.000000000 -0500
+--- liquidsoap.orig/scripts/utils.liq	2009-10-31 17:33:00.000000000 -0500
++++ liquidsoap/scripts/utils.liq	2010-03-25 11:49:52.000000000 -0500
 @@ -157,14 +157,14 @@
  %ifdef input.oss
    in = fun () -> input.oss(id="oss_mic")
diff --git a/debian/patches/replay_gain_quiet_mode.patch b/debian/patches/replay_gain_quiet_mode.patch
index 8ac5284..b8eadcc 100644
--- a/debian/patches/replay_gain_quiet_mode.patch
+++ b/debian/patches/replay_gain_quiet_mode.patch
@@ -1,7 +1,7 @@
 Index: liquidsoap/scripts/extract-replaygain
 ===================================================================
---- liquidsoap.orig/scripts/extract-replaygain	2009-10-30 17:04:31.000000000 -0500
-+++ liquidsoap/scripts/extract-replaygain	2009-10-30 17:04:41.000000000 -0500
+--- liquidsoap.orig/scripts/extract-replaygain	2009-10-31 17:32:59.000000000 -0500
++++ liquidsoap/scripts/extract-replaygain	2010-03-25 11:49:53.000000000 -0500
 @@ -15,7 +15,7 @@
  
    if (`which mp3gain`) {
diff --git a/debian/patches/series b/debian/patches/series
index e8c7537..e2e9b3a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,5 @@
+magic_follow_symlink.patch
+fix_sdl_output.patch
+theora_0.2.0_fix.patch
 move_portaudio_low_in_in.patch
 replay_gain_quiet_mode.patch
diff --git a/debian/patches/theora_0.2.0_fix.patch b/debian/patches/theora_0.2.0_fix.patch
new file mode 100644
index 0000000..27f8ee6
--- /dev/null
+++ b/debian/patches/theora_0.2.0_fix.patch
@@ -0,0 +1,168 @@
+Index: liquidsoap/src/ogg_formats/theora_format.ml
+===================================================================
+--- liquidsoap.orig/src/ogg_formats/theora_format.ml	2009-10-30 15:35:23.000000000 -0500
++++ liquidsoap/src/ogg_formats/theora_format.ml	2010-03-25 11:49:51.000000000 -0500
+@@ -23,45 +23,27 @@
+ let check = Theora.Decoder.check
+ 
+ let decoder os =
+-  let decoder = ref None in
+   let meta    = ref None in
+-  let packet1 = ref None in
+-  let packet2 = ref None in
+-  let packet3 = ref None in
++  let fps     = ref None in
++  let decoder = Theora.Decoder.create () in
+   let fill feed =
+-    (* Decoder is created upon first decoding..*)
+-    let decoder,fps =
+-      match !decoder with
++    let fps =
++      match !fps with
+         | None ->
+-           let packet1 =
+-             match !packet1 with
+-               | None ->
+-                  let p = Ogg.Stream.get_packet os in
+-                  packet1 := Some p; p
+-               | Some p -> p
+-           in
+-           let packet2 =
+-             match !packet2 with
+-               | None ->
+-                  let p = Ogg.Stream.get_packet os in
+-                  packet2 := Some p; p
+-               | Some p -> p
+-           in
+-           let packet3 =
+-             match !packet3 with
+-               | None ->
+-                   let p = Ogg.Stream.get_packet os in
+-                   packet3 := Some p; p
+-               | Some p -> p
+-           in
+-           let (d,info,vendor,m) = Theora.Decoder.create packet1 packet2 packet3 in
+-           let fps = (float (info.Theora.fps_numerator)) /.
+-                     (float (info.Theora.fps_denominator))
+-           in
+-           meta := Some (vendor,m);
+-           decoder := Some (d,fps);
+-           d,fps
+-        | Some d -> d
++           let p = Ogg.Stream.get_packet os in
++           begin
++            try
++             let (info,vendor,m) = Theora.Decoder.headerin decoder p in
++             let nfps = (float (info.Theora.fps_numerator)) /.
++                       (float (info.Theora.fps_denominator))
++             in
++             meta := Some (vendor,m);
++             fps := Some nfps ;
++             nfps
++            with
++              | Theora.Not_enough_data -> raise Ogg.Not_enough_data
++           end
++        | Some fps -> fps
+     in
+     let ret = Theora.Decoder.get_yuv decoder os in
+     let ret =
+@@ -70,9 +52,11 @@
+         y_width   = ret.Theora.y_width;
+         y_height  = ret.Theora.y_height;
+         y_stride  = ret.Theora.y_stride;
+-        uv_width  = ret.Theora.uv_width;
+-        uv_height = ret.Theora.uv_height;
+-        uv_stride = ret.Theora.uv_stride;
++        (** This is an approximation when format
++          * is YUV420 *)
++        uv_width  = ret.Theora.u_width;
++        uv_height = ret.Theora.u_height;
++        uv_stride = ret.Theora.u_stride;
+         fps       = fps;
+         y = ret.Theora.y;
+         u = ret.Theora.u;
+@@ -90,48 +74,34 @@
+ let create_encoder ~quality ~metadata () =
+   let frame_x = Fmt.video_width () in
+   let frame_y = Fmt.video_height () in
+-  (* Theora has a divisible-by-sixteen restriction for the encoded video size. *)
+-  (* Scale the frame size up to the nearest /16 and calculate offsets. *)
+-  let video_x = ((frame_x + 15) lsr 4) lsl 4 in
+-  let video_y = ((frame_y + 15) lsr 4) lsl 4 in
+-  let frame_x_offset = ((video_x - frame_x) / 2) land (lnot 1) in
+-  let frame_y_offset = ((video_y - frame_y) / 2) land (lnot 1) in
+   let video_r = 800 in
+   (* TODO: variable FPS *)
+   let fps = Fmt.video_frames_of_seconds 1. in
++  let version_major,version_minor,version_subminor = Theora.version_number in
+   let info =
+     {
+      Theora.
+-      width = video_x;
+-      height = video_y;
+       frame_width = frame_x;
+       frame_height = frame_y;
+-      offset_x = frame_x_offset;
+-      offset_y = frame_y_offset;
++      picture_width = frame_x;
++      picture_height = frame_y;
++      picture_x = 0;
++      picture_y = 0;
+       fps_numerator = fps;
+       fps_denominator = 1;
+       aspect_numerator = 1;
+       aspect_denominator = 1;
++      keyframe_granule_shift = Theora.default_granule_shift;
+       colorspace = Theora.CS_unspecified;
+       target_bitrate = video_r;
+       quality = quality;
+-      quick_p = true;
+-      version_major = 0;
+-      version_minor = 0;
+-      version_subminor = 0;
+-      dropframes_p = false;
+-      keyframe_auto_p = true;
+-      keyframe_frequency = 64;
+-      keyframe_frequency_force = 64;
+-      keyframe_data_target_bitrate = (video_r * 3 / 2);
+-      keyframe_auto_threshold = 80;
+-      keyframe_mindistance = 8;
+-      noise_sensitivity = 1;
+-      sharpness = 1; (* ??? *)
+-      pixelformat = Theora.PF_420
++      version_major = version_major;
++      version_minor = version_minor;
++      version_subminor = version_subminor;
++      pixel_fmt = Theora.PF_420
+     }
+   in
+-  let enc = Theora.Encoder.create info in
++  let enc = Theora.Encoder.create info metadata in
+   let started = ref false in
+   let header_encoder os = 
+     Theora.Encoder.encode_header enc os;
+@@ -142,8 +112,6 @@
+     Some (Theora.Skeleton.fisbone ~serialno ~info ())
+   in
+   let stream_start os = 
+-    Theora.Encoder.encode_comments os metadata;
+-    Theora.Encoder.encode_tables enc os;
+     Ogg_encoder.flush_pages os
+   in
+   let ((y,y_stride), (u, v, uv_stride) as yuv) =
+@@ -154,9 +122,12 @@
+     Theora.y_width = Fmt.video_width ();
+     Theora.y_height = Fmt.video_height ();
+     Theora.y_stride = y_stride;
+-    Theora.uv_width = Fmt.video_width () / 2;
+-    Theora.uv_height = Fmt.video_height () / 2;
+-    Theora.uv_stride = uv_stride;
++    Theora.u_width = Fmt.video_width () / 2;
++    Theora.u_height = Fmt.video_height () / 2;
++    Theora.u_stride = uv_stride;
++    Theora.v_width = Fmt.video_width () / 2;
++    Theora.v_height = Fmt.video_height () / 2;
++    Theora.v_stride = uv_stride;
+     Theora.y = y;
+     Theora.u = u;
+     Theora.v = v;

-- 
liquidsoap packaging



More information about the Pkg-ocaml-maint-commits mailing list