66
67
mp_msg(MSGT_WIN32,MSGL_ERR,"ICOpen failed! unknown codec / wrong parameters?\n");
69
printf("HIC: %x\n", encoder_hic);
70
mp_msg(MSGT_WIN32,MSGL_INFO,"HIC: %x\n", encoder_hic);
75
76
ret = ICGetInfo(encoder_hic, &icinfo, sizeof(ICINFO));
76
printf("%ld - %ld - %d\n", ret, icinfo.dwSize, sizeof(ICINFO));
77
printf("Compressor type: %.4lx\n", icinfo.fccType);
78
printf("Compressor subtype: %.4lx\n", icinfo.fccHandler);
79
printf("Compressor flags: %lu, version %lu, ICM version: %lu\n",
77
mp_msg(MSGT_WIN32,MSGL_INFO,"%ld - %ld - %d\n", ret, icinfo.dwSize, sizeof(ICINFO));
78
mp_msg(MSGT_WIN32,MSGL_INFO,MSGTR_MPCODECS_CompressorType, icinfo.fccType);
79
mp_msg(MSGT_WIN32,MSGL_INFO,MSGTR_MPCODECS_CompressorSubtype, icinfo.fccHandler);
80
mp_msg(MSGT_WIN32,MSGL_INFO,MSGTR_MPCODECS_CompressorFlags,
80
81
icinfo.dwFlags, icinfo.dwVersion, icinfo.dwVersionICM);
81
82
//printf("Compressor name: %s\n", icinfo.szName);
82
83
//printf("Compressor description: %s\n", icinfo.szDescription);
85
mp_msg(MSGT_WIN32,MSGL_INFO,MSGTR_MPCODECS_Flags);
85
86
if (icinfo.dwFlags & VIDCF_QUALITY)
87
mp_msg(MSGT_WIN32,MSGL_INFO,MSGTR_MPCODECS_Quality);
87
88
if (icinfo.dwFlags & VIDCF_FASTTEMPORALD)
88
printf(" fast-decompr");
89
mp_msg(MSGT_WIN32,MSGL_INFO," fast-decompr");
89
90
if (icinfo.dwFlags & VIDCF_QUALITYTIME)
90
printf(" temp-quality");
91
mp_msg(MSGT_WIN32,MSGL_INFO," temp-quality");
92
mp_msg(MSGT_WIN32,MSGL_INFO,"\n");
95
96
temp_len = ICCompressGetFormatSize(encoder_hic, input_bih);
96
printf("ICCompressGetFormatSize ret: %d\n", temp_len);
97
mp_msg(MSGT_WIN32,MSGL_INFO,"ICCompressGetFormatSize ret: %d\n", temp_len);
98
99
if (temp_len < sizeof(BITMAPINFOHEADER)) temp_len=sizeof(BITMAPINFOHEADER);
126
127
for(i=sizeof(output_bih);i<temp_len;i++) mp_msg(MSGT_WIN32, MSGL_DBG2, "%02X ",temp[i]);
130
// if( mp_msg_test(MSGT_WIN32,MSGL_V) ) {
130
131
printf("Starting compression:\n");
131
132
printf(" Input format:\n");
132
133
printf(" biSize %d\n", input_bih->biSize);
161
162
mp_msg(MSGT_WIN32,MSGL_ERR,"ICCompressBegin failed: Error %d\n", (int)ret);
164
mp_msg(MSGT_WIN32,MSGL_V,"ICCompressBegin OK\n");
166
printf(" Output format after query/begin:\n");
167
printf(" biSize %d\n", output_bih->biSize);
168
printf(" biWidth %d\n", output_bih->biWidth);
169
printf(" biHeight %d\n", output_bih->biHeight);
170
printf(" biPlanes %d\n", output_bih->biPlanes);
171
printf(" biBitCount %d\n", output_bih->biBitCount);
172
printf(" biCompression 0x%x ('%.4s')\n", output_bih->biCompression, (char *)&output_bih->biCompression);
173
printf(" biSizeImage %d\n", output_bih->biSizeImage);
165
mp_msg(MSGT_WIN32,MSGL_V,"ICCompressBegin OK\n");
166
mp_msg(MSGT_WIN32,MSGL_INFO," Output format after query/begin:\n");
167
mp_msg(MSGT_WIN32,MSGL_INFO," biSize %d\n", output_bih->biSize);
168
mp_msg(MSGT_WIN32,MSGL_INFO," biWidth %d\n", output_bih->biWidth);
169
mp_msg(MSGT_WIN32,MSGL_INFO," biHeight %d\n", output_bih->biHeight);
170
mp_msg(MSGT_WIN32,MSGL_INFO," biPlanes %d\n", output_bih->biPlanes);
171
mp_msg(MSGT_WIN32,MSGL_INFO," biBitCount %d\n", output_bih->biBitCount);
172
mp_msg(MSGT_WIN32,MSGL_INFO," biCompression 0x%x ('%.4s')\n", output_bih->biCompression, (char *)&output_bih->biCompression);
173
mp_msg(MSGT_WIN32,MSGL_INFO," biSizeImage %d\n", output_bih->biSizeImage);
175
175
encoder_buf_size=input_bih->biSizeImage;
176
176
encoder_buf=malloc(encoder_buf_size);
241
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
241
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
244
244
// flip_upside_down(vo_image_ptr,vo_image_ptr,3*vo_w,vo_h); // dirty hack
245
245
ret=vfw_encode_frame(mux_v->bih, mux_v->buffer, vfw_bih, mpi->planes[0], &flags, 10000);
246
muxer_write_chunk(mux_v,mux_v->bih->biSizeImage,flags);
246
muxer_write_chunk(mux_v,mux_v->bih->biSizeImage,flags, pts, pts);