Merge writer-thread with original which was time-cleanup.
authorCarl Hetherington <cth@carlh.net>
Thu, 17 Jan 2013 21:42:43 +0000 (21:42 +0000)
committerCarl Hetherington <cth@carlh.net>
Thu, 17 Jan 2013 21:42:43 +0000 (21:42 +0000)
66 files changed:
ChangeLog
analog [deleted file]
debian/changelog
optimise/8proc.log [new file with mode: 0644]
optimise/analog [new file with mode: 0755]
optimise/plotlog [new file with mode: 0755]
src/lib/ab_transcode_job.cc
src/lib/ab_transcode_job.h
src/lib/ab_transcoder.cc
src/lib/ab_transcoder.h
src/lib/audio_decoder.cc
src/lib/audio_decoder.h
src/lib/check_hashes_job.cc
src/lib/check_hashes_job.h
src/lib/config.cc
src/lib/config.h
src/lib/dcp_video_frame.cc
src/lib/dcp_video_frame.h
src/lib/decoder.cc
src/lib/decoder.h
src/lib/decoder_factory.cc
src/lib/decoder_factory.h
src/lib/encoder.cc
src/lib/encoder.h
src/lib/examine_content_job.cc
src/lib/examine_content_job.h
src/lib/external_audio_decoder.cc
src/lib/external_audio_decoder.h
src/lib/ffmpeg_decoder.cc
src/lib/ffmpeg_decoder.h
src/lib/film.cc
src/lib/film.h
src/lib/filter_graph.cc
src/lib/filter_graph.h
src/lib/format.cc
src/lib/format.h
src/lib/image.cc
src/lib/image.h
src/lib/imagemagick_decoder.cc
src/lib/imagemagick_decoder.h
src/lib/make_dcp_job.cc
src/lib/make_dcp_job.h
src/lib/matcher.h
src/lib/options.h
src/lib/server.cc
src/lib/subtitle.cc
src/lib/transcode_job.cc
src/lib/transcode_job.h
src/lib/transcoder.cc
src/lib/transcoder.h
src/lib/util.cc
src/lib/util.h
src/lib/video_decoder.cc
src/lib/video_decoder.h
src/tools/makedcp.cc
src/wx/config_dialog.cc
src/wx/config_dialog.h
src/wx/film_editor.cc
src/wx/film_editor.h
src/wx/film_viewer.cc
src/wx/properties_dialog.cc
test/metadata.ref
test/test.cc
windows/dvdomatic.rc
wrapper/makedcp [deleted file]
wscript

index f2563ef109b6b45a780effcf6755c5f17b3be3fc..c82fe2ec791eff1125291a4f40d510466318e229 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2013-01-12  Carl Hetherington  <cth@carlh.net>
+
+       * Version 0.71beta2 released.
+
+2013-01-12  Carl Hetherington  <cth@carlh.net>
+
+       * Version 0.71beta1 released.
+
+2013-01-12  Carl Hetherington  <cth@carlh.net>
+
+       * Untested support for splitting DCPs
+       into multiple reels.
+
 2013-01-09  Carl Hetherington  <cth@carlh.net>
 
        * Try to build with 0.10.4-ish ffmpeg.
diff --git a/analog b/analog
deleted file mode 100755 (executable)
index 1743008..0000000
--- a/analog
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/python
-
-import sys
-
-class Encoder:
-      def __init__(self):
-            self.awake = 0
-            self.asleep = 0
-            self.last_event = 0
-            self.state = None
-
-encoders = dict()
-
-f = open(sys.argv[1], 'r')
-while 1:
-      l = f.readline()
-      if l == '':
-        break
-
-      s = l.split()
-      if len(s) == 0:
-            continue
-
-      t = s[0].split(':')
-      if len(t) != 2:
-            continue
-
-      secs = float(t[0]) + float(t[1]) / 1e6
-      if s[1] == 'encoder' and s[2] == 'thread' and s[4] == 'finishes':
-            tid = s[3]
-            if not tid in encoders:
-                  encoders[tid] = Encoder()
-
-            assert(encoders[tid].state == None or encoders[tid].state == 'awake')
-            if encoders[tid].state == 'awake':
-                  encoders[tid].awake += (secs - encoders[tid].last_event)
-
-            encoders[tid].state = 'asleep'
-            encoders[tid].last_event = secs
-
-      elif s[1] == 'encoder' and s[2] == 'thread' and s[4] == 'begins':
-            tid = s[3]
-            if not tid in encoders:
-                  encoders[tid] = Encoder()
-
-            if encoders[tid].state is not None:
-                  encoders[tid].asleep += (secs - encoders[tid].last_event)
-
-            encoders[tid].state = 'awake'
-            encoders[tid].last_event = secs
-
-for k, v in encoders.iteritems():
-      print '%s: awake %f asleep %f' % (k, v.awake, v.asleep)
index ec1e3c77406a9e3883f604777e6fb9cff5d2e907..b8385a4b020bdd8db606901420891afab446bbc9 100644 (file)
@@ -1,8 +1,10 @@
-dvdomatic (0.70-1) UNRELEASED; urgency=low
+dvdomatic (0.71beta2-1) UNRELEASED; urgency=low
 
   * New upstream release.
+  * New upstream release.
+  * New upstream release.
 
- -- Carl Hetherington <carl@houllier.lan>  Mon, 07 Jan 2013 23:57:26 +0000
+ -- Carl Hetherington <cth@carlh.net>  Sat, 12 Jan 2013 23:07:15 +0000
 
 dvdomatic (0.70beta3-1) UNRELEASED; urgency=low
 
diff --git a/optimise/8proc.log b/optimise/8proc.log
new file mode 100644 (file)
index 0000000..edc40d9
--- /dev/null
@@ -0,0 +1,2427 @@
+Fri Jan 11 19:38:14 2013: DVD-o-matic 0.71pre git d8106aabb6 using libopenjpeg 1.5.0, libavcodec 54.86.100, libavfilter 3.32.100, libavformat 54.59.107, libavutil 52.13.100, libpostproc 52.2.100, libswscale 2.1.103, ImageMagick 6.6.9-7 2012-08-17 Q16 http://www.imagemagick.org, libssh 0.5.2/openssl/zlib, libdcp 0.36pre git e651d843c5
+Fri Jan 11 19:38:14 2013: Starting to make DCP on ip-10-240-125-92
+Fri Jan 11 19:38:14 2013: Content is /mnt/boon_telly.mkv; type video
+Fri Jan 11 19:38:14 2013: Content length 1
+Fri Jan 11 19:38:14 2013: Content digest 72332980e2f9b2fec52e665d9de67f5d
+Fri Jan 11 19:38:14 2013: 8 threads
+Fri Jan 11 19:38:14 2013: J2K bandwidth 200000000
+Fri Jan 11 19:38:14 2013: Transcode job starting
+Fri Jan 11 19:38:14 2013: Audio delay is 0ms
+Fri Jan 11 19:38:14 2013: Will resample audio from 44100 to 47952
+1357933094:340201 encoder thread 0x7fe358024570 sleeps
+1357933094:340494 encoder thread 0x7fe3580a45f0 sleeps
+1357933094:340739 encoder thread 0x7fe3580a4940 sleeps
+1357933094:340894 encoder thread 0x7fe3580a4c90 sleeps
+1357933094:341042 encoder thread 0x7fe3580a5680 sleeps
+1357933094:341172 encoder thread 0x7fe3580a5330 sleeps
+1357933094:341331 encoder thread 0x7fe3580a4fe0 sleeps
+1357933094:341502 encoder thread 0x7fe3580a6090 sleeps
+1357933094:341656 encoder thread 0x7fe3580a63e0 sleeps
+1357933094:341814 encoder thread 0x7fe3580a59d0 sleeps
+1357933094:342030 encoder thread 0x7fe3580a6a80 sleeps
+1357933094:342242 encoder thread 0x7fe3580a6730 sleeps
+1357933094:342402 encoder thread 0x7fe3580a5d40 sleeps
+1357933094:342670 writer sleeps with a queue of 0
+1357933094:342784 encoder thread 0x7fe358031200 sleeps
+1357933094:342894 encoder thread 0x7fe358031550 sleeps
+1357933094:343025 encoder thread 0x7fe358030eb0 sleeps
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0, output at 0
+Fri Jan 11 19:38:14 2013: New graph for 320x240, pixel format 0
+1357933094:359750 Decoder emits 0
+1357933094:359959 adding to queue of 0
+1357933094:360201 encoder thread 0x7fe358024570 wakes with queue of 1
+Fri Jan 11 19:38:14 2013: First video at 0, first audio at 0.279, pushing 12304 audio frames of silence for 2 channels (4 bytes per sample)
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe358024570 pops frame 0 from queue
+1357933094:360518 encoder thread 0x7fe358024570 begins local encode of 0
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.033, output at 0.0333667
+1357933094:364961 Decoder emits 1
+1357933094:365141 adding to queue of 0
+1357933094:365349 encoder thread 0x7fe3580a45f0 wakes with queue of 1
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe3580a45f0 pops frame 1 from queue
+1357933094:365531 encoder thread 0x7fe3580a45f0 begins local encode of 1
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.067, output at 0.0667333
+1357933094:366438 Decoder emits 2
+1357933094:366640 adding to queue of 0
+1357933094:366797 encoder thread 0x7fe3580a4940 wakes with queue of 1
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe3580a4940 pops frame 2 from queue
+1357933094:366971 encoder thread 0x7fe3580a4940 begins local encode of 2
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.1, output at 0.1001
+1357933094:367910 Decoder emits 3
+1357933094:368090 adding to queue of 0
+1357933094:368247 encoder thread 0x7fe3580a4c90 wakes with queue of 1
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe3580a4c90 pops frame 3 from queue
+1357933094:368480 encoder thread 0x7fe3580a4c90 begins local encode of 3
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.133, output at 0.133467
+1357933094:369833 Decoder emits 4
+1357933094:369996 adding to queue of 0
+1357933094:370158 encoder thread 0x7fe358031550 wakes with queue of 1
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe358031550 pops frame 4 from queue
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.167, output at 0.166833
+1357933094:371634 Decoder emits 5
+1357933094:371799 adding to queue of 0
+1357933094:372031 encoder thread 0x7fe3580a6a80 wakes with queue of 1
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe3580a6a80 pops frame 5 from queue
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.2, output at 0.2002
+1357933094:373749 Decoder emits 6
+1357933094:374043 adding to queue of 0
+1357933094:374300 encoder thread 0x7fe3580a4fe0 wakes with queue of 1
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe3580a4fe0 pops frame 6 from queue
+1357933094:374572 encoder thread 0x7fe3580a4fe0 begins local encode of 6
+Fri Jan 11 19:38:14 2013: Remote encode of 4 on shankly failed (Host not found (authoritative)); thread sleeping for 10s
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe358031550 pushes frame 4 back onto queue after failure
+Fri Jan 11 19:38:14 2013: Remote encode of 5 on shankly failed (Host not found (authoritative)); thread sleeping for 10s
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.234, output at 0.233567
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe3580a6a80 pushes frame 5 back onto queue after failure
+1357933094:376385 Decoder emits 7
+1357933094:376576 adding to queue of 2
+1357933094:376741 encoder thread 0x7fe3580a6090 wakes with queue of 3
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe3580a6090 pops frame 5 from queue
+1357933094:376955 encoder thread 0x7fe358030eb0 wakes with queue of 2
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe358030eb0 pops frame 4 from queue
+1357933094:377373 encoder thread 0x7fe3580a59d0 wakes with queue of 1
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.267, output at 0.266933
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe3580a59d0 pops frame 7 from queue
+Fri Jan 11 19:38:14 2013: Remote encode of 5 on shankly-gbit failed (Host not found (authoritative)); thread sleeping for 10s
+1357933094:378831 encoder thread 0x7fe3580a59d0 begins local encode of 7
+Fri Jan 11 19:38:14 2013: Remote encode of 4 on shankly failed (Host not found (authoritative)); thread sleeping for 10s
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe3580a6090 pushes frame 5 back onto queue after failure
+1357933094:379408 Decoder emits 8
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe358030eb0 pushes frame 4 back onto queue after failure
+1357933094:381559 adding to queue of 2
+1357933094:381743 encoder thread 0x7fe3580a5680 wakes with queue of 3
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe3580a5680 pops frame 4 from queue
+1357933094:382048 encoder thread 0x7fe3580a5680 begins local encode of 4
+1357933094:382177 encoder thread 0x7fe3580a5d40 wakes with queue of 2
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe3580a5d40 pops frame 5 from queue
+1357933094:382637 encoder thread 0x7fe3580a6730 wakes with queue of 1
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe3580a6730 pops frame 8 from queue
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.3, output at 0.3003
+Fri Jan 11 19:38:14 2013: Remote encode of 5 on shankly-gbit failed (Host not found (authoritative)); thread sleeping for 10s
+1357933094:385624 Decoder emits 9
+Fri Jan 11 19:38:14 2013: Remote encode of 8 on shankly-gbit failed (Host not found (authoritative)); thread sleeping for 10s
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe3580a5d40 pushes frame 5 back onto queue after failure
+1357933094:386344 adding to queue of 1
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe3580a6730 pushes frame 8 back onto queue after failure
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.334, output at 0.333667
+1357933094:387790 encoder thread 0x7fe358031200 wakes with queue of 3
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe358031200 pops frame 8 from queue
+1357933094:388454 encoder thread 0x7fe3580a63e0 wakes with queue of 2
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe3580a63e0 pops frame 5 from queue
+1357933094:389086 Decoder emits 10
+1357933094:389317 encoder thread 0x7fe3580a5330 wakes with queue of 1
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe3580a5330 pops frame 9 from queue
+1357933094:390132 encoder thread 0x7fe3580a5330 begins local encode of 9
+Fri Jan 11 19:38:14 2013: Remote encode of 8 on shankly failed (Host not found (authoritative)); thread sleeping for 10s
+1357933094:391076 adding to queue of 0
+Fri Jan 11 19:38:14 2013: Remote encode of 5 on shankly-gbit failed (Host not found (authoritative)); thread sleeping for 10s
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe358031200 pushes frame 8 back onto queue after failure
+Fri Jan 11 19:38:14 2013: Encoder thread 0x7fe3580a63e0 pushes frame 5 back onto queue after failure
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.367, output at 0.367033
+1357933094:393896 Decoder emits 11
+1357933094:394191 adding to queue of 3
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.4, output at 0.4004
+1357933094:396333 Decoder emits 12
+1357933094:396622 adding to queue of 4
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.434, output at 0.433767
+1357933094:398815 Decoder emits 13
+1357933094:399193 adding to queue of 5
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.467, output at 0.467133
+1357933094:401444 Decoder emits 14
+1357933094:401823 adding to queue of 6
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.501, output at 0.5005
+1357933094:404225 Decoder emits 15
+1357933094:404539 adding to queue of 7
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.534, output at 0.533867
+1357933094:406560 Decoder emits 16
+1357933094:406843 adding to queue of 8
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.567, output at 0.567233
+1357933094:408774 Decoder emits 17
+1357933094:409048 adding to queue of 9
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.601, output at 0.6006
+1357933094:411389 Decoder emits 18
+1357933094:411689 adding to queue of 10
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.634, output at 0.633967
+1357933094:413810 Decoder emits 19
+1357933094:414127 adding to queue of 11
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.667, output at 0.667333
+1357933094:416830 Decoder emits 20
+1357933094:417080 adding to queue of 12
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.701, output at 0.7007
+1357933094:419640 Decoder emits 21
+1357933094:419904 adding to queue of 13
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.734, output at 0.734067
+1357933094:421940 Decoder emits 22
+1357933094:422174 adding to queue of 14
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.767, output at 0.767433
+1357933094:423850 Decoder emits 23
+1357933094:424200 adding to queue of 15
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.801, output at 0.8008
+1357933094:425983 Decoder emits 24
+1357933094:426251 adding to queue of 16
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.834, output at 0.834167
+1357933094:428361 Decoder emits 25
+1357933094:428579 adding to queue of 17
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.868, output at 0.867533
+1357933094:430320 Decoder emits 26
+1357933094:430564 adding to queue of 18
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.901, output at 0.9009
+1357933094:432926 Decoder emits 27
+1357933094:433234 adding to queue of 19
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.934, output at 0.934267
+1357933094:435586 Decoder emits 28
+1357933094:435813 adding to queue of 20
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 0.968, output at 0.967633
+1357933094:438455 Decoder emits 29
+1357933094:440090 adding to queue of 21
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 1.001, output at 1.001
+1357933094:444491 Decoder emits 30
+1357933094:444860 adding to queue of 22
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 1.034, output at 1.03437
+1357933094:448724 Decoder emits 31
+1357933094:448976 adding to queue of 23
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 1.068, output at 1.06773
+1357933094:451685 Decoder emits 32
+1357933094:451946 adding to queue of 24
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 1.101, output at 1.1011
+1357933094:454092 Decoder emits 33
+1357933094:454334 adding to queue of 25
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 1.134, output at 1.13447
+1357933094:465182 Decoder emits 34
+1357933094:465635 adding to queue of 26
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 1.168, output at 1.16783
+1357933094:469982 Decoder emits 35
+1357933094:470438 adding to queue of 27
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 1.201, output at 1.2012
+1357933094:489678 Decoder emits 36
+1357933094:490046 adding to queue of 28
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 1.235, output at 1.23457
+1357933094:492329 Decoder emits 37
+1357933094:492583 adding to queue of 29
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 1.268, output at 1.26793
+1357933094:494702 Decoder emits 38
+1357933094:494982 adding to queue of 30
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 1.301, output at 1.3013
+1357933094:497256 Decoder emits 39
+1357933094:497654 adding to queue of 31
+Fri Jan 11 19:38:14 2013: Source video frame ready; source at 1.335, output at 1.33467
+1357933094:501057 Decoder emits 40
+1357933094:501413 decoder sleeps with queue of 32
+Fri Jan 11 19:38:21 2013: Finished locally-encoded frame 3
+Fri Jan 11 19:38:21 2013: Finished locally-encoded frame 1
+Fri Jan 11 19:38:21 2013: Finished locally-encoded frame 6
+Fri Jan 11 19:38:21 2013: Finished locally-encoded frame 4
+Fri Jan 11 19:38:21 2013: Finished locally-encoded frame 2
+Fri Jan 11 19:38:21 2013: Finished locally-encoded frame 0
+Fri Jan 11 19:38:21 2013: Finished locally-encoded frame 9
+Fri Jan 11 19:38:21 2013: Finished locally-encoded frame 7
+1357933101:993117 encoder thread 0x7fe3580a4c90 finishes local encode of 3
+1357933101:993423 writer wakes with a queue of 1
+1357933102:3937 encoder thread 0x7fe3580a45f0 finishes local encode of 1
+1357933102:7985 decoder wakes with queue of 32
+1357933102:10662 encoder thread 0x7fe3580a4c90 sleeps
+1357933102:10887 encoder thread 0x7fe3580a4fe0 finishes local encode of 6
+1357933102:11039 decoder sleeps with queue of 32
+1357933102:18971 writer sleeps with a queue of 2
+1357933102:22602 encoder thread 0x7fe3580a45f0 sleeps
+1357933102:22763 encoder thread 0x7fe3580a4c90 wakes with queue of 32
+1357933102:25582 writer wakes with a queue of 2
+1357933102:28203 encoder thread 0x7fe3580a5680 finishes local encode of 4
+Fri Jan 11 19:38:22 2013: Encoder thread 0x7fe3580a4c90 pops frame 5 from queue
+1357933102:31001 encoder thread 0x7fe3580a59d0 finishes local encode of 7
+1357933102:37630 encoder thread 0x7fe358024570 finishes local encode of 0
+1357933102:44369 encoder thread 0x7fe3580a4c90 begins local encode of 5
+1357933102:47717 encoder thread 0x7fe3580a4940 finishes local encode of 2
+1357933102:47823 writer sleeps with a queue of 3
+1357933102:47929 encoder thread 0x7fe3580a4fe0 sleeps
+1357933102:47995 decoder wakes with queue of 31
+1357933102:48092 encoder thread 0x7fe3580a5330 finishes local encode of 9
+1357933102:48178 writer wakes with a queue of 3
+1357933102:48251 adding to queue of 31
+1357933102:48377 encoder thread 0x7fe3580a45f0 wakes with queue of 32
+Fri Jan 11 19:38:22 2013: Encoder thread 0x7fe3580a45f0 pops frame 8 from queue
+1357933102:48663 encoder thread 0x7fe3580a45f0 begins local encode of 8
+1357933102:52712 encoder thread 0x7fe3580a5680 sleeps
+Fri Jan 11 19:38:22 2013: Source video frame ready; source at 1.368, output at 1.36803
+1357933102:60215 writer sleeps with a queue of 5
+1357933102:60296 encoder thread 0x7fe3580a59d0 sleeps
+1357933102:60355 encoder thread 0x7fe3580a4fe0 wakes with queue of 31
+1357933102:60518 writer wakes with a queue of 5
+1357933102:60573 Decoder emits 41
+Fri Jan 11 19:38:22 2013: Encoder thread 0x7fe3580a4fe0 pops frame 10 from queue
+1357933102:60790 encoder thread 0x7fe3580a4fe0 begins local encode of 10
+1357933102:71805 writer sleeps with a queue of 4
+1357933102:76222 encoder thread 0x7fe358024570 sleeps
+1357933102:83571 writer wakes with a queue of 4
+1357933102:87934 encoder thread 0x7fe3580a4940 sleeps
+1357933102:94813 encoder thread 0x7fe3580a5330 sleeps
+1357933102:94919 encoder thread 0x7fe3580a5680 wakes with queue of 30
+Fri Jan 11 19:38:22 2013: Encoder thread 0x7fe3580a5680 pops frame 11 from queue
+1357933102:95137 encoder thread 0x7fe3580a5680 begins local encode of 11
+1357933102:95206 encoder thread 0x7fe3580a59d0 wakes with queue of 29
+Fri Jan 11 19:38:22 2013: Encoder thread 0x7fe3580a59d0 pops frame 12 from queue
+1357933102:95350 encoder thread 0x7fe3580a59d0 begins local encode of 12
+1357933102:95450 adding to queue of 28
+1357933102:95638 encoder thread 0x7fe358024570 wakes with queue of 29
+Fri Jan 11 19:38:22 2013: Encoder thread 0x7fe358024570 pops frame 13 from queue
+1357933102:95827 encoder thread 0x7fe358024570 begins local encode of 13
+1357933102:95961 encoder thread 0x7fe3580a4940 wakes with queue of 28
+Fri Jan 11 19:38:22 2013: Encoder thread 0x7fe3580a4940 pops frame 14 from queue
+1357933102:96324 encoder thread 0x7fe3580a4940 begins local encode of 14
+Fri Jan 11 19:38:22 2013: Source video frame ready; source at 1.401, output at 1.4014
+1357933102:96884 writer sleeps with a queue of 3
+1357933102:97030 Decoder emits 42
+1357933102:109515 encoder thread 0x7fe3580a5330 wakes with queue of 27
+1357933102:109759 writer wakes with a queue of 3
+Fri Jan 11 19:38:22 2013: Encoder thread 0x7fe3580a5330 pops frame 15 from queue
+1357933102:110205 adding to queue of 26
+Fri Jan 11 19:38:22 2013: Source video frame ready; source at 1.435, output at 1.43477
+1357933102:112797 Decoder emits 43
+1357933102:113092 adding to queue of 27
+1357933102:113721 writer sleeps with a queue of 2
+1357933102:113967 encoder thread 0x7fe3580a5330 begins local encode of 15
+1357933102:114180 writer wakes with a queue of 2
+Fri Jan 11 19:38:22 2013: Source video frame ready; source at 1.468, output at 1.46813
+1357933102:115092 Decoder emits 44
+1357933102:115964 adding to queue of 28
+Fri Jan 11 19:38:22 2013: Source video frame ready; source at 1.502, output at 1.5015
+1357933102:118372 Decoder emits 45
+1357933102:118553 writer sleeps with a queue of 1
+1357933102:118736 writer wakes with a queue of 1
+1357933102:118932 adding to queue of 29
+Fri Jan 11 19:38:22 2013: Source video frame ready; source at 1.535, output at 1.53487
+1357933102:120998 Decoder emits 46
+1357933102:121257 adding to queue of 30
+1357933102:122434 writer sleeps with a queue of 0
+Fri Jan 11 19:38:22 2013: Source video frame ready; source at 1.568, output at 1.56823
+1357933102:123122 Decoder emits 47
+1357933102:123390 adding to queue of 31
+Fri Jan 11 19:38:22 2013: Source video frame ready; source at 1.602, output at 1.6016
+1357933102:125079 Decoder emits 48
+1357933102:125306 decoder sleeps with queue of 32
+1357933104:375629 decoder wakes with queue of 32
+1357933104:376068 encoder thread 0x7fe358031550 sleeps
+1357933104:376536 decoder sleeps with queue of 32
+1357933104:376946 encoder thread 0x7fe3580a6a80 sleeps
+1357933104:377378 decoder wakes with queue of 32
+1357933104:377797 decoder sleeps with queue of 32
+1357933104:378186 encoder thread 0x7fe358031550 wakes with queue of 32
+Fri Jan 11 19:38:24 2013: Encoder thread 0x7fe358031550 pops frame 16 from queue
+1357933104:379015 encoder thread 0x7fe3580a6a80 wakes with queue of 31
+Fri Jan 11 19:38:24 2013: Encoder thread 0x7fe3580a6a80 pops frame 17 from queue
+1357933104:379776 encoder thread 0x7fe3580a6090 sleeps
+1357933104:380137 decoder wakes with queue of 30
+Fri Jan 11 19:38:24 2013: Remote encode of 16 on shankly failed (Host not found (authoritative)); thread sleeping for 20s
+1357933104:380914 adding to queue of 30
+Fri Jan 11 19:38:24 2013: Remote encode of 17 on shankly failed (Host not found (authoritative)); thread sleeping for 20s
+Fri Jan 11 19:38:24 2013: Source video frame ready; source at 1.635, output at 1.63497
+1357933104:393590 encoder thread 0x7fe358030eb0 sleeps
+1357933104:393986 encoder thread 0x7fe3580a6090 wakes with queue of 31
+Fri Jan 11 19:38:24 2013: Encoder thread 0x7fe3580a6090 pops frame 18 from queue
+Fri Jan 11 19:38:24 2013: Encoder thread 0x7fe358031550 pushes frame 16 back onto queue after failure
+Fri Jan 11 19:38:24 2013: Encoder thread 0x7fe3580a6a80 pushes frame 17 back onto queue after failure
+1357933104:395915 encoder thread 0x7fe3580a5d40 sleeps
+1357933104:396286 encoder thread 0x7fe3580a6730 sleeps
+1357933104:396655 encoder thread 0x7fe358031200 sleeps
+1357933104:397018 encoder thread 0x7fe3580a63e0 sleeps
+1357933104:397354 encoder thread 0x7fe358030eb0 wakes with queue of 32
+Fri Jan 11 19:38:24 2013: Remote encode of 18 on shankly-gbit failed (Host not found (authoritative)); thread sleeping for 20s
+1357933104:398091 Decoder emits 49
+Fri Jan 11 19:38:24 2013: Encoder thread 0x7fe358030eb0 pops frame 17 from queue
+1357933104:398770 encoder thread 0x7fe3580a5d40 wakes with queue of 31
+Fri Jan 11 19:38:24 2013: Encoder thread 0x7fe3580a5d40 pops frame 16 from queue
+1357933104:399433 encoder thread 0x7fe3580a6730 wakes with queue of 30
+Fri Jan 11 19:38:24 2013: Encoder thread 0x7fe3580a6730 pops frame 19 from queue
+Fri Jan 11 19:38:24 2013: Remote encode of 17 on shankly failed (Host not found (authoritative)); thread sleeping for 20s
+Fri Jan 11 19:38:24 2013: Remote encode of 16 on shankly-gbit failed (Host not found (authoritative)); thread sleeping for 20s
+1357933104:400921 encoder thread 0x7fe358031200 wakes with queue of 29
+Fri Jan 11 19:38:24 2013: Remote encode of 19 on shankly-gbit failed (Host not found (authoritative)); thread sleeping for 20s
+Fri Jan 11 19:38:24 2013: Encoder thread 0x7fe358031200 pops frame 20 from queue
+1357933104:402087 encoder thread 0x7fe3580a63e0 wakes with queue of 28
+Fri Jan 11 19:38:24 2013: Encoder thread 0x7fe3580a63e0 pops frame 21 from queue
+Fri Jan 11 19:38:24 2013: Encoder thread 0x7fe3580a6090 pushes frame 18 back onto queue after failure
+Fri Jan 11 19:38:24 2013: Remote encode of 20 on shankly failed (Host not found (authoritative)); thread sleeping for 20s
+1357933104:403658 adding to queue of 28
+Fri Jan 11 19:38:24 2013: Remote encode of 21 on shankly-gbit failed (Host not found (authoritative)); thread sleeping for 20s
+Fri Jan 11 19:38:24 2013: Encoder thread 0x7fe358030eb0 pushes frame 17 back onto queue after failure
+Fri Jan 11 19:38:24 2013: Encoder thread 0x7fe3580a5d40 pushes frame 16 back onto queue after failure
+Fri Jan 11 19:38:24 2013: Source video frame ready; source at 1.668, output at 1.66833
+Fri Jan 11 19:38:24 2013: Encoder thread 0x7fe3580a6730 pushes frame 19 back onto queue after failure
+1357933104:405879 Decoder emits 50
+Fri Jan 11 19:38:24 2013: Encoder thread 0x7fe358031200 pushes frame 20 back onto queue after failure
+Fri Jan 11 19:38:24 2013: Encoder thread 0x7fe3580a63e0 pushes frame 21 back onto queue after failure
+1357933104:406940 decoder sleeps with queue of 34
+Fri Jan 11 19:38:28 2013: Finished locally-encoded frame 8
+1357933108:903758 encoder thread 0x7fe3580a45f0 finishes local encode of 8
+1357933108:904086 writer wakes with a queue of 1
+1357933108:922214 encoder thread 0x7fe3580a45f0 sleeps
+1357933108:922312 decoder wakes with queue of 34
+1357933108:922452 decoder sleeps with queue of 34
+1357933108:922559 encoder thread 0x7fe3580a45f0 wakes with queue of 34
+Fri Jan 11 19:38:28 2013: Encoder thread 0x7fe3580a45f0 pops frame 21 from queue
+1357933108:922709 encoder thread 0x7fe3580a45f0 begins local encode of 21
+1357933108:926212 writer sleeps with a queue of 0
+Fri Jan 11 19:38:29 2013: Finished locally-encoded frame 5
+1357933109:181344 encoder thread 0x7fe3580a4c90 finishes local encode of 5
+Fri Jan 11 19:38:29 2013: Finished locally-encoded frame 15
+Fri Jan 11 19:38:29 2013: Finished locally-encoded frame 13
+Fri Jan 11 19:38:29 2013: Finished locally-encoded frame 12
+Fri Jan 11 19:38:29 2013: Finished locally-encoded frame 10
+1357933109:273438 writer wakes with a queue of 1
+Fri Jan 11 19:38:29 2013: Finished locally-encoded frame 14
+Fri Jan 11 19:38:29 2013: Finished locally-encoded frame 11
+1357933109:274120 encoder thread 0x7fe3580a4c90 sleeps
+1357933109:274347 decoder wakes with queue of 33
+1357933109:274616 encoder thread 0x7fe3580a5330 finishes local encode of 15
+1357933109:274815 encoder thread 0x7fe358024570 finishes local encode of 13
+1357933109:275027 decoder sleeps with queue of 33
+1357933109:275243 encoder thread 0x7fe3580a4c90 wakes with queue of 33
+Fri Jan 11 19:38:29 2013: Encoder thread 0x7fe3580a4c90 pops frame 20 from queue
+1357933109:275540 encoder thread 0x7fe3580a4fe0 finishes local encode of 10
+1357933109:302943 encoder thread 0x7fe3580a59d0 finishes local encode of 12
+1357933109:303092 encoder thread 0x7fe3580a4940 finishes local encode of 14
+1357933109:303216 encoder thread 0x7fe3580a5680 finishes local encode of 11
+1357933109:303343 encoder thread 0x7fe3580a4c90 begins local encode of 20
+1357933109:305539 writer sleeps with a queue of 2
+1357933109:305645 encoder thread 0x7fe3580a5330 sleeps
+1357933109:305779 encoder thread 0x7fe358024570 sleeps
+1357933109:305845 decoder wakes with queue of 32
+1357933109:305940 writer wakes with a queue of 2
+1357933109:306010 decoder sleeps with queue of 32
+1357933109:319371 encoder thread 0x7fe358024570 wakes with queue of 32
+1357933109:319478 encoder thread 0x7fe3580a5680 sleeps
+Fri Jan 11 19:38:29 2013: Encoder thread 0x7fe358024570 pops frame 19 from queue
+1357933109:319729 encoder thread 0x7fe358024570 begins local encode of 19
+1357933109:331703 writer sleeps with a queue of 5
+1357933109:345077 encoder thread 0x7fe3580a59d0 sleeps
+1357933109:358909 encoder thread 0x7fe3580a4fe0 sleeps
+1357933109:359054 writer wakes with a queue of 5
+1357933109:359167 encoder thread 0x7fe3580a5330 wakes with queue of 31
+1357933109:359292 encoder thread 0x7fe3580a4940 sleeps
+Fri Jan 11 19:38:29 2013: Encoder thread 0x7fe3580a5330 pops frame 16 from queue
+1357933109:359566 encoder thread 0x7fe3580a5330 begins local encode of 16
+1357933109:359626 decoder wakes with queue of 30
+1357933109:359802 adding to queue of 30
+1357933109:359993 encoder thread 0x7fe3580a5680 wakes with queue of 31
+Fri Jan 11 19:38:29 2013: Encoder thread 0x7fe3580a5680 pops frame 17 from queue
+1357933109:360297 encoder thread 0x7fe3580a5680 begins local encode of 17
+1357933109:360414 encoder thread 0x7fe3580a59d0 wakes with queue of 30
+Fri Jan 11 19:38:29 2013: Encoder thread 0x7fe3580a59d0 pops frame 18 from queue
+1357933109:360637 encoder thread 0x7fe3580a59d0 begins local encode of 18
+Fri Jan 11 19:38:29 2013: Source video frame ready; source at 1.702, output at 1.7017
+1357933109:361593 Decoder emits 51
+1357933109:362224 writer sleeps with a queue of 4
+1357933109:362368 encoder thread 0x7fe3580a4fe0 wakes with queue of 29
+1357933109:362457 writer wakes with a queue of 4
+Fri Jan 11 19:38:29 2013: Encoder thread 0x7fe3580a4fe0 pops frame 22 from queue
+1357933109:362689 encoder thread 0x7fe3580a4fe0 begins local encode of 22
+1357933109:363838 encoder thread 0x7fe3580a4940 wakes with queue of 28
+Fri Jan 11 19:38:29 2013: Encoder thread 0x7fe3580a4940 pops frame 23 from queue
+1357933109:364204 encoder thread 0x7fe3580a4940 begins local encode of 23
+1357933109:364383 adding to queue of 27
+1357933109:366117 writer sleeps with a queue of 3
+Fri Jan 11 19:38:29 2013: Source video frame ready; source at 1.735, output at 1.73507
+1357933109:366765 Decoder emits 52
+1357933109:367035 adding to queue of 28
+Fri Jan 11 19:38:29 2013: Source video frame ready; source at 1.768, output at 1.76843
+1357933109:368911 Decoder emits 53
+1357933109:369164 adding to queue of 29
+Fri Jan 11 19:38:29 2013: Source video frame ready; source at 1.802, output at 1.8018
+1357933109:371579 writer wakes with a queue of 3
+1357933109:371810 Decoder emits 54
+1357933109:372115 adding to queue of 30
+Fri Jan 11 19:38:29 2013: Source video frame ready; source at 1.835, output at 1.83517
+1357933109:374135 Decoder emits 55
+1357933109:374415 adding to queue of 31
+Fri Jan 11 19:38:29 2013: Source video frame ready; source at 1.869, output at 1.86853
+1357933109:376060 Decoder emits 56
+1357933109:376403 decoder sleeps with queue of 32
+1357933109:389508 writer sleeps with a queue of 2
+1357933109:389828 writer wakes with a queue of 2
+1357933109:393643 writer sleeps with a queue of 1
+1357933109:393940 writer wakes with a queue of 1
+1357933109:397571 writer sleeps with a queue of 0
+Fri Jan 11 19:38:33 2013: Finished locally-encoded frame 21
+1357933113:380530 encoder thread 0x7fe3580a45f0 finishes local encode of 21
+1357933113:380913 encoder thread 0x7fe3580a45f0 sleeps
+1357933113:381429 decoder wakes with queue of 32
+1357933113:381828 writer wakes with a queue of 1
+1357933113:382145 decoder sleeps with queue of 32
+1357933113:382500 encoder thread 0x7fe3580a45f0 wakes with queue of 32
+Fri Jan 11 19:38:33 2013: Encoder thread 0x7fe3580a45f0 pops frame 24 from queue
+1357933113:383231 encoder thread 0x7fe3580a45f0 begins local encode of 24
+1357933113:385816 writer sleeps with a queue of 0
+Fri Jan 11 19:38:35 2013: Finished locally-encoded frame 16
+1357933115:890275 encoder thread 0x7fe3580a5330 finishes local encode of 16
+Fri Jan 11 19:38:35 2013: Finished locally-encoded frame 22
+1357933116:26523 encoder thread 0x7fe3580a5330 sleeps
+Fri Jan 11 19:38:36 2013: Finished locally-encoded frame 23
+1357933116:103278 writer wakes with a queue of 1
+Fri Jan 11 19:38:36 2013: Finished locally-encoded frame 18
+Fri Jan 11 19:38:36 2013: Finished locally-encoded frame 20
+1357933116:136045 encoder thread 0x7fe3580a4fe0 finishes local encode of 22
+Fri Jan 11 19:38:36 2013: Finished locally-encoded frame 19
+1357933116:136315 decoder wakes with queue of 31
+Fri Jan 11 19:38:36 2013: Finished locally-encoded frame 17
+1357933116:136580 encoder thread 0x7fe3580a4940 finishes local encode of 23
+Fri Jan 11 19:38:36 2013: Finished locally-encoded frame 24
+1357933116:136865 adding to queue of 31
+1357933116:136974 encoder thread 0x7fe3580a4c90 finishes local encode of 20
+1357933116:137088 encoder thread 0x7fe3580a59d0 finishes local encode of 18
+1357933116:137241 encoder thread 0x7fe3580a5330 wakes with queue of 32
+Fri Jan 11 19:38:36 2013: Encoder thread 0x7fe3580a5330 pops frame 25 from queue
+1357933116:137426 encoder thread 0x7fe358024570 finishes local encode of 19
+1357933116:137535 encoder thread 0x7fe3580a5330 begins local encode of 25
+1357933116:151350 encoder thread 0x7fe3580a45f0 finishes local encode of 24
+1357933116:164741 encoder thread 0x7fe3580a4940 sleeps
+1357933116:164866 writer sleeps with a queue of 5
+Fri Jan 11 19:38:36 2013: Source video frame ready; source at 1.902, output at 1.9019
+1357933116:165039 encoder thread 0x7fe3580a4fe0 sleeps
+1357933116:165109 encoder thread 0x7fe3580a4c90 sleeps
+1357933116:165172 encoder thread 0x7fe3580a5680 finishes local encode of 17
+1357933116:165240 encoder thread 0x7fe3580a59d0 sleeps
+1357933116:165297 encoder thread 0x7fe358024570 sleeps
+1357933116:165361 encoder thread 0x7fe3580a4940 wakes with queue of 31
+1357933116:165433 writer wakes with a queue of 5
+1357933116:165505 Decoder emits 57
+Fri Jan 11 19:38:36 2013: Encoder thread 0x7fe3580a4940 pops frame 26 from queue
+1357933116:165660 encoder thread 0x7fe3580a4940 begins local encode of 26
+1357933116:165704 encoder thread 0x7fe3580a4fe0 wakes with queue of 30
+Fri Jan 11 19:38:36 2013: Encoder thread 0x7fe3580a4fe0 pops frame 27 from queue
+1357933116:165850 encoder thread 0x7fe3580a4fe0 begins local encode of 27
+1357933116:165901 encoder thread 0x7fe3580a4c90 wakes with queue of 29
+Fri Jan 11 19:38:36 2013: Encoder thread 0x7fe3580a4c90 pops frame 28 from queue
+1357933116:166098 encoder thread 0x7fe3580a4c90 begins local encode of 28
+1357933116:166146 encoder thread 0x7fe3580a59d0 wakes with queue of 28
+Fri Jan 11 19:38:36 2013: Encoder thread 0x7fe3580a59d0 pops frame 29 from queue
+1357933116:166347 encoder thread 0x7fe3580a59d0 begins local encode of 29
+1357933116:166441 encoder thread 0x7fe358024570 wakes with queue of 27
+Fri Jan 11 19:38:36 2013: Encoder thread 0x7fe358024570 pops frame 30 from queue
+1357933116:166582 encoder thread 0x7fe358024570 begins local encode of 30
+1357933116:176479 adding to queue of 26
+Fri Jan 11 19:38:36 2013: Source video frame ready; source at 1.935, output at 1.93527
+1357933116:178524 writer sleeps with a queue of 6
+1357933116:178587 writer wakes with a queue of 6
+1357933116:178665 Decoder emits 58
+1357933116:178906 adding to queue of 27
+Fri Jan 11 19:38:36 2013: Source video frame ready; source at 1.969, output at 1.96863
+1357933116:181499 Decoder emits 59
+1357933116:181653 adding to queue of 28
+1357933116:182321 writer sleeps with a queue of 5
+1357933116:182450 encoder thread 0x7fe3580a45f0 sleeps
+1357933116:182595 encoder thread 0x7fe3580a45f0 wakes with queue of 29
+Fri Jan 11 19:38:36 2013: Encoder thread 0x7fe3580a45f0 pops frame 31 from queue
+1357933116:182755 encoder thread 0x7fe3580a45f0 begins local encode of 31
+Fri Jan 11 19:38:36 2013: Source video frame ready; source at 2.002, output at 2.002
+1357933116:183530 Decoder emits 60
+1357933116:183657 adding to queue of 28
+Fri Jan 11 19:38:36 2013: Source video frame ready; source at 2.035, output at 2.03537
+1357933116:186741 Decoder emits 61
+1357933116:187020 adding to queue of 29
+1357933116:188457 encoder thread 0x7fe3580a5680 sleeps
+1357933116:189864 writer wakes with a queue of 5
+Fri Jan 11 19:38:36 2013: Source video frame ready; source at 2.069, output at 2.06873
+1357933116:192759 encoder thread 0x7fe3580a5680 wakes with queue of 30
+Fri Jan 11 19:38:36 2013: Encoder thread 0x7fe3580a5680 pops frame 32 from queue
+1357933116:193167 encoder thread 0x7fe3580a5680 begins local encode of 32
+1357933116:193338 Decoder emits 62
+1357933116:193598 adding to queue of 29
+1357933116:194932 writer sleeps with a queue of 4
+1357933116:195245 writer wakes with a queue of 4
+Fri Jan 11 19:38:36 2013: Source video frame ready; source at 2.102, output at 2.1021
+1357933116:196145 Decoder emits 63
+1357933116:196502 adding to queue of 30
+Fri Jan 11 19:38:36 2013: Source video frame ready; source at 2.135, output at 2.13547
+1357933116:198708 Decoder emits 64
+1357933116:198947 adding to queue of 31
+Fri Jan 11 19:38:36 2013: Source video frame ready; source at 2.169, output at 2.16883
+1357933116:200702 writer sleeps with a queue of 3
+1357933116:200906 writer wakes with a queue of 3
+1357933116:201299 Decoder emits 65
+1357933116:201648 decoder sleeps with queue of 32
+1357933116:204559 writer sleeps with a queue of 2
+1357933116:204726 writer wakes with a queue of 2
+1357933116:208531 writer sleeps with a queue of 1
+1357933116:208702 writer wakes with a queue of 1
+1357933116:212392 writer sleeps with a queue of 0
+Fri Jan 11 19:38:43 2013: Finished locally-encoded frame 31
+1357933123:218645 encoder thread 0x7fe3580a45f0 finishes local encode of 31
+Fri Jan 11 19:38:43 2013: Finished locally-encoded frame 30
+Fri Jan 11 19:38:43 2013: Finished locally-encoded frame 28
+Fri Jan 11 19:38:43 2013: Finished locally-encoded frame 26
+1357933123:407719 writer wakes with a queue of 1
+Fri Jan 11 19:38:43 2013: Finished locally-encoded frame 27
+1357933123:407921 encoder thread 0x7fe3580a45f0 sleeps
+1357933123:408055 decoder wakes with queue of 32
+Fri Jan 11 19:38:43 2013: Finished locally-encoded frame 29
+1357933123:408313 encoder thread 0x7fe358024570 finishes local encode of 30
+Fri Jan 11 19:38:43 2013: Finished locally-encoded frame 25
+Fri Jan 11 19:38:43 2013: Finished locally-encoded frame 32
+1357933123:408728 encoder thread 0x7fe3580a4c90 finishes local encode of 28
+1357933123:408877 decoder sleeps with queue of 32
+1357933123:409054 encoder thread 0x7fe3580a45f0 wakes with queue of 32
+Fri Jan 11 19:38:43 2013: Encoder thread 0x7fe3580a45f0 pops frame 33 from queue
+1357933123:409261 encoder thread 0x7fe3580a45f0 begins local encode of 33
+1357933123:409461 encoder thread 0x7fe3580a4940 finishes local encode of 26
+1357933123:423780 encoder thread 0x7fe3580a4fe0 finishes local encode of 27
+1357933123:438064 encoder thread 0x7fe3580a5680 finishes local encode of 32
+1357933123:438162 decoder wakes with queue of 31
+1357933123:438320 encoder thread 0x7fe3580a5330 finishes local encode of 25
+1357933123:438404 encoder thread 0x7fe358024570 sleeps
+1357933123:438491 writer sleeps with a queue of 3
+1357933123:438571 encoder thread 0x7fe3580a4940 sleeps
+1357933123:438643 encoder thread 0x7fe3580a59d0 finishes local encode of 29
+1357933123:438723 adding to queue of 31
+1357933123:438820 writer wakes with a queue of 3
+Fri Jan 11 19:38:43 2013: Source video frame ready; source at 2.202, output at 2.2022
+1357933123:452255 encoder thread 0x7fe3580a4c90 sleeps
+1357933123:452389 encoder thread 0x7fe358024570 wakes with queue of 32
+1357933123:452482 Decoder emits 66
+Fri Jan 11 19:38:43 2013: Encoder thread 0x7fe358024570 pops frame 34 from queue
+1357933123:452712 encoder thread 0x7fe358024570 begins local encode of 34
+1357933123:452767 encoder thread 0x7fe3580a4940 wakes with queue of 31
+Fri Jan 11 19:38:43 2013: Encoder thread 0x7fe3580a4940 pops frame 35 from queue
+1357933123:452989 encoder thread 0x7fe3580a4940 begins local encode of 35
+1357933123:466394 writer sleeps with a queue of 6
+1357933123:476131 encoder thread 0x7fe3580a4fe0 sleeps
+1357933123:486712 writer wakes with a queue of 6
+1357933123:486858 encoder thread 0x7fe3580a5680 sleeps
+1357933123:487013 encoder thread 0x7fe3580a4fe0 wakes with queue of 30
+1357933123:487118 encoder thread 0x7fe3580a5330 sleeps
+Fri Jan 11 19:38:43 2013: Encoder thread 0x7fe3580a4fe0 pops frame 36 from queue
+1357933123:487345 encoder thread 0x7fe3580a4fe0 begins local encode of 36
+1357933123:487428 encoder thread 0x7fe3580a4c90 wakes with queue of 29
+Fri Jan 11 19:38:43 2013: Encoder thread 0x7fe3580a4c90 pops frame 37 from queue
+1357933123:487643 encoder thread 0x7fe3580a4c90 begins local encode of 37
+1357933123:487765 adding to queue of 28
+Fri Jan 11 19:38:43 2013: Source video frame ready; source at 2.236, output at 2.23557
+1357933123:498635 encoder thread 0x7fe3580a59d0 sleeps
+1357933123:498886 Decoder emits 67
+1357933123:499017 encoder thread 0x7fe3580a5680 wakes with queue of 29
+Fri Jan 11 19:38:43 2013: Encoder thread 0x7fe3580a5680 pops frame 38 from queue
+1357933123:499271 encoder thread 0x7fe3580a5680 begins local encode of 38
+1357933123:499364 encoder thread 0x7fe3580a5330 wakes with queue of 28
+Fri Jan 11 19:38:43 2013: Encoder thread 0x7fe3580a5330 pops frame 39 from queue
+1357933123:499644 encoder thread 0x7fe3580a5330 begins local encode of 39
+1357933123:500692 writer sleeps with a queue of 5
+1357933123:500910 writer wakes with a queue of 5
+1357933123:501054 encoder thread 0x7fe3580a59d0 wakes with queue of 27
+Fri Jan 11 19:38:43 2013: Encoder thread 0x7fe3580a59d0 pops frame 40 from queue
+1357933123:501365 encoder thread 0x7fe3580a59d0 begins local encode of 40
+1357933123:501474 adding to queue of 26
+Fri Jan 11 19:38:43 2013: Source video frame ready; source at 2.269, output at 2.26893
+1357933123:503979 Decoder emits 68
+1357933123:504243 adding to queue of 27
+1357933123:504600 writer sleeps with a queue of 4
+1357933123:504728 writer wakes with a queue of 4
+Fri Jan 11 19:38:43 2013: Source video frame ready; source at 2.302, output at 2.3023
+1357933123:507138 Decoder emits 69
+1357933123:507367 adding to queue of 28
+1357933123:509074 writer sleeps with a queue of 3
+1357933123:509376 writer wakes with a queue of 3
+Fri Jan 11 19:38:43 2013: Source video frame ready; source at 2.336, output at 2.33567
+1357933123:510128 Decoder emits 70
+1357933123:510398 adding to queue of 29
+Fri Jan 11 19:38:43 2013: Source video frame ready; source at 2.369, output at 2.36903
+1357933123:512603 Decoder emits 71
+1357933123:512861 adding to queue of 30
+Fri Jan 11 19:38:43 2013: Source video frame ready; source at 2.402, output at 2.4024
+1357933123:515123 Decoder emits 72
+1357933123:515389 adding to queue of 31
+Fri Jan 11 19:38:43 2013: Source video frame ready; source at 2.436, output at 2.43577
+1357933123:517884 Decoder emits 73
+1357933123:518124 decoder sleeps with queue of 32
+1357933123:524203 writer sleeps with a queue of 2
+1357933123:524484 writer wakes with a queue of 2
+1357933123:529054 writer sleeps with a queue of 1
+1357933123:529365 writer wakes with a queue of 1
+1357933123:533776 writer sleeps with a queue of 0
+1357933124:395531 decoder wakes with queue of 32
+1357933124:395971 encoder thread 0x7fe358031550 sleeps
+1357933124:396417 decoder sleeps with queue of 32
+1357933124:396762 encoder thread 0x7fe3580a6a80 sleeps
+1357933124:397154 decoder wakes with queue of 32
+1357933124:397593 decoder sleeps with queue of 32
+1357933124:397957 encoder thread 0x7fe358031550 wakes with queue of 32
+Fri Jan 11 19:38:44 2013: Encoder thread 0x7fe358031550 pops frame 41 from queue
+1357933124:398719 encoder thread 0x7fe3580a6a80 wakes with queue of 31
+Fri Jan 11 19:38:44 2013: Encoder thread 0x7fe3580a6a80 pops frame 42 from queue
+Fri Jan 11 19:38:44 2013: Remote encode of 41 on shankly failed (Host not found (authoritative)); thread sleeping for 30s
+Fri Jan 11 19:38:44 2013: Remote encode of 42 on shankly failed (Host not found (authoritative)); thread sleeping for 30s
+Fri Jan 11 19:38:44 2013: Encoder thread 0x7fe358031550 pushes frame 41 back onto queue after failure
+Fri Jan 11 19:38:44 2013: Encoder thread 0x7fe3580a6a80 pushes frame 42 back onto queue after failure
+1357933124:403437 encoder thread 0x7fe3580a6090 sleeps
+1357933124:403804 decoder wakes with queue of 32
+1357933124:404217 decoder sleeps with queue of 32
+1357933124:404693 encoder thread 0x7fe3580a6090 wakes with queue of 32
+Fri Jan 11 19:38:44 2013: Encoder thread 0x7fe3580a6090 pops frame 42 from queue
+1357933124:405429 encoder thread 0x7fe358030eb0 sleeps
+1357933124:405849 decoder wakes with queue of 31
+1357933124:406590 adding to queue of 31
+Fri Jan 11 19:38:44 2013: Remote encode of 42 on shankly-gbit failed (Host not found (authoritative)); thread sleeping for 30s
+1357933124:410919 encoder thread 0x7fe3580a5d40 sleeps
+1357933124:411494 encoder thread 0x7fe358030eb0 wakes with queue of 32
+Fri Jan 11 19:38:44 2013: Source video frame ready; source at 2.469, output at 2.46913
+Fri Jan 11 19:38:44 2013: Encoder thread 0x7fe358030eb0 pops frame 41 from queue
+1357933124:413762 Decoder emits 74
+1357933124:414500 encoder thread 0x7fe3580a6730 sleeps
+1357933124:427061 encoder thread 0x7fe358031200 sleeps
+Fri Jan 11 19:38:44 2013: Remote encode of 41 on shankly failed (Host not found (authoritative)); thread sleeping for 30s
+1357933124:428843 encoder thread 0x7fe3580a63e0 sleeps
+Fri Jan 11 19:38:44 2013: Encoder thread 0x7fe3580a6090 pushes frame 42 back onto queue after failure
+1357933124:429727 encoder thread 0x7fe3580a5d40 wakes with queue of 32
+Fri Jan 11 19:38:44 2013: Encoder thread 0x7fe3580a5d40 pops frame 42 from queue
+1357933124:430875 adding to queue of 31
+1357933124:431481 encoder thread 0x7fe3580a6730 wakes with queue of 32
+Fri Jan 11 19:38:44 2013: Remote encode of 42 on shankly-gbit failed (Host not found (authoritative)); thread sleeping for 30s
+Fri Jan 11 19:38:44 2013: Encoder thread 0x7fe3580a6730 pops frame 43 from queue
+1357933124:436047 encoder thread 0x7fe358031200 wakes with queue of 31
+Fri Jan 11 19:38:44 2013: Source video frame ready; source at 2.503, output at 2.5025
+Fri Jan 11 19:38:44 2013: Encoder thread 0x7fe358031200 pops frame 44 from queue
+Fri Jan 11 19:38:44 2013: Encoder thread 0x7fe358030eb0 pushes frame 41 back onto queue after failure
+1357933124:439474 Decoder emits 75
+Fri Jan 11 19:38:44 2013: Remote encode of 43 on shankly-gbit failed (Host not found (authoritative)); thread sleeping for 30s
+1357933124:440343 encoder thread 0x7fe3580a63e0 wakes with queue of 31
+Fri Jan 11 19:38:44 2013: Encoder thread 0x7fe3580a63e0 pops frame 41 from queue
+Fri Jan 11 19:38:44 2013: Encoder thread 0x7fe3580a5d40 pushes frame 42 back onto queue after failure
+Fri Jan 11 19:38:44 2013: Remote encode of 44 on shankly failed (Host not found (authoritative)); thread sleeping for 30s
+1357933124:442532 adding to queue of 31
+Fri Jan 11 19:38:44 2013: Remote encode of 41 on shankly-gbit failed (Host not found (authoritative)); thread sleeping for 30s
+Fri Jan 11 19:38:44 2013: Encoder thread 0x7fe3580a6730 pushes frame 43 back onto queue after failure
+Fri Jan 11 19:38:44 2013: Encoder thread 0x7fe358031200 pushes frame 44 back onto queue after failure
+Fri Jan 11 19:38:44 2013: Encoder thread 0x7fe3580a63e0 pushes frame 41 back onto queue after failure
+Fri Jan 11 19:38:44 2013: Source video frame ready; source at 2.536, output at 2.53587
+1357933124:447003 Decoder emits 76
+1357933124:447526 decoder sleeps with queue of 35
+Fri Jan 11 19:38:48 2013: Finished locally-encoded frame 33
+1357933128:522199 encoder thread 0x7fe3580a45f0 finishes local encode of 33
+1357933128:522522 writer wakes with a queue of 1
+1357933128:570490 decoder wakes with queue of 35
+1357933128:572143 decoder sleeps with queue of 35
+1357933128:572227 encoder thread 0x7fe3580a45f0 sleeps
+1357933128:572348 encoder thread 0x7fe3580a45f0 wakes with queue of 35
+Fri Jan 11 19:38:48 2013: Encoder thread 0x7fe3580a45f0 pops frame 41 from queue
+1357933128:572508 encoder thread 0x7fe3580a45f0 begins local encode of 41
+1357933128:574402 writer sleeps with a queue of 0
+Fri Jan 11 19:38:49 2013: Finished locally-encoded frame 34
+1357933129:154610 encoder thread 0x7fe358024570 finishes local encode of 34
+1357933129:155254 writer wakes with a queue of 1
+1357933129:167760 encoder thread 0x7fe358024570 sleeps
+1357933129:169522 decoder wakes with queue of 34
+1357933129:172190 decoder sleeps with queue of 34
+1357933129:172446 writer sleeps with a queue of 0
+1357933129:172631 encoder thread 0x7fe358024570 wakes with queue of 34
+Fri Jan 11 19:38:49 2013: Encoder thread 0x7fe358024570 pops frame 44 from queue
+1357933129:172910 encoder thread 0x7fe358024570 begins local encode of 44
+Fri Jan 11 19:38:49 2013: Finished locally-encoded frame 39
+1357933129:223266 encoder thread 0x7fe3580a5330 finishes local encode of 39
+1357933129:223556 writer wakes with a queue of 1
+1357933129:294239 encoder thread 0x7fe3580a5330 sleeps
+1357933129:294364 decoder wakes with queue of 33
+1357933129:294441 decoder sleeps with queue of 33
+1357933129:294532 encoder thread 0x7fe3580a5330 wakes with queue of 33
+Fri Jan 11 19:38:49 2013: Encoder thread 0x7fe3580a5330 pops frame 43 from queue
+1357933129:294693 encoder thread 0x7fe3580a5330 begins local encode of 43
+1357933129:297852 writer sleeps with a queue of 0
+Fri Jan 11 19:38:49 2013: Finished locally-encoded frame 38
+Fri Jan 11 19:38:49 2013: Finished locally-encoded frame 40
+1357933129:466490 encoder thread 0x7fe3580a5680 finishes local encode of 38
+Fri Jan 11 19:38:49 2013: Finished locally-encoded frame 36
+1357933129:522282 encoder thread 0x7fe3580a59d0 finishes local encode of 40
+Fri Jan 11 19:38:49 2013: Finished locally-encoded frame 35
+Fri Jan 11 19:38:49 2013: Finished locally-encoded frame 37
+1357933129:523059 writer wakes with a queue of 1
+1357933129:523326 encoder thread 0x7fe3580a5680 sleeps
+1357933129:523649 decoder wakes with queue of 32
+1357933129:523876 decoder sleeps with queue of 32
+1357933129:523999 encoder thread 0x7fe3580a4940 finishes local encode of 35
+1357933129:528241 encoder thread 0x7fe3580a4fe0 finishes local encode of 36
+1357933129:549790 encoder thread 0x7fe3580a4c90 finishes local encode of 37
+1357933129:549940 encoder thread 0x7fe3580a59d0 sleeps
+1357933129:550044 encoder thread 0x7fe3580a5680 wakes with queue of 32
+Fri Jan 11 19:38:49 2013: Encoder thread 0x7fe3580a5680 pops frame 42 from queue
+1357933129:550316 encoder thread 0x7fe3580a5680 begins local encode of 42
+1357933129:550420 decoder wakes with queue of 31
+1357933129:550552 adding to queue of 31
+1357933129:551794 writer sleeps with a queue of 4
+Fri Jan 11 19:38:49 2013: Source video frame ready; source at 2.569, output at 2.56923
+1357933129:592770 encoder thread 0x7fe3580a4940 sleeps
+1357933129:592953 Decoder emits 77
+1357933129:593076 writer wakes with a queue of 4
+1357933129:593222 encoder thread 0x7fe3580a4c90 sleeps
+1357933129:593369 encoder thread 0x7fe3580a59d0 wakes with queue of 32
+1357933129:593512 encoder thread 0x7fe3580a4fe0 sleeps
+Fri Jan 11 19:38:49 2013: Encoder thread 0x7fe3580a59d0 pops frame 45 from queue
+1357933129:593796 encoder thread 0x7fe3580a59d0 begins local encode of 45
+1357933129:593909 encoder thread 0x7fe3580a4940 wakes with queue of 31
+Fri Jan 11 19:38:49 2013: Encoder thread 0x7fe3580a4940 pops frame 46 from queue
+1357933129:594182 encoder thread 0x7fe3580a4940 begins local encode of 46
+1357933129:594319 adding to queue of 30
+Fri Jan 11 19:38:49 2013: Source video frame ready; source at 2.603, output at 2.6026
+1357933129:596326 encoder thread 0x7fe3580a4c90 wakes with queue of 31
+1357933129:598370 writer sleeps with a queue of 3
+1357933129:598521 Decoder emits 78
+Fri Jan 11 19:38:49 2013: Encoder thread 0x7fe3580a4c90 pops frame 47 from queue
+1357933129:598799 writer wakes with a queue of 3
+1357933129:599014 encoder thread 0x7fe3580a4c90 begins local encode of 47
+1357933129:600090 encoder thread 0x7fe3580a4fe0 wakes with queue of 30
+Fri Jan 11 19:38:49 2013: Encoder thread 0x7fe3580a4fe0 pops frame 48 from queue
+1357933129:600552 adding to queue of 29
+1357933129:601030 encoder thread 0x7fe3580a4fe0 begins local encode of 48
+1357933129:602301 writer sleeps with a queue of 2
+1357933129:604481 writer wakes with a queue of 2
+Fri Jan 11 19:38:49 2013: Source video frame ready; source at 2.636, output at 2.63597
+1357933129:605223 Decoder emits 79
+1357933129:605653 adding to queue of 30
+Fri Jan 11 19:38:49 2013: Source video frame ready; source at 2.669, output at 2.66933
+1357933129:608174 Decoder emits 80
+1357933129:608533 adding to queue of 31
+1357933129:608773 writer sleeps with a queue of 1
+1357933129:609027 writer wakes with a queue of 1
+Fri Jan 11 19:38:49 2013: Source video frame ready; source at 2.703, output at 2.7027
+1357933129:611833 Decoder emits 81
+1357933129:612122 decoder sleeps with queue of 32
+1357933129:613890 writer sleeps with a queue of 0
+Fri Jan 11 19:38:51 2013: Finished locally-encoded frame 41
+1357933131:643683 encoder thread 0x7fe3580a45f0 finishes local encode of 41
+1357933131:644053 encoder thread 0x7fe3580a45f0 sleeps
+1357933131:644379 writer wakes with a queue of 1
+1357933131:644845 decoder wakes with queue of 32
+1357933131:645233 decoder sleeps with queue of 32
+1357933131:645607 encoder thread 0x7fe3580a45f0 wakes with queue of 32
+Fri Jan 11 19:38:51 2013: Encoder thread 0x7fe3580a45f0 pops frame 49 from queue
+1357933131:646289 encoder thread 0x7fe3580a45f0 begins local encode of 49
+1357933131:648638 writer sleeps with a queue of 0
+Fri Jan 11 19:38:54 2013: Finished locally-encoded frame 43
+1357933134:553870 encoder thread 0x7fe3580a5330 finishes local encode of 43
+1357933134:553990 writer wakes with a queue of 1
+1357933134:556931 writer sleeps with a queue of 0
+1357933134:557016 encoder thread 0x7fe3580a5330 sleeps
+1357933134:557111 decoder wakes with queue of 31
+1357933134:557261 adding to queue of 31
+1357933134:557388 encoder thread 0x7fe3580a5330 wakes with queue of 32
+Fri Jan 11 19:38:54 2013: Encoder thread 0x7fe3580a5330 pops frame 50 from queue
+1357933134:557536 encoder thread 0x7fe3580a5330 begins local encode of 50
+Fri Jan 11 19:38:54 2013: Source video frame ready; source at 2.736, output at 2.73607
+1357933134:558867 Decoder emits 82
+1357933134:558981 adding to queue of 31
+Fri Jan 11 19:38:54 2013: Source video frame ready; source at 2.769, output at 2.76943
+1357933134:560985 Decoder emits 83
+1357933134:561079 decoder sleeps with queue of 32
+Fri Jan 11 19:38:54 2013: Finished locally-encoded frame 44
+1357933134:782210 encoder thread 0x7fe358024570 finishes local encode of 44
+1357933134:782324 writer wakes with a queue of 1
+1357933134:782389 decoder wakes with queue of 32
+1357933134:782452 decoder sleeps with queue of 32
+1357933134:782494 encoder thread 0x7fe358024570 sleeps
+1357933134:782545 encoder thread 0x7fe358024570 wakes with queue of 32
+Fri Jan 11 19:38:54 2013: Encoder thread 0x7fe358024570 pops frame 51 from queue
+1357933134:782649 encoder thread 0x7fe358024570 begins local encode of 51
+1357933134:785342 writer sleeps with a queue of 0
+Fri Jan 11 19:38:55 2013: Finished locally-encoded frame 47
+1357933136:19792 encoder thread 0x7fe3580a4c90 finishes local encode of 47
+Fri Jan 11 19:38:56 2013: Finished locally-encoded frame 48
+Fri Jan 11 19:38:56 2013: Finished locally-encoded frame 46
+1357933136:121135 writer wakes with a queue of 1
+Fri Jan 11 19:38:56 2013: Finished locally-encoded frame 45
+1357933136:121397 encoder thread 0x7fe3580a4c90 sleeps
+1357933136:121508 decoder wakes with queue of 31
+Fri Jan 11 19:38:56 2013: Finished locally-encoded frame 42
+1357933136:121681 adding to queue of 31
+1357933136:121738 encoder thread 0x7fe3580a4fe0 finishes local encode of 48
+1357933136:122320 encoder thread 0x7fe3580a59d0 finishes local encode of 45
+1357933136:136126 encoder thread 0x7fe3580a5680 finishes local encode of 42
+Fri Jan 11 19:38:56 2013: Source video frame ready; source at 2.803, output at 2.8028
+1357933136:136343 encoder thread 0x7fe3580a4940 finishes local encode of 46
+1357933136:136434 encoder thread 0x7fe3580a4fe0 sleeps
+1357933136:136495 encoder thread 0x7fe3580a4c90 wakes with queue of 32
+1357933136:136551 Decoder emits 84
+Fri Jan 11 19:38:56 2013: Encoder thread 0x7fe3580a4c90 pops frame 52 from queue
+1357933136:136700 encoder thread 0x7fe3580a4c90 begins local encode of 52
+1357933136:166270 encoder thread 0x7fe3580a59d0 sleeps
+1357933136:187294 encoder thread 0x7fe3580a5680 sleeps
+1357933136:198771 writer sleeps with a queue of 4
+1357933136:198855 encoder thread 0x7fe3580a4940 sleeps
+1357933136:198942 encoder thread 0x7fe3580a4fe0 wakes with queue of 31
+Fri Jan 11 19:38:56 2013: Finished locally-encoded frame 49
+1357933136:199171 writer wakes with a queue of 4
+Fri Jan 11 19:38:56 2013: Encoder thread 0x7fe3580a4fe0 pops frame 53 from queue
+1357933136:199328 encoder thread 0x7fe3580a4fe0 begins local encode of 53
+1357933136:199413 adding to queue of 30
+1357933136:199592 encoder thread 0x7fe3580a59d0 wakes with queue of 31
+Fri Jan 11 19:38:56 2013: Encoder thread 0x7fe3580a59d0 pops frame 54 from queue
+1357933136:199726 encoder thread 0x7fe3580a45f0 finishes local encode of 49
+1357933136:199812 encoder thread 0x7fe3580a5680 wakes with queue of 30
+Fri Jan 11 19:38:56 2013: Encoder thread 0x7fe3580a5680 pops frame 55 from queue
+1357933136:199929 encoder thread 0x7fe3580a5680 begins local encode of 55
+1357933136:200006 encoder thread 0x7fe3580a4940 wakes with queue of 29
+Fri Jan 11 19:38:56 2013: Encoder thread 0x7fe3580a4940 pops frame 56 from queue
+1357933136:200167 encoder thread 0x7fe3580a4940 begins local encode of 56
+Fri Jan 11 19:38:56 2013: Source video frame ready; source at 2.836, output at 2.83617
+1357933136:211315 encoder thread 0x7fe3580a45f0 sleeps
+1357933136:211455 encoder thread 0x7fe3580a45f0 wakes with queue of 28
+1357933136:211508 writer sleeps with a queue of 4
+1357933136:211626 Decoder emits 85
+1357933136:211714 encoder thread 0x7fe3580a59d0 begins local encode of 54
+Fri Jan 11 19:38:56 2013: Encoder thread 0x7fe3580a45f0 pops frame 57 from queue
+1357933136:211907 writer wakes with a queue of 4
+1357933136:211990 adding to queue of 27
+Fri Jan 11 19:38:56 2013: Source video frame ready; source at 2.87, output at 2.86953
+1357933136:213971 Decoder emits 86
+1357933136:214237 adding to queue of 28
+1357933136:215566 writer sleeps with a queue of 3
+1357933136:216640 writer wakes with a queue of 3
+Fri Jan 11 19:38:56 2013: Source video frame ready; source at 2.903, output at 2.9029
+1357933136:217159 Decoder emits 87
+1357933136:217403 adding to queue of 29
+1357933136:218028 encoder thread 0x7fe3580a45f0 begins local encode of 57
+Fri Jan 11 19:38:56 2013: Source video frame ready; source at 2.936, output at 2.93627
+1357933136:219867 Decoder emits 88
+1357933136:220093 adding to queue of 30
+Fri Jan 11 19:38:56 2013: Source video frame ready; source at 2.97, output at 2.96963
+1357933136:222272 Decoder emits 89
+1357933136:222510 adding to queue of 31
+Fri Jan 11 19:38:56 2013: Source video frame ready; source at 3.003, output at 3.003
+1357933136:224745 Decoder emits 90
+1357933136:224989 decoder sleeps with queue of 32
+1357933136:233519 writer sleeps with a queue of 2
+1357933136:233767 writer wakes with a queue of 2
+1357933136:237516 writer sleeps with a queue of 1
+1357933136:237868 writer wakes with a queue of 1
+1357933136:242268 writer sleeps with a queue of 0
+Fri Jan 11 19:38:57 2013: Finished locally-encoded frame 50
+1357933137:284424 encoder thread 0x7fe3580a5330 finishes local encode of 50
+1357933137:284730 writer wakes with a queue of 1
+1357933137:292610 encoder thread 0x7fe3580a5330 sleeps
+1357933137:292956 decoder wakes with queue of 32
+1357933137:293271 decoder sleeps with queue of 32
+1357933137:293578 encoder thread 0x7fe3580a5330 wakes with queue of 32
+Fri Jan 11 19:38:57 2013: Encoder thread 0x7fe3580a5330 pops frame 58 from queue
+1357933137:294222 encoder thread 0x7fe3580a5330 begins local encode of 58
+1357933137:296253 writer sleeps with a queue of 0
+Fri Jan 11 19:38:57 2013: Finished locally-encoded frame 51
+1357933137:372268 encoder thread 0x7fe358024570 finishes local encode of 51
+1357933137:372706 writer wakes with a queue of 1
+1357933137:386056 encoder thread 0x7fe358024570 sleeps
+1357933137:386379 decoder wakes with queue of 31
+1357933137:386777 adding to queue of 31
+1357933137:387177 encoder thread 0x7fe358024570 wakes with queue of 32
+Fri Jan 11 19:38:57 2013: Encoder thread 0x7fe358024570 pops frame 59 from queue
+1357933137:387861 encoder thread 0x7fe358024570 begins local encode of 59
+Fri Jan 11 19:38:57 2013: Source video frame ready; source at 3.036, output at 3.03637
+1357933137:389941 writer sleeps with a queue of 0
+1357933137:390254 Decoder emits 91
+1357933137:390637 adding to queue of 31
+Fri Jan 11 19:38:57 2013: Source video frame ready; source at 3.07, output at 3.06973
+1357933137:392303 Decoder emits 92
+1357933137:392631 decoder sleeps with queue of 32
+Fri Jan 11 19:39:02 2013: Finished locally-encoded frame 55
+1357933142:115338 encoder thread 0x7fe3580a5680 finishes local encode of 55
+1357933142:115697 writer wakes with a queue of 1
+1357933142:131598 writer sleeps with a queue of 0
+1357933142:131861 encoder thread 0x7fe3580a5680 sleeps
+1357933142:131999 decoder wakes with queue of 32
+1357933142:132227 decoder sleeps with queue of 32
+1357933142:132353 encoder thread 0x7fe3580a5680 wakes with queue of 32
+Fri Jan 11 19:39:02 2013: Encoder thread 0x7fe3580a5680 pops frame 60 from queue
+1357933142:132509 encoder thread 0x7fe3580a5680 begins local encode of 60
+Fri Jan 11 19:39:02 2013: Finished locally-encoded frame 57
+1357933142:652200 encoder thread 0x7fe3580a45f0 finishes local encode of 57
+1357933142:652478 writer wakes with a queue of 1
+1357933142:670430 encoder thread 0x7fe3580a45f0 sleeps
+1357933142:672161 decoder wakes with queue of 31
+1357933142:672536 adding to queue of 31
+1357933142:674747 writer sleeps with a queue of 0
+Fri Jan 11 19:39:02 2013: Source video frame ready; source at 3.103, output at 3.1031
+1357933142:674991 encoder thread 0x7fe3580a45f0 wakes with queue of 32
+Fri Jan 11 19:39:02 2013: Encoder thread 0x7fe3580a45f0 pops frame 61 from queue
+1357933142:675160 encoder thread 0x7fe3580a45f0 begins local encode of 61
+1357933142:675251 Decoder emits 93
+1357933142:675422 adding to queue of 31
+Fri Jan 11 19:39:02 2013: Source video frame ready; source at 3.136, output at 3.13647
+1357933142:678756 Decoder emits 94
+1357933142:678875 decoder sleeps with queue of 32
+Fri Jan 11 19:39:02 2013: Finished locally-encoded frame 56
+Fri Jan 11 19:39:02 2013: Finished locally-encoded frame 52
+Fri Jan 11 19:39:02 2013: Finished locally-encoded frame 53
+1357933142:884663 encoder thread 0x7fe3580a4940 finishes local encode of 56
+Fri Jan 11 19:39:02 2013: Finished locally-encoded frame 54
+1357933142:899652 encoder thread 0x7fe3580a4c90 finishes local encode of 52
+1357933142:899866 writer wakes with a queue of 1
+1357933142:900134 encoder thread 0x7fe3580a4940 sleeps
+1357933142:900310 encoder thread 0x7fe3580a59d0 finishes local encode of 54
+1357933142:900505 decoder wakes with queue of 32
+1357933142:900675 decoder sleeps with queue of 32
+1357933142:914829 encoder thread 0x7fe3580a4c90 sleeps
+1357933142:915010 encoder thread 0x7fe3580a4940 wakes with queue of 32
+Fri Jan 11 19:39:02 2013: Encoder thread 0x7fe3580a4940 pops frame 62 from queue
+1357933142:915345 encoder thread 0x7fe3580a4940 begins local encode of 62
+1357933142:936039 encoder thread 0x7fe3580a59d0 sleeps
+1357933142:974305 decoder wakes with queue of 31
+1357933142:987770 writer sleeps with a queue of 2
+Fri Jan 11 19:39:02 2013: Finished locally-encoded frame 58
+Fri Jan 11 19:39:02 2013: Finished locally-encoded frame 59
+1357933142:988424 adding to queue of 31
+1357933142:988714 writer wakes with a queue of 2
+1357933142:989115 encoder thread 0x7fe3580a4c90 wakes with queue of 32
+Fri Jan 11 19:39:02 2013: Encoder thread 0x7fe3580a4c90 pops frame 63 from queue
+1357933142:989600 encoder thread 0x7fe3580a4c90 begins local encode of 63
+1357933142:989810 encoder thread 0x7fe3580a5330 finishes local encode of 58
+1357933142:990161 encoder thread 0x7fe3580a59d0 wakes with queue of 31
+1357933142:990494 encoder thread 0x7fe358024570 finishes local encode of 59
+Fri Jan 11 19:39:02 2013: Source video frame ready; source at 3.17, output at 3.16983
+1357933142:991069 Decoder emits 95
+Fri Jan 11 19:39:02 2013: Encoder thread 0x7fe3580a59d0 pops frame 64 from queue
+1357933142:991534 encoder thread 0x7fe3580a59d0 begins local encode of 64
+1357933143:2971 writer sleeps with a queue of 3
+1357933143:9064 encoder thread 0x7fe3580a5330 sleeps
+1357933143:9313 encoder thread 0x7fe358024570 sleeps
+1357933143:9452 adding to queue of 30
+1357933143:9608 writer wakes with a queue of 3
+1357933143:9804 encoder thread 0x7fe3580a4fe0 finishes local encode of 53
+1357933143:9990 encoder thread 0x7fe3580a5330 wakes with queue of 31
+Fri Jan 11 19:39:03 2013: Encoder thread 0x7fe3580a5330 pops frame 65 from queue
+1357933143:10511 encoder thread 0x7fe3580a5330 begins local encode of 65
+1357933143:10803 encoder thread 0x7fe358024570 wakes with queue of 30
+Fri Jan 11 19:39:03 2013: Encoder thread 0x7fe358024570 pops frame 66 from queue
+Fri Jan 11 19:39:03 2013: Source video frame ready; source at 3.203, output at 3.2032
+1357933143:11848 Decoder emits 96
+1357933143:12061 encoder thread 0x7fe3580a4fe0 sleeps
+1357933143:12370 adding to queue of 29
+1357933143:12447 encoder thread 0x7fe358024570 begins local encode of 66
+1357933143:13252 writer sleeps with a queue of 3
+1357933143:13540 encoder thread 0x7fe3580a4fe0 wakes with queue of 30
+1357933143:13753 writer wakes with a queue of 3
+Fri Jan 11 19:39:03 2013: Source video frame ready; source at 3.237, output at 3.23657
+1357933143:14476 Decoder emits 97
+Fri Jan 11 19:39:03 2013: Encoder thread 0x7fe3580a4fe0 pops frame 67 from queue
+1357933143:15875 encoder thread 0x7fe3580a4fe0 begins local encode of 67
+1357933143:16079 adding to queue of 29
+Fri Jan 11 19:39:03 2013: Source video frame ready; source at 3.27, output at 3.26993
+1357933143:18286 Decoder emits 98
+1357933143:18493 writer sleeps with a queue of 2
+1357933143:18734 adding to queue of 30
+Fri Jan 11 19:39:03 2013: Source video frame ready; source at 3.303, output at 3.3033
+1357933143:21059 Decoder emits 99
+1357933143:21320 adding to queue of 31
+Fri Jan 11 19:39:03 2013: Source video frame ready; source at 3.337, output at 3.33667
+1357933143:27968 writer wakes with a queue of 2
+1357933143:28422 Decoder emits 100
+1357933143:29904 decoder sleeps with queue of 32
+1357933143:32086 writer sleeps with a queue of 1
+1357933143:32329 writer wakes with a queue of 1
+1357933143:46423 writer sleeps with a queue of 0
+Fri Jan 11 19:39:05 2013: Finished locally-encoded frame 60
+1357933145:40526 encoder thread 0x7fe3580a5680 finishes local encode of 60
+1357933145:40958 writer wakes with a queue of 1
+1357933145:54534 encoder thread 0x7fe3580a5680 sleeps
+1357933145:54905 decoder wakes with queue of 32
+1357933145:55214 decoder sleeps with queue of 32
+1357933145:55589 encoder thread 0x7fe3580a5680 wakes with queue of 32
+Fri Jan 11 19:39:05 2013: Encoder thread 0x7fe3580a5680 pops frame 68 from queue
+1357933145:56270 encoder thread 0x7fe3580a5680 begins local encode of 68
+1357933145:58332 writer sleeps with a queue of 0
+Fri Jan 11 19:39:09 2013: Finished locally-encoded frame 65
+1357933149:516036 encoder thread 0x7fe3580a5330 finishes local encode of 65
+Fri Jan 11 19:39:09 2013: Finished locally-encoded frame 61
+1357933149:544443 decoder wakes with queue of 31
+1357933149:544635 encoder thread 0x7fe3580a5330 sleeps
+1357933149:544726 adding to queue of 31
+1357933149:544802 writer wakes with a queue of 1
+1357933149:545457 encoder thread 0x7fe3580a45f0 finishes local encode of 61
+Fri Jan 11 19:39:09 2013: Source video frame ready; source at 3.37, output at 3.37003
+1357933149:563307 encoder thread 0x7fe3580a5330 wakes with queue of 32
+Fri Jan 11 19:39:09 2013: Encoder thread 0x7fe3580a5330 pops frame 69 from queue
+1357933149:563572 encoder thread 0x7fe3580a5330 begins local encode of 69
+1357933149:563682 Decoder emits 101
+1357933149:563935 adding to queue of 31
+1357933149:565648 writer sleeps with a queue of 1
+1357933149:565771 writer wakes with a queue of 1
+Fri Jan 11 19:39:09 2013: Source video frame ready; source at 3.403, output at 3.4034
+1357933149:567160 Decoder emits 102
+1357933149:567387 decoder sleeps with queue of 32
+1357933149:567530 encoder thread 0x7fe3580a45f0 sleeps
+1357933149:567617 encoder thread 0x7fe3580a45f0 wakes with queue of 32
+Fri Jan 11 19:39:09 2013: Encoder thread 0x7fe3580a45f0 pops frame 70 from queue
+1357933149:567830 encoder thread 0x7fe3580a45f0 begins local encode of 70
+1357933149:581549 writer sleeps with a queue of 0
+Fri Jan 11 19:39:09 2013: Finished locally-encoded frame 63
+Fri Jan 11 19:39:09 2013: Finished locally-encoded frame 62
+1357933149:935739 encoder thread 0x7fe3580a4c90 finishes local encode of 63
+Fri Jan 11 19:39:09 2013: Finished locally-encoded frame 68
+Fri Jan 11 19:39:09 2013: Finished locally-encoded frame 64
+1357933149:995417 encoder thread 0x7fe3580a4940 finishes local encode of 62
+Fri Jan 11 19:39:09 2013: Finished locally-encoded frame 67
+1357933149:995680 writer wakes with a queue of 1
+Fri Jan 11 19:39:09 2013: Finished locally-encoded frame 66
+1357933149:995936 encoder thread 0x7fe3580a5680 finishes local encode of 68
+1357933149:996084 decoder wakes with queue of 31
+1357933149:996281 encoder thread 0x7fe3580a4c90 sleeps
+1357933149:996491 adding to queue of 31
+1357933149:997365 encoder thread 0x7fe358024570 finishes local encode of 66
+1357933150:10655 encoder thread 0x7fe3580a59d0 finishes local encode of 64
+1357933150:23649 encoder thread 0x7fe3580a4fe0 finishes local encode of 67
+Fri Jan 11 19:39:10 2013: Source video frame ready; source at 3.437, output at 3.43677
+1357933150:23841 encoder thread 0x7fe3580a4940 sleeps
+1357933150:23931 writer sleeps with a queue of 3
+1357933150:23995 encoder thread 0x7fe3580a5680 sleeps
+1357933150:24056 encoder thread 0x7fe3580a4c90 wakes with queue of 32
+1357933150:24114 Decoder emits 103
+1357933150:24194 writer wakes with a queue of 3
+Fri Jan 11 19:39:10 2013: Encoder thread 0x7fe3580a4c90 pops frame 71 from queue
+1357933150:24342 encoder thread 0x7fe3580a4c90 begins local encode of 71
+1357933150:27909 encoder thread 0x7fe358024570 sleeps
+1357933150:28026 encoder thread 0x7fe3580a4940 wakes with queue of 31
+Fri Jan 11 19:39:10 2013: Encoder thread 0x7fe3580a4940 pops frame 72 from queue
+1357933150:28216 encoder thread 0x7fe3580a4940 begins local encode of 72
+1357933150:28275 encoder thread 0x7fe3580a5680 wakes with queue of 30
+Fri Jan 11 19:39:10 2013: Encoder thread 0x7fe3580a5680 pops frame 73 from queue
+1357933150:28418 encoder thread 0x7fe3580a5680 begins local encode of 73
+1357933150:28475 adding to queue of 29
+Fri Jan 11 19:39:10 2013: Source video frame ready; source at 3.47, output at 3.47013
+1357933150:53366 writer sleeps with a queue of 4
+1357933150:53618 encoder thread 0x7fe3580a59d0 sleeps
+1357933150:53732 encoder thread 0x7fe3580a4fe0 sleeps
+1357933150:53830 encoder thread 0x7fe358024570 wakes with queue of 30
+1357933150:53957 writer wakes with a queue of 4
+1357933150:54040 Decoder emits 104
+Fri Jan 11 19:39:10 2013: Encoder thread 0x7fe358024570 pops frame 74 from queue
+1357933150:54310 encoder thread 0x7fe358024570 begins local encode of 74
+1357933150:54398 encoder thread 0x7fe3580a59d0 wakes with queue of 29
+Fri Jan 11 19:39:10 2013: Encoder thread 0x7fe3580a59d0 pops frame 75 from queue
+1357933150:54635 encoder thread 0x7fe3580a59d0 begins local encode of 75
+1357933150:54754 encoder thread 0x7fe3580a4fe0 wakes with queue of 28
+Fri Jan 11 19:39:10 2013: Encoder thread 0x7fe3580a4fe0 pops frame 76 from queue
+1357933150:55191 encoder thread 0x7fe3580a4fe0 begins local encode of 76
+1357933150:55375 adding to queue of 27
+Fri Jan 11 19:39:10 2013: Source video frame ready; source at 3.504, output at 3.5035
+1357933150:58456 Decoder emits 105
+1357933150:58844 adding to queue of 28
+Fri Jan 11 19:39:10 2013: Source video frame ready; source at 3.537, output at 3.53687
+1357933150:60887 Decoder emits 106
+1357933150:61233 adding to queue of 29
+Fri Jan 11 19:39:10 2013: Source video frame ready; source at 3.57, output at 3.57023
+1357933150:64285 Decoder emits 107
+1357933150:64633 adding to queue of 30
+Fri Jan 11 19:39:10 2013: Source video frame ready; source at 3.604, output at 3.6036
+1357933150:66537 Decoder emits 108
+1357933150:66676 writer sleeps with a queue of 3
+1357933150:67009 writer wakes with a queue of 3
+1357933150:68451 adding to queue of 31
+Fri Jan 11 19:39:10 2013: Source video frame ready; source at 3.637, output at 3.63697
+1357933150:72083 Decoder emits 109
+1357933150:72341 decoder sleeps with queue of 32
+1357933150:81537 writer sleeps with a queue of 2
+1357933150:81991 writer wakes with a queue of 2
+1357933150:87900 writer sleeps with a queue of 1
+1357933150:90060 writer wakes with a queue of 1
+1357933150:94749 writer sleeps with a queue of 0
+1357933154:401667 encoder thread 0x7fe358031550 sleeps
+1357933154:402110 decoder wakes with queue of 32
+1357933154:402594 decoder sleeps with queue of 32
+1357933154:403034 encoder thread 0x7fe3580a6a80 sleeps
+1357933154:403384 encoder thread 0x7fe358031550 wakes with queue of 32
+Fri Jan 11 19:39:14 2013: Encoder thread 0x7fe358031550 pops frame 77 from queue
+1357933154:404149 decoder wakes with queue of 31
+1357933154:404586 adding to queue of 31
+1357933154:405021 encoder thread 0x7fe3580a6a80 wakes with queue of 32
+Fri Jan 11 19:39:14 2013: Encoder thread 0x7fe3580a6a80 pops frame 78 from queue
+Fri Jan 11 19:39:14 2013: Remote encode of 77 on shankly failed (Host not found (authoritative)); thread sleeping for 40s
+Fri Jan 11 19:39:14 2013: Source video frame ready; source at 3.67, output at 3.67033
+Fri Jan 11 19:39:14 2013: Encoder thread 0x7fe358031550 pushes frame 77 back onto queue after failure
+1357933154:407061 Decoder emits 110
+Fri Jan 11 19:39:14 2013: Remote encode of 78 on shankly failed (Host not found (authoritative)); thread sleeping for 40s
+1357933154:407920 decoder sleeps with queue of 32
+Fri Jan 11 19:39:14 2013: Encoder thread 0x7fe3580a6a80 pushes frame 78 back onto queue after failure
+1357933154:429739 encoder thread 0x7fe3580a6090 sleeps
+1357933154:430165 decoder wakes with queue of 33
+1357933154:430503 decoder sleeps with queue of 33
+1357933154:430863 encoder thread 0x7fe3580a6090 wakes with queue of 33
+Fri Jan 11 19:39:14 2013: Encoder thread 0x7fe3580a6090 pops frame 78 from queue
+Fri Jan 11 19:39:14 2013: Remote encode of 78 on shankly-gbit failed (Host not found (authoritative)); thread sleeping for 40s
+Fri Jan 11 19:39:14 2013: Encoder thread 0x7fe3580a6090 pushes frame 78 back onto queue after failure
+1357933154:439557 encoder thread 0x7fe358030eb0 sleeps
+1357933154:439866 decoder wakes with queue of 33
+1357933154:440151 decoder sleeps with queue of 33
+1357933154:440511 encoder thread 0x7fe358030eb0 wakes with queue of 33
+Fri Jan 11 19:39:14 2013: Encoder thread 0x7fe358030eb0 pops frame 78 from queue
+1357933154:441997 encoder thread 0x7fe3580a5d40 sleeps
+1357933154:442300 decoder wakes with queue of 32
+Fri Jan 11 19:39:14 2013: Remote encode of 78 on shankly failed (Host not found (authoritative)); thread sleeping for 40s
+1357933154:443063 decoder sleeps with queue of 32
+1357933154:443393 encoder thread 0x7fe3580a5d40 wakes with queue of 32
+Fri Jan 11 19:39:14 2013: Encoder thread 0x7fe3580a5d40 pops frame 77 from queue
+Fri Jan 11 19:39:14 2013: Encoder thread 0x7fe358030eb0 pushes frame 78 back onto queue after failure
+1357933154:444645 decoder wakes with queue of 32
+1357933154:445028 encoder thread 0x7fe3580a6730 sleeps
+1357933154:445343 decoder sleeps with queue of 32
+Fri Jan 11 19:39:14 2013: Remote encode of 77 on shankly-gbit failed (Host not found (authoritative)); thread sleeping for 40s
+1357933154:445962 encoder thread 0x7fe358031200 sleeps
+1357933154:446264 encoder thread 0x7fe3580a6730 wakes with queue of 32
+Fri Jan 11 19:39:14 2013: Encoder thread 0x7fe3580a6730 pops frame 78 from queue
+1357933154:446887 decoder wakes with queue of 31
+1357933154:447235 adding to queue of 31
+1357933154:447642 encoder thread 0x7fe3580a63e0 sleeps
+Fri Jan 11 19:39:14 2013: Encoder thread 0x7fe3580a5d40 pushes frame 77 back onto queue after failure
+Fri Jan 11 19:39:14 2013: Remote encode of 78 on shankly-gbit failed (Host not found (authoritative)); thread sleeping for 40s
+1357933154:448719 encoder thread 0x7fe358031200 wakes with queue of 33
+Fri Jan 11 19:39:14 2013: Source video frame ready; source at 3.704, output at 3.7037
+Fri Jan 11 19:39:14 2013: Encoder thread 0x7fe358031200 pops frame 77 from queue
+1357933154:449617 Decoder emits 111
+1357933154:449964 encoder thread 0x7fe3580a63e0 wakes with queue of 32
+Fri Jan 11 19:39:14 2013: Encoder thread 0x7fe3580a63e0 pops frame 79 from queue
+Fri Jan 11 19:39:14 2013: Encoder thread 0x7fe3580a6730 pushes frame 78 back onto queue after failure
+Fri Jan 11 19:39:14 2013: Remote encode of 77 on shankly failed (Host not found (authoritative)); thread sleeping for 40s
+1357933154:451408 decoder sleeps with queue of 32
+Fri Jan 11 19:39:14 2013: Remote encode of 79 on shankly-gbit failed (Host not found (authoritative)); thread sleeping for 40s
+Fri Jan 11 19:39:14 2013: Encoder thread 0x7fe358031200 pushes frame 77 back onto queue after failure
+Fri Jan 11 19:39:14 2013: Encoder thread 0x7fe3580a63e0 pushes frame 79 back onto queue after failure
+Fri Jan 11 19:39:16 2013: Finished locally-encoded frame 69
+1357933156:856781 encoder thread 0x7fe3580a5330 finishes local encode of 69
+1357933156:866630 encoder thread 0x7fe3580a5330 sleeps
+1357933156:866855 decoder wakes with queue of 34
+1357933156:866944 decoder sleeps with queue of 34
+1357933156:867031 encoder thread 0x7fe3580a5330 wakes with queue of 34
+Fri Jan 11 19:39:16 2013: Encoder thread 0x7fe3580a5330 pops frame 79 from queue
+1357933156:867173 encoder thread 0x7fe3580a5330 begins local encode of 79
+1357933156:904295 writer wakes with a queue of 1
+1357933156:909270 writer sleeps with a queue of 0
+Fri Jan 11 19:39:17 2013: Finished locally-encoded frame 70
+Fri Jan 11 19:39:17 2013: Finished locally-encoded frame 74
+1357933157:96701 encoder thread 0x7fe3580a45f0 finishes local encode of 70
+Fri Jan 11 19:39:17 2013: Finished locally-encoded frame 73
+1357933157:188013 encoder thread 0x7fe358024570 finishes local encode of 74
+1357933157:223228 writer wakes with a queue of 1
+Fri Jan 11 19:39:17 2013: Finished locally-encoded frame 76
+Fri Jan 11 19:39:17 2013: Finished locally-encoded frame 75
+1357933157:269634 encoder thread 0x7fe3580a5680 finishes local encode of 73
+1357933157:269830 decoder wakes with queue of 33
+1357933157:270010 encoder thread 0x7fe3580a45f0 sleeps
+Fri Jan 11 19:39:17 2013: Finished locally-encoded frame 72
+Fri Jan 11 19:39:17 2013: Finished locally-encoded frame 71
+1357933157:270414 encoder thread 0x7fe3580a4fe0 finishes local encode of 76
+1357933157:270539 decoder sleeps with queue of 33
+1357933157:270694 encoder thread 0x7fe3580a59d0 finishes local encode of 75
+1357933157:274635 encoder thread 0x7fe3580a4c90 finishes local encode of 71
+1357933157:301852 encoder thread 0x7fe3580a45f0 wakes with queue of 33
+1357933157:301968 encoder thread 0x7fe358024570 sleeps
+1357933157:302077 encoder thread 0x7fe3580a5680 sleeps
+1357933157:302195 writer sleeps with a queue of 3
+Fri Jan 11 19:39:17 2013: Encoder thread 0x7fe3580a45f0 pops frame 77 from queue
+1357933157:302423 writer wakes with a queue of 3
+1357933157:316504 encoder thread 0x7fe3580a45f0 begins local encode of 77
+1357933157:316677 encoder thread 0x7fe3580a4fe0 sleeps
+1357933157:316810 decoder wakes with queue of 32
+1357933157:316930 decoder sleeps with queue of 32
+1357933157:317071 encoder thread 0x7fe358024570 wakes with queue of 32
+Fri Jan 11 19:39:17 2013: Encoder thread 0x7fe358024570 pops frame 78 from queue
+1357933157:317338 encoder thread 0x7fe358024570 begins local encode of 78
+1357933157:317453 encoder thread 0x7fe3580a5680 wakes with queue of 31
+Fri Jan 11 19:39:17 2013: Encoder thread 0x7fe3580a5680 pops frame 80 from queue
+1357933157:317752 encoder thread 0x7fe3580a5680 begins local encode of 80
+1357933157:344719 encoder thread 0x7fe3580a59d0 sleeps
+1357933157:344933 writer sleeps with a queue of 4
+1357933157:345033 encoder thread 0x7fe3580a4c90 sleeps
+1357933157:345123 encoder thread 0x7fe3580a4fe0 wakes with queue of 30
+1357933157:345226 encoder thread 0x7fe3580a4940 finishes local encode of 72
+1357933157:345377 writer wakes with a queue of 4
+Fri Jan 11 19:39:17 2013: Encoder thread 0x7fe3580a4fe0 pops frame 81 from queue
+1357933157:345640 encoder thread 0x7fe3580a4fe0 begins local encode of 81
+1357933157:345736 decoder wakes with queue of 29
+1357933157:345883 adding to queue of 29
+1357933157:346083 encoder thread 0x7fe3580a59d0 wakes with queue of 30
+Fri Jan 11 19:39:17 2013: Encoder thread 0x7fe3580a59d0 pops frame 82 from queue
+1357933157:346331 encoder thread 0x7fe3580a59d0 begins local encode of 82
+1357933157:346915 encoder thread 0x7fe3580a4c90 wakes with queue of 29
+Fri Jan 11 19:39:17 2013: Encoder thread 0x7fe3580a4c90 pops frame 83 from queue
+1357933157:347248 encoder thread 0x7fe3580a4c90 begins local encode of 83
+1357933157:347463 encoder thread 0x7fe3580a4940 sleeps
+Fri Jan 11 19:39:17 2013: Source video frame ready; source at 3.737, output at 3.73707
+1357933157:349555 Decoder emits 112
+1357933157:349668 encoder thread 0x7fe3580a4940 wakes with queue of 28
+Fri Jan 11 19:39:17 2013: Encoder thread 0x7fe3580a4940 pops frame 84 from queue
+1357933157:349977 encoder thread 0x7fe3580a4940 begins local encode of 84
+1357933157:350093 writer sleeps with a queue of 4
+1357933157:350265 adding to queue of 27
+Fri Jan 11 19:39:17 2013: Source video frame ready; source at 3.77, output at 3.77043
+1357933157:352268 Decoder emits 113
+1357933157:352530 adding to queue of 28
+Fri Jan 11 19:39:17 2013: Source video frame ready; source at 3.804, output at 3.8038
+1357933157:363455 Decoder emits 114
+1357933157:363872 adding to queue of 29
+Fri Jan 11 19:39:17 2013: Source video frame ready; source at 3.837, output at 3.83717
+1357933157:366499 Decoder emits 115
+1357933157:366809 adding to queue of 30
+Fri Jan 11 19:39:17 2013: Source video frame ready; source at 3.871, output at 3.87053
+1357933157:369799 Decoder emits 116
+1357933157:370025 writer wakes with a queue of 4
+1357933157:370281 adding to queue of 31
+Fri Jan 11 19:39:17 2013: Source video frame ready; source at 3.904, output at 3.9039
+1357933157:372780 Decoder emits 117
+1357933157:373003 decoder sleeps with queue of 32
+1357933157:374537 writer sleeps with a queue of 3
+1357933157:374715 writer wakes with a queue of 3
+1357933157:378775 writer sleeps with a queue of 2
+1357933157:379025 writer wakes with a queue of 2
+1357933157:398922 writer sleeps with a queue of 1
+1357933157:399123 writer wakes with a queue of 1
+1357933157:403505 writer sleeps with a queue of 0
+Fri Jan 11 19:39:22 2013: Finished locally-encoded frame 79
+1357933162:300558 encoder thread 0x7fe3580a5330 finishes local encode of 79
+1357933162:300646 encoder thread 0x7fe3580a5330 sleeps
+1357933162:300695 decoder wakes with queue of 32
+1357933162:300770 writer wakes with a queue of 1
+1357933162:300888 decoder sleeps with queue of 32
+1357933162:300962 encoder thread 0x7fe3580a5330 wakes with queue of 32
+Fri Jan 11 19:39:22 2013: Encoder thread 0x7fe3580a5330 pops frame 85 from queue
+1357933162:301073 encoder thread 0x7fe3580a5330 begins local encode of 85
+1357933162:304126 writer sleeps with a queue of 0
+Fri Jan 11 19:39:23 2013: Finished locally-encoded frame 84
+1357933163:759332 encoder thread 0x7fe3580a4940 finishes local encode of 84
+1357933163:759615 writer wakes with a queue of 1
+1357933163:778025 encoder thread 0x7fe3580a4940 sleeps
+1357933163:778119 decoder wakes with queue of 31
+1357933163:778328 adding to queue of 31
+1357933163:778494 encoder thread 0x7fe3580a4940 wakes with queue of 32
+Fri Jan 11 19:39:23 2013: Encoder thread 0x7fe3580a4940 pops frame 86 from queue
+1357933163:778654 encoder thread 0x7fe3580a4940 begins local encode of 86
+Fri Jan 11 19:39:23 2013: Source video frame ready; source at 3.937, output at 3.93727
+1357933163:781912 writer sleeps with a queue of 0
+1357933163:782018 Decoder emits 118
+1357933163:782253 adding to queue of 31
+Fri Jan 11 19:39:23 2013: Source video frame ready; source at 3.971, output at 3.97063
+1357933163:784596 Decoder emits 119
+1357933163:784843 decoder sleeps with queue of 32
+Fri Jan 11 19:39:24 2013: Finished locally-encoded frame 82
+Fri Jan 11 19:39:24 2013: Finished locally-encoded frame 80
+1357933164:244969 encoder thread 0x7fe3580a59d0 finishes local encode of 82
+Fri Jan 11 19:39:24 2013: Finished locally-encoded frame 78
+Fri Jan 11 19:39:24 2013: Finished locally-encoded frame 81
+Fri Jan 11 19:39:24 2013: Finished locally-encoded frame 83
+Fri Jan 11 19:39:24 2013: Finished locally-encoded frame 77
+1357933164:264693 writer wakes with a queue of 1
+1357933164:264886 encoder thread 0x7fe3580a59d0 sleeps
+1357933164:265091 decoder wakes with queue of 32
+1357933164:265315 encoder thread 0x7fe358024570 finishes local encode of 78
+1357933164:265582 encoder thread 0x7fe3580a4fe0 finishes local encode of 81
+1357933164:265740 decoder sleeps with queue of 32
+1357933164:265936 encoder thread 0x7fe3580a59d0 wakes with queue of 32
+Fri Jan 11 19:39:24 2013: Encoder thread 0x7fe3580a59d0 pops frame 87 from queue
+1357933164:266248 encoder thread 0x7fe3580a59d0 begins local encode of 87
+1357933164:266399 encoder thread 0x7fe3580a4c90 finishes local encode of 83
+1357933164:278864 encoder thread 0x7fe3580a45f0 finishes local encode of 77
+1357933164:279034 encoder thread 0x7fe358024570 sleeps
+1357933164:279158 encoder thread 0x7fe3580a4fe0 sleeps
+1357933164:279258 decoder wakes with queue of 31
+1357933164:279402 adding to queue of 31
+1357933164:279905 encoder thread 0x7fe3580a5680 finishes local encode of 80
+1357933164:294035 writer sleeps with a queue of 4
+Fri Jan 11 19:39:24 2013: Source video frame ready; source at 4.004, output at 4.004
+1357933164:294328 encoder thread 0x7fe3580a45f0 sleeps
+1357933164:294452 encoder thread 0x7fe3580a4c90 sleeps
+1357933164:294537 encoder thread 0x7fe358024570 wakes with queue of 32
+1357933164:294620 writer wakes with a queue of 4
+1357933164:294704 Decoder emits 120
+Fri Jan 11 19:39:24 2013: Encoder thread 0x7fe358024570 pops frame 88 from queue
+1357933164:294928 encoder thread 0x7fe358024570 begins local encode of 88
+1357933164:295016 encoder thread 0x7fe3580a4fe0 wakes with queue of 31
+Fri Jan 11 19:39:24 2013: Encoder thread 0x7fe3580a4fe0 pops frame 89 from queue
+1357933164:295295 encoder thread 0x7fe3580a4fe0 begins local encode of 89
+1357933164:295415 encoder thread 0x7fe3580a45f0 wakes with queue of 30
+Fri Jan 11 19:39:24 2013: Encoder thread 0x7fe3580a45f0 pops frame 90 from queue
+1357933164:295651 encoder thread 0x7fe3580a45f0 begins local encode of 90
+1357933164:295748 encoder thread 0x7fe3580a4c90 wakes with queue of 29
+Fri Jan 11 19:39:24 2013: Encoder thread 0x7fe3580a4c90 pops frame 91 from queue
+1357933164:296038 encoder thread 0x7fe3580a4c90 begins local encode of 91
+1357933164:298408 writer sleeps with a queue of 4
+1357933164:298530 adding to queue of 28
+Fri Jan 11 19:39:24 2013: Source video frame ready; source at 4.037, output at 4.03737
+1357933164:301288 Decoder emits 121
+1357933164:301533 adding to queue of 29
+1357933164:301787 writer wakes with a queue of 4
+1357933164:301913 encoder thread 0x7fe3580a5680 sleeps
+1357933164:302318 encoder thread 0x7fe3580a5680 wakes with queue of 30
+Fri Jan 11 19:39:24 2013: Encoder thread 0x7fe3580a5680 pops frame 92 from queue
+1357933164:302822 encoder thread 0x7fe3580a5680 begins local encode of 92
+Fri Jan 11 19:39:24 2013: Source video frame ready; source at 4.071, output at 4.07073
+1357933164:304770 Decoder emits 122
+1357933164:304991 adding to queue of 29
+1357933164:306671 writer sleeps with a queue of 3
+Fri Jan 11 19:39:24 2013: Source video frame ready; source at 4.104, output at 4.1041
+1357933164:307658 Decoder emits 123
+1357933164:307843 writer wakes with a queue of 3
+1357933164:308164 adding to queue of 30
+Fri Jan 11 19:39:24 2013: Source video frame ready; source at 4.137, output at 4.13747
+1357933164:311097 Decoder emits 124
+1357933164:311403 adding to queue of 31
+1357933164:313011 writer sleeps with a queue of 2
+1357933164:314222 writer wakes with a queue of 2
+Fri Jan 11 19:39:24 2013: Source video frame ready; source at 4.171, output at 4.17083
+1357933164:315088 Decoder emits 125
+1357933164:315362 decoder sleeps with queue of 32
+1357933164:318075 writer sleeps with a queue of 1
+1357933164:318317 writer wakes with a queue of 1
+1357933164:333907 writer sleeps with a queue of 0
+Fri Jan 11 19:39:24 2013: Finished locally-encoded frame 85
+1357933164:943495 encoder thread 0x7fe3580a5330 finishes local encode of 85
+1357933164:943772 writer wakes with a queue of 1
+1357933164:951312 encoder thread 0x7fe3580a5330 sleeps
+1357933164:951576 decoder wakes with queue of 32
+1357933164:951869 decoder sleeps with queue of 32
+1357933164:952173 encoder thread 0x7fe3580a5330 wakes with queue of 32
+Fri Jan 11 19:39:24 2013: Encoder thread 0x7fe3580a5330 pops frame 93 from queue
+1357933164:952848 encoder thread 0x7fe3580a5330 begins local encode of 93
+1357933164:954847 writer sleeps with a queue of 0
+Fri Jan 11 19:39:28 2013: Finished locally-encoded frame 86
+1357933168:218472 encoder thread 0x7fe3580a4940 finishes local encode of 86
+1357933168:218894 writer wakes with a queue of 1
+1357933168:234453 encoder thread 0x7fe3580a4940 sleeps
+1357933168:234819 decoder wakes with queue of 31
+1357933168:235189 adding to queue of 31
+1357933168:235585 encoder thread 0x7fe3580a4940 wakes with queue of 32
+Fri Jan 11 19:39:28 2013: Encoder thread 0x7fe3580a4940 pops frame 94 from queue
+Fri Jan 11 19:39:28 2013: Source video frame ready; source at 4.204, output at 4.2042
+1357933168:236976 encoder thread 0x7fe3580a4940 begins local encode of 94
+1357933168:237346 Decoder emits 126
+1357933168:237769 adding to queue of 31
+1357933168:238332 writer sleeps with a queue of 0
+Fri Jan 11 19:39:28 2013: Source video frame ready; source at 4.238, output at 4.23757
+1357933168:239315 Decoder emits 127
+1357933168:239673 decoder sleeps with queue of 32
+Fri Jan 11 19:39:31 2013: Finished locally-encoded frame 88
+1357933171:278675 encoder thread 0x7fe358024570 finishes local encode of 88
+Fri Jan 11 19:39:31 2013: Finished locally-encoded frame 89
+1357933171:389144 encoder thread 0x7fe358024570 sleeps
+Fri Jan 11 19:39:31 2013: Finished locally-encoded frame 91
+1357933171:486733 decoder wakes with queue of 32
+1357933171:500331 writer wakes with a queue of 1
+1357933171:511296 encoder thread 0x7fe3580a4fe0 finishes local encode of 89
+Fri Jan 11 19:39:31 2013: Finished locally-encoded frame 87
+Fri Jan 11 19:39:31 2013: Finished locally-encoded frame 90
+1357933171:536686 encoder thread 0x7fe3580a4c90 finishes local encode of 91
+Fri Jan 11 19:39:31 2013: Finished locally-encoded frame 92
+Fri Jan 11 19:39:31 2013: Finished locally-encoded frame 93
+1357933171:536987 decoder sleeps with queue of 32
+Fri Jan 11 19:39:31 2013: Finished locally-encoded frame 94
+1357933171:537223 encoder thread 0x7fe3580a59d0 finishes local encode of 87
+1357933171:537285 encoder thread 0x7fe358024570 wakes with queue of 32
+Fri Jan 11 19:39:31 2013: Encoder thread 0x7fe358024570 pops frame 95 from queue
+1357933171:537438 encoder thread 0x7fe358024570 begins local encode of 95
+1357933171:550605 encoder thread 0x7fe3580a45f0 finishes local encode of 90
+1357933171:566467 encoder thread 0x7fe3580a5680 finishes local encode of 92
+1357933171:579791 encoder thread 0x7fe3580a5330 finishes local encode of 93
+1357933171:579924 decoder wakes with queue of 31
+1357933171:580091 writer sleeps with a queue of 3
+1357933171:580171 adding to queue of 31
+1357933171:580224 encoder thread 0x7fe3580a4fe0 sleeps
+1357933171:580318 encoder thread 0x7fe3580a59d0 sleeps
+1357933171:580411 encoder thread 0x7fe3580a4940 finishes local encode of 94
+1357933171:580486 writer wakes with a queue of 3
+1357933171:580539 encoder thread 0x7fe3580a4c90 sleeps
+1357933171:580609 encoder thread 0x7fe3580a4fe0 wakes with queue of 32
+Fri Jan 11 19:39:31 2013: Encoder thread 0x7fe3580a4fe0 pops frame 96 from queue
+1357933171:580805 encoder thread 0x7fe3580a4fe0 begins local encode of 96
+1357933171:580865 encoder thread 0x7fe3580a59d0 wakes with queue of 31
+Fri Jan 11 19:39:31 2013: Encoder thread 0x7fe3580a59d0 pops frame 97 from queue
+1357933171:581232 encoder thread 0x7fe3580a59d0 begins local encode of 97
+1357933171:589731 encoder thread 0x7fe3580a45f0 sleeps
+1357933171:589881 encoder thread 0x7fe3580a4c90 wakes with queue of 30
+Fri Jan 11 19:39:31 2013: Source video frame ready; source at 4.271, output at 4.27093
+Fri Jan 11 19:39:31 2013: Encoder thread 0x7fe3580a4c90 pops frame 98 from queue
+1357933171:590335 encoder thread 0x7fe3580a4c90 begins local encode of 98
+1357933171:605346 Decoder emits 128
+1357933171:627210 writer sleeps with a queue of 6
+1357933171:627432 encoder thread 0x7fe3580a5680 sleeps
+1357933171:627569 encoder thread 0x7fe3580a5330 sleeps
+1357933171:627650 encoder thread 0x7fe3580a45f0 wakes with queue of 29
+1357933171:627736 encoder thread 0x7fe3580a4940 sleeps
+1357933171:627844 writer wakes with a queue of 6
+Fri Jan 11 19:39:31 2013: Encoder thread 0x7fe3580a45f0 pops frame 99 from queue
+1357933171:628058 encoder thread 0x7fe3580a45f0 begins local encode of 99
+1357933171:628124 adding to queue of 28
+1357933171:628508 encoder thread 0x7fe3580a5680 wakes with queue of 29
+Fri Jan 11 19:39:31 2013: Encoder thread 0x7fe3580a5680 pops frame 100 from queue
+1357933171:628769 encoder thread 0x7fe3580a5680 begins local encode of 100
+Fri Jan 11 19:39:31 2013: Source video frame ready; source at 4.304, output at 4.3043
+1357933171:630460 Decoder emits 129
+1357933171:632234 writer sleeps with a queue of 5
+1357933171:632351 encoder thread 0x7fe3580a5330 wakes with queue of 28
+1357933171:632446 writer wakes with a queue of 5
+Fri Jan 11 19:39:31 2013: Encoder thread 0x7fe3580a5330 pops frame 101 from queue
+1357933171:632713 encoder thread 0x7fe3580a5330 begins local encode of 101
+1357933171:633893 encoder thread 0x7fe3580a4940 wakes with queue of 27
+Fri Jan 11 19:39:31 2013: Encoder thread 0x7fe3580a4940 pops frame 102 from queue
+1357933171:634248 encoder thread 0x7fe3580a4940 begins local encode of 102
+1357933171:634389 adding to queue of 26
+1357933171:636023 writer sleeps with a queue of 4
+Fri Jan 11 19:39:31 2013: Source video frame ready; source at 4.338, output at 4.33767
+1357933171:637681 Decoder emits 130
+1357933171:637913 adding to queue of 27
+Fri Jan 11 19:39:31 2013: Source video frame ready; source at 4.371, output at 4.37103
+1357933171:639817 Decoder emits 131
+1357933171:639950 writer wakes with a queue of 4
+1357933171:640304 adding to queue of 28
+Fri Jan 11 19:39:31 2013: Source video frame ready; source at 4.404, output at 4.4044
+1357933171:642416 Decoder emits 132
+1357933171:642667 adding to queue of 29
+Fri Jan 11 19:39:31 2013: Source video frame ready; source at 4.438, output at 4.43777
+1357933171:644252 Decoder emits 133
+1357933171:644505 adding to queue of 30
+Fri Jan 11 19:39:31 2013: Source video frame ready; source at 4.471, output at 4.47113
+1357933171:646288 Decoder emits 134
+1357933171:646421 writer sleeps with a queue of 3
+1357933171:646627 writer wakes with a queue of 3
+1357933171:646831 adding to queue of 31
+Fri Jan 11 19:39:31 2013: Source video frame ready; source at 4.505, output at 4.5045
+1357933171:648695 Decoder emits 135
+1357933171:649000 decoder sleeps with queue of 32
+1357933171:651037 writer sleeps with a queue of 2
+1357933171:651208 writer wakes with a queue of 2
+1357933171:655192 writer sleeps with a queue of 1
+1357933171:655373 writer wakes with a queue of 1
+1357933171:659901 writer sleeps with a queue of 0
+Fri Jan 11 19:39:38 2013: Finished locally-encoded frame 100
+1357933178:754229 encoder thread 0x7fe3580a5680 finishes local encode of 100
+Fri Jan 11 19:39:38 2013: Finished locally-encoded frame 98
+Fri Jan 11 19:39:38 2013: Finished locally-encoded frame 96
+Fri Jan 11 19:39:38 2013: Finished locally-encoded frame 102
+1357933178:982783 encoder thread 0x7fe3580a5680 sleeps
+1357933178:982892 decoder wakes with queue of 32
+1357933178:982989 writer wakes with a queue of 1
+1357933178:983117 encoder thread 0x7fe3580a4c90 finishes local encode of 98
+1357933178:983215 encoder thread 0x7fe3580a4940 finishes local encode of 102
+Fri Jan 11 19:39:38 2013: Finished locally-encoded frame 95
+Fri Jan 11 19:39:38 2013: Finished locally-encoded frame 97
+1357933178:983485 encoder thread 0x7fe3580a4fe0 finishes local encode of 96
+Fri Jan 11 19:39:38 2013: Finished locally-encoded frame 101
+1357933178:983766 decoder sleeps with queue of 32
+Fri Jan 11 19:39:38 2013: Finished locally-encoded frame 99
+1357933178:984038 encoder thread 0x7fe358024570 finishes local encode of 95
+1357933178:984101 encoder thread 0x7fe3580a5680 wakes with queue of 32
+Fri Jan 11 19:39:38 2013: Encoder thread 0x7fe3580a5680 pops frame 103 from queue
+1357933178:984251 encoder thread 0x7fe3580a5680 begins local encode of 103
+1357933178:998083 encoder thread 0x7fe3580a4c90 sleeps
+1357933179:25471 encoder thread 0x7fe3580a59d0 finishes local encode of 97
+1357933179:25602 encoder thread 0x7fe3580a45f0 finishes local encode of 99
+1357933179:25679 encoder thread 0x7fe3580a5330 finishes local encode of 101
+1357933179:25761 encoder thread 0x7fe3580a4940 sleeps
+1357933179:25826 writer sleeps with a queue of 4
+1357933179:25893 encoder thread 0x7fe3580a4fe0 sleeps
+1357933179:25957 encoder thread 0x7fe3580a4c90 wakes with queue of 31
+1357933179:26019 writer wakes with a queue of 4
+Fri Jan 11 19:39:39 2013: Encoder thread 0x7fe3580a4c90 pops frame 104 from queue
+1357933179:26182 encoder thread 0x7fe3580a4c90 begins local encode of 104
+1357933179:36490 encoder thread 0x7fe3580a5330 sleeps
+1357933179:47899 writer sleeps with a queue of 6
+1357933179:47981 encoder thread 0x7fe3580a5330 wakes with queue of 30
+1357933179:48052 encoder thread 0x7fe358024570 sleeps
+1357933179:48130 writer wakes with a queue of 6
+Fri Jan 11 19:39:39 2013: Encoder thread 0x7fe3580a5330 pops frame 105 from queue
+1357933179:48294 encoder thread 0x7fe3580a5330 begins local encode of 105
+1357933179:48351 encoder thread 0x7fe3580a4fe0 wakes with queue of 29
+Fri Jan 11 19:39:39 2013: Encoder thread 0x7fe3580a4fe0 pops frame 106 from queue
+1357933179:48520 encoder thread 0x7fe3580a4fe0 begins local encode of 106
+1357933179:60923 encoder thread 0x7fe3580a59d0 sleeps
+1357933179:68886 writer sleeps with a queue of 5
+1357933179:68981 encoder thread 0x7fe3580a45f0 sleeps
+1357933179:69115 decoder wakes with queue of 28
+1357933179:69186 writer wakes with a queue of 5
+1357933179:69249 adding to queue of 28
+1357933179:69426 encoder thread 0x7fe3580a4940 wakes with queue of 29
+Fri Jan 11 19:39:39 2013: Encoder thread 0x7fe3580a4940 pops frame 107 from queue
+1357933179:69682 encoder thread 0x7fe3580a4940 begins local encode of 107
+1357933179:69790 encoder thread 0x7fe358024570 wakes with queue of 28
+Fri Jan 11 19:39:39 2013: Encoder thread 0x7fe358024570 pops frame 108 from queue
+1357933179:70118 encoder thread 0x7fe358024570 begins local encode of 108
+1357933179:70215 encoder thread 0x7fe3580a59d0 wakes with queue of 27
+Fri Jan 11 19:39:39 2013: Encoder thread 0x7fe3580a59d0 pops frame 109 from queue
+Fri Jan 11 19:39:39 2013: Source video frame ready; source at 4.538, output at 4.53787
+1357933179:71090 Decoder emits 136
+1357933179:71356 adding to queue of 26
+1357933179:71570 encoder thread 0x7fe3580a45f0 wakes with queue of 27
+Fri Jan 11 19:39:39 2013: Encoder thread 0x7fe3580a45f0 pops frame 110 from queue
+1357933179:73111 encoder thread 0x7fe3580a45f0 begins local encode of 110
+Fri Jan 11 19:39:39 2013: Source video frame ready; source at 4.571, output at 4.57123
+1357933179:73729 Decoder emits 137
+1357933179:73966 adding to queue of 26
+Fri Jan 11 19:39:39 2013: Source video frame ready; source at 4.605, output at 4.6046
+1357933179:75609 Decoder emits 138
+1357933179:75774 adding to queue of 27
+Fri Jan 11 19:39:39 2013: Source video frame ready; source at 4.638, output at 4.63797
+1357933179:78084 encoder thread 0x7fe3580a59d0 begins local encode of 109
+1357933179:78312 writer sleeps with a queue of 4
+1357933179:78504 writer wakes with a queue of 4
+1357933179:78753 Decoder emits 139
+1357933179:79174 adding to queue of 28
+Fri Jan 11 19:39:39 2013: Source video frame ready; source at 4.671, output at 4.67133
+1357933179:83761 writer sleeps with a queue of 3
+1357933179:83985 writer wakes with a queue of 3
+1357933179:84375 Decoder emits 140
+1357933179:84843 adding to queue of 29
+Fri Jan 11 19:39:39 2013: Source video frame ready; source at 4.705, output at 4.7047
+1357933179:87382 Decoder emits 141
+1357933179:87678 adding to queue of 30
+1357933179:89018 writer sleeps with a queue of 2
+1357933179:89318 writer wakes with a queue of 2
+Fri Jan 11 19:39:39 2013: Source video frame ready; source at 4.738, output at 4.73807
+1357933179:90013 Decoder emits 142
+1357933179:90337 adding to queue of 31
+Fri Jan 11 19:39:39 2013: Source video frame ready; source at 4.771, output at 4.77143
+1357933179:92900 Decoder emits 143
+1357933179:93086 writer sleeps with a queue of 1
+1357933179:93279 writer wakes with a queue of 1
+1357933179:93506 decoder sleeps with queue of 32
+1357933179:96759 writer sleeps with a queue of 0
+Fri Jan 11 19:39:46 2013: Finished locally-encoded frame 104
+Fri Jan 11 19:39:46 2013: Finished locally-encoded frame 105
+Fri Jan 11 19:39:46 2013: Finished locally-encoded frame 108
+1357933186:274915 encoder thread 0x7fe3580a4c90 finishes local encode of 104
+Fri Jan 11 19:39:46 2013: Finished locally-encoded frame 110
+1357933186:288567 decoder wakes with queue of 32
+1357933186:288641 encoder thread 0x7fe3580a5330 finishes local encode of 105
+Fri Jan 11 19:39:46 2013: Finished locally-encoded frame 106
+Fri Jan 11 19:39:46 2013: Finished locally-encoded frame 103
+Fri Jan 11 19:39:46 2013: Finished locally-encoded frame 107
+1357933186:289078 writer wakes with a queue of 1
+1357933186:289183 encoder thread 0x7fe358024570 finishes local encode of 108
+1357933186:289272 encoder thread 0x7fe3580a4c90 sleeps
+Fri Jan 11 19:39:46 2013: Finished locally-encoded frame 109
+1357933186:289514 decoder sleeps with queue of 32
+1357933186:289653 encoder thread 0x7fe3580a45f0 finishes local encode of 110
+1357933186:289938 encoder thread 0x7fe3580a4fe0 finishes local encode of 106
+1357933186:300780 encoder thread 0x7fe3580a5680 finishes local encode of 103
+1357933186:308513 writer sleeps with a queue of 4
+1357933186:308578 writer wakes with a queue of 4
+1357933186:308620 encoder thread 0x7fe3580a5330 sleeps
+1357933186:308690 encoder thread 0x7fe358024570 sleeps
+1357933186:308767 encoder thread 0x7fe3580a4c90 wakes with queue of 32
+1357933186:308828 encoder thread 0x7fe3580a4940 finishes local encode of 107
+1357933186:308906 encoder thread 0x7fe3580a59d0 finishes local encode of 109
+Fri Jan 11 19:39:46 2013: Encoder thread 0x7fe3580a4c90 pops frame 111 from queue
+1357933186:309072 encoder thread 0x7fe3580a4c90 begins local encode of 111
+1357933186:316420 encoder thread 0x7fe3580a45f0 sleeps
+1357933186:316521 decoder wakes with queue of 31
+1357933186:316643 adding to queue of 31
+Fri Jan 11 19:39:46 2013: Source video frame ready; source at 4.805, output at 4.8048
+1357933186:330616 writer sleeps with a queue of 6
+1357933186:344739 encoder thread 0x7fe3580a5680 sleeps
+1357933186:344810 encoder thread 0x7fe3580a4fe0 sleeps
+1357933186:344879 writer wakes with a queue of 6
+1357933186:344962 encoder thread 0x7fe3580a5330 wakes with queue of 32
+1357933186:345032 Decoder emits 144
+Fri Jan 11 19:39:46 2013: Encoder thread 0x7fe3580a5330 pops frame 112 from queue
+1357933186:345232 encoder thread 0x7fe3580a5330 begins local encode of 112
+1357933186:345303 encoder thread 0x7fe358024570 wakes with queue of 31
+Fri Jan 11 19:39:46 2013: Encoder thread 0x7fe358024570 pops frame 113 from queue
+1357933186:345461 encoder thread 0x7fe358024570 begins local encode of 113
+1357933186:368710 encoder thread 0x7fe3580a4940 sleeps
+1357933186:368835 encoder thread 0x7fe3580a59d0 sleeps
+1357933186:368898 encoder thread 0x7fe3580a45f0 wakes with queue of 30
+Fri Jan 11 19:39:46 2013: Encoder thread 0x7fe3580a45f0 pops frame 114 from queue
+1357933186:369117 encoder thread 0x7fe3580a45f0 begins local encode of 114
+1357933186:369170 encoder thread 0x7fe3580a5680 wakes with queue of 29
+Fri Jan 11 19:39:46 2013: Encoder thread 0x7fe3580a5680 pops frame 115 from queue
+1357933186:369342 encoder thread 0x7fe3580a5680 begins local encode of 115
+1357933186:375527 encoder thread 0x7fe3580a4fe0 wakes with queue of 28
+1357933186:375745 writer sleeps with a queue of 5
+1357933186:375813 writer wakes with a queue of 5
+Fri Jan 11 19:39:46 2013: Encoder thread 0x7fe3580a4fe0 pops frame 116 from queue
+1357933186:376196 encoder thread 0x7fe3580a4fe0 begins local encode of 116
+1357933186:376453 adding to queue of 27
+1357933186:377212 encoder thread 0x7fe3580a4940 wakes with queue of 28
+Fri Jan 11 19:39:46 2013: Encoder thread 0x7fe3580a4940 pops frame 117 from queue
+1357933186:377543 encoder thread 0x7fe3580a4940 begins local encode of 117
+Fri Jan 11 19:39:46 2013: Source video frame ready; source at 4.838, output at 4.83817
+1357933186:379255 writer sleeps with a queue of 4
+1357933186:379395 encoder thread 0x7fe3580a59d0 wakes with queue of 27
+1357933186:379501 Decoder emits 145
+1357933186:379616 writer wakes with a queue of 4
+Fri Jan 11 19:39:46 2013: Encoder thread 0x7fe3580a59d0 pops frame 118 from queue
+1357933186:381383 encoder thread 0x7fe3580a59d0 begins local encode of 118
+1357933186:381547 adding to queue of 26
+1357933186:383259 writer sleeps with a queue of 3
+Fri Jan 11 19:39:46 2013: Source video frame ready; source at 4.872, output at 4.87153
+1357933186:384579 Decoder emits 146
+1357933186:384821 adding to queue of 27
+Fri Jan 11 19:39:46 2013: Source video frame ready; source at 4.905, output at 4.9049
+1357933186:386708 Decoder emits 147
+1357933186:386964 adding to queue of 28
+Fri Jan 11 19:39:46 2013: Source video frame ready; source at 4.938, output at 4.93827
+1357933186:389785 Decoder emits 148
+1357933186:390035 adding to queue of 29
+Fri Jan 11 19:39:46 2013: Source video frame ready; source at 4.972, output at 4.97163
+1357933186:392171 writer wakes with a queue of 3
+1357933186:392523 Decoder emits 149
+1357933186:392861 adding to queue of 30
+Fri Jan 11 19:39:46 2013: Source video frame ready; source at 5.005, output at 5.005
+1357933186:395163 Decoder emits 150
+1357933186:395456 adding to queue of 31
+1357933186:396558 writer sleeps with a queue of 2
+1357933186:396964 writer wakes with a queue of 2
+Fri Jan 11 19:39:46 2013: Source video frame ready; source at 5.038, output at 5.03837
+1357933186:397779 Decoder emits 151
+1357933186:398028 decoder sleeps with queue of 32
+1357933186:401782 writer sleeps with a queue of 1
+1357933186:402018 writer wakes with a queue of 1
+1357933186:409277 writer sleeps with a queue of 0
+Fri Jan 11 19:39:53 2013: Finished locally-encoded frame 116
+1357933193:349837 encoder thread 0x7fe3580a4fe0 finishes local encode of 116
+1357933193:350054 writer wakes with a queue of 1
+1357933193:354234 writer sleeps with a queue of 0
+1357933193:374690 encoder thread 0x7fe3580a4fe0 sleeps
+1357933193:374857 decoder wakes with queue of 32
+1357933193:374940 decoder sleeps with queue of 32
+1357933193:375099 encoder thread 0x7fe3580a4fe0 wakes with queue of 32
+Fri Jan 11 19:39:53 2013: Encoder thread 0x7fe3580a4fe0 pops frame 119 from queue
+1357933193:375279 encoder thread 0x7fe3580a4fe0 begins local encode of 119
+Fri Jan 11 19:39:53 2013: Finished locally-encoded frame 118
+Fri Jan 11 19:39:53 2013: Finished locally-encoded frame 117
+Fri Jan 11 19:39:53 2013: Finished locally-encoded frame 111
+Fri Jan 11 19:39:53 2013: Finished locally-encoded frame 115
+1357933193:678184 encoder thread 0x7fe3580a59d0 finishes local encode of 118
+Fri Jan 11 19:39:53 2013: Finished locally-encoded frame 112
+Fri Jan 11 19:39:53 2013: Finished locally-encoded frame 114
+Fri Jan 11 19:39:53 2013: Finished locally-encoded frame 113
+1357933193:692105 writer wakes with a queue of 1
+1357933193:692327 encoder thread 0x7fe3580a4c90 finishes local encode of 111
+1357933193:692453 encoder thread 0x7fe3580a5680 finishes local encode of 115
+1357933193:692702 encoder thread 0x7fe3580a59d0 sleeps
+1357933193:692856 decoder wakes with queue of 31
+1357933193:692940 encoder thread 0x7fe3580a5330 finishes local encode of 112
+1357933193:693030 encoder thread 0x7fe358024570 finishes local encode of 113
+1357933193:693139 encoder thread 0x7fe3580a45f0 finishes local encode of 114
+1357933193:693272 adding to queue of 31
+1357933193:693783 encoder thread 0x7fe3580a4940 finishes local encode of 117
+Fri Jan 11 19:39:53 2013: Source video frame ready; source at 5.072, output at 5.07173
+1357933193:720807 writer sleeps with a queue of 6
+1357933193:720912 writer wakes with a queue of 6
+1357933193:721000 encoder thread 0x7fe3580a59d0 wakes with queue of 32
+1357933193:721076 encoder thread 0x7fe3580a4c90 sleeps
+1357933193:721173 encoder thread 0x7fe3580a5680 sleeps
+1357933193:721247 Decoder emits 152
+Fri Jan 11 19:39:53 2013: Encoder thread 0x7fe3580a59d0 pops frame 120 from queue
+1357933193:721409 encoder thread 0x7fe3580a59d0 begins local encode of 120
+1357933193:735893 encoder thread 0x7fe3580a5330 sleeps
+1357933193:743408 writer sleeps with a queue of 5
+1357933193:743490 writer wakes with a queue of 5
+1357933193:743572 encoder thread 0x7fe3580a4940 sleeps
+1357933193:743668 encoder thread 0x7fe3580a4c90 wakes with queue of 31
+1357933193:743742 encoder thread 0x7fe358024570 sleeps
+1357933193:743820 encoder thread 0x7fe3580a45f0 sleeps
+Fri Jan 11 19:39:53 2013: Encoder thread 0x7fe3580a4c90 pops frame 121 from queue
+1357933193:743992 encoder thread 0x7fe3580a4c90 begins local encode of 121
+1357933193:744106 encoder thread 0x7fe3580a5680 wakes with queue of 30
+Fri Jan 11 19:39:53 2013: Encoder thread 0x7fe3580a5680 pops frame 122 from queue
+1357933193:744319 encoder thread 0x7fe3580a5680 begins local encode of 122
+1357933193:744418 adding to queue of 29
+1357933193:744568 encoder thread 0x7fe3580a5330 wakes with queue of 30
+Fri Jan 11 19:39:53 2013: Encoder thread 0x7fe3580a5330 pops frame 123 from queue
+1357933193:744742 encoder thread 0x7fe3580a5330 begins local encode of 123
+1357933193:744818 encoder thread 0x7fe3580a4940 wakes with queue of 29
+Fri Jan 11 19:39:53 2013: Encoder thread 0x7fe3580a4940 pops frame 124 from queue
+1357933193:744997 encoder thread 0x7fe3580a4940 begins local encode of 124
+Fri Jan 11 19:39:53 2013: Source video frame ready; source at 5.105, output at 5.1051
+1357933193:746131 Decoder emits 153
+1357933193:746595 writer sleeps with a queue of 4
+1357933193:746652 writer wakes with a queue of 4
+1357933193:749908 writer sleeps with a queue of 3
+1357933193:750034 encoder thread 0x7fe358024570 wakes with queue of 28
+1357933193:750133 writer wakes with a queue of 3
+Fri Jan 11 19:39:53 2013: Encoder thread 0x7fe358024570 pops frame 125 from queue
+1357933193:750396 encoder thread 0x7fe358024570 begins local encode of 125
+1357933193:750519 encoder thread 0x7fe3580a45f0 wakes with queue of 27
+Fri Jan 11 19:39:53 2013: Encoder thread 0x7fe3580a45f0 pops frame 126 from queue
+1357933193:750936 encoder thread 0x7fe3580a45f0 begins local encode of 126
+1357933193:751094 adding to queue of 26
+Fri Jan 11 19:39:53 2013: Source video frame ready; source at 5.138, output at 5.13847
+1357933193:758910 Decoder emits 154
+1357933193:759158 adding to queue of 27
+1357933193:760609 writer sleeps with a queue of 2
+1357933193:760878 writer wakes with a queue of 2
+Fri Jan 11 19:39:53 2013: Source video frame ready; source at 5.172, output at 5.17183
+1357933193:761568 Decoder emits 155
+1357933193:761830 adding to queue of 28
+Fri Jan 11 19:39:53 2013: Source video frame ready; source at 5.205, output at 5.2052
+1357933193:763729 Decoder emits 156
+1357933193:763941 adding to queue of 29
+Fri Jan 11 19:39:53 2013: Source video frame ready; source at 5.239, output at 5.23857
+1357933193:765932 Decoder emits 157
+1357933193:766178 adding to queue of 30
+Fri Jan 11 19:39:53 2013: Source video frame ready; source at 5.272, output at 5.27193
+1357933193:767794 Decoder emits 158
+1357933193:768019 adding to queue of 31
+Fri Jan 11 19:39:53 2013: Source video frame ready; source at 5.305, output at 5.3053
+1357933193:769709 Decoder emits 159
+1357933193:769913 decoder sleeps with queue of 32
+1357933193:781529 writer sleeps with a queue of 1
+1357933193:782078 writer wakes with a queue of 1
+1357933193:792101 writer sleeps with a queue of 0
+1357933194:407280 encoder thread 0x7fe358031550 sleeps
+1357933194:407760 decoder wakes with queue of 32
+1357933194:408135 decoder sleeps with queue of 32
+1357933194:408503 encoder thread 0x7fe358031550 wakes with queue of 32
+Fri Jan 11 19:39:54 2013: Encoder thread 0x7fe358031550 pops frame 127 from queue
+1357933194:409338 encoder thread 0x7fe3580a6a80 sleeps
+1357933194:409728 decoder wakes with queue of 31
+1357933194:410215 adding to queue of 31
+1357933194:410644 encoder thread 0x7fe3580a6a80 wakes with queue of 32
+Fri Jan 11 19:39:54 2013: Remote encode of 127 on shankly failed (Host not found (authoritative)); thread sleeping for 50s
+Fri Jan 11 19:39:54 2013: Encoder thread 0x7fe3580a6a80 pops frame 128 from queue
+Fri Jan 11 19:39:54 2013: Source video frame ready; source at 5.339, output at 5.33867
+Fri Jan 11 19:39:54 2013: Encoder thread 0x7fe358031550 pushes frame 127 back onto queue after failure
+1357933194:412750 Decoder emits 160
+Fri Jan 11 19:39:54 2013: Remote encode of 128 on shankly failed (Host not found (authoritative)); thread sleeping for 50s
+1357933194:413532 decoder sleeps with queue of 32
+Fri Jan 11 19:39:54 2013: Encoder thread 0x7fe3580a6a80 pushes frame 128 back onto queue after failure
+1357933194:433562 encoder thread 0x7fe3580a6090 sleeps
+1357933194:434003 decoder wakes with queue of 33
+1357933194:434361 decoder sleeps with queue of 33
+1357933194:434694 encoder thread 0x7fe3580a6090 wakes with queue of 33
+Fri Jan 11 19:39:54 2013: Encoder thread 0x7fe3580a6090 pops frame 128 from queue
+Fri Jan 11 19:39:54 2013: Remote encode of 128 on shankly-gbit failed (Host not found (authoritative)); thread sleeping for 50s
+Fri Jan 11 19:39:54 2013: Encoder thread 0x7fe3580a6090 pushes frame 128 back onto queue after failure
+1357933194:444618 encoder thread 0x7fe358030eb0 sleeps
+1357933194:444958 decoder wakes with queue of 33
+1357933194:445318 decoder sleeps with queue of 33
+1357933194:445690 encoder thread 0x7fe358030eb0 wakes with queue of 33
+Fri Jan 11 19:39:54 2013: Encoder thread 0x7fe358030eb0 pops frame 128 from queue
+Fri Jan 11 19:39:54 2013: Remote encode of 128 on shankly failed (Host not found (authoritative)); thread sleeping for 50s
+Fri Jan 11 19:39:54 2013: Encoder thread 0x7fe358030eb0 pushes frame 128 back onto queue after failure
+1357933194:448439 encoder thread 0x7fe3580a5d40 sleeps
+1357933194:448778 decoder wakes with queue of 33
+1357933194:449180 decoder sleeps with queue of 33
+1357933194:449576 encoder thread 0x7fe3580a5d40 wakes with queue of 33
+Fri Jan 11 19:39:54 2013: Encoder thread 0x7fe3580a5d40 pops frame 128 from queue
+Fri Jan 11 19:39:54 2013: Remote encode of 128 on shankly-gbit failed (Host not found (authoritative)); thread sleeping for 50s
+1357933194:451904 encoder thread 0x7fe3580a6730 sleeps
+1357933194:452236 decoder wakes with queue of 32
+1357933194:452577 decoder sleeps with queue of 32
+Fri Jan 11 19:39:54 2013: Encoder thread 0x7fe3580a5d40 pushes frame 128 back onto queue after failure
+1357933194:453428 encoder thread 0x7fe3580a6730 wakes with queue of 33
+Fri Jan 11 19:39:54 2013: Encoder thread 0x7fe3580a6730 pops frame 128 from queue
+1357933194:454393 encoder thread 0x7fe358031200 sleeps
+1357933194:454941 encoder thread 0x7fe3580a63e0 sleeps
+1357933194:455524 decoder wakes with queue of 32
+1357933194:456348 decoder sleeps with queue of 32
+Fri Jan 11 19:39:54 2013: Remote encode of 128 on shankly-gbit failed (Host not found (authoritative)); thread sleeping for 50s
+1357933194:457470 encoder thread 0x7fe358031200 wakes with queue of 32
+Fri Jan 11 19:39:54 2013: Encoder thread 0x7fe358031200 pops frame 127 from queue
+1357933194:458437 encoder thread 0x7fe3580a63e0 wakes with queue of 31
+Fri Jan 11 19:39:54 2013: Encoder thread 0x7fe3580a63e0 pops frame 129 from queue
+Fri Jan 11 19:39:54 2013: Encoder thread 0x7fe3580a6730 pushes frame 128 back onto queue after failure
+Fri Jan 11 19:39:54 2013: Remote encode of 127 on shankly failed (Host not found (authoritative)); thread sleeping for 50s
+Fri Jan 11 19:39:54 2013: Encoder thread 0x7fe358031200 pushes frame 127 back onto queue after failure
+Fri Jan 11 19:39:54 2013: Remote encode of 129 on shankly-gbit failed (Host not found (authoritative)); thread sleeping for 50s
+Fri Jan 11 19:39:54 2013: Encoder thread 0x7fe3580a63e0 pushes frame 129 back onto queue after failure
+Fri Jan 11 19:39:58 2013: Finished locally-encoded frame 123
+1357933198:967025 encoder thread 0x7fe3580a5330 finishes local encode of 123
+1357933198:967382 writer wakes with a queue of 1
+1357933198:982912 writer sleeps with a queue of 0
+1357933198:983079 encoder thread 0x7fe3580a5330 sleeps
+1357933198:983205 decoder wakes with queue of 33
+1357933198:983404 decoder sleeps with queue of 33
+1357933198:983524 encoder thread 0x7fe3580a5330 wakes with queue of 33
+Fri Jan 11 19:39:58 2013: Encoder thread 0x7fe3580a5330 pops frame 129 from queue
+1357933198:983688 encoder thread 0x7fe3580a5330 begins local encode of 129
+Fri Jan 11 19:39:59 2013: Finished locally-encoded frame 126
+Fri Jan 11 19:39:59 2013: Finished locally-encoded frame 125
+1357933199:496055 encoder thread 0x7fe3580a45f0 finishes local encode of 126
+1357933199:496328 encoder thread 0x7fe358024570 finishes local encode of 125
+1357933199:506491 writer wakes with a queue of 1
+1357933199:506810 encoder thread 0x7fe3580a45f0 sleeps
+1357933199:507491 decoder wakes with queue of 32
+1357933199:507687 decoder sleeps with queue of 32
+1357933199:517739 encoder thread 0x7fe358024570 sleeps
+1357933199:520670 writer sleeps with a queue of 1
+1357933199:520966 encoder thread 0x7fe3580a45f0 wakes with queue of 32
+1357933199:551489 writer wakes with a queue of 1
+Fri Jan 11 19:39:59 2013: Encoder thread 0x7fe3580a45f0 pops frame 127 from queue
+1357933199:551904 encoder thread 0x7fe3580a45f0 begins local encode of 127
+1357933199:552048 decoder wakes with queue of 31
+1357933199:552437 adding to queue of 31
+Fri Jan 11 19:39:59 2013: Source video frame ready; source at 5.372, output at 5.37203
+1357933199:555815 Decoder emits 161
+1357933199:585975 writer sleeps with a queue of 0
+1357933199:586174 encoder thread 0x7fe358024570 wakes with queue of 32
+Fri Jan 11 19:39:59 2013: Encoder thread 0x7fe358024570 pops frame 128 from queue
+1357933199:589103 encoder thread 0x7fe358024570 begins local encode of 128
+1357933199:589197 adding to queue of 31
+Fri Jan 11 19:39:59 2013: Source video frame ready; source at 5.405, output at 5.4054
+1357933199:592859 Decoder emits 162
+1357933199:593024 decoder sleeps with queue of 32
+Fri Jan 11 19:40:00 2013: Finished locally-encoded frame 122
+Fri Jan 11 19:40:00 2013: Finished locally-encoded frame 121
+Fri Jan 11 19:40:00 2013: Finished locally-encoded frame 120
+Fri Jan 11 19:40:00 2013: Finished locally-encoded frame 124
+Fri Jan 11 19:40:00 2013: Finished locally-encoded frame 119
+1357933200:131149 encoder thread 0x7fe3580a5680 finishes local encode of 122
+1357933200:131381 encoder thread 0x7fe3580a4c90 finishes local encode of 121
+1357933200:145988 encoder thread 0x7fe3580a59d0 finishes local encode of 120
+1357933200:146160 writer wakes with a queue of 1
+1357933200:146319 encoder thread 0x7fe3580a4940 finishes local encode of 124
+1357933200:146479 encoder thread 0x7fe3580a4fe0 finishes local encode of 119
+1357933200:146602 decoder wakes with queue of 32
+1357933200:146736 encoder thread 0x7fe3580a5680 sleeps
+1357933200:146838 decoder sleeps with queue of 32
+1357933200:161572 encoder thread 0x7fe3580a4c90 sleeps
+1357933200:172938 writer sleeps with a queue of 4
+1357933200:200744 encoder thread 0x7fe3580a4fe0 sleeps
+1357933200:200941 encoder thread 0x7fe3580a4940 sleeps
+1357933200:201094 encoder thread 0x7fe3580a5680 wakes with queue of 32
+1357933200:201215 writer wakes with a queue of 4
+1357933200:201334 encoder thread 0x7fe3580a59d0 sleeps
+Fri Jan 11 19:40:00 2013: Encoder thread 0x7fe3580a5680 pops frame 130 from queue
+1357933200:201644 encoder thread 0x7fe3580a5680 begins local encode of 130
+1357933200:201754 decoder wakes with queue of 31
+1357933200:201936 adding to queue of 31
+1357933200:202122 encoder thread 0x7fe3580a4c90 wakes with queue of 32
+Fri Jan 11 19:40:00 2013: Encoder thread 0x7fe3580a4c90 pops frame 131 from queue
+1357933200:202401 encoder thread 0x7fe3580a4c90 begins local encode of 131
+1357933200:202557 encoder thread 0x7fe3580a4fe0 wakes with queue of 31
+Fri Jan 11 19:40:00 2013: Encoder thread 0x7fe3580a4fe0 pops frame 132 from queue
+1357933200:202851 encoder thread 0x7fe3580a4fe0 begins local encode of 132
+1357933200:203068 encoder thread 0x7fe3580a4940 wakes with queue of 30
+Fri Jan 11 19:40:00 2013: Encoder thread 0x7fe3580a4940 pops frame 133 from queue
+Fri Jan 11 19:40:00 2013: Source video frame ready; source at 5.439, output at 5.43877
+1357933200:203879 Decoder emits 163
+1357933200:205621 encoder thread 0x7fe3580a59d0 wakes with queue of 29
+1357933200:205741 encoder thread 0x7fe3580a4940 begins local encode of 133
+1357933200:205843 writer sleeps with a queue of 3
+Fri Jan 11 19:40:00 2013: Encoder thread 0x7fe3580a59d0 pops frame 134 from queue
+1357933200:206112 writer wakes with a queue of 3
+1357933200:206218 adding to queue of 28
+Fri Jan 11 19:40:00 2013: Source video frame ready; source at 5.472, output at 5.47213
+1357933200:208814 Decoder emits 164
+1357933200:209172 adding to queue of 29
+1357933200:209351 encoder thread 0x7fe3580a59d0 begins local encode of 134
+1357933200:210101 writer sleeps with a queue of 2
+1357933200:210371 writer wakes with a queue of 2
+Fri Jan 11 19:40:00 2013: Source video frame ready; source at 5.506, output at 5.5055
+1357933200:211088 Decoder emits 165
+1357933200:211382 adding to queue of 30
+Fri Jan 11 19:40:00 2013: Source video frame ready; source at 5.539, output at 5.53887
+1357933200:214538 Decoder emits 166
+1357933200:214791 adding to queue of 31
+Fri Jan 11 19:40:00 2013: Source video frame ready; source at 5.572, output at 5.57223
+1357933200:216922 Decoder emits 167
+1357933200:217157 decoder sleeps with queue of 32
+1357933200:220148 writer sleeps with a queue of 1
+1357933200:220554 writer wakes with a queue of 1
+1357933200:224544 writer sleeps with a queue of 0
+Fri Jan 11 19:40:02 2013: Finished locally-encoded frame 129
+1357933202:83650 encoder thread 0x7fe3580a5330 finishes local encode of 129
+1357933202:83981 encoder thread 0x7fe3580a5330 sleeps
+1357933202:84243 writer wakes with a queue of 1
+1357933202:84556 decoder wakes with queue of 32
+1357933202:84913 decoder sleeps with queue of 32
+1357933202:85326 encoder thread 0x7fe3580a5330 wakes with queue of 32
+Fri Jan 11 19:40:02 2013: Encoder thread 0x7fe3580a5330 pops frame 135 from queue
+1357933202:86077 encoder thread 0x7fe3580a5330 begins local encode of 135
+1357933202:88210 writer sleeps with a queue of 0
+Fri Jan 11 19:40:05 2013: Finished locally-encoded frame 127
+1357933205:288446 encoder thread 0x7fe3580a45f0 finishes local encode of 127
+1357933205:288531 encoder thread 0x7fe3580a45f0 sleeps
+1357933205:288582 decoder wakes with queue of 31
+1357933205:288689 adding to queue of 31
+1357933205:288792 encoder thread 0x7fe3580a45f0 wakes with queue of 32
+Fri Jan 11 19:40:05 2013: Source video frame ready; source at 5.606, output at 5.6056
+1357933205:364162 Decoder emits 168
+1357933205:394427 writer wakes with a queue of 1
+Fri Jan 11 19:40:05 2013: Encoder thread 0x7fe3580a45f0 pops frame 136 from queue
+Fri Jan 11 19:40:05 2013: Finished locally-encoded frame 128
+1357933205:394722 adding to queue of 31
+1357933205:395192 encoder thread 0x7fe358024570 finishes local encode of 128
+1357933205:395260 encoder thread 0x7fe358024570 sleeps
+1357933205:395316 encoder thread 0x7fe358024570 wakes with queue of 32
+Fri Jan 11 19:40:05 2013: Encoder thread 0x7fe358024570 pops frame 137 from queue
+1357933205:395421 encoder thread 0x7fe358024570 begins local encode of 137
+Fri Jan 11 19:40:05 2013: Source video frame ready; source at 5.639, output at 5.63897
+1357933205:396291 Decoder emits 169
+1357933205:396402 adding to queue of 31
+Fri Jan 11 19:40:05 2013: Source video frame ready; source at 5.672, output at 5.67233
+1357933205:397317 Decoder emits 170
+1357933205:397391 decoder sleeps with queue of 32
+1357933205:397443 encoder thread 0x7fe3580a45f0 begins local encode of 136
+1357933205:397742 writer sleeps with a queue of 1
+1357933205:397790 writer wakes with a queue of 1
+1357933205:401013 writer sleeps with a queue of 0
+Fri Jan 11 19:40:06 2013: Finished locally-encoded frame 130
+1357933206:832217 encoder thread 0x7fe3580a5680 finishes local encode of 130
+Fri Jan 11 19:40:06 2013: Finished locally-encoded frame 134
+1357933206:952915 writer wakes with a queue of 1
+Fri Jan 11 19:40:07 2013: Finished locally-encoded frame 131
+1357933207:11661 encoder thread 0x7fe3580a5680 sleeps
+1357933207:11768 decoder wakes with queue of 32
+Fri Jan 11 19:40:07 2013: Finished locally-encoded frame 133
+Fri Jan 11 19:40:07 2013: Finished locally-encoded frame 132
+Fri Jan 11 19:40:07 2013: Finished locally-encoded frame 135
+1357933207:12501 decoder sleeps with queue of 32
+1357933207:12770 encoder thread 0x7fe3580a4c90 finishes local encode of 131
+1357933207:13108 encoder thread 0x7fe3580a5680 wakes with queue of 32
+Fri Jan 11 19:40:07 2013: Encoder thread 0x7fe3580a5680 pops frame 138 from queue
+1357933207:13585 encoder thread 0x7fe3580a4fe0 finishes local encode of 132
+1357933207:26871 encoder thread 0x7fe3580a4940 finishes local encode of 133
+1357933207:27003 encoder thread 0x7fe3580a5680 begins local encode of 138
+1357933207:27106 encoder thread 0x7fe3580a5330 finishes local encode of 135
+1357933207:27221 encoder thread 0x7fe3580a4c90 sleeps
+1357933207:27313 decoder wakes with queue of 31
+1357933207:27478 adding to queue of 31
+1357933207:27762 encoder thread 0x7fe3580a59d0 finishes local encode of 134
+Fri Jan 11 19:40:07 2013: Source video frame ready; source at 5.706, output at 5.7057
+1357933207:55750 writer sleeps with a queue of 4
+1357933207:68468 encoder thread 0x7fe3580a4fe0 sleeps
+1357933207:68618 encoder thread 0x7fe3580a4940 sleeps
+1357933207:68697 Decoder emits 171
+1357933207:68779 writer wakes with a queue of 4
+1357933207:68845 encoder thread 0x7fe3580a5330 sleeps
+1357933207:68933 encoder thread 0x7fe3580a4c90 wakes with queue of 32
+Fri Jan 11 19:40:07 2013: Encoder thread 0x7fe3580a4c90 pops frame 139 from queue
+1357933207:69084 encoder thread 0x7fe3580a4c90 begins local encode of 139
+1357933207:69127 encoder thread 0x7fe3580a4fe0 wakes with queue of 31
+Fri Jan 11 19:40:07 2013: Encoder thread 0x7fe3580a4fe0 pops frame 140 from queue
+1357933207:69280 encoder thread 0x7fe3580a4fe0 begins local encode of 140
+1357933207:69324 encoder thread 0x7fe3580a4940 wakes with queue of 30
+Fri Jan 11 19:40:07 2013: Encoder thread 0x7fe3580a4940 pops frame 141 from queue
+1357933207:69519 encoder thread 0x7fe3580a4940 begins local encode of 141
+1357933207:69582 adding to queue of 29
+1357933207:69977 encoder thread 0x7fe3580a59d0 sleeps
+Fri Jan 11 19:40:07 2013: Source video frame ready; source at 5.739, output at 5.73907
+1357933207:72464 writer sleeps with a queue of 4
+1357933207:72574 writer wakes with a queue of 4
+1357933207:72665 Decoder emits 172
+1357933207:73511 encoder thread 0x7fe3580a5330 wakes with queue of 30
+Fri Jan 11 19:40:07 2013: Encoder thread 0x7fe3580a5330 pops frame 142 from queue
+1357933207:73795 encoder thread 0x7fe3580a5330 begins local encode of 142
+1357933207:75724 writer sleeps with a queue of 3
+1357933207:75872 writer wakes with a queue of 3
+1357933207:77044 encoder thread 0x7fe3580a59d0 wakes with queue of 29
+Fri Jan 11 19:40:07 2013: Encoder thread 0x7fe3580a59d0 pops frame 143 from queue
+1357933207:77457 encoder thread 0x7fe3580a59d0 begins local encode of 143
+1357933207:77615 adding to queue of 28
+1357933207:91384 writer sleeps with a queue of 2
+Fri Jan 11 19:40:07 2013: Source video frame ready; source at 5.772, output at 5.77243
+1357933207:91734 Decoder emits 173
+1357933207:91867 adding to queue of 29
+Fri Jan 11 19:40:07 2013: Source video frame ready; source at 5.806, output at 5.8058
+1357933207:93716 Decoder emits 174
+1357933207:93887 adding to queue of 30
+Fri Jan 11 19:40:07 2013: Source video frame ready; source at 5.839, output at 5.83917
+1357933207:95435 Decoder emits 175
+1357933207:95568 adding to queue of 31
+Fri Jan 11 19:40:07 2013: Source video frame ready; source at 5.873, output at 5.87253
+1357933207:97226 writer wakes with a queue of 2
+1357933207:97514 Decoder emits 176
+1357933207:98891 decoder sleeps with queue of 32
+1357933207:101158 writer sleeps with a queue of 1
+1357933207:101363 writer wakes with a queue of 1
+1357933207:116791 writer sleeps with a queue of 0
+Fri Jan 11 19:40:08 2013: Finished locally-encoded frame 137
+1357933208:437367 encoder thread 0x7fe358024570 finishes local encode of 137
+1357933208:437839 writer wakes with a queue of 1
+1357933208:451320 encoder thread 0x7fe358024570 sleeps
+1357933208:451732 decoder wakes with queue of 32
+1357933208:452078 decoder sleeps with queue of 32
+1357933208:452430 encoder thread 0x7fe358024570 wakes with queue of 32
+Fri Jan 11 19:40:08 2013: Encoder thread 0x7fe358024570 pops frame 144 from queue
+1357933208:453028 encoder thread 0x7fe358024570 begins local encode of 144
+1357933208:454944 writer sleeps with a queue of 0
+Fri Jan 11 19:40:08 2013: Finished locally-encoded frame 136
+1357933208:509695 encoder thread 0x7fe3580a45f0 finishes local encode of 136
+1357933208:510026 writer wakes with a queue of 1
+1357933208:516892 encoder thread 0x7fe3580a45f0 sleeps
+1357933208:517230 decoder wakes with queue of 31
+1357933208:517631 adding to queue of 31
+1357933208:518098 encoder thread 0x7fe3580a45f0 wakes with queue of 32
+Fri Jan 11 19:40:08 2013: Encoder thread 0x7fe3580a45f0 pops frame 145 from queue
+1357933208:518943 encoder thread 0x7fe3580a45f0 begins local encode of 145
+Fri Jan 11 19:40:08 2013: Source video frame ready; source at 5.906, output at 5.9059
+1357933208:519693 Decoder emits 177
+1357933208:520028 adding to queue of 31
+1357933208:520685 writer sleeps with a queue of 0
+Fri Jan 11 19:40:08 2013: Source video frame ready; source at 5.939, output at 5.93927
+1357933208:527563 Decoder emits 178
+1357933208:527928 decoder sleeps with queue of 32
+Fri Jan 11 19:40:13 2013: Finished locally-encoded frame 141
+1357933213:290129 encoder thread 0x7fe3580a4940 finishes local encode of 141
+1357933213:290422 writer wakes with a queue of 1
+1357933213:308220 encoder thread 0x7fe3580a4940 sleeps
+1357933213:308315 decoder wakes with queue of 32
+1357933213:308388 decoder sleeps with queue of 32
+1357933213:308467 encoder thread 0x7fe3580a4940 wakes with queue of 32
+Fri Jan 11 19:40:13 2013: Encoder thread 0x7fe3580a4940 pops frame 146 from queue
+1357933213:308630 encoder thread 0x7fe3580a4940 begins local encode of 146
+1357933213:312482 writer sleeps with a queue of 0
+Fri Jan 11 19:40:13 2013: Finished locally-encoded frame 143
+Fri Jan 11 19:40:13 2013: Finished locally-encoded frame 139
+1357933213:773670 encoder thread 0x7fe3580a59d0 finishes local encode of 143
+Fri Jan 11 19:40:13 2013: Finished locally-encoded frame 138
+Fri Jan 11 19:40:13 2013: Finished locally-encoded frame 140
+Fri Jan 11 19:40:13 2013: Finished locally-encoded frame 142
+1357933213:790346 writer wakes with a queue of 1
+1357933213:790508 encoder thread 0x7fe3580a4c90 finishes local encode of 139
+1357933213:790799 encoder thread 0x7fe3580a59d0 sleeps
+1357933213:791023 decoder wakes with queue of 31
+1357933213:791375 encoder thread 0x7fe3580a5680 finishes local encode of 138
+1357933213:791614 encoder thread 0x7fe3580a5330 finishes local encode of 142
+1357933213:791759 adding to queue of 31
+1357933213:791896 encoder thread 0x7fe3580a4fe0 finishes local encode of 140
+Fri Jan 11 19:40:13 2013: Source video frame ready; source at 5.973, output at 5.97263
+1357933213:808217 encoder thread 0x7fe3580a4c90 sleeps
+1357933213:808325 encoder thread 0x7fe3580a59d0 wakes with queue of 32
+Fri Jan 11 19:40:13 2013: Encoder thread 0x7fe3580a59d0 pops frame 147 from queue
+1357933213:808557 Decoder emits 179
+1357933213:825154 encoder thread 0x7fe3580a59d0 begins local encode of 147
+1357933213:839728 encoder thread 0x7fe3580a5330 sleeps
+1357933213:855320 writer sleeps with a queue of 4
+1357933213:863567 encoder thread 0x7fe3580a5680 sleeps
+1357933213:892870 encoder thread 0x7fe3580a4fe0 sleeps
+1357933213:900683 encoder thread 0x7fe3580a4c90 wakes with queue of 31
+Fri Jan 11 19:40:13 2013: Finished locally-encoded frame 144
+Fri Jan 11 19:40:13 2013: Finished locally-encoded frame 145
+1357933213:927093 writer wakes with a queue of 4
+Fri Jan 11 19:40:13 2013: Encoder thread 0x7fe3580a4c90 pops frame 148 from queue
+1357933213:927469 encoder thread 0x7fe3580a4c90 begins local encode of 148
+1357933213:927654 encoder thread 0x7fe358024570 finishes local encode of 144
+1357933213:927782 adding to queue of 30
+1357933213:928043 encoder thread 0x7fe3580a5330 wakes with queue of 31
+1357933213:928216 encoder thread 0x7fe3580a45f0 finishes local encode of 145
+Fri Jan 11 19:40:13 2013: Encoder thread 0x7fe3580a5330 pops frame 149 from queue
+1357933213:928494 encoder thread 0x7fe3580a5330 begins local encode of 149
+1357933213:928602 encoder thread 0x7fe3580a5680 wakes with queue of 30
+Fri Jan 11 19:40:13 2013: Encoder thread 0x7fe3580a5680 pops frame 150 from queue
+1357933213:928910 encoder thread 0x7fe3580a5680 begins local encode of 150
+1357933213:929087 encoder thread 0x7fe3580a4fe0 wakes with queue of 29
+Fri Jan 11 19:40:13 2013: Encoder thread 0x7fe3580a4fe0 pops frame 151 from queue
+Fri Jan 11 19:40:13 2013: Source video frame ready; source at 6.006, output at 6.006
+1357933213:937591 encoder thread 0x7fe358024570 sleeps
+1357933213:948264 encoder thread 0x7fe3580a4fe0 begins local encode of 151
+1357933213:948443 writer sleeps with a queue of 5
+1357933213:948574 Decoder emits 180
+1357933213:948709 encoder thread 0x7fe358024570 wakes with queue of 28
+1357933213:948812 encoder thread 0x7fe3580a45f0 sleeps
+1357933213:948916 writer wakes with a queue of 5
+Fri Jan 11 19:40:13 2013: Encoder thread 0x7fe358024570 pops frame 152 from queue
+1357933213:949248 adding to queue of 27
+1357933213:950629 encoder thread 0x7fe3580a45f0 wakes with queue of 28
+Fri Jan 11 19:40:13 2013: Source video frame ready; source at 6.039, output at 6.03937
+1357933213:951268 Decoder emits 181
+1357933213:952749 writer sleeps with a queue of 4
+1357933213:952928 writer wakes with a queue of 4
+1357933213:953026 encoder thread 0x7fe358024570 begins local encode of 152
+1357933213:961791 writer sleeps with a queue of 3
+1357933213:961983 writer wakes with a queue of 3
+Fri Jan 11 19:40:13 2013: Encoder thread 0x7fe3580a45f0 pops frame 153 from queue
+1357933213:962553 encoder thread 0x7fe3580a45f0 begins local encode of 153
+1357933213:962748 adding to queue of 27
+Fri Jan 11 19:40:13 2013: Source video frame ready; source at 6.073, output at 6.07273
+1357933213:965536 Decoder emits 182
+1357933213:965806 adding to queue of 28
+Fri Jan 11 19:40:13 2013: Source video frame ready; source at 6.106, output at 6.1061
+1357933213:967723 Decoder emits 183
+1357933213:967969 adding to queue of 29
+1357933213:968815 writer sleeps with a queue of 2
+1357933213:969070 writer wakes with a queue of 2
+Fri Jan 11 19:40:13 2013: Source video frame ready; source at 6.139, output at 6.13947
+1357933213:970704 Decoder emits 184
+1357933213:971035 adding to queue of 30
+1357933213:972881 writer sleeps with a queue of 1
+1357933213:973063 writer wakes with a queue of 1
+Fri Jan 11 19:40:13 2013: Source video frame ready; source at 6.173, output at 6.17283
+1357933213:974744 Decoder emits 185
+1357933213:975182 adding to queue of 31
+Fri Jan 11 19:40:13 2013: Source video frame ready; source at 6.206, output at 6.2062
+1357933213:978576 writer sleeps with a queue of 0
+1357933213:978832 Decoder emits 186
+1357933213:979201 decoder sleeps with queue of 32
+Fri Jan 11 19:40:18 2013: Finished locally-encoded frame 146
+1357933218:137842 encoder thread 0x7fe3580a4940 finishes local encode of 146
+1357933218:138235 writer wakes with a queue of 1
+1357933218:151181 encoder thread 0x7fe3580a4940 sleeps
+1357933218:151542 decoder wakes with queue of 32
+1357933218:151859 decoder sleeps with queue of 32
+1357933218:152173 encoder thread 0x7fe3580a4940 wakes with queue of 32
+Fri Jan 11 19:40:18 2013: Encoder thread 0x7fe3580a4940 pops frame 154 from queue
+1357933218:152898 encoder thread 0x7fe3580a4940 begins local encode of 154
+1357933218:154726 writer sleeps with a queue of 0
+Fri Jan 11 19:40:20 2013: Finished locally-encoded frame 149
+1357933220:603254 encoder thread 0x7fe3580a5330 finishes local encode of 149
+1357933220:603651 writer wakes with a queue of 1
+1357933220:620330 writer sleeps with a queue of 0
+1357933220:629730 encoder thread 0x7fe3580a5330 sleeps
+1357933220:629935 decoder wakes with queue of 31
+1357933220:630139 adding to queue of 31
+1357933220:630289 encoder thread 0x7fe3580a5330 wakes with queue of 32
+Fri Jan 11 19:40:20 2013: Encoder thread 0x7fe3580a5330 pops frame 155 from queue
+1357933220:630509 encoder thread 0x7fe3580a5330 begins local encode of 155
+Fri Jan 11 19:40:20 2013: Source video frame ready; source at 6.24, output at 6.23957
+1357933220:633105 Decoder emits 187
+1357933220:633352 adding to queue of 31
+Fri Jan 11 19:40:20 2013: Source video frame ready; source at 6.273, output at 6.27293
+1357933220:636497 Decoder emits 188
+1357933220:636642 decoder sleeps with queue of 32
+Fri Jan 11 19:40:20 2013: Finished locally-encoded frame 148
+Fri Jan 11 19:40:20 2013: Finished locally-encoded frame 152
+Fri Jan 11 19:40:20 2013: Finished locally-encoded frame 150
+1357933220:910037 encoder thread 0x7fe3580a4c90 finishes local encode of 148
+Fri Jan 11 19:40:20 2013: Finished locally-encoded frame 147
+Fri Jan 11 19:40:20 2013: Finished locally-encoded frame 151
+1357933220:954556 encoder thread 0x7fe358024570 finishes local encode of 152
+Fri Jan 11 19:40:20 2013: Finished locally-encoded frame 153
+1357933220:960042 writer wakes with a queue of 1
+1357933220:960114 encoder thread 0x7fe3580a5680 finishes local encode of 150
+1357933220:960268 encoder thread 0x7fe3580a4c90 sleeps
+1357933220:960449 decoder wakes with queue of 32
+1357933220:960604 encoder thread 0x7fe3580a59d0 finishes local encode of 147
+1357933220:960684 encoder thread 0x7fe3580a4fe0 finishes local encode of 151
+Fri Jan 11 19:40:20 2013: Finished locally-encoded frame 154
+1357933220:960878 encoder thread 0x7fe3580a45f0 finishes local encode of 153
+1357933220:960988 decoder sleeps with queue of 32
+1357933220:961542 encoder thread 0x7fe3580a4940 finishes local encode of 154
+1357933220:984624 encoder thread 0x7fe358024570 sleeps
+1357933220:984728 encoder thread 0x7fe3580a5680 sleeps
+1357933220:984842 encoder thread 0x7fe3580a4c90 wakes with queue of 32
+Fri Jan 11 19:40:20 2013: Encoder thread 0x7fe3580a4c90 pops frame 156 from queue
+1357933220:985115 encoder thread 0x7fe3580a4c90 begins local encode of 156
+1357933221:10659 encoder thread 0x7fe3580a59d0 sleeps
+1357933221:12559 encoder thread 0x7fe3580a4fe0 sleeps
+1357933221:20062 writer sleeps with a queue of 6
+1357933221:20161 encoder thread 0x7fe3580a45f0 sleeps
+1357933221:20265 decoder wakes with queue of 31
+1357933221:20375 writer wakes with a queue of 6
+1357933221:20470 adding to queue of 31
+Fri Jan 11 19:40:21 2013: Source video frame ready; source at 6.306, output at 6.3063
+1357933221:32732 encoder thread 0x7fe3580a4940 sleeps
+1357933221:32845 encoder thread 0x7fe358024570 wakes with queue of 32
+1357933221:32957 Decoder emits 189
+Fri Jan 11 19:40:21 2013: Encoder thread 0x7fe358024570 pops frame 157 from queue
+1357933221:33133 encoder thread 0x7fe358024570 begins local encode of 157
+1357933221:33238 encoder thread 0x7fe3580a5680 wakes with queue of 31
+Fri Jan 11 19:40:21 2013: Encoder thread 0x7fe3580a5680 pops frame 158 from queue
+1357933221:33440 encoder thread 0x7fe3580a5680 begins local encode of 158
+1357933221:33542 encoder thread 0x7fe3580a59d0 wakes with queue of 30
+Fri Jan 11 19:40:21 2013: Encoder thread 0x7fe3580a59d0 pops frame 159 from queue
+1357933221:33735 encoder thread 0x7fe3580a59d0 begins local encode of 159
+1357933221:33816 encoder thread 0x7fe3580a4fe0 wakes with queue of 29
+Fri Jan 11 19:40:21 2013: Encoder thread 0x7fe3580a4fe0 pops frame 160 from queue
+1357933221:34033 encoder thread 0x7fe3580a4fe0 begins local encode of 160
+1357933221:34104 encoder thread 0x7fe3580a45f0 wakes with queue of 28
+Fri Jan 11 19:40:21 2013: Encoder thread 0x7fe3580a45f0 pops frame 161 from queue
+1357933221:34361 encoder thread 0x7fe3580a45f0 begins local encode of 161
+1357933221:34708 writer sleeps with a queue of 5
+1357933221:34872 writer wakes with a queue of 5
+1357933221:35022 encoder thread 0x7fe3580a4940 wakes with queue of 27
+Fri Jan 11 19:40:21 2013: Encoder thread 0x7fe3580a4940 pops frame 162 from queue
+1357933221:40856 encoder thread 0x7fe3580a4940 begins local encode of 162
+1357933221:40985 adding to queue of 26
+Fri Jan 11 19:40:21 2013: Source video frame ready; source at 6.34, output at 6.33967
+1357933221:43235 Decoder emits 190
+1357933221:43454 adding to queue of 27
+Fri Jan 11 19:40:21 2013: Source video frame ready; source at 6.373, output at 6.37303
+1357933221:45029 Decoder emits 191
+1357933221:45259 adding to queue of 28
+Fri Jan 11 19:40:21 2013: Source video frame ready; source at 6.406, output at 6.4064
+1357933221:46908 writer sleeps with a queue of 4
+1357933221:47159 Decoder emits 192
+1357933221:47486 adding to queue of 29
+1357933221:47643 writer wakes with a queue of 4
+Fri Jan 11 19:40:21 2013: Source video frame ready; source at 6.44, output at 6.43977
+1357933221:49982 Decoder emits 193
+1357933221:50252 adding to queue of 30
+1357933221:51546 writer sleeps with a queue of 3
+1357933221:51717 writer wakes with a queue of 3
+Fri Jan 11 19:40:21 2013: Source video frame ready; source at 6.473, output at 6.47313
+1357933221:53353 Decoder emits 194
+1357933221:53691 adding to queue of 31
+Fri Jan 11 19:40:21 2013: Source video frame ready; source at 6.507, output at 6.5065
+1357933221:55670 Decoder emits 195
+1357933221:55911 decoder sleeps with queue of 32
+1357933221:56324 writer sleeps with a queue of 2
+1357933221:56496 writer wakes with a queue of 2
+1357933221:59946 writer sleeps with a queue of 1
+1357933221:60134 writer wakes with a queue of 1
+1357933221:64145 writer sleeps with a queue of 0
+Fri Jan 11 19:40:28 2013: Finished locally-encoded frame 156
+1357933228:335212 encoder thread 0x7fe3580a4c90 finishes local encode of 156
+Fri Jan 11 19:40:28 2013: Finished locally-encoded frame 155
+Fri Jan 11 19:40:28 2013: Finished locally-encoded frame 162
+Fri Jan 11 19:40:28 2013: Finished locally-encoded frame 160
+Fri Jan 11 19:40:28 2013: Finished locally-encoded frame 158
+Fri Jan 11 19:40:28 2013: Finished locally-encoded frame 157
+Fri Jan 11 19:40:28 2013: Finished locally-encoded frame 161
+Fri Jan 11 19:40:28 2013: Finished locally-encoded frame 159
+1357933228:431256 encoder thread 0x7fe3580a5330 finishes local encode of 155
+1357933228:431360 encoder thread 0x7fe3580a4c90 sleeps
+1357933228:431509 decoder wakes with queue of 32
+1357933228:431607 writer wakes with a queue of 1
+1357933228:431694 decoder sleeps with queue of 32
+1357933228:432503 encoder thread 0x7fe3580a4fe0 finishes local encode of 160
+1357933228:439720 encoder thread 0x7fe3580a5680 finishes local encode of 158
+1357933228:439794 encoder thread 0x7fe3580a59d0 finishes local encode of 159
+1357933228:439898 encoder thread 0x7fe358024570 finishes local encode of 157
+1357933228:439985 encoder thread 0x7fe3580a45f0 finishes local encode of 161
+1357933228:440058 encoder thread 0x7fe3580a4940 finishes local encode of 162
+1357933228:440122 encoder thread 0x7fe3580a5330 sleeps
+1357933228:440182 decoder wakes with queue of 32
+1357933228:440252 decoder sleeps with queue of 32
+1357933228:440345 encoder thread 0x7fe3580a4c90 wakes with queue of 32
+Fri Jan 11 19:40:28 2013: Encoder thread 0x7fe3580a4c90 pops frame 163 from queue
+1357933228:440487 encoder thread 0x7fe3580a4c90 begins local encode of 163
+1357933228:454795 encoder thread 0x7fe3580a4fe0 sleeps
+1357933228:484602 encoder thread 0x7fe3580a5680 sleeps
+1357933228:498923 writer sleeps with a queue of 7
+1357933228:510758 writer wakes with a queue of 7
+1357933228:510821 encoder thread 0x7fe358024570 sleeps
+1357933228:510982 encoder thread 0x7fe3580a45f0 sleeps
+1357933228:511047 encoder thread 0x7fe3580a59d0 sleeps
+1357933228:511116 encoder thread 0x7fe3580a4940 sleeps
+1357933228:511197 encoder thread 0x7fe3580a5330 wakes with queue of 31
+Fri Jan 11 19:40:28 2013: Encoder thread 0x7fe3580a5330 pops frame 164 from queue
+1357933228:511389 encoder thread 0x7fe3580a5330 begins local encode of 164
+1357933228:511460 decoder wakes with queue of 30
+1357933228:511586 adding to queue of 30
+1357933228:511706 encoder thread 0x7fe3580a4fe0 wakes with queue of 31
+Fri Jan 11 19:40:28 2013: Encoder thread 0x7fe3580a4fe0 pops frame 165 from queue
+1357933228:511927 encoder thread 0x7fe3580a4fe0 begins local encode of 165
+1357933228:511981 encoder thread 0x7fe3580a5680 wakes with queue of 30
+Fri Jan 11 19:40:28 2013: Encoder thread 0x7fe3580a5680 pops frame 166 from queue
+1357933228:512240 encoder thread 0x7fe3580a5680 begins local encode of 166
+1357933228:512316 encoder thread 0x7fe358024570 wakes with queue of 29
+Fri Jan 11 19:40:28 2013: Encoder thread 0x7fe358024570 pops frame 167 from queue
+1357933228:512498 encoder thread 0x7fe358024570 begins local encode of 167
+1357933228:512587 encoder thread 0x7fe3580a45f0 wakes with queue of 28
+Fri Jan 11 19:40:28 2013: Encoder thread 0x7fe3580a45f0 pops frame 168 from queue
+1357933228:512815 encoder thread 0x7fe3580a45f0 begins local encode of 168
+1357933228:513053 encoder thread 0x7fe3580a59d0 wakes with queue of 27
+Fri Jan 11 19:40:28 2013: Source video frame ready; source at 6.54, output at 6.53987
+1357933228:513470 Decoder emits 196
+Fri Jan 11 19:40:28 2013: Encoder thread 0x7fe3580a59d0 pops frame 169 from queue
+1357933228:513710 encoder thread 0x7fe3580a59d0 begins local encode of 169
+1357933228:513885 writer sleeps with a queue of 6
+1357933228:514017 writer wakes with a queue of 6
+1357933228:517170 writer sleeps with a queue of 5
+1357933228:517363 writer wakes with a queue of 5
+1357933228:517495 encoder thread 0x7fe3580a4940 wakes with queue of 26
+Fri Jan 11 19:40:28 2013: Encoder thread 0x7fe3580a4940 pops frame 170 from queue
+1357933228:517910 encoder thread 0x7fe3580a4940 begins local encode of 170
+1357933228:518072 adding to queue of 25
+Fri Jan 11 19:40:28 2013: Source video frame ready; source at 6.573, output at 6.57323
+1357933228:520309 Decoder emits 197
+1357933228:520653 adding to queue of 26
+1357933228:520887 writer sleeps with a queue of 4
+1357933228:521063 writer wakes with a queue of 4
+Fri Jan 11 19:40:28 2013: Source video frame ready; source at 6.607, output at 6.6066
+1357933228:522919 Decoder emits 198
+1357933228:523164 adding to queue of 27
+Fri Jan 11 19:40:28 2013: Source video frame ready; source at 6.64, output at 6.63997
+1357933228:525230 Decoder emits 199
+1357933228:525450 adding to queue of 28
+Fri Jan 11 19:40:28 2013: Source video frame ready; source at 6.673, output at 6.67333
+1357933228:527251 Decoder emits 200
+1357933228:527472 adding to queue of 29
+1357933228:528187 writer sleeps with a queue of 3
+1357933228:528611 writer wakes with a queue of 3
+Fri Jan 11 19:40:28 2013: Source video frame ready; source at 6.707, output at 6.7067
+1357933228:529589 Decoder emits 201
+1357933228:529794 adding to queue of 30
+Fri Jan 11 19:40:28 2013: Source video frame ready; source at 6.74, output at 6.74007
+1357933228:531614 Decoder emits 202
+1357933228:531836 adding to queue of 31
+Fri Jan 11 19:40:28 2013: Source video frame ready; source at 6.773, output at 6.77343
+1357933228:534921 Decoder emits 203
+1357933228:535135 decoder sleeps with queue of 32
+1357933228:541575 writer sleeps with a queue of 2
+1357933228:541984 writer wakes with a queue of 2
+1357933228:549575 writer sleeps with a queue of 1
+1357933228:549917 writer wakes with a queue of 1
+1357933228:553777 writer sleeps with a queue of 0
+Fri Jan 11 19:40:35 2013: Finished locally-encoded frame 167
+1357933235:537904 encoder thread 0x7fe358024570 finishes local encode of 167
+Fri Jan 11 19:40:35 2013: Finished locally-encoded frame 170
+1357933235:584070 writer wakes with a queue of 1
+1357933235:680813 encoder thread 0x7fe358024570 sleeps
+Fri Jan 11 19:40:35 2013: Finished locally-encoded frame 168
+1357933235:783272 encoder thread 0x7fe3580a4940 finishes local encode of 170
+Fri Jan 11 19:40:35 2013: Finished locally-encoded frame 164
+Fri Jan 11 19:40:35 2013: Finished locally-encoded frame 169
+Fri Jan 11 19:40:35 2013: Finished locally-encoded frame 163
+Fri Jan 11 19:40:35 2013: Finished locally-encoded frame 165
+1357933235:783772 decoder wakes with queue of 32
+1357933235:783892 decoder sleeps with queue of 32
+Fri Jan 11 19:40:35 2013: Finished locally-encoded frame 166
+1357933235:784139 encoder thread 0x7fe358024570 wakes with queue of 32
+Fri Jan 11 19:40:35 2013: Encoder thread 0x7fe358024570 pops frame 171 from queue
+1357933235:784307 encoder thread 0x7fe3580a45f0 finishes local encode of 168
+1357933235:784377 encoder thread 0x7fe358024570 begins local encode of 171
+1357933235:802457 writer sleeps with a queue of 2
+1357933235:809820 decoder wakes with queue of 31
+1357933235:809914 encoder thread 0x7fe3580a59d0 finishes local encode of 169
+1357933235:809998 encoder thread 0x7fe3580a5330 finishes local encode of 164
+1357933235:810063 encoder thread 0x7fe3580a5680 finishes local encode of 166
+1357933235:810131 encoder thread 0x7fe3580a4940 sleeps
+1357933235:810192 encoder thread 0x7fe3580a4c90 finishes local encode of 163
+1357933235:810263 encoder thread 0x7fe3580a45f0 sleeps
+1357933235:810336 encoder thread 0x7fe3580a4fe0 finishes local encode of 165
+1357933235:810408 writer wakes with a queue of 2
+1357933235:810469 adding to queue of 31
+Fri Jan 11 19:40:35 2013: Source video frame ready; source at 6.807, output at 6.8068
+1357933235:825103 encoder thread 0x7fe3580a45f0 wakes with queue of 32
+1357933235:825196 encoder thread 0x7fe3580a5680 sleeps
+1357933235:825248 Decoder emits 204
+Fri Jan 11 19:40:35 2013: Encoder thread 0x7fe3580a45f0 pops frame 172 from queue
+1357933235:825406 encoder thread 0x7fe3580a45f0 begins local encode of 172
+1357933235:840303 writer sleeps with a queue of 6
+1357933235:854047 encoder thread 0x7fe3580a59d0 sleeps
+1357933235:854156 writer wakes with a queue of 6
+1357933235:854248 encoder thread 0x7fe3580a5330 sleeps
+1357933235:854396 encoder thread 0x7fe3580a4940 wakes with queue of 31
+Fri Jan 11 19:40:35 2013: Encoder thread 0x7fe3580a4940 pops frame 173 from queue
+1357933235:854638 encoder thread 0x7fe3580a4940 begins local encode of 173
+1357933235:863490 encoder thread 0x7fe3580a4c90 sleeps
+1357933235:877655 encoder thread 0x7fe3580a4fe0 sleeps
+1357933235:877791 encoder thread 0x7fe3580a5680 wakes with queue of 30
+Fri Jan 11 19:40:35 2013: Encoder thread 0x7fe3580a5680 pops frame 174 from queue
+1357933235:878054 encoder thread 0x7fe3580a5680 begins local encode of 174
+1357933235:878150 adding to queue of 29
+1357933235:878340 encoder thread 0x7fe3580a59d0 wakes with queue of 30
+Fri Jan 11 19:40:35 2013: Encoder thread 0x7fe3580a59d0 pops frame 175 from queue
+1357933235:878548 encoder thread 0x7fe3580a59d0 begins local encode of 175
+1357933235:878678 encoder thread 0x7fe3580a5330 wakes with queue of 29
+Fri Jan 11 19:40:35 2013: Encoder thread 0x7fe3580a5330 pops frame 176 from queue
+1357933235:879013 encoder thread 0x7fe3580a5330 begins local encode of 176
+1357933235:879172 encoder thread 0x7fe3580a4c90 wakes with queue of 28
+Fri Jan 11 19:40:35 2013: Encoder thread 0x7fe3580a4c90 pops frame 177 from queue
+1357933235:879618 encoder thread 0x7fe3580a4c90 begins local encode of 177
+1357933235:879797 writer sleeps with a queue of 5
+1357933235:880021 writer wakes with a queue of 5
+Fri Jan 11 19:40:35 2013: Source video frame ready; source at 6.84, output at 6.84017
+1357933235:881619 Decoder emits 205
+1357933235:882570 encoder thread 0x7fe3580a4fe0 wakes with queue of 27
+Fri Jan 11 19:40:35 2013: Encoder thread 0x7fe3580a4fe0 pops frame 178 from queue
+1357933235:883015 adding to queue of 26
+Fri Jan 11 19:40:35 2013: Source video frame ready; source at 6.874, output at 6.87353
+1357933235:885209 Decoder emits 206
+1357933235:885316 encoder thread 0x7fe3580a4fe0 begins local encode of 178
+1357933235:896831 writer sleeps with a queue of 4
+1357933235:897273 adding to queue of 27
+Fri Jan 11 19:40:35 2013: Source video frame ready; source at 6.907, output at 6.9069
+1357933235:901894 Decoder emits 207
+1357933235:902468 adding to queue of 28
+Fri Jan 11 19:40:35 2013: Source video frame ready; source at 6.94, output at 6.94027
+1357933235:906674 Decoder emits 208
+1357933235:907081 adding to queue of 29
+Fri Jan 11 19:40:35 2013: Source video frame ready; source at 6.974, output at 6.97363
+1357933235:909295 writer wakes with a queue of 4
+1357933235:909557 Decoder emits 209
+1357933235:909873 adding to queue of 30
+Fri Jan 11 19:40:35 2013: Source video frame ready; source at 7.007, output at 7.007
+1357933235:912676 Decoder emits 210
+1357933235:912943 adding to queue of 31
+Fri Jan 11 19:40:35 2013: Source video frame ready; source at 7.04, output at 7.04037
+1357933235:914787 writer sleeps with a queue of 3
+1357933235:915006 writer wakes with a queue of 3
+1357933235:915169 Decoder emits 211
+1357933235:915486 decoder sleeps with queue of 32
+1357933235:918704 writer sleeps with a queue of 2
+1357933235:918904 writer wakes with a queue of 2
+1357933235:922506 writer sleeps with a queue of 1
+1357933235:922648 writer wakes with a queue of 1
+1357933235:926325 writer sleeps with a queue of 0
diff --git a/optimise/analog b/optimise/analog
new file mode 100755 (executable)
index 0000000..1743008
--- /dev/null
@@ -0,0 +1,53 @@
+#!/usr/bin/python
+
+import sys
+
+class Encoder:
+      def __init__(self):
+            self.awake = 0
+            self.asleep = 0
+            self.last_event = 0
+            self.state = None
+
+encoders = dict()
+
+f = open(sys.argv[1], 'r')
+while 1:
+      l = f.readline()
+      if l == '':
+        break
+
+      s = l.split()
+      if len(s) == 0:
+            continue
+
+      t = s[0].split(':')
+      if len(t) != 2:
+            continue
+
+      secs = float(t[0]) + float(t[1]) / 1e6
+      if s[1] == 'encoder' and s[2] == 'thread' and s[4] == 'finishes':
+            tid = s[3]
+            if not tid in encoders:
+                  encoders[tid] = Encoder()
+
+            assert(encoders[tid].state == None or encoders[tid].state == 'awake')
+            if encoders[tid].state == 'awake':
+                  encoders[tid].awake += (secs - encoders[tid].last_event)
+
+            encoders[tid].state = 'asleep'
+            encoders[tid].last_event = secs
+
+      elif s[1] == 'encoder' and s[2] == 'thread' and s[4] == 'begins':
+            tid = s[3]
+            if not tid in encoders:
+                  encoders[tid] = Encoder()
+
+            if encoders[tid].state is not None:
+                  encoders[tid].asleep += (secs - encoders[tid].last_event)
+
+            encoders[tid].state = 'awake'
+            encoders[tid].last_event = secs
+
+for k, v in encoders.iteritems():
+      print '%s: awake %f asleep %f' % (k, v.awake, v.asleep)
diff --git a/optimise/plotlog b/optimise/plotlog
new file mode 100755 (executable)
index 0000000..55b6fb8
--- /dev/null
@@ -0,0 +1,80 @@
+#!/usr/bin/python
+
+from pylab import *
+import sys
+
+class Point:
+    def __init__(self, t, a):
+        self.time = t
+        self.awake = a
+
+decoder = []
+writer = []
+encoder = dict()
+
+f = open(sys.argv[1], 'r')
+for l in f.readlines():
+    l = l.strip()
+    s = l.split()
+    if len(s) == 0:
+        continue
+
+    t = s[0].split(':')
+    if len(t) != 2:
+        continue
+
+    secs = float(t[0]) + float(t[1]) / 1e6
+    if s[1] == 'decoder' and s[2] == 'sleeps':
+        decoder.append(Point(secs, False))
+    elif s[1] == 'decoder' and s[2] == 'wakes':
+        decoder.append(Point(secs, True))
+    elif s[1] == 'encoder' and s[2] == 'thread' and s[4] == 'finishes':
+        if s[3] not in encoder:
+            print 'new encoder %s' % s[3]
+            encoder[s[3]] = []
+        encoder[str(s[3])].append(Point(secs, False))
+    elif s[1] == 'encoder' and s[2] == 'thread' and s[4] == 'begins':
+        if s[3] not in encoder:
+            print 'new encoder %s' % s[3]
+            encoder[s[3]] = []
+        encoder[s[3]].append(Point(secs, True))
+    elif s[1] == 'writer' and s[2] == 'sleeps':
+        writer.append(Point(secs, False))
+    elif s[1] == 'writer' and s[2] == 'wakes':
+        writer.append(Point(secs, True))
+
+def do_a_plot(points, tit, pos):
+    x = []
+    y = []
+    awake = False
+    for p in points:
+        if p.awake != awake:
+            x.append(p.time)
+            y.append(int(awake) + pos)
+            x.append(p.time)
+            y.append(int(p.awake) + pos)
+            awake = p.awake
+
+    plot(x, y)
+#    fill_between(x, y, 0, color='0.8')
+    title(tit)
+
+figure()
+
+N = len(encoder) + 2
+
+do_a_plot(decoder, 'dec', 0)
+do_a_plot(writer, 'wri', 1)
+
+encoder_list = []
+for k, v in encoder.iteritems():
+    encoder_list.append(v)
+
+print len(encoder_list)
+
+y = 2
+for e in encoder_list:
+    do_a_plot(e, 'enc', y)
+    y += 1
+
+show()
index a6233c185783d42055be316361ff4e4713c76a3a..0efd277bb73799a76fdbf0f68aec04e36f7ab2d0 100644 (file)
@@ -30,12 +30,11 @@ using std::string;
 using boost::shared_ptr;
 
 /** @param f Film to compare.
- *  @param o Options.
+ *  @param o Decode options.
  */
-ABTranscodeJob::ABTranscodeJob (shared_ptr<Film> f, shared_ptr<const DecodeOptions> od, shared_ptr<const EncodeOptions> oe, shared_ptr<Job> req)
+ABTranscodeJob::ABTranscodeJob (shared_ptr<Film> f, DecodeOptions o, shared_ptr<Job> req)
        : Job (f, req)
-       , _decode_opt (od)
-       , _encode_opt (oe)
+       , _decode_opt (o)
 {
        _film_b.reset (new Film (*_film));
        _film_b->set_scaler (Config::instance()->reference_scaler ());
@@ -53,7 +52,7 @@ ABTranscodeJob::run ()
 {
        try {
                /* _film_b is the one with reference filters */
-               ABTranscoder w (_film_b, _film, _decode_opt, this, shared_ptr<Encoder> (new Encoder (_film, _encode_opt)));
+               ABTranscoder w (_film_b, _film, _decode_opt, this, shared_ptr<Encoder> (new Encoder (_film)));
                w.go ();
                set_progress (1);
                set_state (FINISHED_OK);
index 86a2a81b8b2b0e4416503eb00ae1c7025f5dd5a2..983842038f936cb4ad0f0e63aeef8600e82712aa 100644 (file)
 
 #include <boost/shared_ptr.hpp>
 #include "job.h"
+#include "options.h"
 
 class Film;
-class DecodeOptions;
-class EncodeOptions;
 
 /** @class ABTranscodeJob
  *  @brief Job to run a transcoder which produces output for A/B comparison of various settings.
@@ -40,8 +39,7 @@ class ABTranscodeJob : public Job
 public:
        ABTranscodeJob (
                boost::shared_ptr<Film> f,
-               boost::shared_ptr<const DecodeOptions> od,
-               boost::shared_ptr<const EncodeOptions> oe,
+               DecodeOptions o,
                boost::shared_ptr<Job> req
                );
 
@@ -49,8 +47,7 @@ public:
        void run ();
 
 private:
-       boost::shared_ptr<const DecodeOptions> _decode_opt;
-       boost::shared_ptr<const EncodeOptions> _encode_opt;
+       DecodeOptions _decode_opt;
        
        /** Copy of our Film using the reference filters and scaler */
        boost::shared_ptr<Film> _film_b;
index 53af43b5d91a2be5f259bad4d1d725fb3f18c067..fc4fb8daa44c96105f11ea14a5562bc847344ca9 100644 (file)
@@ -49,7 +49,7 @@ using boost::shared_ptr;
  */
 
 ABTranscoder::ABTranscoder (
-       shared_ptr<Film> a, shared_ptr<Film> b, shared_ptr<const DecodeOptions> o, Job* j, shared_ptr<Encoder> e)
+       shared_ptr<Film> a, shared_ptr<Film> b, DecodeOptions o, Job* j, shared_ptr<Encoder> e)
        : _film_a (a)
        , _film_b (b)
        , _job (j)
index 7bfcb393cb32182d833bde5cc52eeae0e47327a1..58a08af04ca7fbe67eddd78937af60c0fd53b51d 100644 (file)
@@ -31,7 +31,6 @@ class Job;
 class Encoder;
 class VideoDecoder;
 class AudioDecoder;
-class DecodeOptions;
 class Image;
 class Log;
 class Subtitle;
@@ -51,7 +50,7 @@ public:
        ABTranscoder (
                boost::shared_ptr<Film> a,
                boost::shared_ptr<Film> b,
-               boost::shared_ptr<const DecodeOptions> o,
+               DecodeOptions o,
                Job* j,
                boost::shared_ptr<Encoder> e
                );
index 9d8de971c654356a753f85fc48b8618d49568fc9..a038dd2bb22131b8ea4d2888216acd224a0fddc1 100644 (file)
@@ -23,7 +23,7 @@
 using boost::optional;
 using boost::shared_ptr;
 
-AudioDecoder::AudioDecoder (shared_ptr<Film> f, shared_ptr<const DecodeOptions> o, Job* j)
+AudioDecoder::AudioDecoder (shared_ptr<Film> f, DecodeOptions o, Job* j)
        : Decoder (f, o, j)
 {
 
index 013a6327f1d8587b3e9d4991f3603f618e995da5..3bf585f4de1f77259de867f218d66fa6fe4fe141 100644 (file)
@@ -34,7 +34,7 @@
 class AudioDecoder : public AudioSource, public virtual Decoder
 {
 public:
-       AudioDecoder (boost::shared_ptr<Film>, boost::shared_ptr<const DecodeOptions>, Job *);
+       AudioDecoder (boost::shared_ptr<Film>, DecodeOptions, Job *);
 
        virtual void set_audio_stream (boost::shared_ptr<AudioStream>);
 
index 701584c74dfb7ca7c2f0f4b32f2623d0e57c50cb..55a744552162ff5b48153e4b32aeab87e9e4afb1 100644 (file)
@@ -34,10 +34,9 @@ using std::stringstream;
 using std::ifstream;
 using boost::shared_ptr;
 
-CheckHashesJob::CheckHashesJob (shared_ptr<Film> f, shared_ptr<const DecodeOptions> od, shared_ptr<const EncodeOptions> oe, shared_ptr<Job> req)
+CheckHashesJob::CheckHashesJob (shared_ptr<Film> f, DecodeOptions o, shared_ptr<Job> req)
        : Job (f, req)
-       , _decode_opt (od)
-       , _encode_opt (oe)
+       , _decode_opt (o)
        , _bad (0)
 {
 
@@ -54,16 +53,14 @@ CheckHashesJob::run ()
 {
        _bad = 0;
 
-       if (!_film->dcp_length()) {
-               throw EncodeError ("cannot check hashes of a DCP with unknown length");
+       if (!_film->dcp_intrinsic_duration()) {
+               throw EncodeError ("cannot check hashes of a DCP with unknown intrinsic duration");
        }
        
-       SourceFrame const N = _film->dcp_trim_start() + _film->dcp_length().get();
-       DCPFrameRate const dfr = dcp_frame_rate (_film->frames_per_second ());
-       
-       for (SourceFrame i = _film->dcp_trim_start(); i < N; i += dfr.skip) {
-               string const j2k_file = _encode_opt->frame_out_path (i, false);
-               string const hash_file = _encode_opt->hash_out_path (i, false);
+       int const N = _film->dcp_intrinsic_duration().get();
+       for (int i = 0; i < N; ++i) {
+               string const j2k_file = _film->frame_out_path (i, false);
+               string const hash_file = _film->hash_out_path (i, false);
 
                if (!boost::filesystem::exists (j2k_file)) {
                        _film->log()->log (String::compose ("Frame %1 has a missing J2K file.", i));
@@ -92,13 +89,13 @@ CheckHashesJob::run ()
                shared_ptr<Job> tc;
 
                if (_film->dcp_ab()) {
-                       tc.reset (new ABTranscodeJob (_film, _decode_opt, _encode_opt, shared_from_this()));
+                       tc.reset (new ABTranscodeJob (_film, _decode_opt, shared_from_this()));
                } else {
-                       tc.reset (new TranscodeJob (_film, _decode_opt, _encode_opt, shared_from_this()));
+                       tc.reset (new TranscodeJob (_film, _decode_opt, shared_from_this()));
                }
                
                JobManager::instance()->add_after (shared_from_this(), tc);
-               JobManager::instance()->add_after (tc, shared_ptr<Job> (new CheckHashesJob (_film, _decode_opt, _encode_opt, tc)));
+               JobManager::instance()->add_after (tc, shared_ptr<Job> (new CheckHashesJob (_film, _decode_opt, tc)));
        }
                
        set_progress (1);
index c41af9d3f885fbfc0bb63873b3dd85a5b0c0afff..5fa17382db17cbb0935554c91e53805e1adcdf9a 100644 (file)
 */
 
 #include "job.h"
-
-class DecodeOptions;
-class EncodeOptions;
+#include "options.h"
 
 class CheckHashesJob : public Job
 {
 public:
        CheckHashesJob (
                boost::shared_ptr<Film> f,
-               boost::shared_ptr<const DecodeOptions> od,
-               boost::shared_ptr<const EncodeOptions> oe,
+               DecodeOptions od,
                boost::shared_ptr<Job> req
                );
 
@@ -37,7 +34,6 @@ public:
        std::string status () const;
 
 private:
-       boost::shared_ptr<const DecodeOptions> _decode_opt;
-       boost::shared_ptr<const EncodeOptions> _encode_opt;
+       DecodeOptions _decode_opt;
        int _bad;
 };
index d19adc2a41886e4fd7dd7c46eb569b6f4eece5d9..307b9684414359ffb823a937f3febc515711db84 100644 (file)
@@ -40,12 +40,14 @@ Config* Config::_instance = 0;
 Config::Config ()
        : _num_local_encoding_threads (2)
        , _server_port (6192)
-       , _colour_lut_index (0)
-       , _j2k_bandwidth (250000000)
        , _reference_scaler (Scaler::from_id ("bicubic"))
        , _tms_path (".")
        , _sound_processor (SoundProcessor::from_id ("dolby_cp750"))
 {
+       _allowed_dcp_frame_rates.push_back (24);
+       _allowed_dcp_frame_rates.push_back (25);
+       _allowed_dcp_frame_rates.push_back (30);
+       
        ifstream f (file().c_str ());
        string line;
        while (getline (f, line)) {
@@ -71,10 +73,6 @@ Config::Config ()
                        _default_directory = v;
                } else if (k == "server_port") {
                        _server_port = atoi (v.c_str ());
-               } else if (k == "colour_lut_index") {
-                       _colour_lut_index = atoi (v.c_str ());
-               } else if (k == "j2k_bandwidth") {
-                       _j2k_bandwidth = atoi (v.c_str ());
                } else if (k == "reference_scaler") {
                        _reference_scaler = Scaler::from_id (v);
                } else if (k == "reference_filter") {
@@ -124,8 +122,6 @@ Config::write () const
        f << "num_local_encoding_threads " << _num_local_encoding_threads << "\n"
          << "default_directory " << _default_directory << "\n"
          << "server_port " << _server_port << "\n"
-         << "colour_lut_index " << _colour_lut_index << "\n"
-         << "j2k_bandwidth " << _j2k_bandwidth << "\n"
          << "reference_scaler " << _reference_scaler->id () << "\n";
 
        for (vector<Filter const *>::const_iterator i = _reference_filters.begin(); i != _reference_filters.end(); ++i) {
index 4575cb54d6864e23ed3c614e63f4f1dd8bd30c81..c41437efbe290f6aacad37ec5387fd21dc4d99db 100644 (file)
@@ -56,19 +56,6 @@ public:
                return _server_port;
        }
 
-       /** @return index of colour LUT to use when converting RGB to XYZ.
-        *  0: sRGB
-        *  1: Rec 709
-        */
-       int colour_lut_index () const {
-               return _colour_lut_index;
-       }
-
-       /** @return bandwidth for J2K files in bits per second */
-       int j2k_bandwidth () const {
-               return _j2k_bandwidth;
-       }
-
        /** @return J2K encoding servers to use */
        std::vector<ServerDescription*> servers () const {
                return _servers;
@@ -107,6 +94,10 @@ public:
                return _sound_processor;
        }
 
+       std::list<int> allowed_dcp_frame_rates () const {
+               return _allowed_dcp_frame_rates;
+       }
+       
        /** @param n New number of local encoding threads */
        void set_num_local_encoding_threads (int n) {
                _num_local_encoding_threads = n;
@@ -121,16 +112,6 @@ public:
                _server_port = p;
        }
 
-       /** @param i New colour LUT index */
-       void set_colour_lut_index (int i) {
-               _colour_lut_index = i;
-       }
-
-       /** @param b New J2K bandwidth */
-       void set_j2k_bandwidth (int b) {
-               _j2k_bandwidth = b;
-       }
-
        /** @param s New list of servers */
        void set_servers (std::vector<ServerDescription*> s) {
                _servers = s;
@@ -163,7 +144,11 @@ public:
        void set_tms_password (std::string p) {
                _tms_password = p;
        }
-       
+
+       void set_allowed_dcp_frame_rates (std::list<int> const & r) {
+               _allowed_dcp_frame_rates = r;
+       }
+
        void write () const;
 
        static Config* instance ();
@@ -178,12 +163,6 @@ private:
        std::string _default_directory;
        /** port to use for J2K encoding servers */
        int _server_port;
-       /** index of colour LUT to use when converting RGB to XYZ
-        *  (see colour_lut_index ())
-        */
-       int _colour_lut_index;
-       /** bandwidth for J2K files in bits per second */
-       int _j2k_bandwidth;
 
        /** J2K encoding servers to use */
        std::vector<ServerDescription *> _servers;
@@ -201,6 +180,7 @@ private:
        std::string _tms_password;
        /** Our sound processor */
        SoundProcessor const * _sound_processor;
+       std::list<int> _allowed_dcp_frame_rates;
 
        /** Singleton instance, or 0 */
        static Config* _instance;
index f84fa8a3f1be39053b4bb77c75a7f2e1938ca789..1c408270e46ae6b4e34c027740e760897ede819a 100644 (file)
@@ -61,14 +61,15 @@ using std::stringstream;
 using std::ofstream;
 using std::cout;
 using boost::shared_ptr;
+using libdcp::Size;
 
 /** Construct a DCP video frame.
  *  @param input Input image.
  *  @param out Required size of output, in pixels (including any padding).
  *  @param s Scaler to use.
  *  @param p Number of pixels of padding either side of the image.
- *  @param f Index of the frame within the Film.
- *  @param fps Frames per second of the Film.
+ *  @param f Index of the frame within the DCP's intrinsic duration.
+ *  @param fps Frames per second of the Film's source.
  *  @param pp FFmpeg post-processing string to use.
  *  @param clut Colour look-up table to use (see Config::colour_lut_index ())
  *  @param bw J2K bandwidth to use (see Config::j2k_bandwidth ())
@@ -77,7 +78,7 @@ using boost::shared_ptr;
 DCPVideoFrame::DCPVideoFrame (
        shared_ptr<const Image> yuv, shared_ptr<Subtitle> sub,
        Size out, int p, int subtitle_offset, float subtitle_scale,
-       Scaler const * s, SourceFrame f, float fps, string pp, int clut, int bw, Log* l
+       Scaler const * s, int f, float fps, string pp, int clut, int bw, Log* l
        )
        : _input (yuv)
        , _subtitle (sub)
@@ -87,9 +88,9 @@ DCPVideoFrame::DCPVideoFrame (
        , _subtitle_scale (subtitle_scale)
        , _scaler (s)
        , _frame (f)
-       , _frames_per_second (dcp_frame_rate(fps).frames_per_second)
+       , _frames_per_second (DCPFrameRate(fps).frames_per_second)
        , _post_process (pp)
-       , _colour_lut_index (clut)
+       , _colour_lut (clut)
        , _j2k_bandwidth (bw)
        , _log (l)
        , _image (0)
@@ -189,22 +190,22 @@ DCPVideoFrame::encode_locally ()
                for (int x = 0; x < _out_size.width; ++x) {
 
                        /* In gamma LUT (converting 8-bit input to 12-bit) */
-                       s.r = lut_in[_colour_lut_index][*p++ << 4];
-                       s.g = lut_in[_colour_lut_index][*p++ << 4];
-                       s.b = lut_in[_colour_lut_index][*p++ << 4];
+                       s.r = lut_in[_colour_lut][*p++ << 4];
+                       s.g = lut_in[_colour_lut][*p++ << 4];
+                       s.b = lut_in[_colour_lut][*p++ << 4];
                        
                        /* RGB to XYZ Matrix */
-                       d.x = ((s.r * color_matrix[_colour_lut_index][0][0]) +
-                              (s.g * color_matrix[_colour_lut_index][0][1]) +
-                              (s.b * color_matrix[_colour_lut_index][0][2]));
+                       d.x = ((s.r * color_matrix[_colour_lut][0][0]) +
+                              (s.g * color_matrix[_colour_lut][0][1]) +
+                              (s.b * color_matrix[_colour_lut][0][2]));
                        
-                       d.y = ((s.r * color_matrix[_colour_lut_index][1][0]) +
-                              (s.g * color_matrix[_colour_lut_index][1][1]) +
-                              (s.b * color_matrix[_colour_lut_index][1][2]));
+                       d.y = ((s.r * color_matrix[_colour_lut][1][0]) +
+                              (s.g * color_matrix[_colour_lut][1][1]) +
+                              (s.b * color_matrix[_colour_lut][1][2]));
                        
-                       d.z = ((s.r * color_matrix[_colour_lut_index][2][0]) +
-                              (s.g * color_matrix[_colour_lut_index][2][1]) +
-                              (s.b * color_matrix[_colour_lut_index][2][2]));
+                       d.z = ((s.r * color_matrix[_colour_lut][2][0]) +
+                              (s.g * color_matrix[_colour_lut][2][1]) +
+                              (s.b * color_matrix[_colour_lut][2][2]));
                        
                        /* DCI companding */
                        d.x = d.x * DCI_COEFFICENT * (DCI_LUT_SIZE - 1);
@@ -335,8 +336,8 @@ DCPVideoFrame::encode_remotely (ServerDescription const * serv)
                s << "post_process " << _post_process << "\n";
        }
        
-       s << "colour_lut " << Config::instance()->colour_lut_index () << "\n"
-         << "j2k_bandwidth " << Config::instance()->j2k_bandwidth () << "\n";
+       s << "colour_lut " << _colour_lut << "\n"
+         << "j2k_bandwidth " << _j2k_bandwidth << "\n";
 
        if (_subtitle) {
                s << "subtitle_x " << _subtitle->position().x << "\n"
@@ -386,12 +387,12 @@ EncodedData::~EncodedData ()
 
 /** Write this data to a J2K file.
  *  @param opt Options.
- *  @param frame Frame index.
+ *  @param frame DCP Frame index.
  */
 void
-EncodedData::write (shared_ptr<const EncodeOptions> opt, SourceFrame frame)
+EncodedData::write (shared_ptr<const Film> film, int frame)
 {
-       string const tmp_j2k = opt->frame_out_path (frame, true);
+       string const tmp_j2k = film->frame_out_path (frame, true);
 
        FILE* f = fopen (tmp_j2k.c_str (), "wb");
        
@@ -402,13 +403,13 @@ EncodedData::write (shared_ptr<const EncodeOptions> opt, SourceFrame frame)
        fwrite (_data, 1, _size, f);
        fclose (f);
 
-       string const real_j2k = opt->frame_out_path (frame, false);
+       string const real_j2k = film->frame_out_path (frame, false);
 
        /* Rename the file from foo.j2c.tmp to foo.j2c now that it is complete */
        boost::filesystem::rename (tmp_j2k, real_j2k);
 
        /* Write a file containing the hash */
-       string const hash = opt->hash_out_path (frame, false);
+       string const hash = film->hash_out_path (frame, false);
        ofstream h (hash.c_str());
        h << md5_digest (_data, _size) << "\n";
        h.close ();
index f5ffa467e81b8ef45de2b4941ff95940ae80f9df..e311724d8d8b9aa137d367ceaeef02136efbee0c 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 class FilmState;
-class EncodeOptions;
+class Film;
 class ServerDescription;
 class Scaler;
 class Image;
@@ -46,7 +46,7 @@ public:
        virtual ~EncodedData ();
 
        void send (boost::shared_ptr<Socket> socket);
-       void write (boost::shared_ptr<const EncodeOptions>, SourceFrame);
+       void write (boost::shared_ptr<const Film>, int);
 
        /** @return data */
        uint8_t* data () const {
@@ -104,8 +104,8 @@ class DCPVideoFrame
 {
 public:
        DCPVideoFrame (
-               boost::shared_ptr<const Image>, boost::shared_ptr<Subtitle>, Size,
-               int, int, float, Scaler const *, SourceFrame, float, std::string, int, int, Log *
+               boost::shared_ptr<const Image>, boost::shared_ptr<Subtitle>, libdcp::Size,
+               int, int, float, Scaler const *, int, float, std::string, int, int, Log *
                );
        
        virtual ~DCPVideoFrame ();
@@ -113,7 +113,7 @@ public:
        boost::shared_ptr<EncodedData> encode_locally ();
        boost::shared_ptr<EncodedData> encode_remotely (ServerDescription const *);
 
-       SourceFrame frame () const {
+       int frame () const {
                return _frame;
        }
        
@@ -122,16 +122,16 @@ private:
 
        boost::shared_ptr<const Image> _input; ///< the input image
        boost::shared_ptr<Subtitle> _subtitle; ///< any subtitle that should be on the image
-       Size _out_size;                  ///< the required size of the output, in pixels
+       libdcp::Size _out_size;                ///< the required size of the output, in pixels
        int _padding;
        int _subtitle_offset;
        float _subtitle_scale;
        Scaler const * _scaler;          ///< scaler to use
-       SourceFrame _frame;              ///< frame index within the Film's source
+       int _frame;                      ///< frame index within the DCP's intrinsic duration
        int _frames_per_second;          ///< Frames per second that we will use for the DCP (rounded)
        std::string _post_process;       ///< FFmpeg post-processing string to use
-       int _colour_lut_index;           ///< Colour look-up table to use (see Config::colour_lut_index ())
-       int _j2k_bandwidth;              ///< J2K bandwidth to use (see Config::j2k_bandwidth ())
+       int _colour_lut;                 ///< Colour look-up table to use
+       int _j2k_bandwidth;              ///< J2K bandwidth to use
 
        Log* _log; ///< log
 
index 7066b488e6507352320c06767caaa216218c0275..fd0abee4183e540b4a4db5c5a9cb3588e5d8a34c 100644 (file)
@@ -46,10 +46,10 @@ using boost::shared_ptr;
 using boost::optional;
 
 /** @param f Film.
- *  @param o Options.
+ *  @param o Decode options.
  *  @param j Job that we are running within, or 0
  */
-Decoder::Decoder (boost::shared_ptr<Film> f, boost::shared_ptr<const DecodeOptions> o, Job* j)
+Decoder::Decoder (boost::shared_ptr<Film> f, DecodeOptions o, Job* j)
        : _film (f)
        , _opt (o)
        , _job (j)
index 3908afa2fbfed522b24266846925fad693ee374f..cc4c87373616e6f4f469e4f3ce9018b4ee5aa929 100644 (file)
@@ -34,9 +34,9 @@
 #include "video_source.h"
 #include "audio_source.h"
 #include "film.h"
+#include "options.h"
 
 class Job;
-class DecodeOptions;
 class Image;
 class Log;
 class DelayLine;
@@ -54,7 +54,7 @@ class FilterGraph;
 class Decoder
 {
 public:
-       Decoder (boost::shared_ptr<Film>, boost::shared_ptr<const DecodeOptions>, Job *);
+       Decoder (boost::shared_ptr<Film>, DecodeOptions, Job *);
        virtual ~Decoder () {}
 
        virtual bool pass () = 0;
@@ -66,8 +66,8 @@ public:
 protected:
        /** our Film */
        boost::shared_ptr<Film> _film;
-       /** our options */
-       boost::shared_ptr<const DecodeOptions> _opt;
+       /** our decode options */
+       DecodeOptions _opt;
        /** associated Job, or 0 */
        Job* _job;
 
index 2a0d828e2153d4e418e8f254277f98f719a33754..c4d818f497f6d7eec7f173eea9fa445d9a666f21 100644 (file)
@@ -36,7 +36,7 @@ using boost::dynamic_pointer_cast;
 
 Decoders
 decoder_factory (
-       shared_ptr<Film> f, shared_ptr<const DecodeOptions> o, Job* j
+       shared_ptr<Film> f, DecodeOptions o, Job* j
        )
 {
        if (boost::filesystem::is_directory (f->content_path()) || f->content_type() == STILL) {
index 47d977ce7581dd966d7db70980aca574882f0be5..445a1c8a2f7a27462f6532801f51ae4810a7a8a9 100644 (file)
@@ -24,8 +24,9 @@
  *  @brief A method to create appropriate decoders for some content.
  */
 
+#include "options.h"
+
 class Film;
-class DecodeOptions;
 class Job;
 class VideoDecoder;
 class AudioDecoder;
@@ -43,7 +44,7 @@ struct Decoders {
 };
 
 extern Decoders decoder_factory (
-       boost::shared_ptr<Film>, boost::shared_ptr<const DecodeOptions>, Job *
+       boost::shared_ptr<Film>, DecodeOptions, Job *
        );
 
 #endif
index 731a39042ea0a8be2993aee073a75334192eb5a7..0f48310ef873ce9ec6a447509f7c9f1a20bea242 100644 (file)
@@ -34,6 +34,7 @@
 #include "config.h"
 #include "dcp_video_frame.h"
 #include "server.h"
+#include "format.h"
 #include "cross.h"
 
 using std::pair;
@@ -50,16 +51,16 @@ int const Encoder::_history_size = 25;
 /** @param f Film that we are encoding.
  *  @param o Options.
  */
-Encoder::Encoder (shared_ptr<const Film> f, shared_ptr<const EncodeOptions> o)
+Encoder::Encoder (shared_ptr<const Film> f)
        : _film (f)
-       , _opt (o)
        , _just_skipped (false)
-       , _video_frame (0)
-       , _audio_frame (0)
+       , _video_frames_in (0)
+       , _audio_frames_in (0)
+       , _video_frames_out (0)
+       , _audio_frames_out (0)
 #ifdef HAVE_SWRESAMPLE   
        , _swr_context (0)
 #endif   
-       , _audio_frames_written (0)
        , _terminate_encoder (false)
        , _writer_thread (0)
        , _terminate_writer (false)
@@ -74,9 +75,9 @@ Encoder::Encoder (shared_ptr<const Film> f, shared_ptr<const EncodeOptions> o)
                        /* We write mono files */
                        sf_info.channels = 1;
                        sf_info.format = SF_FORMAT_WAV | SF_FORMAT_PCM_24;
-                       SNDFILE* f = sf_open (_opt->multichannel_audio_out_path (i, true).c_str (), SFM_WRITE, &sf_info);
+                       SNDFILE* f = sf_open (_film->multichannel_audio_out_path (i, true).c_str (), SFM_WRITE, &sf_info);
                        if (f == 0) {
-                               throw CreateFileError (_opt->multichannel_audio_out_path (i, true));
+                               throw CreateFileError (_film->multichannel_audio_out_path (i, true));
                        }
                        _sound_files.push_back (f);
                }
@@ -170,10 +171,10 @@ Encoder::process_end ()
                
                /* Rename .wav.tmp files to .wav */
                for (int i = 0; i < dcp_audio_channels (_film->audio_channels()); ++i) {
-                       if (boost::filesystem::exists (_opt->multichannel_audio_out_path (i, false))) {
-                               boost::filesystem::remove (_opt->multichannel_audio_out_path (i, false));
+                       if (boost::filesystem::exists (_film->multichannel_audio_out_path (i, false))) {
+                               boost::filesystem::remove (_film->multichannel_audio_out_path (i, false));
                        }
-                       boost::filesystem::rename (_opt->multichannel_audio_out_path (i, true), _opt->multichannel_audio_out_path (i, false));
+                       boost::filesystem::rename (_film->multichannel_audio_out_path (i, true), _film->multichannel_audio_out_path (i, false));
                }
        }
 
@@ -208,7 +209,7 @@ Encoder::process_end ()
                _film->log()->log (String::compose ("Encode left-over frame %1", (*i)->frame ()));
                try {
                        shared_ptr<EncodedData> e = (*i)->encode_locally ();
-                       e->write (_opt, (*i)->frame ());
+                       e->write (_film, (*i)->frame ());
                        frame_done ();
                } catch (std::exception& e) {
                        _film->log()->log (String::compose ("Local encode failed (%1)", e.what ()));
@@ -222,8 +223,8 @@ Encoder::process_end ()
 
        /* Now do links (or copies on windows) to duplicate frames */
        for (list<pair<int, int> >::iterator i = _links_required.begin(); i != _links_required.end(); ++i) {
-               link (_opt->frame_out_path (i->first, false), _opt->frame_out_path (i->second, false));
-               link (_opt->hash_out_path (i->first, false), _opt->hash_out_path (i->second, false));
+               link (_film->frame_out_path (i->first, false), _film->frame_out_path (i->second, false));
+               link (_film->hash_out_path (i->first, false), _film->hash_out_path (i->second, false));
        }
 }      
 
@@ -252,12 +253,12 @@ Encoder::skipping () const
        return _just_skipped;
 }
 
-/** @return Number of video frames that have been received */
-SourceFrame
-Encoder::video_frame () const
+/** @return Number of video frames that have been sent out */
+int
+Encoder::video_frames_out () const
 {
        boost::mutex::scoped_lock (_history_mutex);
-       return _video_frame;
+       return _video_frames_out;
 }
 
 /** Should be called when a frame has been encoded successfully.
@@ -290,19 +291,13 @@ Encoder::frame_skipped ()
 void
 Encoder::process_video (shared_ptr<Image> image, bool same, boost::shared_ptr<Subtitle> sub)
 {
-       if (_opt->video_skip != 0 && (_video_frame % _opt->video_skip) != 0) {
-               ++_video_frame;
+       DCPFrameRate dfr (_film->frames_per_second ());
+       
+       if (dfr.skip && (_video_frames_in % 2)) {
+               ++_video_frames_in;
                return;
        }
 
-       if (_opt->video_range) {
-               pair<SourceFrame, SourceFrame> const r = _opt->video_range.get();
-               if (_video_frame < r.first || _video_frame >= r.second) {
-                       ++_video_frame;
-                       return;
-               }
-       }
-
        boost::mutex::scoped_lock lock (_worker_mutex);
 
        /* Wait until the queue has gone down a bit */
@@ -317,7 +312,7 @@ Encoder::process_video (shared_ptr<Image> image, bool same, boost::shared_ptr<Su
        }
 
        /* Only do the processing if we don't already have a file for this frame */
-       if (boost::filesystem::exists (_opt->frame_out_path (_video_frame, false))) {
+       if (boost::filesystem::exists (_film->frame_out_path (_video_frames_out, false))) {
                frame_skipped ();
                return;
        }
@@ -327,54 +322,37 @@ Encoder::process_video (shared_ptr<Image> image, bool same, boost::shared_ptr<Su
                   as on windows the link is really a copy and the reference frame might not have
                   finished encoding yet.
                */
-               _links_required.push_back (make_pair (_last_real_frame.get(), _video_frame));
+               _links_required.push_back (make_pair (_last_real_frame.get(), _video_frames_out));
        } else {
                /* Queue this new frame for encoding */
                pair<string, string> const s = Filter::ffmpeg_strings (_film->filters());
                TIMING ("adding to queue of %1", _encode_queue.size ());
                _encode_queue.push_back (boost::shared_ptr<DCPVideoFrame> (
                                          new DCPVideoFrame (
-                                                 image, sub, _opt->out_size, _opt->padding, _film->subtitle_offset(), _film->subtitle_scale(),
-                                                 _film->scaler(), _video_frame, _film->frames_per_second(), s.second,
-                                                 Config::instance()->colour_lut_index (), Config::instance()->j2k_bandwidth (),
+                                                 image, sub, _film->format()->dcp_size(), _film->format()->dcp_padding (_film),
+                                                 _film->subtitle_offset(), _film->subtitle_scale(),
+                                                 _film->scaler(), _video_frames_out, _film->frames_per_second(), s.second,
+                                                 _film->colour_lut(), _film->j2k_bandwidth(),
                                                  _film->log()
                                                  )
                                          ));
                
                _worker_condition.notify_all ();
-               _last_real_frame = _video_frame;
+               _last_real_frame = _video_frames_out;
        }
 
-       ++_video_frame;
+       ++_video_frames_in;
+       ++_video_frames_out;
+
+       if (dfr.repeat) {
+               _links_required.push_back (make_pair (_video_frames_out, _video_frames_out - 1));
+               ++_video_frames_out;
+       }
 }
 
 void
 Encoder::process_audio (shared_ptr<AudioBuffers> data)
 {
-       if (_opt->audio_range) {
-               shared_ptr<AudioBuffers> trimmed (new AudioBuffers (*data.get ()));
-               
-               /* Range that we are encoding */
-               pair<int64_t, int64_t> required_range = _opt->audio_range.get();
-               /* Range of this block of data */
-               pair<int64_t, int64_t> this_range (_audio_frame, _audio_frame + trimmed->frames());
-
-               if (this_range.second < required_range.first || required_range.second < this_range.first) {
-                       /* No part of this audio is within the required range */
-                       return;
-               } else if (required_range.first >= this_range.first && required_range.first < this_range.second) {
-                       /* Trim start */
-                       int64_t const shift = required_range.first - this_range.first;
-                       trimmed->move (shift, 0, trimmed->frames() - shift);
-                       trimmed->set_frames (trimmed->frames() - shift);
-               } else if (required_range.second >= this_range.first && required_range.second < this_range.second) {
-                       /* Trim end */
-                       trimmed->set_frames (required_range.second - this_range.first);
-               }
-
-               data = trimmed;
-       }
-
 #if HAVE_SWRESAMPLE
        /* Maybe sample-rate convert */
        if (_swr_context) {
@@ -418,7 +396,7 @@ Encoder::process_audio (shared_ptr<AudioBuffers> data)
 
        write_audio (data);
        
-       _audio_frame += data->frames ();
+       _audio_frames_in += data->frames ();
 }
 
 void
@@ -428,7 +406,7 @@ Encoder::write_audio (shared_ptr<const AudioBuffers> audio)
                sf_write_float (_sound_files[i], audio->data(i), audio->frames());
        }
 
-       _audio_frames_written += audio->frames ();
+       _audio_frames_out += audio->frames ();
 }
 
 void
index fff26496345aefac365ac17bfcd39e2efcc54cf0..96e7a1d25e08742597da886b84e0346c89de1caf 100644 (file)
@@ -44,7 +44,6 @@ extern "C" {
 #include "video_sink.h"
 #include "audio_sink.h"
 
-class EncodeOptions;
 class Image;
 class Subtitle;
 class AudioBuffers;
@@ -63,7 +62,7 @@ class EncodedData;
 class Encoder : public VideoSink, public AudioSink
 {
 public:
-       Encoder (boost::shared_ptr<const Film> f, boost::shared_ptr<const EncodeOptions> o);
+       Encoder (boost::shared_ptr<const Film> f);
        virtual ~Encoder ();
 
        /** Called to indicate that a processing run is about to begin */
@@ -84,17 +83,22 @@ public:
 
        float current_frames_per_second () const;
        bool skipping () const;
-       SourceFrame video_frame () const;
+       int video_frames_out () const;
 
-protected:
+private:
        
        void frame_done ();
        void frame_skipped ();
        
+       void close_sound_files ();
+       void write_audio (boost::shared_ptr<const AudioBuffers> audio);
+
+       void encoder_thread (ServerDescription *);
+       void terminate_worker_threads ();
+       void link (std::string, std::string) const;
+
        /** Film that we are encoding */
        boost::shared_ptr<const Film> _film;
-       /** Options */
-       boost::shared_ptr<const EncodeOptions> _opt;
 
        /** Mutex for _time_history, _just_skipped and _last_frame */
        mutable boost::mutex _history_mutex;
@@ -108,17 +112,13 @@ protected:
        bool _just_skipped;
 
        /** Number of video frames received so far */
-       SourceFrame _video_frame;
+       SourceFrame _video_frames_in;
        /** Number of audio frames received so far */
-       int64_t _audio_frame;
-
-private:
-       void close_sound_files ();
-       void write_audio (boost::shared_ptr<const AudioBuffers> audio);
-
-       void encoder_thread (ServerDescription *);
-       void terminate_worker_threads ();
-       void link (std::string, std::string) const;
+       int64_t _audio_frames_in;
+       /** Number of video frames written for the DCP so far */
+       int _video_frames_out;
+       /** Number of audio frames written for the DCP so far */
+       int64_t _audio_frames_out;
 
        void writer_thread ();
        void terminate_writer_thread ();
@@ -130,11 +130,11 @@ private:
        /** List of links that we need to create when all frames have been processed;
         *  such that we need to call link (first, second) for each member of this list.
         *  In other words, `first' is a `real' frame and `second' should be a link to `first'.
+        *  Frames are DCP frames.
         */
        std::list<std::pair<int, int> > _links_required;
 
        std::vector<SNDFILE*> _sound_files;
-       int64_t _audio_frames_written;
 
        boost::optional<int> _last_real_frame;
        bool _terminate_encoder;
index a783cde339f646a009d7b4c3da9eea617ace0b16..69a757e2b94bb65ad5f37128fb2c896386011f51 100644 (file)
@@ -78,8 +78,8 @@ ExamineContentJob::run ()
                _film->unset_length ();
                _film->set_crop (Crop ());
                
-               shared_ptr<DecodeOptions> o (new DecodeOptions);
-               o->decode_audio = false;
+               DecodeOptions o;
+               o.decode_audio = false;
                
                Decoders decoders = decoder_factory (_film, o, this);
                
@@ -96,8 +96,7 @@ ExamineContentJob::run ()
 
                /* Get a quick decoder to get the content's length from its header */
                
-               shared_ptr<DecodeOptions> o (new DecodeOptions);
-               Decoders d = decoder_factory (_film, o, 0);
+               Decoders d = decoder_factory (_film, DecodeOptions(), 0);
                _film->set_length (d.video->length());
        
                _film->log()->log (String::compose ("Video length obtained from header as %1 frames", _film->length().get()));
index 2004aca8318225e2b2f33da0c6b70f1c959b0c59..729c287b58fe66488526f02eeff31708d2f7d307 100644 (file)
 */
 
 /** @file  src/examine_content_job.h
- *  @brief A class to run through content at high speed to find its length.
+ *  @brief A class to obtain the length and MD5 digest of a content file.
  */
 
 #include "job.h"
 
 /** @class ExamineContentJob
- *  @brief A class to run through content at high speed to find its length.
+ *  @brief A class to obtain the length and MD5 digest of a content file.
  */
 class ExamineContentJob : public Job
 {
index 25c8068b6fcdb02726a0b93f8163b7ef6b968e1b..36605141886aed7ec596bb024b0425bfedc23f94 100644 (file)
@@ -31,7 +31,7 @@ using std::cout;
 using boost::shared_ptr;
 using boost::optional;
 
-ExternalAudioDecoder::ExternalAudioDecoder (shared_ptr<Film> f, shared_ptr<const DecodeOptions> o, Job* j)
+ExternalAudioDecoder::ExternalAudioDecoder (shared_ptr<Film> f, DecodeOptions o, Job* j)
        : Decoder (f, o, j)
        , AudioDecoder (f, o, j)
 {
index 2558955eb1985f45c396d5067a753f1109ec976d..37e53bca7f5ac1453adb54d635849a266bb384af 100644 (file)
@@ -44,7 +44,7 @@ private:
 class ExternalAudioDecoder : public AudioDecoder
 {
 public:
-       ExternalAudioDecoder (boost::shared_ptr<Film>, boost::shared_ptr<const DecodeOptions>, Job *);
+       ExternalAudioDecoder (boost::shared_ptr<Film>, DecodeOptions, Job *);
 
        bool pass ();
 
index a19f26ad79bdfde7dc66e3d795d87254e5796d43..e7dfc206be2dfe6c105e374e65472f293cb38a5e 100644 (file)
@@ -58,8 +58,9 @@ using std::list;
 using boost::shared_ptr;
 using boost::optional;
 using boost::dynamic_pointer_cast;
+using libdcp::Size;
 
-FFmpegDecoder::FFmpegDecoder (shared_ptr<Film> f, shared_ptr<const DecodeOptions> o, Job* j)
+FFmpegDecoder::FFmpegDecoder (shared_ptr<Film> f, DecodeOptions o, Job* j)
        : Decoder (f, o, j)
        , VideoDecoder (f, o, j)
        , AudioDecoder (f, o, j)
@@ -78,7 +79,7 @@ FFmpegDecoder::FFmpegDecoder (shared_ptr<Film> f, shared_ptr<const DecodeOptions
        setup_audio ();
        setup_subtitle ();
 
-       if (!o->video_sync) {
+       if (!o.video_sync) {
                _first_video = 0;
        }
 }
@@ -239,7 +240,7 @@ FFmpegDecoder::pass ()
                        filter_and_emit_video (_frame);
                }
 
-               if (_audio_stream && _opt->decode_audio) {
+               if (_audio_stream && _opt.decode_audio) {
                        while (avcodec_decode_audio4 (_audio_codec_context, _frame, &frame_finished, &_packet) >= 0 && frame_finished) {
                                int const data_size = av_samples_get_buffer_size (
                                        0, _audio_codec_context->channels, _frame->nb_samples, audio_sample_format (), 1
@@ -267,14 +268,14 @@ FFmpegDecoder::pass ()
                                _film->log()->log (String::compose ("Used only %1 bytes of %2 in packet", r, _packet.size));
                        }
 
-                       if (_opt->video_sync) {
+                       if (_opt.video_sync) {
                                out_with_sync ();
                        } else {
                                filter_and_emit_video (_frame);
                        }
                }
 
-       } else if (ffa && _packet.stream_index == ffa->id() && _opt->decode_audio) {
+       } else if (ffa && _packet.stream_index == ffa->id() && _opt.decode_audio) {
 
                int frame_finished;
                if (avcodec_decode_audio4 (_audio_codec_context, _frame, &frame_finished, &_packet) >= 0 && frame_finished) {
@@ -323,7 +324,7 @@ FFmpegDecoder::pass ()
                        }
                }
                        
-       } else if (_subtitle_stream && _packet.stream_index == _subtitle_stream->id() && _opt->decode_subtitles && _first_video) {
+       } else if (_subtitle_stream && _packet.stream_index == _subtitle_stream->id() && _opt.decode_subtitles && _first_video) {
 
                int got_subtitle;
                AVSubtitle sub;
index 2fb8675f996b243e13b097b5feba65ef8d1c9727..9a4e65ebc2ccd7a4db041df1dae59f6f03ec03e9 100644 (file)
@@ -86,11 +86,11 @@ private:
 class FFmpegDecoder : public VideoDecoder, public AudioDecoder
 {
 public:
-       FFmpegDecoder (boost::shared_ptr<Film>, boost::shared_ptr<const DecodeOptions>, Job *);
+       FFmpegDecoder (boost::shared_ptr<Film>, DecodeOptions, Job *);
        ~FFmpegDecoder ();
 
        float frames_per_second () const;
-       Size native_size () const;
+       libdcp::Size native_size () const;
        SourceFrame length () const;
        int time_base_numerator () const;
        int time_base_denominator () const;
index 8fd8efc3ad8946fe8c4c40f50b85cb631e2ed70e..1741d49e691269e79abf7079cdfd11a67fc9a4ec 100644 (file)
@@ -72,8 +72,9 @@ using boost::to_upper_copy;
 using boost::ends_with;
 using boost::starts_with;
 using boost::optional;
+using libdcp::Size;
 
-int const Film::state_version = 1;
+int const Film::state_version = 2;
 
 /** Construct a Film object in a given directory, reading any metadata
  *  file that exists in that directory.  An exception will be thrown if
@@ -89,8 +90,8 @@ Film::Film (string d, bool must_exist)
        , _dcp_content_type (0)
        , _format (0)
        , _scaler (Scaler::from_id ("bicubic"))
-       , _dcp_trim_start (0)
-       , _dcp_trim_end (0)
+       , _trim_start (0)
+       , _trim_end (0)
        , _dcp_ab (false)
        , _use_content_audio (true)
        , _audio_gain (0)
@@ -99,6 +100,8 @@ Film::Film (string d, bool must_exist)
        , _with_subtitles (false)
        , _subtitle_offset (0)
        , _subtitle_scale (1)
+       , _colour_lut (0)
+       , _j2k_bandwidth (200000000)
        , _frames_per_second (0)
        , _dirty (false)
 {
@@ -153,8 +156,9 @@ Film::Film (Film const & o)
        , _crop              (o._crop)
        , _filters           (o._filters)
        , _scaler            (o._scaler)
-       , _dcp_trim_start    (o._dcp_trim_start)
-       , _dcp_trim_end      (o._dcp_trim_end)
+       , _trim_start        (o._trim_start)
+       , _trim_end          (o._trim_end)
+       , _reel_size         (o._reel_size)
        , _dcp_ab            (o._dcp_ab)
        , _content_audio_stream (o._content_audio_stream)
        , _external_audio    (o._external_audio)
@@ -166,6 +170,8 @@ Film::Film (Film const & o)
        , _with_subtitles    (o._with_subtitles)
        , _subtitle_offset   (o._subtitle_offset)
        , _subtitle_scale    (o._subtitle_scale)
+       , _colour_lut        (o._colour_lut)
+       , _j2k_bandwidth     (o._j2k_bandwidth)
        , _audio_language    (o._audio_language)
        , _subtitle_language (o._subtitle_language)
        , _territory         (o._territory)
@@ -175,6 +181,7 @@ Film::Film (Film const & o)
        , _package_type      (o._package_type)
        , _size              (o._size)
        , _length            (o._length)
+       , _dcp_intrinsic_duration (o._dcp_intrinsic_duration)
        , _content_digest    (o._content_digest)
        , _content_audio_streams (o._content_audio_streams)
        , _external_audio_stream (o._external_audio_stream)
@@ -212,7 +219,9 @@ Film::j2k_dir () const
          << "_" << content_digest()
          << "_" << crop().left << "_" << crop().right << "_" << crop().top << "_" << crop().bottom
          << "_" << f.first << "_" << f.second
-         << "_" << scaler()->id();
+         << "_" << scaler()->id()
+         << "_" << j2k_bandwidth()
+         << "_" << boost::lexical_cast<int> (colour_lut());
 
        p /= s.str ();
 
@@ -245,13 +254,28 @@ Film::make_dcp (bool transcode)
                char buffer[128];
                gethostname (buffer, sizeof (buffer));
                log()->log (String::compose ("Starting to make DCP on %1", buffer));
-               log()->log (String::compose ("Content is %1; type %2", content_path(), (content_type() == STILL ? "still" : "video")));
-               log()->log (String::compose ("Content length %1", length()));
-               log()->log (String::compose ("Content digest %1", content_digest()));
-               log()->log (String::compose ("%1 threads", Config::instance()->num_local_encoding_threads()));
-               log()->log (String::compose ("J2K bandwidth %1", Config::instance()->j2k_bandwidth()));
        }
-               
+       
+       log()->log (String::compose ("Content is %1; type %2", content_path(), (content_type() == STILL ? "still" : "video")));
+       if (length()) {
+               log()->log (String::compose ("Content length %1", length().get()));
+       }
+       log()->log (String::compose ("Content digest %1", content_digest()));
+       log()->log (String::compose ("%1 threads", Config::instance()->num_local_encoding_threads()));
+       log()->log (String::compose ("J2K bandwidth %1", j2k_bandwidth()));
+#ifdef DVDOMATIC_DEBUG
+       log()->log ("DVD-o-matic built in debug mode.");
+#else
+       log()->log ("DVD-o-matic built in optimised mode.");
+#endif
+#ifdef LIBDCP_DEBUG
+       log()->log ("libdcp built in debug mode.");
+#else
+       log()->log ("libdcp built in optimised mode.");
+#endif
+       pair<string, int> const c = cpu_info ();
+       log()->log (String::compose ("CPU: %1, %2 processors", c.first, c.second));
+       
        if (format() == 0) {
                throw MissingSettingError ("format");
        }
@@ -268,47 +292,21 @@ Film::make_dcp (bool transcode)
                throw MissingSettingError ("name");
        }
 
-       shared_ptr<EncodeOptions> oe (new EncodeOptions (j2k_dir(), ".j2c", dir ("wavs")));
-       oe->out_size = format()->dcp_size ();
-       oe->padding = format()->dcp_padding (shared_from_this ());
-       if (dcp_length ()) {
-               oe->video_range = make_pair (dcp_trim_start(), dcp_trim_start() + dcp_length().get());
-               if (audio_stream()) {
-                       oe->audio_range = make_pair (
-
-                               video_frames_to_audio_frames (
-                                       oe->video_range.get().first,
-                                       dcp_audio_sample_rate (audio_stream()->sample_rate()),
-                                       dcp_frame_rate (frames_per_second()).frames_per_second
-                                       ),
-                               
-                               video_frames_to_audio_frames (
-                                       oe->video_range.get().second,
-                                       dcp_audio_sample_rate (audio_stream()->sample_rate()),
-                                       dcp_frame_rate (frames_per_second()).frames_per_second
-                                       )
-                               );
-               }
-                       
-       }
-       
-       oe->video_skip = dcp_frame_rate (frames_per_second()).skip;
-
-       shared_ptr<DecodeOptions> od (new DecodeOptions);
-       od->decode_subtitles = with_subtitles ();
+       DecodeOptions od;
+       od.decode_subtitles = with_subtitles ();
 
        shared_ptr<Job> r;
 
        if (transcode) {
                if (dcp_ab()) {
-                       r = JobManager::instance()->add (shared_ptr<Job> (new ABTranscodeJob (shared_from_this(), od, oe, shared_ptr<Job> ())));
+                       r = JobManager::instance()->add (shared_ptr<Job> (new ABTranscodeJob (shared_from_this(), od, shared_ptr<Job> ())));
                } else {
-                       r = JobManager::instance()->add (shared_ptr<Job> (new TranscodeJob (shared_from_this(), od, oe, shared_ptr<Job> ())));
+                       r = JobManager::instance()->add (shared_ptr<Job> (new TranscodeJob (shared_from_this(), od, shared_ptr<Job> ())));
                }
        }
 
-       r = JobManager::instance()->add (shared_ptr<Job> (new CheckHashesJob (shared_from_this(), od, oe, r)));
-       JobManager::instance()->add (shared_ptr<Job> (new MakeDCPJob (shared_from_this(), oe, r)));
+       r = JobManager::instance()->add (shared_ptr<Job> (new CheckHashesJob (shared_from_this(), od, r)));
+       JobManager::instance()->add (shared_ptr<Job> (new MakeDCPJob (shared_from_this(), r)));
 }
 
 /** Start a job to examine our content file */
@@ -330,18 +328,6 @@ Film::examine_content_finished ()
        _examine_content_job.reset ();
 }
 
-/** @return full paths to any audio files that this Film has */
-vector<string>
-Film::audio_files () const
-{
-       vector<string> f;
-       for (boost::filesystem::directory_iterator i = boost::filesystem::directory_iterator (dir("wavs")); i != boost::filesystem::directory_iterator(); ++i) {
-               f.push_back (i->path().string ());
-       }
-
-       return f;
-}
-
 /** Start a job to send our DCP to the configured TMS */
 void
 Film::send_dcp_to_tms ()
@@ -404,8 +390,11 @@ Film::write_metadata () const
                f << "filter " << (*i)->id () << "\n";
        }
        f << "scaler " << _scaler->id () << "\n";
-       f << "dcp_trim_start " << _dcp_trim_start << "\n";
-       f << "dcp_trim_end " << _dcp_trim_end << "\n";
+       f << "trim_start " << _trim_start << "\n";
+       f << "trim_end " << _trim_end << "\n";
+       if (_reel_size) {
+               f << "reel_size " << _reel_size.get() << "\n";
+       }
        f << "dcp_ab " << (_dcp_ab ? "1" : "0") << "\n";
        if (_content_audio_stream) {
                f << "selected_content_audio_stream " << _content_audio_stream->to_string() << "\n";
@@ -423,6 +412,8 @@ Film::write_metadata () const
        f << "with_subtitles " << _with_subtitles << "\n";
        f << "subtitle_offset " << _subtitle_offset << "\n";
        f << "subtitle_scale " << _subtitle_scale << "\n";
+       f << "colour_lut " << _colour_lut << "\n";
+       f << "j2k_bandwidth " << _j2k_bandwidth << "\n";
        f << "audio_language " << _audio_language << "\n";
        f << "subtitle_language " << _subtitle_language << "\n";
        f << "territory " << _territory << "\n";
@@ -434,6 +425,7 @@ Film::write_metadata () const
        f << "width " << _size.width << "\n";
        f << "height " << _size.height << "\n";
        f << "length " << _length.get_value_or(0) << "\n";
+       f << "dcp_intrinsic_duration " << _dcp_intrinsic_duration.get_value_or(0) << "\n";
        f << "content_digest " << _content_digest << "\n";
 
        for (vector<shared_ptr<AudioStream> >::const_iterator i = _content_audio_streams.begin(); i != _content_audio_streams.end(); ++i) {
@@ -514,10 +506,12 @@ Film::read_metadata ()
                        _filters.push_back (Filter::from_id (v));
                } else if (k == "scaler") {
                        _scaler = Scaler::from_id (v);
-               } else if (k == "dcp_trim_start") {
-                       _dcp_trim_start = atoi (v.c_str ());
-               } else if (k == "dcp_trim_end") {
-                       _dcp_trim_end = atoi (v.c_str ());
+               } else if ( ((!version || version < 2) && k == "trim_start") || k == "trim_start") {
+                       _trim_start = atoi (v.c_str ());
+               } else if ( ((!version || version < 2) && k == "trim_end") || k == "trim_end") {
+                       _trim_end = atoi (v.c_str ());
+               } else if (k == "reel_size") {
+                       _reel_size = boost::lexical_cast<uint64_t> (v);
                } else if (k == "dcp_ab") {
                        _dcp_ab = (v == "1");
                } else if (k == "selected_content_audio_stream" || (!version && k == "selected_audio_stream")) {
@@ -548,6 +542,10 @@ Film::read_metadata ()
                        _subtitle_offset = atoi (v.c_str ());
                } else if (k == "subtitle_scale") {
                        _subtitle_scale = atof (v.c_str ());
+               } else if (k == "colour_lut") {
+                       _colour_lut = atoi (v.c_str ());
+               } else if (k == "j2k_bandwidth") {
+                       _j2k_bandwidth = atoi (v.c_str ());
                } else if (k == "audio_language") {
                        _audio_language = v;
                } else if (k == "subtitle_language") {
@@ -574,6 +572,11 @@ Film::read_metadata ()
                        if (vv) {
                                _length = vv;
                        }
+               } else if (k == "dcp_intrinsic_duration") {
+                       int const vv = atoi (v.c_str ());
+                       if (vv) {
+                               _dcp_intrinsic_duration = vv;
+                       }
                } else if (k == "content_digest") {
                        _content_digest = v;
                } else if (k == "content_audio_stream" || (!version && k == "audio_stream")) {
@@ -685,30 +688,25 @@ Film::target_audio_sample_rate () const
        /* Resample to a DCI-approved sample rate */
        double t = dcp_audio_sample_rate (audio_stream()->sample_rate());
 
-       DCPFrameRate dfr = dcp_frame_rate (frames_per_second ());
+       DCPFrameRate dfr (frames_per_second ());
 
-       /* Compensate for the fact that video will be rounded to the
-          nearest integer number of frames per second.
+       /* Compensate if the DCP is being run at a different frame rate
+          to the source; that is, if the video is run such that it will
+          look different in the DCP compared to the source (slower or faster).
+          skip/repeat doesn't come into effect here.
        */
-       if (dfr.run_fast) {
-               t *= _frames_per_second * dfr.skip / dfr.frames_per_second;
+
+       if (dfr.change_speed) {
+               t *= _frames_per_second * dfr.factor() / dfr.frames_per_second;
        }
 
        return rint (t);
 }
 
-boost::optional<int>
-Film::dcp_length () const
+int
+Film::still_duration_in_frames () const
 {
-       if (content_type() == STILL) {
-               return _still_duration * frames_per_second();
-       }
-       
-       if (!length()) {
-               return boost::optional<int> ();
-       }
-
-       return length().get() - dcp_trim_start() - dcp_trim_end();
+       return still_duration() * frames_per_second();
 }
 
 /** @return a DCI-compliant name for a DCP of this film */
@@ -880,8 +878,7 @@ Film::set_content (string c)
        */
 
        try {
-               shared_ptr<DecodeOptions> o (new DecodeOptions);
-               Decoders d = decoder_factory (shared_from_this(), o, 0);
+               Decoders d = decoder_factory (shared_from_this(), DecodeOptions(), 0);
                
                set_size (d.video->native_size ());
                set_frames_per_second (d.video->frames_per_second ());
@@ -1056,23 +1053,43 @@ Film::set_scaler (Scaler const * s)
 }
 
 void
-Film::set_dcp_trim_start (int t)
+Film::set_trim_start (int t)
 {
        {
                boost::mutex::scoped_lock lm (_state_mutex);
-               _dcp_trim_start = t;
+               _trim_start = t;
        }
-       signal_changed (DCP_TRIM_START);
+       signal_changed (TRIM_START);
 }
 
 void
-Film::set_dcp_trim_end (int t)
+Film::set_trim_end (int t)
 {
        {
                boost::mutex::scoped_lock lm (_state_mutex);
-               _dcp_trim_end = t;
+               _trim_end = t;
        }
-       signal_changed (DCP_TRIM_END);
+       signal_changed (TRIM_END);
+}
+
+void
+Film::set_reel_size (uint64_t s)
+{
+       {
+               boost::mutex::scoped_lock lm (_state_mutex);
+               _reel_size = s;
+       }
+       signal_changed (REEL_SIZE);
+}
+
+void
+Film::unset_reel_size ()
+{
+       {
+               boost::mutex::scoped_lock lm (_state_mutex);
+               _reel_size = boost::optional<uint64_t> ();
+       }
+       signal_changed (REEL_SIZE);
 }
 
 void
@@ -1103,8 +1120,7 @@ Film::set_external_audio (vector<string> a)
                _external_audio = a;
        }
 
-       shared_ptr<DecodeOptions> o (new DecodeOptions);
-       shared_ptr<ExternalAudioDecoder> decoder (new ExternalAudioDecoder (shared_from_this(), o, 0));
+       shared_ptr<ExternalAudioDecoder> decoder (new ExternalAudioDecoder (shared_from_this(), DecodeOptions(), 0));
        if (decoder->audio_stream()) {
                _external_audio_stream = decoder->audio_stream ();
        }
@@ -1193,6 +1209,26 @@ Film::set_subtitle_scale (float s)
        signal_changed (SUBTITLE_SCALE);
 }
 
+void
+Film::set_colour_lut (int i)
+{
+       {
+               boost::mutex::scoped_lock lm (_state_mutex);
+               _colour_lut = i;
+       }
+       signal_changed (COLOUR_LUT);
+}
+
+void
+Film::set_j2k_bandwidth (int b)
+{
+       {
+               boost::mutex::scoped_lock lm (_state_mutex);
+               _j2k_bandwidth = b;
+       }
+       signal_changed (J2K_BANDWIDTH);
+}
+
 void
 Film::set_audio_language (string l)
 {
@@ -1291,7 +1327,17 @@ Film::unset_length ()
                _length = boost::none;
        }
        signal_changed (LENGTH);
-}      
+}
+
+void
+Film::set_dcp_intrinsic_duration (int d)
+{
+       {
+               boost::mutex::scoped_lock lm (_state_mutex);
+               _dcp_intrinsic_duration = d;
+       }
+       signal_changed (DCP_INTRINSIC_DURATION);
+}
 
 void
 Film::set_content_digest (string d)
@@ -1372,3 +1418,45 @@ Film::audio_stream () const
 
        return _external_audio_stream;
 }
+
+/** @param f DCP frame index.
+ *  @param t true to return a temporary file path, otherwise a permanent one.
+ *  @return The path to write this video frame to.
+ */
+string
+Film::frame_out_path (int f, bool t) const
+{
+       stringstream s;
+       s << j2k_dir() << "/";
+       s.width (8);
+       s << std::setfill('0') << f << ".j2c";
+
+       if (t) {
+               s << ".tmp";
+       }
+
+       return s.str ();
+}
+
+string
+Film::hash_out_path (int f, bool t) const
+{
+       return frame_out_path (f, t) + ".md5";
+}
+
+/** @param c Audio channel index.
+ *  @param t true to return a temporary file path, otherwise a permanent one.
+ *  @return The path to write this audio file to.
+ */
+string
+Film::multichannel_audio_out_path (int c, bool t) const
+{
+       stringstream s;
+       s << dir ("wavs") << "/" << (c + 1) << ".wav";
+       if (t) {
+               s << ".tmp";
+       }
+       
+       return s.str ();
+}
+
index eb199784edbdaed4813904b88f528c6d6f548839..e10abfa4bbed2127e14627a4282786b1c9e3dc3f 100644 (file)
@@ -47,9 +47,9 @@ class ExamineContentJob;
 class ExternalAudioStream;
 
 /** @class Film
- *  @brief A representation of a video with sound.
+ *  @brief A representation of a video, maybe with sound.
  *
- *  A representation of a piece of video (with sound), including naming,
+ *  A representation of a piece of video (maybe with sound), including naming,
  *  the source content file, and how it should be presented in a DCP.
  */
 class Film : public boost::enable_shared_from_this<Film>
@@ -60,7 +60,6 @@ public:
        ~Film ();
 
        std::string j2k_dir () const;
-       std::vector<std::string> audio_files () const;
 
        void examine_content ();
        void send_dcp_to_tms ();
@@ -79,6 +78,10 @@ public:
        std::string file (std::string f) const;
        std::string dir (std::string d) const;
 
+       std::string frame_out_path (int f, bool t) const;
+       std::string hash_out_path (int f, bool t) const;
+       std::string multichannel_audio_out_path (int c, bool t) const;
+       
        std::string content_path () const;
        ContentType content_type () const;
        
@@ -87,11 +90,15 @@ public:
        void write_metadata () const;
        void read_metadata ();
 
-       Size cropped_size (Size) const;
-       boost::optional<int> dcp_length () const;
+       libdcp::Size cropped_size (libdcp::Size) const;
        std::string dci_name () const;
        std::string dcp_name () const;
 
+       boost::optional<int> dcp_intrinsic_duration () const {
+               return _dcp_intrinsic_duration;
+       }
+
+       /** @return true if our state has changed since we last saved it */
        bool dirty () const {
                return _dirty;
        }
@@ -100,6 +107,9 @@ public:
 
        void set_dci_date_today ();
 
+       /** Identifiers for the parts of our state;
+           used for signalling changes.
+       */
        enum Property {
                NONE,
                NAME,
@@ -111,8 +121,9 @@ public:
                CROP,
                FILTERS,
                SCALER,
-               DCP_TRIM_START,
-               DCP_TRIM_END,
+               TRIM_START,
+               TRIM_END,
+               REEL_SIZE,
                DCP_AB,
                CONTENT_AUDIO_STREAM,
                EXTERNAL_AUDIO,
@@ -124,9 +135,12 @@ public:
                WITH_SUBTITLES,
                SUBTITLE_OFFSET,
                SUBTITLE_SCALE,
+               COLOUR_LUT,
+               J2K_BANDWIDTH,
                DCI_METADATA,
                SIZE,
                LENGTH,
+               DCP_INTRINSIC_DURATION,
                CONTENT_AUDIO_STREAMS,
                SUBTITLE_STREAMS,
                FRAMES_PER_SECOND,
@@ -185,14 +199,19 @@ public:
                return _scaler;
        }
 
-       SourceFrame dcp_trim_start () const {
+       int trim_start () const {
                boost::mutex::scoped_lock lm (_state_mutex);
-               return _dcp_trim_start;
+               return _trim_start;
        }
 
-       SourceFrame dcp_trim_end () const {
+       int trim_end () const {
                boost::mutex::scoped_lock lm (_state_mutex);
-               return _dcp_trim_end;
+               return _trim_end;
+       }
+
+       boost::optional<uint64_t> reel_size () const {
+               boost::mutex::scoped_lock lm (_state_mutex);
+               return _reel_size;
        }
        
        bool dcp_ab () const {
@@ -230,6 +249,8 @@ public:
                return _still_duration;
        }
 
+       int still_duration_in_frames () const;
+
        boost::shared_ptr<SubtitleStream> subtitle_stream () const {
                boost::mutex::scoped_lock lm (_state_mutex);
                return _subtitle_stream;
@@ -250,6 +271,16 @@ public:
                return _subtitle_scale;
        }
 
+       int colour_lut () const {
+               boost::mutex::scoped_lock lm (_state_mutex);
+               return _colour_lut;
+       }
+
+       int j2k_bandwidth () const {
+               boost::mutex::scoped_lock lm (_state_mutex);
+               return _j2k_bandwidth;
+       }
+
        std::string audio_language () const {
                boost::mutex::scoped_lock lm (_state_mutex);
                return _audio_language;
@@ -285,7 +316,7 @@ public:
                return _package_type;
        }
 
-       Size size () const {
+       libdcp::Size size () const {
                boost::mutex::scoped_lock lm (_state_mutex);
                return _size;
        }
@@ -338,8 +369,10 @@ public:
        void set_bottom_crop (int);
        void set_filters (std::vector<Filter const *>);
        void set_scaler (Scaler const *);
-       void set_dcp_trim_start (int);
-       void set_dcp_trim_end (int);
+       void set_trim_start (int);
+       void set_trim_end (int);
+       void set_reel_size (uint64_t);
+       void unset_reel_size ();
        void set_dcp_ab (bool);
        void set_content_audio_stream (boost::shared_ptr<AudioStream>);
        void set_external_audio (std::vector<std::string>);
@@ -351,6 +384,8 @@ public:
        void set_with_subtitles (bool);
        void set_subtitle_offset (int);
        void set_subtitle_scale (float);
+       void set_colour_lut (int);
+       void set_j2k_bandwidth (int);
        void set_audio_language (std::string);
        void set_subtitle_language (std::string);
        void set_territory (std::string);
@@ -358,9 +393,10 @@ public:
        void set_studio (std::string);
        void set_facility (std::string);
        void set_package_type (std::string);
-       void set_size (Size);
+       void set_size (libdcp::Size);
        void set_length (SourceFrame);
        void unset_length ();
+       void set_dcp_intrinsic_duration (int);
        void set_content_digest (std::string);
        void set_content_audio_streams (std::vector<boost::shared_ptr<AudioStream> >);
        void set_subtitle_streams (std::vector<boost::shared_ptr<SubtitleStream> >);
@@ -401,6 +437,10 @@ private:
         *  or an absolute path.
         */
        std::string _content;
+       /** If this is true, we will believe the length specified by the content
+        *  file's header; if false, we will run through the whole content file
+        *  the first time we see it in order to obtain the length.
+        */
        bool _trust_content_header;
        /** The type of content that this Film represents (feature, trailer etc.) */
        DCPContentType const * _dcp_content_type;
@@ -413,9 +453,11 @@ private:
        /** Scaler algorithm to use */
        Scaler const * _scaler;
        /** Frames to trim off the start of the DCP */
-       int _dcp_trim_start;
+       int _trim_start;
        /** Frames to trim off the end of the DCP */
-       int _dcp_trim_end;
+       int _trim_end;
+       /** Approximate target reel size in bytes; if not set, use a single reel */
+       boost::optional<uint64_t> _reel_size;
        /** true to create an A/B comparison DCP, where the left half of the image
            is the video without any filters or post-processing, and the right half
            has the specified filters and post-processing.
@@ -444,7 +486,14 @@ private:
        int _subtitle_offset;
        /** scale factor to apply to subtitles */
        float _subtitle_scale;
-
+       /** index of colour LUT to use when converting RGB to XYZ.
+        *  0: sRGB
+        *  1: Rec 709
+        */
+       int _colour_lut;
+       /** bandwidth for J2K files in bits per second */
+       int _j2k_bandwidth;
+       
        /* DCI naming stuff */
        std::string _audio_language;
        std::string _subtitle_language;
@@ -457,9 +506,10 @@ private:
        /* Data which are cached to speed things up */
 
        /** Size, in pixels, of the source (ignoring cropping) */
-       Size _size;
+       libdcp::Size _size;
        /** The length of the source, in video frames (as far as we know) */
        boost::optional<SourceFrame> _length;
+       boost::optional<int> _dcp_intrinsic_duration;
        /** MD5 digest of our content file */
        std::string _content_digest;
        /** The audio streams in our content */
index 376ab404fad8e23e42944c9504bb9fbbc5df5615..86864a762295c93c4d22085570d45feb5b7f6640 100644 (file)
@@ -47,6 +47,7 @@ using std::stringstream;
 using std::string;
 using std::list;
 using boost::shared_ptr;
+using libdcp::Size;
 
 /** Construct a FilterGraph for the settings in a film.
  *  @param film Film.
index 9e6ac62528859591acaf0af5152a5bb3e53e947f..7e4e8422b07d36236b2185c588f2a23311eab18e 100644 (file)
@@ -37,15 +37,15 @@ class FFmpegDecoder;
 class FilterGraph
 {
 public:
-       FilterGraph (boost::shared_ptr<Film> film, FFmpegDecoder* decoder, Size s, AVPixelFormat p);
+       FilterGraph (boost::shared_ptr<Film> film, FFmpegDecoder* decoder, libdcp::Size s, AVPixelFormat p);
 
-       bool can_process (Size s, AVPixelFormat p) const;
+       bool can_process (libdcp::Size s, AVPixelFormat p) const;
        std::list<boost::shared_ptr<Image> > process (AVFrame const * frame);
 
 private:
        AVFilterContext* _buffer_src_context;
        AVFilterContext* _buffer_sink_context;
-       Size _size; ///< size of the images that this chain can process
+       libdcp::Size _size; ///< size of the images that this chain can process
        AVPixelFormat _pixel_format; ///< pixel format of the images that this chain can process
 };
 
index 9758624118054ef20aedfb5430e3b6278f2521a3..a80fab6193d0998fa320f8b745de70631a00105e 100644 (file)
@@ -35,6 +35,7 @@ using std::setprecision;
 using std::stringstream;
 using std::vector;
 using boost::shared_ptr;
+using libdcp::Size;
 
 vector<Format const *> Format::_formats;
 
index 2118237a406525e99295765270d4133e3cf98e87..48a000480fcbacec36189b062431780817f6c419 100644 (file)
@@ -31,7 +31,7 @@ class Film;
 class Format
 {
 public:
-       Format (Size dcp, std::string id, std::string n, std::string d)
+       Format (libdcp::Size dcp, std::string id, std::string n, std::string d)
                : _dcp_size (dcp)
                , _id (id)
                , _nickname (n)
@@ -52,7 +52,7 @@ public:
         *  put in a DCP for this ratio.  This size will not correspond
         *  to the ratio when we are doing things like 16:9 in a Flat frame.
         */
-       Size dcp_size () const {
+       libdcp::Size dcp_size () const {
                return _dcp_size;
        }
 
@@ -85,7 +85,7 @@ protected:
         *  put in a DCP for this ratio.  This size will not correspond
         *  to the ratio when we are doing things like 16:9 in a Flat frame.
         */
-       Size _dcp_size;
+       libdcp::Size _dcp_size;
        /** id for use in metadata */
        std::string _id;
        /** nickname (e.g. Flat, Scope) */
@@ -104,7 +104,7 @@ private:
 class FixedFormat : public Format
 {
 public:
-       FixedFormat (int, Size, std::string, std::string, std::string);
+       FixedFormat (int, libdcp::Size, std::string, std::string, std::string);
 
        int ratio_as_integer (boost::shared_ptr<const Film>) const {
                return _ratio;
@@ -125,7 +125,7 @@ private:
 class VariableFormat : public Format
 {
 public:
-       VariableFormat (Size, std::string, std::string, std::string);
+       VariableFormat (libdcp::Size, std::string, std::string, std::string);
 
        int ratio_as_integer (boost::shared_ptr<const Film> f) const;
        float ratio_as_float (boost::shared_ptr<const Film> f) const;
index f774f476fd707c7b02ddf00b6ca099b6c3a6ca85..c41558f02b178b2981edc509ddcee217c986312e 100644 (file)
@@ -42,6 +42,7 @@ extern "C" {
 
 using namespace std;
 using namespace boost;
+using libdcp::Size;
 
 void
 Image::swap (Image& other)
index e19c6f54b7055d916df185cdab98c102f9ea8496..5ca3f337c82cc15df66b8779e20ece84771b5d6f 100644 (file)
@@ -66,13 +66,13 @@ public:
        virtual int * stride () const = 0;
 
        /** @return Size of the image, in pixels */
-       virtual Size size () const = 0;
+       virtual libdcp::Size size () const = 0;
 
        int components () const;
        int lines (int) const;
 
-       boost::shared_ptr<Image> scale_and_convert_to_rgb (Size out_size, int padding, Scaler const * scaler, bool aligned) const;
-       boost::shared_ptr<Image> scale (Size, Scaler const *, bool aligned) const;
+       boost::shared_ptr<Image> scale_and_convert_to_rgb (libdcp::Size out_size, int padding, Scaler const * scaler, bool aligned) const;
+       boost::shared_ptr<Image> scale (libdcp::Size, Scaler const *, bool aligned) const;
        boost::shared_ptr<Image> post_process (std::string, bool aligned) const;
        void alpha_blend (boost::shared_ptr<const Image> image, Position pos);
        boost::shared_ptr<Image> crop (Crop c, bool aligned) const;
@@ -106,7 +106,7 @@ public:
        uint8_t ** data () const;
        int * line_size () const;
        int * stride () const;
-       Size size () const;
+       libdcp::Size size () const;
 
 private:
        /* Not allowed */
@@ -122,7 +122,7 @@ private:
 class SimpleImage : public Image
 {
 public:
-       SimpleImage (AVPixelFormat, Size, bool);
+       SimpleImage (AVPixelFormat, libdcp::Size, bool);
        SimpleImage (SimpleImage const &);
        SimpleImage& operator= (SimpleImage const &);
        ~SimpleImage ();
@@ -130,14 +130,14 @@ public:
        uint8_t ** data () const;
        int * line_size () const;
        int * stride () const;
-       Size size () const;
+       libdcp::Size size () const;
 
 protected:
        void allocate ();
        void swap (SimpleImage &);
        
 private:
-       Size _size; ///< size in pixels
+       libdcp::Size _size; ///< size in pixels
        uint8_t** _data; ///< array of pointers to components
        int* _line_size; ///< array of sizes of the data in each line, in pixels (without any alignment padding bytes)
        int* _stride; ///< array of strides for each line (including any alignment padding bytes)
index bad1fb81314e182ccbc831d19462e33e5cc3fb51..bab4f2f072f1b19c0dad60958936f1f8a0061db5 100644 (file)
 
 using std::cout;
 using boost::shared_ptr;
+using libdcp::Size;
 
 ImageMagickDecoder::ImageMagickDecoder (
-       boost::shared_ptr<Film> f, boost::shared_ptr<const DecodeOptions> o, Job* j)
+       boost::shared_ptr<Film> f, DecodeOptions o, Job* j)
        : Decoder (f, o, j)
        , VideoDecoder (f, o, j)
 {
@@ -70,7 +71,7 @@ bool
 ImageMagickDecoder::pass ()
 {
        if (_iter == _files.end()) {
-               if (!_film->dcp_length() || video_frame() >= _film->dcp_length().get()) {
+               if (video_frame() >= _film->still_duration_in_frames()) {
                        return true;
                }
 
index 6f426f308058a403330af912baa0acdc7d58b281..84a6f15f9aa8b63d762ada2deb5ac94ccd756646 100644 (file)
@@ -26,14 +26,14 @@ namespace Magick {
 class ImageMagickDecoder : public VideoDecoder
 {
 public:
-       ImageMagickDecoder (boost::shared_ptr<Film>, boost::shared_ptr<const DecodeOptions>, Job *);
+       ImageMagickDecoder (boost::shared_ptr<Film>, DecodeOptions, Job *);
 
        float frames_per_second () const {
                /* We don't know */
                return 0;
        }
 
-       Size native_size () const;
+       libdcp::Size native_size () const;
 
        SourceFrame length () const {
                /* We don't know */
index 5272d6badf59b341d8ed1d2a851b207ab03d9806..fb24fedb386ab386f55b5b92c4ab6644e9b56831 100644 (file)
@@ -21,6 +21,7 @@
  *  @brief A job to create DCPs.
  */
 
+#include <iostream>
 #include <boost/filesystem.hpp>
 #include <libdcp/dcp.h>
 #include <libdcp/picture_asset.h>
@@ -35,16 +36,17 @@ extern "C" {
 #include "options.h"
 #include "imagemagick_decoder.h"
 #include "film.h"
+#include "format.h"
 
 using std::string;
+using std::cout;
 using boost::shared_ptr;
 
 /** @param f Film we are making the DCP for.
  *  @param o Options.
  */
-MakeDCPJob::MakeDCPJob (shared_ptr<Film> f, shared_ptr<const EncodeOptions> o, shared_ptr<Job> req)
+MakeDCPJob::MakeDCPJob (shared_ptr<Film> f, shared_ptr<Job> req)
        : Job (f, req)
-       , _opt (o)
 {
        
 }
@@ -57,42 +59,34 @@ MakeDCPJob::name () const
 
 /** @param f DCP frame index */
 string
-MakeDCPJob::j2c_path (int f) const
+MakeDCPJob::j2c_path (int f, int offset) const
 {
-       SourceFrame const s = (f * dcp_frame_rate(_film->frames_per_second()).skip) + _film->dcp_trim_start();
-       return _opt->frame_out_path (s, false);
+       return _film->frame_out_path (f + offset, false);
 }
 
 string
 MakeDCPJob::wav_path (libdcp::Channel c) const
 {
-       return _opt->multichannel_audio_out_path (int (c), false);
+       return _film->multichannel_audio_out_path (int (c), false);
 }
 
 void
 MakeDCPJob::run ()
 {
-       if (!_film->dcp_length()) {
-               throw EncodeError ("cannot make a DCP when the source length is not known");
+       if (!_film->dcp_intrinsic_duration()) {
+               throw EncodeError ("cannot make a DCP when its intrinsic duration is not known");
        }
+
+       descend (0.9);
        
        string const dcp_path = _film->dir (_film->dcp_name());
 
        /* Remove any old DCP */
        boost::filesystem::remove_all (dcp_path);
 
-       DCPFrameRate const dfr = dcp_frame_rate (_film->frames_per_second ());
-
-       int frames = 0;
-       switch (_film->content_type ()) {
-       case VIDEO:
-               /* Source frames -> DCP frames */
-               frames = _film->dcp_length().get() / dfr.skip;
-               break;
-       case STILL:
-               frames = _film->still_duration() * 24;
-               break;
-       }
+       int const frames = _film->dcp_intrinsic_duration().get();
+       int const duration = frames - _film->trim_start() - _film->trim_end();
+       DCPFrameRate const dfr (_film->frames_per_second ());
 
        libdcp::DCP dcp (_film->dir (_film->dcp_name()));
        dcp.Progress.connect (boost::bind (&MakeDCPJob::dcp_progress, this, _1));
@@ -103,45 +97,80 @@ MakeDCPJob::run ()
        
        dcp.add_cpl (cpl);
 
-       descend (0.8);
-       shared_ptr<libdcp::MonoPictureAsset> pa (
-               new libdcp::MonoPictureAsset (
-                       boost::bind (&MakeDCPJob::j2c_path, this, _1),
-                       _film->dir (_film->dcp_name()),
-                       "video.mxf",
-                       &dcp.Progress,
-                       dfr.frames_per_second,
-                       frames,
-                       _opt->out_size.width,
-                       _opt->out_size.height
-                       )
-               );
-       
-       ascend ();
+       int frames_per_reel = 0;
+       if (_film->reel_size()) {
+               frames_per_reel = (_film->reel_size().get() / (_film->j2k_bandwidth() / 8)) * dfr.frames_per_second;
+       } else {
+               frames_per_reel = frames;
+       }
 
-       shared_ptr<libdcp::SoundAsset> sa;
+       int frames_done = 0;
+       int reel = 0;
 
-       if (_film->audio_channels() > 0) {
-               descend (0.1);
-               sa.reset (
-                       new libdcp::SoundAsset (
-                               boost::bind (&MakeDCPJob::wav_path, this, _1),
+       while (frames_done < frames) {
+
+               descend (float (frames_per_reel) / frames);
+
+               int this_time = std::min (frames_per_reel, (frames - frames_done));
+
+               descend (0.8);
+
+               shared_ptr<libdcp::MonoPictureAsset> pa (
+                       new libdcp::MonoPictureAsset (
+                               boost::bind (&MakeDCPJob::j2c_path, this, _1, frames_done),
                                _film->dir (_film->dcp_name()),
-                               "audio.mxf",
+                               String::compose ("video_%1.mxf", reel),
                                &dcp.Progress,
                                dfr.frames_per_second,
-                               frames,
-                               dcp_audio_channels (_film->audio_channels())
+                               this_time,
+                               _film->format()->dcp_size()
                                )
                        );
+
+               pa->set_entry_point (_film->trim_start ());
+               pa->set_duration (duration);
+       
+               ascend ();
+               
+               shared_ptr<libdcp::SoundAsset> sa;
+               
+               if (_film->audio_channels() > 0) {
+                       descend (0.1);
+                       sa.reset (
+                               new libdcp::SoundAsset (
+                                       boost::bind (&MakeDCPJob::wav_path, this, _1),
+                                       _film->dir (_film->dcp_name()),
+                                       String::compose ("audio_%1.mxf", reel),
+                                       &dcp.Progress,
+                                       dfr.frames_per_second,
+                                       this_time,
+                                       frames_done,
+                                       dcp_audio_channels (_film->audio_channels())
+                                       )
+                               );
+
+                       sa->set_entry_point (_film->trim_start ());
+                       sa->set_duration (duration);
+                       
+                       ascend ();
+               }
+
+               descend (0.1);
+               cpl->add_reel (shared_ptr<libdcp::Reel> (new libdcp::Reel (pa, sa, shared_ptr<libdcp::SubtitleAsset> ())));
+               ascend ();
+               
+               frames_done += frames_per_reel;
+               ++reel;
+
                ascend ();
        }
 
+       ascend ();
+
        descend (0.1);
-       cpl->add_reel (shared_ptr<libdcp::Reel> (new libdcp::Reel (pa, sa, shared_ptr<libdcp::SubtitleAsset> ())));
        dcp.write_xml ();
        ascend ();
-
+               
        set_progress (1);
        set_state (FINISHED_OK);
 }
index 1aa906b0adc5fd9518334ffab78e47f347d5a37b..481382248f3fd247075e3daf933fabd7ea2cae64 100644 (file)
 
 #include "job.h"
 
-class EncodeOptions;
-
 /** @class MakeDCPJob
  *  @brief A job to create DCPs
  */
 class MakeDCPJob : public Job
 {
 public:
-       MakeDCPJob (boost::shared_ptr<Film>, boost::shared_ptr<const EncodeOptions>, boost::shared_ptr<Job> req);
+       MakeDCPJob (boost::shared_ptr<Film>, boost::shared_ptr<Job> req);
 
        std::string name () const;
        void run ();
 
 private:
        void dcp_progress (float);
-       std::string j2c_path (int) const;
+       std::string j2c_path (int, int) const;
        std::string wav_path (libdcp::Channel) const;
-
-       boost::shared_ptr<const EncodeOptions> _opt;
 };
 
index b94c28446a4d7f3b69a8ebe8c70204ecf34e3b67..60bb8743226078628adfb7246fe2a3922c83a7b3 100644 (file)
@@ -35,6 +35,6 @@ private:
        int _video_frames;
        int64_t _audio_frames;
        boost::optional<AVPixelFormat> _pixel_format;
-       boost::optional<Size> _size;
+       boost::optional<libdcp::Size> _size;
        boost::optional<int> _channels;
 };
index 55b066a2d90bb918d53b9a315b62d66fe8020a7b..2cd7dffdedaff57a9ba8bc107045dc710d0bbb03 100644 (file)
 
 */
 
-/** @file src/options.h
- *  @brief Options for a transcoding operation.
- */
-
-#include <string>
-#include <iomanip>
-#include <sstream>
-#include <boost/optional.hpp>
-#include "util.h"
+#ifndef DVDOMATIC_OPTIONS_H
+#define DVDOMATIC_OPTIONS_H
 
-/** @class EncodeOptions
- *  @brief EncodeOptions for an encoding operation.
- *
- *  These are settings which may be different, in different circumstances, for
- *  the same film; ie they are options for a particular operation.
+/** @file src/options.h
+ *  @brief Options for a decoding operation.
  */
-class EncodeOptions
-{
-public:
-
-       EncodeOptions (std::string f, std::string e, std::string m)
-               : padding (0)
-               , video_skip (0)
-               , _frame_out_path (f)
-               , _frame_out_extension (e)
-               , _multichannel_audio_out_path (m)
-       {}
-
-       /** @return The path to write video frames to */
-       std::string frame_out_path () const {
-               return _frame_out_path;
-       }
-
-       /** @param f Source frame index.
-        *  @param t true to return a temporary file path, otherwise a permanent one.
-        *  @return The path to write this video frame to.
-        */
-       std::string frame_out_path (SourceFrame f, bool t) const {
-               std::stringstream s;
-               s << _frame_out_path << "/";
-               s.width (8);
-               s << std::setfill('0') << f << _frame_out_extension;
-
-               if (t) {
-                       s << ".tmp";
-               }
-
-               return s.str ();
-       }
-
-       std::string hash_out_path (SourceFrame f, bool t) const {
-               return frame_out_path (f, t) + ".md5";
-       }
-
-       /** @return Path to write multichannel audio data to */
-       std::string multichannel_audio_out_path () const {
-               return _multichannel_audio_out_path;
-       }
-
-       /** @param c Audio channel index.
-        *  @param t true to return a temporary file path, otherwise a permanent one.
-        *  @return The path to write this audio file to.
-        */
-       std::string multichannel_audio_out_path (int c, bool t) const {
-               std::stringstream s;
-               s << _multichannel_audio_out_path << "/" << (c + 1) << ".wav";
-               if (t) {
-                       s << ".tmp";
-               }
-
-               return s.str ();
-       }
-
-       Size out_size;              ///< size of output images
-       int padding;                ///< number of pixels of padding (in terms of the output size) each side of the image
-
-       /** Range of video frames to encode (in DCP frames) */
-       boost::optional<std::pair<int, int> > video_range;
-       /** Range of audio frames to decode (in the DCP's sampling rate) */
-       boost::optional<std::pair<int64_t, int64_t> > audio_range;
-       
-       /** Skip frames such that we don't decode any frame where (index % decode_video_skip) != 0; e.g.
-        *  1 for every frame, 2 for every other frame, etc.
-        */
-       SourceFrame video_skip; 
-
-private:
-       /** Path of the directory to write video frames to */
-       std::string _frame_out_path;
-       /** Extension to use for video frame files (including the leading .) */
-       std::string _frame_out_extension;
-       /** Path of the directory to write audio files to */
-       std::string _multichannel_audio_out_path;
-};
-
 
 class DecodeOptions
 {
@@ -126,3 +37,5 @@ public:
        bool decode_subtitles;
        bool video_sync;
 };
+
+#endif
index bea75cff8a41e80294b73cbf7d0c6783236be832..134cb65a0140a217ccd4b9a10d3d8a0b7094627d 100644 (file)
@@ -45,6 +45,7 @@ using boost::algorithm::is_any_of;
 using boost::algorithm::split;
 using boost::thread;
 using boost::bind;
+using libdcp::Size;
 
 /** Create a server description from a string of metadata returned from as_metadata().
  *  @param v Metadata.
index c52d3ac664891576a1cced625da24bc678001f73..a7aa7cd21789a772edf04be8edd296362140b776 100644 (file)
@@ -27,6 +27,7 @@
 
 using namespace std;
 using namespace boost;
+using libdcp::Size;
 
 /** Construct a TimedSubtitle.  This is a subtitle image, position,
  *  and a range of time over which it should be shown.
index dfb9b107192748f7dbe8c6b4f2280cd69fa05057..6dd74c36c6ee9fd62dcc6eb31f1a8eaa3b045094 100644 (file)
@@ -37,13 +37,12 @@ using std::setprecision;
 using boost::shared_ptr;
 
 /** @param s Film to use.
- *  @param o Options.
+ *  @param o Decode options.
  *  @param req Job that must be completed before this job is run.
  */
-TranscodeJob::TranscodeJob (shared_ptr<Film> f, shared_ptr<const DecodeOptions> od, shared_ptr<const EncodeOptions> oe, shared_ptr<Job> req)
+TranscodeJob::TranscodeJob (shared_ptr<Film> f, DecodeOptions o, shared_ptr<Job> req)
        : Job (f, req)
-       , _decode_opt (od)
-       , _encode_opt (oe)
+       , _decode_opt (o)
 {
        
 }
@@ -62,13 +61,16 @@ TranscodeJob::run ()
                _film->log()->log ("Transcode job starting");
                _film->log()->log (String::compose ("Audio delay is %1ms", _film->audio_delay()));
 
-               _encoder.reset (new Encoder (_film, _encode_opt));
+               _encoder.reset (new Encoder (_film));
                Transcoder w (_film, _decode_opt, this, _encoder);
                w.go ();
                set_progress (1);
                set_state (FINISHED_OK);
 
+               _film->set_dcp_intrinsic_duration (_encoder->video_frames_out ());
+
                _film->log()->log ("Transcode job completed successfully");
+               _film->log()->log (String::compose ("DCP intrinsic duration is %1", _encoder->video_frames_out()));
 
        } catch (std::exception& e) {
 
@@ -116,11 +118,19 @@ TranscodeJob::remaining_time () const
                return 0;
        }
 
-       if (!_film->dcp_length()) {
+       if (!_film->length()) {
                return 0;
        }
 
+       /* Compute approximate proposed length here, as it's only here that we need it */
+       int length = _film->length().get();
+       DCPFrameRate const dfr (_film->frames_per_second ());
+       if (dfr.skip) {
+               length /= 2;
+       }
+       /* If we are repeating it shouldn't affect transcode time, so don't take it into account */
+
        /* We assume that dcp_length() is valid, if it is set */
-       SourceFrame const left = _film->dcp_trim_start() + _film->dcp_length().get() - _encoder->video_frame();
+       int const left = length - _encoder->video_frames_out();
        return left / fps;
 }
index 97f655e15c212e78aba5ad9f6564dbfc84f9f7e9..8f78e7f6a899b8d3e5dda3f11da4adce2a1fdfcc 100644 (file)
 
 #include <boost/shared_ptr.hpp>
 #include "job.h"
+#include "options.h"
 
 class Encoder;
-class DecodeOptions;
-class EncodeOptions;
 
 /** @class TranscodeJob
  *  @brief A job which transcodes from one format to another.
@@ -34,7 +33,7 @@ class EncodeOptions;
 class TranscodeJob : public Job
 {
 public:
-       TranscodeJob (boost::shared_ptr<Film> f, boost::shared_ptr<const DecodeOptions> od, boost::shared_ptr<const EncodeOptions> oe, boost::shared_ptr<Job> req);
+       TranscodeJob (boost::shared_ptr<Film> f, DecodeOptions od, boost::shared_ptr<Job> req);
        
        std::string name () const;
        void run ();
@@ -44,7 +43,6 @@ protected:
        int remaining_time () const;
 
 private:
-       boost::shared_ptr<const DecodeOptions> _decode_opt;
-       boost::shared_ptr<const EncodeOptions> _encode_opt;
+       DecodeOptions _decode_opt;
        boost::shared_ptr<Encoder> _encoder;
 };
index 87a1fb3f28c8435587e7601b11de13cde3b08a30..93963761e2c3d8a7fdd74bfa4c83119b50102367 100644 (file)
@@ -48,7 +48,7 @@ using boost::dynamic_pointer_cast;
  *  @param j Job that we are running under, or 0.
  *  @param e Encoder to use.
  */
-Transcoder::Transcoder (shared_ptr<Film> f, shared_ptr<const DecodeOptions> o, Job* j, shared_ptr<Encoder> e)
+Transcoder::Transcoder (shared_ptr<Film> f, DecodeOptions o, Job* j, shared_ptr<Encoder> e)
        : _job (j)
        , _encoder (e)
        , _decoders (decoder_factory (f, o, j))
index b50113742369c817aa3e0b57d28158f31d111b41..786010869d35bb04f4528b3827601a62983a3a42 100644 (file)
@@ -36,8 +36,6 @@ class Gain;
 class VideoDecoder;
 class AudioDecoder;
 class DelayLine;
-class EncodeOptions;
-class DecodeOptions;
 
 /** @class Transcoder
  *  @brief A class which takes a FilmState and some Options, then uses those to transcode a Film.
@@ -50,7 +48,7 @@ class Transcoder
 public:
        Transcoder (
                boost::shared_ptr<Film> f,
-               boost::shared_ptr<const DecodeOptions> o,
+               DecodeOptions o,
                Job* j,
                boost::shared_ptr<Encoder> e
                );
index 66743250f18a3913eb9c0037411375445485d74e..0e250bb0885bfecde170a8fa5dd97a3690c906fe 100644 (file)
@@ -26,6 +26,7 @@
 #include <iomanip>
 #include <iostream>
 #include <fstream>
+#include <climits>
 #ifdef DVDOMATIC_POSIX
 #include <execinfo.h>
 #include <cxxabi.h>
@@ -58,9 +59,11 @@ extern "C" {
 #include "dcp_content_type.h"
 #include "filter.h"
 #include "sound_processor.h"
+#include "config.h"
 
 using namespace std;
 using namespace boost;
+using libdcp::Size;
 
 thread::id ui_thread;
 
@@ -330,25 +333,100 @@ md5_digest (string file)
        return s.str ();
 }
 
-/** @param fps Arbitrary frames-per-second value.
- *  @return DCPFrameRate for this frames-per-second.
- */
-DCPFrameRate
-dcp_frame_rate (float fps)
+static bool about_equal (float a, float b)
 {
-       DCPFrameRate dfr;
+       /* A film of F seconds at f FPS will be Ff frames;
+          Consider some delta FPS d, so if we run the same
+          film at (f + d) FPS it will last F(f + d) seconds.
+
+          Hence the difference in length over the length of the film will
+          be F(f + d) - Ff frames
+           = Ff + Fd - Ff frames
+           = Fd frames
+           = Fd/f seconds
+          So if we accept a difference of 1 frame, ie 1/f seconds, we can
+          say that
+
+          1/f = Fd/f
+       ie 1 = Fd
+       ie d = 1/F
+          So for a 3hr film, ie F = 3 * 60 * 60 = 10800, the acceptable
+          FPS error is 1/F ~= 0.0001 ~= 10-e4
+       */
 
-       dfr.run_fast = (fps != rint (fps));
-       dfr.frames_per_second = rint (fps);
-       dfr.skip = 1;
+       return (fabs (a - b) < 1e-4);
+}
+
+class FrameRateCandidate
+{
+public:
+       FrameRateCandidate (float source_, int dcp_)
+               : source (source_)
+               , dcp (dcp_)
+       {}
 
-       /* XXX: somewhat arbitrary */
-       if (fps == 50) {
-               dfr.frames_per_second = 25;
-               dfr.skip = 2;
+       bool skip () const {
+               return !about_equal (source, dcp) && source > dcp;
        }
 
-       return dfr;
+       bool repeat () const {
+               return !about_equal (source, dcp) && source < dcp;
+       }
+
+       float source;
+       int dcp;
+};
+
+/** @param fps Arbitrary source frames-per-second value */
+/** XXX: this could be slow-ish */
+DCPFrameRate::DCPFrameRate (float source_fps)
+{
+       list<int> const allowed_dcp_frame_rates = Config::instance()->allowed_dcp_frame_rates ();
+
+       /* Work out what rates we could manage, including those achieved by using skip / repeat. */
+       list<FrameRateCandidate> candidates;
+
+       /* Start with the ones without skip / repeat so they will get matched in preference to skipped/repeated ones */
+       for (list<int>::const_iterator i = allowed_dcp_frame_rates.begin(); i != allowed_dcp_frame_rates.end(); ++i) {
+               candidates.push_back (FrameRateCandidate (*i, *i));
+       }
+
+       /* Then the skip/repeat ones */
+       for (list<int>::const_iterator i = allowed_dcp_frame_rates.begin(); i != allowed_dcp_frame_rates.end(); ++i) {
+               candidates.push_back (FrameRateCandidate (float (*i) / 2, *i));
+               candidates.push_back (FrameRateCandidate (float (*i) * 2, *i));
+       }
+
+       /* Pick the best one, bailing early if we hit an exact match */
+       float error = numeric_limits<float>::max ();
+       boost::optional<FrameRateCandidate> best;
+       list<FrameRateCandidate>::iterator i = candidates.begin();
+       while (i != candidates.end()) {
+               
+               if (about_equal (i->source, source_fps)) {
+                       best = *i;
+                       break;
+               }
+
+               float const e = fabs (i->source - source_fps);
+               if (e < error) {
+                       error = e;
+                       best = *i;
+               }
+
+               ++i;
+       }
+
+       if (!best) {
+               throw EncodeError ("cannot find a suitable DCP frame rate for this source");
+       }
+
+       frames_per_second = best->dcp;
+       skip = best->skip ();
+       repeat = best->repeat ();
+       change_speed = !about_equal (source_fps * factor(), frames_per_second);
 }
 
 /** @param An arbitrary sampling rate.
@@ -378,16 +456,6 @@ dcp_audio_channels (int f)
 }
 
 
-bool operator== (Size const & a, Size const & b)
-{
-       return (a.width == b.width && a.height == b.height);
-}
-
-bool operator!= (Size const & a, Size const & b)
-{
-       return !(a == b);
-}
-
 bool operator== (Crop const & a, Crop const & b)
 {
        return (a.left == b.left && a.right == b.right && a.top == b.top && a.bottom == b.bottom);
@@ -875,3 +943,29 @@ still_image_file (string f)
        
        return (ext == ".tif" || ext == ".tiff" || ext == ".jpg" || ext == ".jpeg" || ext == ".png");
 }
+
+/** @return A pair containing CPU model name and the number of processors */
+pair<string, int>
+cpu_info ()
+{
+       pair<string, int> info;
+       info.second = 0;
+       
+#ifdef DVDOMATIC_POSIX
+       ifstream f ("/proc/cpuinfo");
+       while (f.good ()) {
+               string l;
+               getline (f, l);
+               if (boost::algorithm::starts_with (l, "model name")) {
+                       string::size_type const c = l.find (':');
+                       if (c != string::npos) {
+                               info.first = l.substr (c + 2);
+                       }
+               } else if (boost::algorithm::starts_with (l, "processor")) {
+                       ++info.second;
+               }
+       }
+#endif 
+
+       return info;
+}
index 0744d9c090080806fac6438a322cd9a715c2e7c7..c4940a5d795b3c615d6861c15a0bc7ba804ce2f1 100644 (file)
@@ -29,6 +29,7 @@
 #include <vector>
 #include <boost/shared_ptr.hpp>
 #include <boost/asio.hpp>
+#include <libdcp/util.h>
 extern "C" {
 #include <libavcodec/avcodec.h>
 #include <libavfilter/avfilter.h>
@@ -61,16 +62,37 @@ typedef int SourceFrame;
 
 struct DCPFrameRate
 {
+       DCPFrameRate (float);
+
+       /** @return factor by which to multiply a source frame rate
+           to get the effective rate after any skip or repeat has happened.
+       */
+       float factor () const {
+               if (skip) {
+                       return 0.5;
+               } else if (repeat) {
+                       return 2;
+               }
+
+               return 1;
+       }
+       
        /** frames per second for the DCP */
        int frames_per_second;
-       /** Skip every `skip' frames.  e.g. if this is 1, we skip nothing;
-        *  if it's 2, we skip every other frame.
+       /** true to skip every other frame */
+       bool skip;
+       /** true to repeat every frame once */
+       bool repeat;
+       /** true if this DCP will run its video faster or slower than the source
+        *  without taking into account `repeat'.
+        *  (e.g. change_speed will be true if
+        *          source is 29.97fps, DCP is 30fps
+        *          source is 14.50fps, DCP is 30fps
+        *  but not if
+        *          source is 15.00fps, DCP is 30fps
+        *          source is 12.50fps, DCP is 25fps)
         */
-       int skip;
-       /** true if this DCP will run its video faster than the source
-        *  (e.g. if the source is 29.97fps and we will run the DCP at 30fps)
-        */
-       bool run_fast;
+       bool change_speed;
 };
 
 enum ContentType {
@@ -78,33 +100,6 @@ enum ContentType {
        VIDEO  ///< content is a video
 };
 
-/** @class Size
- *  @brief Representation of the size of something */
-struct Size
-{
-       /** Construct a zero Size */
-       Size ()
-               : width (0)
-               , height (0)
-       {}
-
-       /** @param w Width.
-        *  @param h Height.
-        */
-       Size (int w, int h)
-               : width (w)
-               , height (h)
-       {}
-
-       /** width */
-       int width;
-       /** height */
-       int height;
-};
-
-extern bool operator== (Size const & a, Size const & b);
-extern bool operator!= (Size const & a, Size const & b);
-
 /** @struct Crop
  *  @brief A description of the crop of an image or video.
  */
@@ -174,16 +169,15 @@ struct Rect
                return Position (x, y);
        }
 
-       Size size () const {
-               return Size (width, height);
+       libdcp::Size size () const {
+               return libdcp::Size (width, height);
        }
 
        Rect intersection (Rect const & other) const;
 };
 
-extern std::string crop_string (Position, Size);
+extern std::string crop_string (Position, libdcp::Size);
 extern int dcp_audio_sample_rate (int);
-extern DCPFrameRate dcp_frame_rate (float);
 extern int dcp_audio_channels (int);
 extern std::string colour_lut_index_to_name (int index);
 extern int stride_round_up (int, int const *, int);
@@ -280,6 +274,7 @@ private:
 
 extern int64_t video_frames_to_audio_frames (SourceFrame v, float audio_sample_rate, float frames_per_second);
 extern bool still_image_file (std::string);
+extern std::pair<std::string, int> cpu_info ();
 
 #endif
 
index e0a7576eeaf5c51670cf1702c6b7b4597467db15..3a803a86339a9fdf955bc59bdcb6c45cca8d05ca 100644 (file)
@@ -28,7 +28,7 @@
 using boost::shared_ptr;
 using boost::optional;
 
-VideoDecoder::VideoDecoder (shared_ptr<Film> f, shared_ptr<const DecodeOptions> o, Job* j)
+VideoDecoder::VideoDecoder (shared_ptr<Film> f, DecodeOptions o, Job* j)
        : Decoder (f, o, j)
        , _video_frame (0)
        , _last_source_time (0)
index 7726d2057fe9b3eec7c5a20914d4b159ef4ce071..ef1ab041a052589f003816e26b239dd4e2ef2a9b 100644 (file)
 class VideoDecoder : public VideoSource, public virtual Decoder
 {
 public:
-       VideoDecoder (boost::shared_ptr<Film>, boost::shared_ptr<const DecodeOptions>, Job *);
+       VideoDecoder (boost::shared_ptr<Film>, DecodeOptions, Job *);
 
        /** @return video frames per second, or 0 if unknown */
        virtual float frames_per_second () const = 0;
        /** @return native size in pixels */
-       virtual Size native_size () const = 0;
+       virtual libdcp::Size native_size () const = 0;
        /** @return length (in source video frames), according to our content's header */
        virtual SourceFrame length () const = 0;
 
index c0fb7ccee3dff138d88370541261fd706daf3c4e..900c31bfc9fca7630bc8002ba833128be88563ff 100644 (file)
@@ -51,7 +51,6 @@ help (string n)
             << "  -v, --version      show DVD-o-matic version\n"
             << "  -h, --help         show this help\n"
             << "  -d, --deps         list DVD-o-matic dependency details and quit\n"
-            << "  -c, --config       list configuration settings that affect output and quit\n"
             << "  -t, --test         run in test mode (repeatable UUID generation, timestamps etc.)\n"
             << "  -n, --no-progress  do not print progress to stdout\n"
             << "  -r, --no-remote    do not use any remote servers\n"
@@ -74,7 +73,6 @@ main (int argc, char* argv[])
                        { "version", no_argument, 0, 'v'},
                        { "help", no_argument, 0, 'h'},
                        { "deps", no_argument, 0, 'd'},
-                       { "config", no_argument, 0, 'c'},
                        { "test", no_argument, 0, 't'},
                        { "no-progress", no_argument, 0, 'n'},
                        { "no-remote", no_argument, 0, 'r'},
@@ -82,7 +80,7 @@ main (int argc, char* argv[])
                        { 0, 0, 0, 0 }
                };
 
-               int c = getopt_long (argc, argv, "vhdctnrl:", long_options, &option_index);
+               int c = getopt_long (argc, argv, "vhdtnrl:", long_options, &option_index);
 
                if (c == -1) {
                        break;
@@ -107,15 +105,6 @@ main (int argc, char* argv[])
                case 'r':
                        no_remote = true;
                        break;
-               case 'c':
-                       cout << "Colour LUT " << colour_lut_index_to_name (Config::instance()->colour_lut_index()) << "; "
-                            << "J2K bandwidth " << Config::instance()->j2k_bandwidth() << "; ";
-#ifdef DVDOMATIC_DEBUG
-                       cout << "built in debug mode\n";
-#else
-                       cout << "built in optimised mode\n";
-#endif                 
-                       exit (EXIT_SUCCESS);
                case 'l':
                        log_level = atoi (optarg);
                        break;
index adf039e41f09045ab2b49b1f174abf55c8ef9efc..9de8e700194642eaeff484c075f098c486b66919 100644 (file)
@@ -79,20 +79,6 @@ ConfigDialog::ConfigDialog (wxWindow* parent)
        table->Add (_default_directory, 1, wxEXPAND);
        table->AddSpacer (0);
 
-       add_label_to_sizer (table, this, "Colour look-up table");
-       _colour_lut = new wxComboBox (this, wxID_ANY);
-       for (int i = 0; i < 2; ++i) {
-               _colour_lut->Append (std_to_wx (colour_lut_index_to_name (i)));
-       }
-       _colour_lut->SetSelection (0);
-       table->Add (_colour_lut, 1, wxEXPAND);
-       table->AddSpacer (0);
-
-       add_label_to_sizer (table, this, "JPEG2000 bandwidth");
-       _j2k_bandwidth = new wxSpinCtrl (this, wxID_ANY);
-       table->Add (_j2k_bandwidth, 1, wxEXPAND);
-       add_label_to_sizer (table, this, "MBps");
-
        add_label_to_sizer (table, this, "Reference scaler for A/B");
        _reference_scaler = new wxComboBox (this, wxID_ANY);
        vector<Scaler const *> const sc = Scaler::all ();
@@ -156,12 +142,6 @@ ConfigDialog::ConfigDialog (wxWindow* parent)
        _default_directory->SetPath (std_to_wx (config->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir()))));
        _default_directory->Connect (wxID_ANY, wxEVT_COMMAND_DIRPICKER_CHANGED, wxCommandEventHandler (ConfigDialog::default_directory_changed), 0, this);
 
-       _colour_lut->Connect (wxID_ANY, wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler (ConfigDialog::colour_lut_changed), 0, this);
-       
-       _j2k_bandwidth->SetRange (50, 250);
-       _j2k_bandwidth->SetValue (rint ((double) config->j2k_bandwidth() / 1e6));
-       _j2k_bandwidth->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (ConfigDialog::j2k_bandwidth_changed), 0, this);
-
        _reference_scaler->SetSelection (Scaler::as_index (config->reference_scaler ()));
        _reference_scaler->Connect (wxID_ANY, wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler (ConfigDialog::reference_scaler_changed), 0, this);
 
@@ -232,18 +212,6 @@ ConfigDialog::default_directory_changed (wxCommandEvent &)
        Config::instance()->set_default_directory (wx_to_std (_default_directory->GetPath ()));
 }
 
-void
-ConfigDialog::colour_lut_changed (wxCommandEvent &)
-{
-       Config::instance()->set_colour_lut_index (_colour_lut->GetSelection ());
-}
-
-void
-ConfigDialog::j2k_bandwidth_changed (wxCommandEvent &)
-{
-       Config::instance()->set_j2k_bandwidth (_j2k_bandwidth->GetValue() * 1e6);
-}
-
 void
 ConfigDialog::add_server_to_control (ServerDescription* s)
 {
index 615d36f830744cfe03ea74824b43437e09357082..32123a0d7eb92748d3b0e3cd701dca15c614bb53 100644 (file)
@@ -45,8 +45,6 @@ private:
        void tms_password_changed (wxCommandEvent &);
        void num_local_encoding_threads_changed (wxCommandEvent &);
        void default_directory_changed (wxCommandEvent &);
-       void colour_lut_changed (wxCommandEvent &);
-       void j2k_bandwidth_changed (wxCommandEvent &);
        void reference_scaler_changed (wxCommandEvent &);
        void edit_reference_filters_clicked (wxCommandEvent &);
        void reference_filters_changed (std::vector<Filter const *>);
@@ -67,8 +65,6 @@ private:
 #else
        wxDirPickerCtrl* _default_directory;
 #endif 
-       wxComboBox* _colour_lut;
-       wxSpinCtrl* _j2k_bandwidth;
        wxComboBox* _reference_scaler;
        wxStaticText* _reference_filters;
        wxButton* _reference_filters_button;
index dece245689b84d1092265c652da51e11c046280f..bbaeb17c467d22d20010bd140dbb630406eb7326 100644 (file)
@@ -140,15 +140,26 @@ FilmEditor::make_film_panel ()
                video_control (add_label_to_sizer (_film_sizer, _film_panel, "Trim frames"));
                wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
                video_control (add_label_to_sizer (s, _film_panel, "Start"));
-               _dcp_trim_start = new wxSpinCtrl (_film_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
-               s->Add (video_control (_dcp_trim_start));
+               _trim_start = new wxSpinCtrl (_film_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
+               s->Add (video_control (_trim_start));
                video_control (add_label_to_sizer (s, _film_panel, "End"));
-               _dcp_trim_end = new wxSpinCtrl (_film_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
-               s->Add (video_control (_dcp_trim_end));
+               _trim_end = new wxSpinCtrl (_film_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1));
+               s->Add (video_control (_trim_end));
 
                _film_sizer->Add (s);
        }
 
+       _multiple_reels = new wxCheckBox (_film_panel, wxID_ANY, wxT ("Make multiple reels"));
+       _film_sizer->Add (_multiple_reels);
+
+       {
+               wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
+               _reel_size = new wxSpinCtrl (_film_panel, wxID_ANY);
+               s->Add (_reel_size);
+               add_label_to_sizer (s, _film_panel, "Gb each");
+               _film_sizer->Add (s);
+       }
+
        _dcp_ab = new wxCheckBox (_film_panel, wxID_ANY, wxT ("A/B"));
        video_control (_dcp_ab);
        _film_sizer->Add (_dcp_ab, 1);
@@ -169,6 +180,8 @@ FilmEditor::make_film_panel ()
        for (vector<DCPContentType const *>::const_iterator i = ct.begin(); i != ct.end(); ++i) {
                _dcp_content_type->Append (std_to_wx ((*i)->pretty_name ()));
        }
+
+       _reel_size->SetRange(1, 1000);
 }
 
 void
@@ -189,11 +202,15 @@ FilmEditor::connect_to_widgets ()
        _dcp_content_type->Connect (wxID_ANY, wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler (FilmEditor::dcp_content_type_changed), 0, this);
        _dcp_ab->Connect (wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler (FilmEditor::dcp_ab_toggled), 0, this);
        _still_duration->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::still_duration_changed), 0, this);
-       _dcp_trim_start->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::dcp_trim_start_changed), 0, this);
-       _dcp_trim_end->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::dcp_trim_end_changed), 0, this);
+       _trim_start->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::trim_start_changed), 0, this);
+       _trim_end->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::trim_end_changed), 0, this);
+       _multiple_reels->Connect (wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler (FilmEditor::multiple_reels_toggled), 0, this);
+       _reel_size->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::reel_size_changed), 0, this);
        _with_subtitles->Connect (wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler (FilmEditor::with_subtitles_toggled), 0, this);
        _subtitle_offset->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::subtitle_offset_changed), 0, this);
        _subtitle_scale->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::subtitle_scale_changed), 0, this);
+       _colour_lut->Connect (wxID_ANY, wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler (FilmEditor::colour_lut_changed), 0, this);
+       _j2k_bandwidth->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::j2k_bandwidth_changed), 0, this);
        _subtitle_stream->Connect (wxID_ANY, wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler (FilmEditor::subtitle_stream_changed), 0, this);
        _audio_stream->Connect (wxID_ANY, wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler (FilmEditor::audio_stream_changed), 0, this);
        _audio_gain->Connect (wxID_ANY, wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler (FilmEditor::audio_gain_changed), 0, this);
@@ -265,13 +282,31 @@ FilmEditor::make_video_panel ()
                _scaler->Append (std_to_wx ((*i)->name()));
        }
 
+       add_label_to_sizer (_video_sizer, _video_panel, "Colour look-up table");
+       _colour_lut = new wxComboBox (_video_panel, wxID_ANY);
+       for (int i = 0; i < 2; ++i) {
+               _colour_lut->Append (std_to_wx (colour_lut_index_to_name (i)));
+       }
+       _colour_lut->SetSelection (0);
+       _video_sizer->Add (_colour_lut, 1, wxEXPAND);
+
+       {
+               add_label_to_sizer (_video_sizer, _video_panel, "JPEG2000 bandwidth");
+               wxSizer* s = new wxBoxSizer (wxHORIZONTAL);
+               _j2k_bandwidth = new wxSpinCtrl (_video_panel, wxID_ANY);
+               s->Add (_j2k_bandwidth, 1);
+               add_label_to_sizer (s, _video_panel, "MBps");
+               _video_sizer->Add (s, 1);
+       }
+
        _left_crop->SetRange (0, 1024);
        _top_crop->SetRange (0, 1024);
        _right_crop->SetRange (0, 1024);
        _bottom_crop->SetRange (0, 1024);
        _still_duration->SetRange (1, 60 * 60);
-       _dcp_trim_start->SetRange (0, 100);
-       _dcp_trim_end->SetRange (0, 100);
+       _trim_start->SetRange (0, 100);
+       _trim_end->SetRange (0, 100);
+       _j2k_bandwidth->SetRange (50, 250);
 }
 
 void
@@ -443,6 +478,32 @@ FilmEditor::trust_content_header_changed (wxCommandEvent &)
        _film->set_trust_content_header (_trust_content_header->GetValue ());
 }
 
+void
+FilmEditor::multiple_reels_toggled (wxCommandEvent &)
+{
+       if (!_film) {
+               return;
+       }
+
+       if (_multiple_reels->GetValue()) {
+               _film->set_reel_size (_reel_size->GetValue() * 1e9);
+       } else {
+               _film->unset_reel_size ();
+       }
+
+       setup_reel_control_sensitivity ();
+}
+
+void
+FilmEditor::reel_size_changed (wxCommandEvent &)
+{
+       if (!_film) {
+               return;
+       }
+
+       _film->set_reel_size (static_cast<uint64_t> (_reel_size->GetValue()) * 1e9);
+}
+
 /** Called when the DCP A/B switch has been toggled */
 void
 FilmEditor::dcp_ab_toggled (wxCommandEvent &)
@@ -485,6 +546,26 @@ FilmEditor::subtitle_scale_changed (wxCommandEvent &)
        _film->set_subtitle_scale (_subtitle_scale->GetValue() / 100.0);
 }
 
+void
+FilmEditor::colour_lut_changed (wxCommandEvent &)
+{
+       if (!_film) {
+               return;
+       }
+       
+       _film->set_colour_lut (_colour_lut->GetSelection ());
+}
+
+void
+FilmEditor::j2k_bandwidth_changed (wxCommandEvent &)
+{
+       if (!_film) {
+               return;
+       }
+       
+       _film->set_j2k_bandwidth (_j2k_bandwidth->GetValue() * 1e6);
+}      
+
 
 /** Called when the metadata stored in the Film object has changed;
  *  so that we can update the GUI.
@@ -580,10 +661,12 @@ FilmEditor::film_changed (Film::Property p)
                } 
                _length->SetLabel (std_to_wx (s.str ()));
                if (_film->length()) {
-                       _dcp_trim_start->SetRange (0, _film->length().get());
-                       _dcp_trim_end->SetRange (0, _film->length().get());
+                       _trim_start->SetRange (0, _film->length().get());
+                       _trim_end->SetRange (0, _film->length().get());
                }
                break;
+       case Film::DCP_INTRINSIC_DURATION:
+               break;
        case Film::DCP_CONTENT_TYPE:
                checked_set (_dcp_content_type, DCPContentType::as_index (_film->dcp_content_type ()));
                _dcp_name->SetLabel (std_to_wx (_film->dcp_name ()));
@@ -594,11 +677,20 @@ FilmEditor::film_changed (Film::Property p)
        case Film::SCALER:
                checked_set (_scaler, Scaler::as_index (_film->scaler ()));
                break;
-       case Film::DCP_TRIM_START:
-               checked_set (_dcp_trim_start, _film->dcp_trim_start());
+       case Film::TRIM_START:
+               checked_set (_trim_start, _film->trim_start());
+               break;
+       case Film::TRIM_END:
+               checked_set (_trim_end, _film->trim_end());
                break;
-       case Film::DCP_TRIM_END:
-               checked_set (_dcp_trim_end, _film->dcp_trim_end());
+       case Film::REEL_SIZE:
+               if (_film->reel_size()) {
+                       checked_set (_multiple_reels, true);
+                       checked_set (_reel_size, _film->reel_size().get() / 1e9);
+               } else {
+                       checked_set (_multiple_reels, false);
+               }
+               setup_reel_control_sensitivity ();
                break;
        case Film::AUDIO_GAIN:
                checked_set (_audio_gain, _film->audio_gain ());
@@ -620,6 +712,12 @@ FilmEditor::film_changed (Film::Property p)
        case Film::SUBTITLE_SCALE:
                checked_set (_subtitle_scale, _film->subtitle_scale() * 100);
                break;
+       case Film::COLOUR_LUT:
+               checked_set (_colour_lut, _film->colour_lut ());
+               break;
+       case Film::J2K_BANDWIDTH:
+               checked_set (_j2k_bandwidth, double (_film->j2k_bandwidth()) / 1e6);
+               break;
        case Film::USE_DCI_NAME:
                checked_set (_use_dci_name, _film->use_dci_name ());
                _dcp_name->SetLabel (std_to_wx (_film->dcp_name ()));
@@ -715,8 +813,9 @@ FilmEditor::set_film (shared_ptr<Film> f)
        film_changed (Film::CROP);
        film_changed (Film::FILTERS);
        film_changed (Film::SCALER);
-       film_changed (Film::DCP_TRIM_START);
-       film_changed (Film::DCP_TRIM_END);
+       film_changed (Film::TRIM_START);
+       film_changed (Film::TRIM_END);
+       film_changed (Film::REEL_SIZE);
        film_changed (Film::DCP_AB);
        film_changed (Film::CONTENT_AUDIO_STREAM);
        film_changed (Film::EXTERNAL_AUDIO);
@@ -727,6 +826,8 @@ FilmEditor::set_film (shared_ptr<Film> f)
        film_changed (Film::WITH_SUBTITLES);
        film_changed (Film::SUBTITLE_OFFSET);
        film_changed (Film::SUBTITLE_SCALE);
+       film_changed (Film::COLOUR_LUT);
+       film_changed (Film::J2K_BANDWIDTH);
        film_changed (Film::DCI_METADATA);
        film_changed (Film::SIZE);
        film_changed (Film::LENGTH);
@@ -757,9 +858,13 @@ FilmEditor::set_things_sensitive (bool s)
        _scaler->Enable (s);
        _audio_stream->Enable (s);
        _dcp_content_type->Enable (s);
-       _dcp_trim_start->Enable (s);
-       _dcp_trim_end->Enable (s);
+       _trim_start->Enable (s);
+       _trim_end->Enable (s);
+       _multiple_reels->Enable (s);
+       _reel_size->Enable (s);
        _dcp_ab->Enable (s);
+       _colour_lut->Enable (s);
+       _j2k_bandwidth->Enable (s);
        _audio_gain->Enable (s);
        _audio_gain_calculate_button->Enable (s);
        _audio_delay->Enable (s);
@@ -767,6 +872,7 @@ FilmEditor::set_things_sensitive (bool s)
 
        setup_subtitle_control_sensitivity ();
        setup_audio_control_sensitivity ();
+       setup_reel_control_sensitivity ();
 }
 
 /** Called when the `Edit filters' button has been clicked */
@@ -870,23 +976,23 @@ FilmEditor::still_duration_changed (wxCommandEvent &)
 }
 
 void
-FilmEditor::dcp_trim_start_changed (wxCommandEvent &)
+FilmEditor::trim_start_changed (wxCommandEvent &)
 {
        if (!_film) {
                return;
        }
 
-       _film->set_dcp_trim_start (_dcp_trim_start->GetValue ());
+       _film->set_trim_start (_trim_start->GetValue ());
 }
 
 void
-FilmEditor::dcp_trim_end_changed (wxCommandEvent &)
+FilmEditor::trim_end_changed (wxCommandEvent &)
 {
        if (!_film) {
                return;
        }
 
-       _film->set_dcp_trim_end (_dcp_trim_end->GetValue ());
+       _film->set_trim_end (_trim_end->GetValue ());
 }
 
 void
@@ -1107,3 +1213,9 @@ FilmEditor::external_audio_changed (wxCommandEvent &)
 
        _film->set_external_audio (a);
 }
+
+void
+FilmEditor::setup_reel_control_sensitivity ()
+{
+       _reel_size->Enable (_multiple_reels->GetValue ());
+}
index 7e75b4bf00841fbcd766778471a989f7f81ec425..323aead95fb3affef35e62385b66e7facd28a09a 100644 (file)
@@ -63,8 +63,10 @@ private:
        void content_changed (wxCommandEvent &);
        void trust_content_header_changed (wxCommandEvent &);
        void format_changed (wxCommandEvent &);
-       void dcp_trim_start_changed (wxCommandEvent &);
-       void dcp_trim_end_changed (wxCommandEvent &);
+       void trim_start_changed (wxCommandEvent &);
+       void trim_end_changed (wxCommandEvent &);
+       void multiple_reels_toggled (wxCommandEvent &);
+       void reel_size_changed (wxCommandEvent &);
        void dcp_content_type_changed (wxCommandEvent &);
        void dcp_ab_toggled (wxCommandEvent &);
        void scaler_changed (wxCommandEvent &);
@@ -74,6 +76,8 @@ private:
        void with_subtitles_toggled (wxCommandEvent &);
        void subtitle_offset_changed (wxCommandEvent &);
        void subtitle_scale_changed (wxCommandEvent &);
+       void colour_lut_changed (wxCommandEvent &);
+       void j2k_bandwidth_changed (wxCommandEvent &);
        void still_duration_changed (wxCommandEvent &);
        void audio_stream_changed (wxCommandEvent &);
        void subtitle_stream_changed (wxCommandEvent &);
@@ -90,6 +94,7 @@ private:
        void setup_formats ();
        void setup_subtitle_control_sensitivity ();
        void setup_audio_control_sensitivity ();
+       void setup_reel_control_sensitivity ();
        void setup_streams ();
        void setup_audio_details ();
        
@@ -148,6 +153,8 @@ private:
        wxComboBox* _subtitle_stream;
        wxSpinCtrl* _subtitle_offset;
        wxSpinCtrl* _subtitle_scale;
+       wxComboBox* _colour_lut;
+       wxSpinCtrl* _j2k_bandwidth;
        /** The Film's DCP content type */
        wxComboBox* _dcp_content_type;
        /** The Film's frames per second */
@@ -161,8 +168,10 @@ private:
        /** The Film's duration for still sources */
        wxSpinCtrl* _still_duration;
 
-       wxSpinCtrl* _dcp_trim_start;
-       wxSpinCtrl* _dcp_trim_end;
+       wxSpinCtrl* _trim_start;
+       wxSpinCtrl* _trim_end;
+       wxCheckBox* _multiple_reels;
+       wxSpinCtrl* _reel_size;
        /** Selector to generate an A/B comparison DCP */
        wxCheckBox* _dcp_ab;
 
index 3d8198457db1a3c342290087fe938408d63a11c1..e5da41d5e80f30c9959a43854f235d29b8d4682a 100644 (file)
@@ -44,6 +44,7 @@ using std::max;
 using std::cout;
 using std::list;
 using boost::shared_ptr;
+using libdcp::Size;
 
 FilmViewer::FilmViewer (shared_ptr<Film> f, wxWindow* p)
        : wxPanel (p)
@@ -98,10 +99,10 @@ FilmViewer::film_changed (Film::Property p)
                break;
        case Film::CONTENT:
        {
-               shared_ptr<DecodeOptions> o (new DecodeOptions);
-               o->decode_audio = false;
-               o->decode_subtitles = true;
-               o->video_sync = false;
+               DecodeOptions o;
+               o.decode_audio = false;
+               o.decode_subtitles = true;
+               o.video_sync = false;
                _decoders = decoder_factory (_film, o, 0);
                _decoders.video->Video.connect (bind (&FilmViewer::process_video, this, _1, _2, _3));
                _decoders.video->OutputChanged.connect (boost::bind (&FilmViewer::decoder_changed, this));
index 61e1f34f0ab1d8513d18a464dae7cd4fb835e5ef..0cf75cf5175bad2d56ca668f46c7d5f41cf54b5c 100644 (file)
@@ -56,7 +56,7 @@ PropertiesDialog::PropertiesDialog (wxWindow* parent, shared_ptr<Film> film)
 
        if (_film->length()) {
                _frames->SetLabel (std_to_wx (lexical_cast<string> (_film->length().get())));
-               double const disk = ((double) Config::instance()->j2k_bandwidth() / 8) * _film->length().get() / (_film->frames_per_second () * 1073741824);
+               double const disk = ((double) _film->j2k_bandwidth() / 8) * _film->length().get() / (_film->frames_per_second () * 1073741824);
                stringstream s;
                s << fixed << setprecision (1) << disk << "Gb";
                _disk_for_frames->SetLabel (std_to_wx (s.str ()));
@@ -91,9 +91,9 @@ PropertiesDialog::frames_already_encoded () const
                return "";
        }
        
-       if (_film->dcp_length()) {
+       if (_film->length()) {
                /* XXX: encoded_frames() should check which frames have been encoded */
-               u << " (" << ((_film->encoded_frames() - _film->dcp_trim_start()) * 100 / _film->dcp_length().get()) << "%)";
+               u << " (" << (_film->encoded_frames() * 100 / _film->length().get()) << "%)";
        }
        return u.str ();
 }
index ab5e01eb060f9c6bf24bd1b21837f53bf5df2a90..ff0c2511803225b6bf951aeb9abc894b4ec0047f 100644 (file)
@@ -1,4 +1,4 @@
-version 1
+version 2
 name fred
 use_dci_name 1
 content 
@@ -12,8 +12,8 @@ bottom_crop 4
 filter pphb
 filter unsharp
 scaler bicubic
-dcp_trim_start 42
-dcp_trim_end 99
+trim_start 42
+trim_end 99
 dcp_ab 1
 use_content_audio 1
 audio_gain 0
@@ -22,6 +22,8 @@ still_duration 10
 with_subtitles 0
 subtitle_offset 0
 subtitle_scale 1
+colour_lut 0
+j2k_bandwidth 200000000
 audio_language 
 subtitle_language 
 territory 
@@ -32,6 +34,7 @@ package_type
 width 0
 height 0
 length 0
+dcp_intrinsic_duration 0
 content_digest 
 external_audio_stream external 0 0
 frames_per_second 0
index 6d4cca060f5d6f6304f0a648ee691a55573c663f..7e1d92e06bf911f8ea0a42557ab4d024125b0665 100644 (file)
@@ -55,8 +55,6 @@ void
 setup_test_config ()
 {
        Config::instance()->set_num_local_encoding_threads (1);
-       Config::instance()->set_colour_lut_index (0);
-       Config::instance()->set_j2k_bandwidth (200000000);
        Config::instance()->set_servers (vector<ServerDescription*> ());
        Config::instance()->set_server_port (61920);
 }
@@ -101,8 +99,8 @@ BOOST_AUTO_TEST_CASE (film_metadata_test)
        f_filters.push_back (Filter::from_id ("pphb"));
        f_filters.push_back (Filter::from_id ("unsharp"));
        f->set_filters (f_filters);
-       f->set_dcp_trim_start (42);
-       f->set_dcp_trim_end (99);
+       f->set_trim_start (42);
+       f->set_trim_end (99);
        f->set_dcp_ab (true);
        f->write_metadata ();
 
@@ -123,8 +121,8 @@ BOOST_AUTO_TEST_CASE (film_metadata_test)
        BOOST_CHECK_EQUAL (g_filters.size(), 2);
        BOOST_CHECK_EQUAL (g_filters.front(), Filter::from_id ("pphb"));
        BOOST_CHECK_EQUAL (g_filters.back(), Filter::from_id ("unsharp"));
-       BOOST_CHECK_EQUAL (g->dcp_trim_start(), 42);
-       BOOST_CHECK_EQUAL (g->dcp_trim_end(), 99);
+       BOOST_CHECK_EQUAL (g->trim_start(), 42);
+       BOOST_CHECK_EQUAL (g->trim_end(), 99);
        BOOST_CHECK_EQUAL (g->dcp_ab(), true);
        
        g->write_metadata ();
@@ -327,7 +325,7 @@ do_remote_encode (shared_ptr<DCPVideoFrame> frame, ServerDescription* descriptio
 
 BOOST_AUTO_TEST_CASE (client_server_test)
 {
-       shared_ptr<Image> image (new SimpleImage (PIX_FMT_RGB24, Size (1998, 1080), false));
+       shared_ptr<Image> image (new SimpleImage (PIX_FMT_RGB24, libdcp::Size (1998, 1080), false));
        uint8_t* p = image->data()[0];
        
        for (int y = 0; y < 1080; ++y) {
@@ -338,7 +336,7 @@ BOOST_AUTO_TEST_CASE (client_server_test)
                }
        }
 
-       shared_ptr<Image> sub_image (new SimpleImage (PIX_FMT_RGBA, Size (100, 200), false));
+       shared_ptr<Image> sub_image (new SimpleImage (PIX_FMT_RGBA, libdcp::Size (100, 200), false));
        p = sub_image->data()[0];
        for (int y = 0; y < 200; ++y) {
                for (int x = 0; x < 100; ++x) {
@@ -357,7 +355,7 @@ BOOST_AUTO_TEST_CASE (client_server_test)
                new DCPVideoFrame (
                        image,
                        subtitle,
-                       Size (1998, 1080),
+                       libdcp::Size (1998, 1080),
                        0,
                        0,
                        1,
@@ -421,7 +419,7 @@ BOOST_AUTO_TEST_CASE (make_dcp_with_range_test)
        film->examine_content ();
        film->set_format (Format::from_nickname ("Flat"));
        film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
-       film->set_dcp_trim_end (42);
+       film->set_trim_end (42);
        film->make_dcp (true);
 
        while (JobManager::instance()->work_to_do() && !JobManager::instance()->errors()) {
@@ -431,6 +429,111 @@ BOOST_AUTO_TEST_CASE (make_dcp_with_range_test)
        BOOST_CHECK_EQUAL (JobManager::instance()->errors(), false);
 }
 
+/* Test the constructor of DCPFrameRate */
+BOOST_AUTO_TEST_CASE (dcp_frame_rate_test)
+{
+       /* Run some tests with a limited range of allowed rates */
+       
+       std::list<int> afr;
+       afr.push_back (24);
+       afr.push_back (25);
+       afr.push_back (30);
+       Config::instance()->set_allowed_dcp_frame_rates (afr);
+
+       DCPFrameRate dfr = DCPFrameRate (60);
+       BOOST_CHECK_EQUAL (dfr.frames_per_second, 30);
+       BOOST_CHECK_EQUAL (dfr.skip, true);
+       BOOST_CHECK_EQUAL (dfr.repeat, false);
+       BOOST_CHECK_EQUAL (dfr.change_speed, false);
+       
+       dfr = DCPFrameRate (50);
+       BOOST_CHECK_EQUAL (dfr.frames_per_second, 25);
+       BOOST_CHECK_EQUAL (dfr.skip, true);
+       BOOST_CHECK_EQUAL (dfr.repeat, false);
+       BOOST_CHECK_EQUAL (dfr.change_speed, false);
+
+       dfr = DCPFrameRate (48);
+       BOOST_CHECK_EQUAL (dfr.frames_per_second, 24);
+       BOOST_CHECK_EQUAL (dfr.skip, true);
+       BOOST_CHECK_EQUAL (dfr.repeat, false);
+       BOOST_CHECK_EQUAL (dfr.change_speed, false);
+       
+       dfr = DCPFrameRate (30);
+       BOOST_CHECK_EQUAL (dfr.skip, false);
+       BOOST_CHECK_EQUAL (dfr.frames_per_second, 30);
+       BOOST_CHECK_EQUAL (dfr.repeat, false);
+       BOOST_CHECK_EQUAL (dfr.change_speed, false);
+
+       dfr = DCPFrameRate (29.97);
+       BOOST_CHECK_EQUAL (dfr.skip, false);
+       BOOST_CHECK_EQUAL (dfr.frames_per_second, 30);
+       BOOST_CHECK_EQUAL (dfr.repeat, false);
+       BOOST_CHECK_EQUAL (dfr.change_speed, true);
+       
+       dfr = DCPFrameRate (25);
+       BOOST_CHECK_EQUAL (dfr.skip, false);
+       BOOST_CHECK_EQUAL (dfr.frames_per_second, 25);
+       BOOST_CHECK_EQUAL (dfr.repeat, false);
+       BOOST_CHECK_EQUAL (dfr.change_speed, false);
+
+       dfr = DCPFrameRate (24);
+       BOOST_CHECK_EQUAL (dfr.skip, false);
+       BOOST_CHECK_EQUAL (dfr.frames_per_second, 24);
+       BOOST_CHECK_EQUAL (dfr.repeat, false);
+       BOOST_CHECK_EQUAL (dfr.change_speed, false);
+
+       dfr = DCPFrameRate (14.5);
+       BOOST_CHECK_EQUAL (dfr.skip, false);
+       BOOST_CHECK_EQUAL (dfr.frames_per_second, 30);
+       BOOST_CHECK_EQUAL (dfr.repeat, true);
+       BOOST_CHECK_EQUAL (dfr.change_speed, true);
+
+       dfr = DCPFrameRate (12.6);
+       BOOST_CHECK_EQUAL (dfr.skip, false);
+       BOOST_CHECK_EQUAL (dfr.frames_per_second, 25);
+       BOOST_CHECK_EQUAL (dfr.repeat, true);
+       BOOST_CHECK_EQUAL (dfr.change_speed, true);
+
+       dfr = DCPFrameRate (12.4);
+       BOOST_CHECK_EQUAL (dfr.skip, false);
+       BOOST_CHECK_EQUAL (dfr.frames_per_second, 25);
+       BOOST_CHECK_EQUAL (dfr.repeat, true);
+       BOOST_CHECK_EQUAL (dfr.change_speed, true);
+
+       dfr = DCPFrameRate (12);
+       BOOST_CHECK_EQUAL (dfr.skip, false);
+       BOOST_CHECK_EQUAL (dfr.frames_per_second, 24);
+       BOOST_CHECK_EQUAL (dfr.repeat, true);
+       BOOST_CHECK_EQUAL (dfr.change_speed, false);
+
+       /* Now add some more rates and see if it will use them
+          in preference to skip/repeat.
+       */
+
+       afr.push_back (48);
+       afr.push_back (50);
+       afr.push_back (60);
+       Config::instance()->set_allowed_dcp_frame_rates (afr);
+
+       dfr = DCPFrameRate (60);
+       BOOST_CHECK_EQUAL (dfr.frames_per_second, 60);
+       BOOST_CHECK_EQUAL (dfr.skip, false);
+       BOOST_CHECK_EQUAL (dfr.repeat, false);
+       BOOST_CHECK_EQUAL (dfr.change_speed, false);
+       
+       dfr = DCPFrameRate (50);
+       BOOST_CHECK_EQUAL (dfr.frames_per_second, 50);
+       BOOST_CHECK_EQUAL (dfr.skip, false);
+       BOOST_CHECK_EQUAL (dfr.repeat, false);
+       BOOST_CHECK_EQUAL (dfr.change_speed, false);
+
+       dfr = DCPFrameRate (48);
+       BOOST_CHECK_EQUAL (dfr.frames_per_second, 48);
+       BOOST_CHECK_EQUAL (dfr.skip, false);
+       BOOST_CHECK_EQUAL (dfr.repeat, false);
+       BOOST_CHECK_EQUAL (dfr.change_speed, false);
+}
+
 BOOST_AUTO_TEST_CASE (audio_sampling_rate_test)
 {
        shared_ptr<Film> f = new_test_film ("audio_sampling_rate_test");
@@ -533,7 +636,7 @@ BOOST_AUTO_TEST_CASE (job_manager_test)
 
 BOOST_AUTO_TEST_CASE (compact_image_test)
 {
-       SimpleImage* s = new SimpleImage (PIX_FMT_RGB24, Size (50, 50), false);
+       SimpleImage* s = new SimpleImage (PIX_FMT_RGB24, libdcp::Size (50, 50), false);
        BOOST_CHECK_EQUAL (s->components(), 1);
        BOOST_CHECK_EQUAL (s->stride()[0], 50 * 3);
        BOOST_CHECK_EQUAL (s->line_size()[0], 50 * 3);
@@ -559,7 +662,7 @@ BOOST_AUTO_TEST_CASE (compact_image_test)
        BOOST_CHECK (t->stride()[0] == s->stride()[0]);
 
        /* assignment operator */
-       SimpleImage* u = new SimpleImage (PIX_FMT_YUV422P, Size (150, 150), true);
+       SimpleImage* u = new SimpleImage (PIX_FMT_YUV422P, libdcp::Size (150, 150), true);
        *u = *s;
        BOOST_CHECK_EQUAL (u->components(), 1);
        BOOST_CHECK_EQUAL (u->stride()[0], 50 * 3);
@@ -582,7 +685,7 @@ BOOST_AUTO_TEST_CASE (compact_image_test)
 
 BOOST_AUTO_TEST_CASE (aligned_image_test)
 {
-       SimpleImage* s = new SimpleImage (PIX_FMT_RGB24, Size (50, 50), true);
+       SimpleImage* s = new SimpleImage (PIX_FMT_RGB24, libdcp::Size (50, 50), true);
        BOOST_CHECK_EQUAL (s->components(), 1);
        /* 160 is 150 aligned to the nearest 32 bytes */
        BOOST_CHECK_EQUAL (s->stride()[0], 160);
@@ -609,7 +712,7 @@ BOOST_AUTO_TEST_CASE (aligned_image_test)
        BOOST_CHECK (t->stride()[0] == s->stride()[0]);
 
        /* assignment operator */
-       SimpleImage* u = new SimpleImage (PIX_FMT_YUV422P, Size (150, 150), false);
+       SimpleImage* u = new SimpleImage (PIX_FMT_YUV422P, libdcp::Size (150, 150), false);
        *u = *s;
        BOOST_CHECK_EQUAL (u->components(), 1);
        BOOST_CHECK_EQUAL (u->stride()[0], 160);
index 97bfac229fcbbf8c5ebbac02ef3096f75b639879..17790cf0d6061947b30b6f50ea3679d369728ac5 100644 (file)
@@ -1,3 +1,3 @@
 id ICON "dvdomatic.ico"
 taskbar_icon ICON "dvdomatic_taskbar.ico"
-#include "wx-2.8/wx/msw/wx.rc"
+#include "wx-2.9/wx/msw/wx.rc"
diff --git a/wrapper/makedcp b/wrapper/makedcp
deleted file mode 100755 (executable)
index 8c3a84e..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-
-dir=`dirname $0`
-LD_LIBRARY_PATH=$dir/../lib:$LD_LIBRARY_PATH $dir/makedcp-bin $*
-
diff --git a/wscript b/wscript
index 657ddc1fafbe8025b9735f45eae07e8edfbb49e7..321a15a82aa9479bfc9e8e87d8c5592d4ab6cc39 100644 (file)
--- a/wscript
+++ b/wscript
@@ -3,7 +3,7 @@ import os
 import sys
 
 APPNAME = 'dvdomatic'
-VERSION = '0.71pre'
+VERSION = '0.71beta2'
 
 def options(opt):
     opt.load('compiler_cxx')
@@ -50,7 +50,7 @@ def configure(conf):
         conf.env.append_value('CXXFLAGS', '-O2')
 
     if not conf.options.static:
-        conf.check_cfg(package = 'libdcp', atleast_version = '0.34', args = '--cflags --libs', uselib_store = 'DCP', mandatory = True)
+        conf.check_cfg(package = 'libdcp', atleast_version = '0.36', args = '--cflags --libs', uselib_store = 'DCP', mandatory = True)
         conf.check_cfg(package = 'libavformat', args = '--cflags --libs', uselib_store = 'AVFORMAT', mandatory = True)
         conf.check_cfg(package = 'libavfilter', args = '--cflags --libs', uselib_store = 'AVFILTER', mandatory = True)
         conf.check_cfg(package = 'libavcodec', args = '--cflags --libs', uselib_store = 'AVCODEC', mandatory = True)