remove old quicktime, replaced with current ffmpeg
[goodguy/history.git] / cinelerra-5.0 / cinelerra / libdv.C
similarity index 92%
rename from cinelerra-5.0/quicktime/libdv.c
rename to cinelerra-5.0/cinelerra/libdv.C
index c3ac4907d63884c68fb856c90dc393e55c7731d9..90c9f6efefbabd99fca21a4da8792e4bfcd408be 100644 (file)
@@ -2,7 +2,7 @@
  * Grabbing algorithm is from dvgrab
  */
 
-#include "colormodels.h"
+#include "bccmodels.h"
 #include "libdv.h"
 
 #include <pthread.h>
@@ -23,7 +23,7 @@ static pthread_mutex_t dv_lock;
 
 dv_t* dv_new()
 {
-       dv_t *dv = calloc(1, sizeof(dv_t));
+       dv_t *dv = (dv_t *)calloc(1, sizeof(dv_t));
        if(!dv_initted)
        {
                pthread_mutexattr_t attr;
@@ -121,7 +121,7 @@ int dv_read_video(dv_t *dv,
        {
                unsigned char *temp_rows[DV_HEIGHT];
                if(!dv->temp_video)
-                       dv->temp_video = calloc(1, DV_WIDTH * DV_HEIGHT * 2);
+                       dv->temp_video = (unsigned char *)calloc(1, DV_WIDTH * DV_HEIGHT * 2);
 
                for(i = 0; i < DV_HEIGHT; i++)
                {
@@ -137,7 +137,7 @@ int dv_read_video(dv_t *dv,
                        pitches);
 //printf("dv_read_video 4\n");
 
-               cmodel_transfer(output_rows, 
+               BC_CModels::transfer(output_rows, 
                        temp_rows,
                        output_rows[0],
                        output_rows[1],
@@ -186,7 +186,7 @@ int dv_read_audio(dv_t *dv,
        if(!dv->temp_audio[0])
        {
                for(i = 0; i < 4; i++)
-                       dv->temp_audio[i] = calloc(1, sizeof(int16_t) * MAX_AUDIO_SAMPLES);
+                       dv->temp_audio[i] = (int16_t*)calloc(1, sizeof(int16_t) * MAX_AUDIO_SAMPLES);
        }
 
        switch(size) {
@@ -231,7 +231,7 @@ void dv_write_video(dv_t *dv,
                int color_model,
                int norm)
 {
-       dv_color_space_t encode_dv_colormodel = 0;
+       int encode_dv_colormodel = 0;
 
        if(!dv->encoder)
        {
@@ -261,7 +261,7 @@ void dv_write_video(dv_t *dv,
        
        dv_encode_full_frame( dv->encoder,
                input_rows, 
-               encode_dv_colormodel, 
+               (dv_color_space_t)encode_dv_colormodel, 
                data );
 }
 
@@ -295,7 +295,7 @@ int dv_write_audio(dv_t *dv,
        if(!dv->temp_audio[0])
        {
                for(i = 0; i < 4; i++)
-                       dv->temp_audio[i] = calloc(1, sizeof(int16_t) * MAX_AUDIO_SAMPLES);
+                       dv->temp_audio[i] = (int16_t*)calloc(1, sizeof(int16_t) * MAX_AUDIO_SAMPLES);
        }
 
        for(i = 0; i < channels; i++)