"Fossies" - the Fresh Open Source Software Archive

Member "quicktime4linux-2.3/smhd.c" (9 Jan 2007, 1131 Bytes) of package /linux/privat/old/quicktime4linux-2.3-src.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #include "funcprotos.h"
    2 #include "quicktime.h"
    3 
    4 
    5 
    6 
    7 void quicktime_smhd_init(quicktime_smhd_t *smhd)
    8 {
    9     smhd->version = 0;
   10     smhd->flags = 0;
   11     smhd->balance = 0;
   12     smhd->reserved = 0;
   13 }
   14 
   15 void quicktime_smhd_delete(quicktime_smhd_t *smhd)
   16 {
   17 }
   18 
   19 void quicktime_smhd_dump(quicktime_smhd_t *smhd)
   20 {
   21     printf("    sound media header\n");
   22     printf("     version %d\n", smhd->version);
   23     printf("     flags %d\n", smhd->flags);
   24     printf("     balance %d\n", smhd->balance);
   25     printf("     reserved %d\n", smhd->reserved);
   26 }
   27 
   28 void quicktime_read_smhd(quicktime_t *file, quicktime_smhd_t *smhd)
   29 {
   30     smhd->version = quicktime_read_char(file);
   31     smhd->flags = quicktime_read_int24(file);
   32     smhd->balance = quicktime_read_int16(file);
   33     smhd->reserved = quicktime_read_int16(file);
   34 }
   35 
   36 void quicktime_write_smhd(quicktime_t *file, quicktime_smhd_t *smhd)
   37 {
   38     quicktime_atom_t atom;
   39     quicktime_atom_write_header(file, &atom, "smhd");
   40 
   41     quicktime_write_char(file, smhd->version);
   42     quicktime_write_int24(file, smhd->flags);
   43     quicktime_write_int16(file, smhd->balance);
   44     quicktime_write_int16(file, smhd->reserved);
   45 
   46     quicktime_atom_write_footer(file, &atom);
   47 }