merging status on feature/elegant_transcoder as a checkpoint.

Squashed commit of the following:

commit 1009bd745ec5c5b0c4c1dfde6146095e6885f9fc
Author: Art Clarke <art.clarke@gmail.com>
Date:   Thu Aug 21 05:58:02 2014 -0700

    add a test to try to repro issue #27

commit 10cb830a48920c16ca1e293cfe4f54ec7b5313a3
Author: Art Clarke <art.clarke@gmail.com>
Date:   Wed Aug 20 16:24:41 2014 -0700

    adjust timestamps after filtering, not before

commit f6370ec22e043e0186ff7d6732d2847ca5cf06e3
Author: Art Clarke <art.clarke@gmail.com>
Date:   Tue Aug 19 08:10:40 2014 -0700

    make sure we have enough audio in a frame before we try to encode.

    For this checkin, the testfile in the encoder has correct audio. video
    is a little off -- but this is likely to do the video path (given that
    the output video has an incorrect starting frame or two). That's next
    to debug.

commit 48aa8687de1aa5a5a17b68b13babb21bfe3a060f
Author: Art Clarke <art.clarke@gmail.com>
Date:   Mon Aug 18 18:58:08 2014 -0700

    fix linux gcc identified bug: always true test

commit 343d8b2a5cedf9faadc692a52b6de904b1b4682f
Author: Art Clarke <art.clarke@gmail.com>
Date:   Mon Aug 18 18:55:08 2014 -0700

    include inttypes.h correctly and modify print strings to be portable

commit 3de21c5dda1eaf680b10f6773c81479f65009e41
Author: Art Clarke <art.clarke@gmail.com>
Date:   Sat Aug 16 11:08:13 2014 -0700

    fix bug that shows up on latest mavericks with -n on echo from shells

commit 2ca8a907975953ee037b2289dd4815f84af442df
Author: Art Clarke <art.clarke@gmail.com>
Date:   Sat Aug 16 11:00:03 2014 -0700

    fix license to CORRECTLY reflect AGPL (the top-level license was AGPL
    originally).

commit 4b3fa3a643b485b13a1d127cde5222220db7257b
Author: Art Clarke <art.clarke@gmail.com>
Date:   Sat Aug 16 09:28:14 2014 -0700

    start trying filter graphs and fix a memory leak in encodeVideo

commit 8fa6c2f0565325a7b8b282725db830e83d955c91
Author: Art Clarke <art.clarke@gmail.com>
Date:   Sat Aug 16 08:30:05 2014 -0700

    revert accidentally checked in copy of a test

commit 8bd21cb802d1d75fb3da97aca6ad923aabd78b7b
Author: Art Clarke <art.clarke@gmail.com>
Date:   Sat Aug 16 08:27:25 2014 -0700

    add swig generated updates

commit b5d6f3556318d5877a583f927244ecaae0994f84
Author: Art Clarke <art.clarke@gmail.com>
Date:   Sat Aug 16 08:26:03 2014 -0700

    change filtering to allow (1) fixed audio frame sizes to be returned and
    (2) EOF handling and EAGAIN handling to be correct. Add tests for both.

commit 4a1b77485b612b6d3eb7208d04eff0e199ee3672
Author: Art Clarke <art.clarke@gmail.com>
Date:   Sat Aug 16 08:24:27 2014 -0700

    Attempt to fix SWIG generation problem. Not yet working.

commit 973c016ed0de50c12222049048d3be1be8058ea5
Author: Art Clarke <art.clarke@gmail.com>
Date:   Sat Aug 16 08:23:29 2014 -0700

    change EAGAIN handling so we return 0 with an incomplete packet.

commit fc1fc283e5a1ed0d12b8d7fb032b040e678cf3fd
Author: Art Clarke <art.clarke@gmail.com>
Date:   Sat Aug 16 08:22:58 2014 -0700

    revise comments

commit bc8c072767f38f5165ab629522bb46a3bb7e06a9
Author: Art Clarke <art.clarke@gmail.com>
Date:   Sat Aug 16 07:00:38 2014 -0700

    fix comments to reflect that we now throw exceptions for interruptions

commit 895ae13c83c8b49ee21259e147acdbe5b6cc622d
Author: Art Clarke <art.clarke@gmail.com>
Date:   Wed Aug 13 08:21:30 2014 -0700

    merge MediaAudioImpl into MediaAudio to aid debugging; add signatures (commented out) for pop/push on audio buffers

commit e6f4c25e8ab8a9640828ebe261c2b3e9360ece76
Author: Art Clarke <art.clarke@gmail.com>
Date:   Wed Aug 13 07:45:05 2014 -0700

    add an error check for incorrect frame size; this will fail some tests but that's the current bug to fix

