1. 23 Oct, 2012 1 commit
  2. 20 Oct, 2012 2 commits
    • Timothy B. Terriberry's avatar
      Re-do abstract stream reader API. · e2d7b266
      Timothy B. Terriberry authored
      This changes op_read_func to
      a) Take a single byte count to read instead of an "item" count
          (which the http backend couldn't properly support anyway).
      b) Use integers for buffer sizes to avoid having to worry about
          sign differences and whether size_t is larger or smaller than
          opus_int64, etc.
      c) Return an explicit error code (instead of using errno like
          fread).
         We had already eliminated the use of errno, but we did it by
          treating read errors and EOF identically in all cases.
         This was preventing us from reporting SSL truncation attacks
          from the https backend.
         The https backend now properly reports such errors.
      
      This commit also fixes a bug introduced in 9b57b0c2, where we
       accidentally started passing absolute offsets to the _boundary
       parameter of op_get_next_page() instead of relative offsets.
      We now use absolute offsets in all places, as it is the simpler
       choice.
      This matters now, because the error reported when encountering EOF
       before hitting the _boundary is no longer suppressed (but instead
       reported as OP_EBADLINK).
      
      Finally, it removes the op_page_seek() function.
      Except for the time needed to decode forward after seeking, this
       function was identical in performance to op_pcm_seek(), and Opus
       requires decoding 80 ms of data after seek anyway, so the relative
       benefit is much smaller than with Vorbis.
      A survey of open-source code using libvorbisfile showed that the
       only usages of ov_page_seek() in the wild were calling it to seek
       to the start of the stream, for which op_pcm_seek() already has a
       special case that makes it just as fast.
      
      The documentation was also updated to describe all of these chanes.
      
      This is an incompatible API change.
      e2d7b266
    • Timothy B. Terriberry's avatar
      Make the URL API more extensible. · 800be8c0
      Timothy B. Terriberry authored
      Right now we have no way to add any more parameters beyond a set of
       basic binary flags.
      This unifies op_url_stream_create() and
       op_url_stream_create_with_proxy() into a single function that
       takes a variable-length list of arguments, which can be extended
       in the future to include more options of any type.
      
      This is an incompatible API change.
      800be8c0
  3. 01 Oct, 2012 3 commits
    • Timothy B. Terriberry's avatar
      Multiple small fixes. · 6c56a973
      Timothy B. Terriberry authored
      * Tags were being freed even if not initialized if
         op_fetch_headers() failed on the first link.
        The logic for handling completely empty links would leak, also.
      * Ignore fragment identifiers in http URLs instead of rejecting
         them.
      * Get the current link in seeking_example's verify_seek when
         op_read_native() fails to return it for us.
      6c56a973
    • Timothy B. Terriberry's avatar
      Add status output to opusfile_example. · 8e6d4a76
      Timothy B. Terriberry authored
      This displays the current raw position, PCM position, and
       instantaneous bitrate once per second of output.
      This is useful when testing against long-running streams.
      8e6d4a76
    • Timothy B. Terriberry's avatar
      Make seeking_example continue after failures. · 643aed3d
      Timothy B. Terriberry authored
      This makes it more useful for testing invalid files, where the goal
       is merely not to crash, assert, or trip valgrind warnings.
      643aed3d
  4. 29 Sep, 2012 2 commits
  5. 24 Sep, 2012 1 commit
  6. 23 Sep, 2012 1 commit
  7. 22 Sep, 2012 1 commit
  8. 21 Sep, 2012 1 commit
  9. 19 Sep, 2012 1 commit
    • Timothy B. Terriberry's avatar
      A couple of seeking_example improvements. · efbca3a1
      Timothy B. Terriberry authored
      1) Check for allocation failure and fall back to merely scanning a
       file for consistent timestamps instead of loading it to RAM.
      2) Report holes, but do not quit scanning/loading unless they cause
       a discontinuity in the timestamps.
      efbca3a1
  10. 17 Sep, 2012 1 commit
    • Ralph Giles's avatar
      Move opusfile.h up a level. · 3f18c55f
      Ralph Giles authored
      This matches the convention used by opus itself, where
      headers are included without a prefix, and the build
      must do -I/path/to/opus to find the appropriate versions.
      3f18c55f
  11. 16 Sep, 2012 1 commit