qtmux: remove c++ comments and add some more comments.
authorMichael Smith <msmith@songbirdnest.com>
Wed, 9 Dec 2009 01:59:04 +0000 (17:59 -0800)
committerMichael Smith <msmith@songbirdnest.com>
Wed, 9 Dec 2009 01:59:04 +0000 (17:59 -0800)
gst/qtmux/atoms.c
gst/qtmux/gstqtmux.c

index 79117cc..66b0a1a 100644 (file)
@@ -3359,6 +3359,8 @@ build_ima_adpcm_atom (gint channels, gint rate, gint blocksize)
 
   /* This atom's content is a WAVE header, including 2 bytes of extra data.
      Note that all of this is little-endian, unlike most stuff in qt. */
+  /* 4 bytes header per channel (including 1 sample). Then 2 samples per byte
+     for the rest. Simplifies to this. */
   samplesperblock = 2 * blocksize / channels - 7;
   bytespersec = rate * blocksize / samplesperblock;
   GST_WRITE_UINT16_LE (data, 0x11);
index 5899d2a..5162a9e 100644 (file)
@@ -1723,9 +1723,12 @@ gst_qt_mux_audio_sink_set_caps (GstPad * pad, GstCaps * caps)
       GST_DEBUG_OBJECT (qtmux, "broken caps, block_align missing");
       goto refuse_caps;
     }
-    // Currently only supports WAV-style IMA ADPCM, for which the codec id is
-    // 0x11
+    /* Currently only supports WAV-style IMA ADPCM, for which the codec id is
+       0x11 */
     entry.fourcc = MS_WAVE_FOURCC (0x11);
+    /* 4 byte header per channel (including one sample). 2 samples per byte
+       remaining. Simplifying gives the following (samples per block per
+       channel) */
     entry.samples_per_packet = 2 * blocksize / channels - 7;
     entry.bytes_per_sample = 2;