commit b18add1ceafe4166b9bdd0d3ce813df827d5f368
Author: Art Clarke <art.clarke@gmail.com>
Date:   Sun Aug 10 20:29:02 2014 -0700

    - do not autoconvert timestamps when timebases change; very error prone.
    - fix off by one error on dropframe calc

commit d1fc8705d13e6a7da8e6a3bc40e44cb6552a260e
Author: Art Clarke <art.clarke@gmail.com>
Date:   Sun Aug 10 19:43:50 2014 -0700

    set timestamp after convering timebase

commit 30ddf44fa88e7d376b23b599938ea64b97e9a18a
Author: Art Clarke <art.clarke@gmail.com>
Date:   Sun Aug 10 18:05:43 2014 -0700

    copy completeness and timebase

commit 187e3d35c670153825378e3fcbf4d97a4bc15922
Author: Art Clarke <art.clarke@gmail.com>
Date:   Sun Aug 10 17:52:47 2014 -0700

    more work on encoder. timestamps are still messed up, but getting
    closer.

commit 0fd583796be165afee6197d6d1831c996aa02fab
Author: Art Clarke <art.clarke@gmail.com>
Date:   Wed Aug 6 21:00:18 2014 -0700

    Add Media::logMetadata, and provide trace logging in debug builds for the major workhorse objects

commit c3f84d050e53dafdc2c6f52ab0160443ff7e0baa
Author: Art Clarke <art.clarke@gmail.com>
Date:   Wed Aug 6 18:28:32 2014 -0700

    add Media::logMetadata to make it easier to output media packets for the inevitable timestamp debugging that now comes

commit 7a8e0467bd6571857b11efc0b870494ec0412a9f
Author: Art Clarke <art.clarke@gmail.com>
Date:   Tue Aug 5 20:42:44 2014 -0700

    more debugging

commit c888dcbc7a4a1f7591b5b01afb698c1cf43d2740
Author: Art Clarke <art.clarke@gmail.com>
Date:   Tue Aug 5 16:56:58 2014 -0700

    add object specific logger names to make it easier to debug each object with logging from Java

commit 840b1f46c422e2f2513a1ab4a39fb223cd0628c4
Author: Art Clarke <art.clarke@gmail.com>
Date:   Tue Aug 5 08:58:30 2014 -0700

    enable trace logging and clean up an allocation inefficiency highlighted as a result

commit af87b045c0a78062e2b7335830560ae3eca7d00b
Author: Art Clarke <art.clarke@gmail.com>
Date:   Mon Aug 4 20:46:45 2014 -0700

    make tracing logging work in debug builds

commit 117739cbcfbd023e4818fa323d4b6098c0ffd341
Author: Art Clarke <art.clarke@gmail.com>
Date:   Mon Aug 4 20:16:41 2014 -0700

    more work on the elegant transcoder.
    - fix problem where -debug builds were not staged (Fix issue #28).
    - make packet stream index default to -1 until explicitly set.
    - make muxer look for right stream by checking packet encoders if a
      stream index is not set.
    - Fix a bug where we throw an exception if a codec id was
      AV_CODEC_ID_NONE on a decoder (can happen with some data streams).

commit 3b4a7d443c8bd68d8b4690564ec0c4ab4f807798
Author: Art Clarke <art.clarke@gmail.com>
Date:   Fri Aug 1 08:42:28 2014 -0700

    minor formatting

commit 92fc93f5a9901058b433500c2d583e4b331c5d07
Author: Art Clarke <art.clarke@gmail.com>
Date:   Fri Aug 1 08:41:27 2014 -0700

    and fix bug where when flushing audio encoders we passed crap audio into
    encode due to not correctly checking completeness of the resampler
    audio.

commit b4f3bf17909b4b279bb79ca32c91900ae968dc57
Author: Art Clarke <art.clarke@gmail.com>
Date:   Fri Aug 1 08:26:09 2014 -0700

    fix bug where encoders sometimes need larger packets by reseting
    the output packet each time through the loop. This will result in the
    Ffmpeg encode allocating a new packet of the correct size.

commit 8ce040303ad7d8bb1231e3746585f96477fb40b7
Author: Art Clarke <art.clarke@gmail.com>
Date:   Wed Jul 30 20:12:44 2014 -0700

    fix bug when null is passed to encode methods.

commit 7cff88d1be3dae4fb9ad059c5031017fdc2b8530
Author: Art Clarke <art.clarke@gmail.com>
Date:   Wed Jul 30 19:50:13 2014 -0700

    continued work on the transcoder.
    resamplers are a class hierarchy now, which makes the encode and decode
     loops for audio and video possible with super-classes that do not
     distinguish between media types.
    Or it would, if there weren't encoding bugs still :)