Mercurial > mplayer.hg
comparison dec_video.c @ 1547:4b0046db8e64
alloc frame buffer for directshow codec - requires for avifile sync
author | arpi |
---|---|
date | Thu, 16 Aug 2001 01:04:28 +0000 |
parents | 0e9c29538a86 |
children | 5c7760aa4f94 |
comparison
equal
deleted
inserted
replaced
1546:d4cd08b06665 | 1547:4b0046db8e64 |
---|---|
169 fprintf(stderr,"MPlayer was compiled WITHOUT directshow support!\n"); | 169 fprintf(stderr,"MPlayer was compiled WITHOUT directshow support!\n"); |
170 return 0; | 170 return 0; |
171 // GUI_MSG( mplCompileWithoutDSSupport ) | 171 // GUI_MSG( mplCompileWithoutDSSupport ) |
172 // exit(1); | 172 // exit(1); |
173 #else | 173 #else |
174 int bpp; | |
174 if(DS_VideoDecoder_Open(sh_video->codec->dll,&sh_video->codec->guid, sh_video->bih, 0, &sh_video->our_out_buffer)){ | 175 if(DS_VideoDecoder_Open(sh_video->codec->dll,&sh_video->codec->guid, sh_video->bih, 0, &sh_video->our_out_buffer)){ |
175 // if(DS_VideoDecoder_Open(sh_video->codec->dll,&sh_video->codec->guid, sh_video->bih, 0, NULL)){ | 176 // if(DS_VideoDecoder_Open(sh_video->codec->dll,&sh_video->codec->guid, sh_video->bih, 0, NULL)){ |
176 printf("ERROR: Couldn't open required DirectShow codec: %s\n",sh_video->codec->dll); | 177 printf("ERROR: Couldn't open required DirectShow codec: %s\n",sh_video->codec->dll); |
177 printf("Maybe you forget to upgrade your win32 codecs?? It's time to download the new\n"); | 178 printf("Maybe you forget to upgrade your win32 codecs?? It's time to download the new\n"); |
178 printf("package from: ftp://thot.banki.hu/esp-team/linux/MPlayer/w32codec.zip !\n"); | 179 printf("package from: ftp://thot.banki.hu/esp-team/linux/MPlayer/w32codec.zip !\n"); |
190 } | 191 } |
191 | 192 |
192 switch(out_fmt){ | 193 switch(out_fmt){ |
193 case IMGFMT_YUY2: | 194 case IMGFMT_YUY2: |
194 case IMGFMT_UYVY: | 195 case IMGFMT_UYVY: |
196 bpp=16; | |
195 DS_VideoDecoder_SetDestFmt(16,out_fmt);break; // packed YUV | 197 DS_VideoDecoder_SetDestFmt(16,out_fmt);break; // packed YUV |
196 case IMGFMT_YV12: | 198 case IMGFMT_YV12: |
197 case IMGFMT_I420: | 199 case IMGFMT_I420: |
198 case IMGFMT_IYUV: | 200 case IMGFMT_IYUV: |
201 bpp=12; | |
199 DS_VideoDecoder_SetDestFmt(12,out_fmt);break; // planar YUV | 202 DS_VideoDecoder_SetDestFmt(12,out_fmt);break; // planar YUV |
200 default: | 203 default: |
204 bpp=((out_fmt&255)+7)&(~7); | |
201 DS_VideoDecoder_SetDestFmt(out_fmt&255,0); // RGB/BGR | 205 DS_VideoDecoder_SetDestFmt(out_fmt&255,0); // RGB/BGR |
202 } | 206 } |
207 | |
208 sh_video->our_out_buffer = shmem_alloc(sh_video->disp_w*sh_video->disp_h*bpp/8); // FIXME!!! | |
203 | 209 |
204 DS_VideoDecoder_Start(); | 210 DS_VideoDecoder_Start(); |
205 | 211 |
206 DS_SetAttr_DivX("Quality",divx_quality); | 212 DS_SetAttr_DivX("Quality",divx_quality); |
207 // printf("DivX setting result = %d\n", DS_SetAttr_DivX("Quality",divx_quality) ); | 213 // printf("DivX setting result = %d\n", DS_SetAttr_DivX("Quality",divx_quality) ); |