"Fossies" - the Fresh Open Source Software Archive

Member "quicktime4linux-2.3/edts.c" (9 Jan 2007, 1185 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 void quicktime_edts_init(quicktime_edts_t *edts)
    5 {
    6     quicktime_elst_init(&(edts->elst));
    7 }
    8 
    9 void quicktime_edts_delete(quicktime_edts_t *edts)
   10 {
   11     quicktime_elst_delete(&(edts->elst));
   12 }
   13 
   14 void quicktime_edts_init_table(quicktime_edts_t *edts)
   15 {
   16     quicktime_elst_init_all(&(edts->elst));
   17 }
   18 
   19 void quicktime_read_edts(quicktime_t *file, quicktime_edts_t *edts, quicktime_atom_t *edts_atom)
   20 {
   21     quicktime_atom_t leaf_atom;
   22 
   23     do
   24     {
   25         quicktime_atom_read_header(file, &leaf_atom);
   26 //printf("quicktime_read_edts %llx %llx\n", quicktime_position(file), leaf_atom.end);
   27         if(quicktime_atom_is(&leaf_atom, "elst"))
   28         { quicktime_read_elst(file, &(edts->elst)); }
   29         else
   30             quicktime_atom_skip(file, &leaf_atom);
   31     }while(quicktime_position(file) < edts_atom->end);
   32 }
   33 
   34 void quicktime_edts_dump(quicktime_edts_t *edts)
   35 {
   36     printf("  edit atom (edts)\n");
   37     quicktime_elst_dump(&(edts->elst));
   38 }
   39 
   40 void quicktime_write_edts(quicktime_t *file, quicktime_edts_t *edts, long duration)
   41 {
   42     quicktime_atom_t atom;
   43     quicktime_atom_write_header(file, &atom, "edts");
   44     quicktime_write_elst(file, &(edts->elst), duration);
   45     quicktime_atom_write_footer(file, &atom);
   46 }