Skip to content
Snippets Groups Projects
  1. Mar 07, 2025
    • Petter Reinholdtsen's avatar
      Dropped passing dummy variable to select() in example, use NULL instead. · 070b5c40
      Petter Reinholdtsen authored
      Both POSIX, the Linux documentation and UNIX Network Programming volume 1
      by Stephens state that NULL is accepted.
      
      This avoid the following compiler message:
      
      ../../examples/player_example.c: In function ‘main’:
      ../../examples/player_example.c:839:22: warning: passing argument 2 to ‘restrict’-qualified parameter aliases with argument 4 [-Werror=restrict]
        839 |           n=select(n,&empty,&writefs,&empty,&timeout);
            |                      ^~~~~~          ~~~~~~
      ../../examples/player_example.c:843:18: warning: passing argument 2 to ‘restrict’-qualified parameter aliases with argument 4 [-Werror=restrict]
        843 |         select(n,&empty,&writefs,&empty,NULL);
            |                  ^~~~~~          ~~~~~~
      070b5c40
  2. Feb 25, 2020
  3. Nov 28, 2016
    • Ralph Giles's avatar
      Initialize global pointers in examples. · 91203fdf
      Ralph Giles authored
      Global pointers are initialized to zero in C, but not in C++.
      
      Add an explicit initializer to reduce confusion and avoid
      bugs when the example code is copied into C++ applications.
      
      Based on a patch by Alex Houghton <houghton1411@aol.com>.
      91203fdf
  4. Jul 23, 2014
  5. Jun 10, 2014
  6. Feb 17, 2014
  7. Feb 11, 2014
  8. Mar 02, 2012
  9. May 20, 2011
  10. Feb 20, 2011
    • Ralph Giles's avatar
      TIFFReadRGBAImage doesn't actually return errors unless you ask it to. · bdc4204e
      Ralph Giles authored
      The final argument to TIFFReadRGBAImage is 'stopOnError'. That is,
      if it's not true then the function will return success even if
      loading the actual image data failed. As such, copying the example
      code out of the documentation wasn't really what we wanted.
      
      svn path=/trunk/theora/; revision=17856
      bdc4204e
  11. Feb 15, 2011
    • Ralph Giles's avatar
      Add a tiff2theora example. · 468ef6fc
      Ralph Giles authored
      This is a modified version of png2theora, using libtiff
      instead of libpng to read a sequence of tiff image files
      and convert them to an Ogg Theora video.
      
      Originally added because the Sintel film project was
      giving us tiff frames and waiting for conversion to
      png before encoding was tedious. In fact, it nearly
      took longer than creating this program.
      
      svn path=/trunk/theora/; revision=17844
      468ef6fc
    • Ralph Giles's avatar
      Remove trailing whitespace from some examples. · cc89c1d2
      Ralph Giles authored
      svn path=/trunk/theora/; revision=17843
      cc89c1d2
  12. Feb 09, 2011
    • Ralph Giles's avatar
      Print summary timing information at the end of encoder_example runs. · 67fe6b35
      Ralph Giles authored
      This is helpful for casual benchmarking and performance comparision.
      We use the very portable time.h clock() call and the beginning and
      end of the main function and calculate the average rate in millions
      of pixels per second and fraction of realtime. Unfortunately clock()
      isn't accurate enough to be useful for per-frame statistics.
      
      svn path=/trunk/theora/; revision=17820
      67fe6b35
  13. Dec 16, 2010
    • Ralph Giles's avatar
      Update the libtheora_info example for the previous commit. · 54290cc6
      Ralph Giles authored
      This example program allocates a minimal encoder context so
      it can query settings through th_encode_ctl(). As of r17760
      setting the framerate to a non-zero/zero value is required.
      
      svn path=/trunk/theora/; revision=17761
      54290cc6
    • Ralph Giles's avatar
      Reject th_info structs with a zero in the frame rate rational. · ef3c399f
      Ralph Giles authored
      The specification says that the frame rate numerator and
      denominator MUST both be greater than zero. This wasn't
      checked as part of the structure validation code, and in
      fact passing a zero value here caused a segfault.
      
      The code now checks for this in oc_state_init() and returns
      TH_EINVAL, which is causes th_encode_alloc() and oc_decode_alloc()
      to return NULL.
      
      A check for that NULL return is also added to encoder_example.c
      to show that it may fail when an invalid th_info parameter is
      passed.
      
      svn path=/trunk/theora/; revision=17760
      ef3c399f
  14. Dec 09, 2010
    • Ralph Giles's avatar
      Also silence the input file summary lines with -q. · 3e1e76b9
      Ralph Giles authored
      I'd found these helpful for script debugging, but really it's
      better for scripts to print their own version of this information.
      The -q option should really mean no non-error output.
      
      svn path=/trunk/theora/; revision=17744
      3e1e76b9
  15. Dec 02, 2010
  16. Nov 25, 2010
  17. Nov 18, 2010
  18. Oct 08, 2010
  19. Sep 23, 2010
Loading