"Fossies" - the Fresh Open Source Software Archive

Member "quicktime4linux-2.3/frma.c" (9 Jan 2007, 1097 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 void quicktime_delete_frma(quicktime_frma_t *frma)
    6 {
    7     if(frma->data) free(frma->data);
    8 }
    9 
   10 int quicktime_read_frma(quicktime_t *file, 
   11     quicktime_atom_t *parent_atom,
   12     quicktime_atom_t *leaf_atom,
   13     quicktime_frma_t *frma)
   14 {
   15     frma->data_size = parent_atom->size - 12;
   16     frma->data = calloc(1, frma->data_size + 1024);
   17     quicktime_set_position(file, parent_atom->start + 12);
   18     quicktime_read_data(file, 
   19         frma->data, 
   20         frma->data_size);
   21 /*
   22  * printf("quicktime_read_frma %02x %02x %02x %02x %02x %02x %02x %02x\n",
   23  * frma->data[0], 
   24  * frma->data[1], 
   25  * frma->data[2], 
   26  * frma->data[3], 
   27  * frma->data[4], 
   28  * frma->data[5], 
   29  * frma->data[6], 
   30  * frma->data[7]);
   31  */
   32     quicktime_atom_skip(file, parent_atom);
   33     return 0;
   34 }
   35 
   36 void quicktime_frma_dump(quicktime_frma_t *frma)
   37 {
   38     int i;
   39     if(frma->data_size)
   40     {
   41         printf("       QDM2 description\n");
   42         printf("        data_size=0x%x\n", frma->data_size);
   43         printf("        data=");
   44         for(i = 0; i < frma->data_size; i++)
   45         {
   46             printf("0x%02x ", (unsigned char)frma->data[i]);
   47         }
   48         printf("\n");
   49     }
   50 }
   51