summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-07-05 20:54:37 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-07-05 20:54:37 +0000
commit52ae732957764b953b3b2491afda4376ce595c43 (patch)
tree9d227674f6c3467f1a9ae60bce88ab29a37265f8
parentd84e2d680f143bfe1fbbf987f5a9bdd5318284ed (diff)
downloadxine-lib-52ae732957764b953b3b2491afda4376ce595c43.tar.gz
xine-lib-52ae732957764b953b3b2491afda4376ce595c43.tar.bz2
- win32 bugfixes
- asf bugfixes - ffmpeg supporting ms iso mpeg4 - softsync fix by Bill Fink CVS patchset: 2216 CVS date: 2002/07/05 20:54:37
-rw-r--r--src/audio_out/audio_oss_out.c8
-rw-r--r--src/demuxers/demux_asf.c29
-rw-r--r--src/libffmpeg/xine_decoder.c13
-rw-r--r--src/libw32dll/DirectShow/DS_VideoDecoder.c27
-rw-r--r--src/libw32dll/DirectShow/guids.c4
-rw-r--r--src/libw32dll/DirectShow/guids.h1
-rw-r--r--src/libw32dll/libwin32.h8
-rw-r--r--src/libw32dll/w32codec.c75
-rw-r--r--src/libw32dll/wine/vfw.h3
-rw-r--r--src/xine-engine/buffer.h3
-rw-r--r--src/xine-engine/buffer_types.c10
11 files changed, 128 insertions, 53 deletions
diff --git a/src/audio_out/audio_oss_out.c b/src/audio_out/audio_oss_out.c
index af1264a7a..429e084ae 100644
--- a/src/audio_out/audio_oss_out.c
+++ b/src/audio_out/audio_oss_out.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_oss_out.c,v 1.70 2002/07/01 13:51:27 miguelfreitas Exp $
+ * $Id: audio_oss_out.c,v 1.71 2002/07/05 20:54:37 miguelfreitas Exp $
*
* 20-8-2001 First implementation of Audio sync and Audio driver separation.
* Copyright (C) 2001 James Courtier-Dutton James@superbug.demon.co.uk
@@ -589,7 +589,8 @@ static int ao_oss_ctrl(ao_driver_t *this_gen, int cmd, ...) {
case AO_CTRL_PLAY_PAUSE:
printf ("audio_oss_out: AO_CTRL_PLAY_PAUSE\n");
- ioctl(this->audio_fd, SNDCTL_DSP_RESET, NULL);
+ if (this->sync_method != OSS_SYNC_SOFTSYNC)
+ ioctl(this->audio_fd, SNDCTL_DSP_RESET, NULL);
/* Uncomment the following lines if RESET causes problems
* ao_oss_close(this_gen);
* ao_oss_open(this_gen, this->bits_per_sample, this->input_sample_rate, this->mode);
@@ -602,7 +603,8 @@ static int ao_oss_ctrl(ao_driver_t *this_gen, int cmd, ...) {
case AO_CTRL_FLUSH_BUFFERS:
printf ("audio_oss_out: AO_CTRL_FLUSH_BUFFERS\n");
- ioctl(this->audio_fd, SNDCTL_DSP_RESET, NULL);
+ if (this->sync_method != OSS_SYNC_SOFTSYNC)
+ ioctl(this->audio_fd, SNDCTL_DSP_RESET, NULL);
break;
}
diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c
index ea4ff3f66..0714fa090 100644
--- a/src/demuxers/demux_asf.c
+++ b/src/demuxers/demux_asf.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: demux_asf.c,v 1.48 2002/07/05 17:31:59 mroi Exp $
+ * $Id: demux_asf.c,v 1.49 2002/07/05 20:54:37 miguelfreitas Exp $
*
* demultiplexer for asf streams
*
@@ -54,7 +54,7 @@
#define DEFRAG_BUFSIZE 65536
-#define VALID_ENDS "asf,wmv"
+#define VALID_ENDS "asf,wmv,wma"
typedef struct {
int num;
@@ -95,10 +95,10 @@ typedef struct demux_asf_s {
int num_audio_streams;
int num_video_streams;
- uint16_t wavex[128];
+ uint16_t wavex[1024];
int wavex_size;
- uint16_t bih[128];
+ uint16_t bih[1024];
int bih_size;
char title[512];
@@ -517,21 +517,28 @@ static int asf_read_header (demux_asf_t *this) {
asf_send_audio_header (this, stream_id);
#ifdef LOG
- printf ("found a_stream id=%d \n", stream_id);
+ printf ("demux_asf: found a_stream id=%d \n", stream_id);
#endif
} else {
+ int i;
+
get_le32(this); /* width */
get_le32(this); /* height */
get_byte(this);
- this->bih_size = get_le16(this); /* size */
-
- this->input->read (this->input, (uint8_t *) this->bih, this->bih_size);
- xine_bmiheader_le2me( (xine_bmiheader *) this->bih );
+
+ i = get_le16(this); /* size */
+ if( i > 0 && i < sizeof(this->bih) ) {
+ this->bih_size = i;
+ this->input->read (this->input, (uint8_t *) this->bih, this->bih_size);
+ xine_bmiheader_le2me( (xine_bmiheader *) this->bih );
- asf_send_video_header (this, stream_id);
+ asf_send_video_header (this, stream_id);
+ }
+ else
+ printf ("demux_asf: invalid bih_size received (%d), v_stream ignored.\n", i );
#ifdef LOG
- printf ("found v_stream id=%d \n", stream_id);
+ printf ("demux_asf: found v_stream id=%d \n", stream_id);
#endif
}
pos2 = this->input->get_current_pos (this->input);
diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c
index a50d72f41..90165b3b3 100644
--- a/src/libffmpeg/xine_decoder.c
+++ b/src/libffmpeg/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.46 2002/07/05 17:32:03 mroi Exp $
+ * $Id: xine_decoder.c,v 1.47 2002/07/05 20:54:37 miguelfreitas Exp $
*
* xine decoder plugin using ffmpeg
*
@@ -58,6 +58,7 @@ typedef struct ff_decoder_s {
int bufsize;
int size;
int skipframes;
+ int illegal_vlc;
AVPicture av_picture;
AVCodecContext context;
@@ -175,6 +176,13 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
this->decoder_ok = 1;
this->video_out->open (this->video_out);
+ /* needed to play streams generated by MS ISO MPEG4 codec.
+ Michael Niedermayer explained:
+ M$ "ISO MPEG4" uses illegal vlc code combinations, a ISO MPEG4 compliant
+ decoder which support error resilience should handle them like errors.
+ */
+ if( this->illegal_vlc )
+ this->context.error_resilience=-1;
if( this->buf )
free( this->buf );
@@ -424,6 +432,9 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) {
this->video_decoder.dispose = ff_dispose;
this->size = 0;
+ this->illegal_vlc = xine->config->register_bool (xine->config, "codec.ffmpeg_illegal_vlc", 1,
+ _("allow illegal vlc codes in mpeg4 streams"), NULL, NULL, NULL);
+
pthread_once( &once_control, init_routine );
return (video_decoder_t *) this;
diff --git a/src/libw32dll/DirectShow/DS_VideoDecoder.c b/src/libw32dll/DirectShow/DS_VideoDecoder.c
index 33c51b4d2..9dafbc85d 100644
--- a/src/libw32dll/DirectShow/DS_VideoDecoder.c
+++ b/src/libw32dll/DirectShow/DS_VideoDecoder.c
@@ -74,9 +74,10 @@ static ct check[] = {
{12, fccIYUV, &MEDIASUBTYPE_IYUV, CAP_IYUV},
{16, fccUYVY, &MEDIASUBTYPE_UYVY, CAP_UYVY},
{12, fccYV12, &MEDIASUBTYPE_YV12, CAP_YV12},
- {16, fccYV12, &MEDIASUBTYPE_YV12, CAP_YV12},
+ //{16, fccYV12, &MEDIASUBTYPE_YV12, CAP_YV12},
{16, fccYVYU, &MEDIASUBTYPE_YVYU, CAP_YVYU},
- //{12, fccI420, &MEDIASUBTYPE_I420, CAP_I420},
+ {12, fccI420, &MEDIASUBTYPE_I420, CAP_I420},
+ {9, fccYVU9, &MEDIASUBTYPE_YVU9, CAP_YVU9},
{0},
};
@@ -194,6 +195,7 @@ DS_VideoDecoder * DS_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHEAD
switch (this->iv.m_bh->biCompression)
{
+#if 0
case fccDIV3:
case fccDIV4:
case fccDIV5:
@@ -208,10 +210,12 @@ DS_VideoDecoder * DS_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHEAD
//m_Caps = CAP_I420;
this->m_Caps = (CAP_YUY2 | CAP_UYVY);
break;
+#endif
default:
this->m_Caps = CAP_NONE;
+ printf("Decoder supports the following YUV formats: ");
for (c = check; c->bits; c++)
{
this->m_sVhdr2->bmiHeader.biBitCount = c->bits;
@@ -219,12 +223,16 @@ DS_VideoDecoder * DS_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHEAD
this->m_sDestType.subtype = *c->subtype;
result = this->m_pDS_Filter->m_pOutputPin->vt->QueryAccept(this->m_pDS_Filter->m_pOutputPin, &this->m_sDestType);
if (!result)
+ {
this->m_Caps = (this->m_Caps | c->cap);
+ printf("%.4s ", &c->fcc);
+ }
}
+ printf("\n");
}
if (this->m_Caps != CAP_NONE)
- printf("Decoder is capable of YUV output ( flags 0x%x)\n", (int)this->m_Caps);
+ printf("Decoder is capable of YUV output (flags 0x%x)\n", (int)this->m_Caps);
this->m_sVhdr2->bmiHeader.biBitCount = 24;
this->m_sVhdr2->bmiHeader.biCompression = 0;
@@ -484,12 +492,17 @@ int DS_VideoDecoder_SetDestFmt(DS_VideoDecoder *this, int bits, unsigned int csp
case fccIYUV:
this->m_sDestType.subtype = MEDIASUBTYPE_IYUV;
break;
+ case fccI420:
+ this->m_sDestType.subtype = MEDIASUBTYPE_I420;
+ break;
case fccUYVY:
this->m_sDestType.subtype = MEDIASUBTYPE_UYVY;
break;
case fccYVYU:
this->m_sDestType.subtype = MEDIASUBTYPE_YVYU;
break;
+ case fccYVU9:
+ this->m_sDestType.subtype = MEDIASUBTYPE_YVU9;
default:
ok = false;
break;
@@ -528,6 +541,10 @@ int DS_VideoDecoder_SetDestFmt(DS_VideoDecoder *this, int bits, unsigned int csp
if(!(this->m_Caps & CAP_IYUV))
should_test=false;
break;
+ case fccI420:
+ if(!(this->m_Caps & CAP_I420))
+ should_test=false;
+ break;
case fccUYVY:
if(!(this->m_Caps & CAP_UYVY))
should_test=false;
@@ -536,6 +553,10 @@ int DS_VideoDecoder_SetDestFmt(DS_VideoDecoder *this, int bits, unsigned int csp
if(!(this->m_Caps & CAP_YVYU))
should_test=false;
break;
+ case fccYVU9:
+ if(!(this->m_Caps & CAP_YVU9))
+ should_test=false;
+ break;
}
if(should_test)
result = this->m_pDS_Filter->m_pOutputPin->vt->QueryAccept(this->m_pDS_Filter->m_pOutputPin, &this->m_sDestType);
diff --git a/src/libw32dll/DirectShow/guids.c b/src/libw32dll/DirectShow/guids.c
index 393b5f90c..f1ee0aaa3 100644
--- a/src/libw32dll/DirectShow/guids.c
+++ b/src/libw32dll/DirectShow/guids.c
@@ -55,6 +55,10 @@ GUID MEDIASUBTYPE_Y211={0x31313259, 0x0000, 0x0010,
{0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
GUID MEDIASUBTYPE_YV12={0x32315659, 0x0000, 0x0010,
{0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
+GUID MEDIASUBTYPE_I420={0x30323449, 0x0000, 0x0010,
+ {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
+GUID MEDIASUBTYPE_IF09={0x39304649, 0x0000, 0x0010,
+ {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
GUID CLSID_MemoryAllocator={0x1e651cc0, 0xb199, 0x11d0,
{0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45}};
GUID IID_DivxHidden={0x598eba01, 0xb49a, 0x11d2,
diff --git a/src/libw32dll/DirectShow/guids.h b/src/libw32dll/DirectShow/guids.h
index 0c96ce202..b17c80662 100644
--- a/src/libw32dll/DirectShow/guids.h
+++ b/src/libw32dll/DirectShow/guids.h
@@ -92,5 +92,6 @@ extern GUID MEDIASUBTYPE_YVYU;
extern GUID MEDIASUBTYPE_UYVY;
extern GUID MEDIASUBTYPE_Y211;
extern GUID MEDIASUBTYPE_YV12;
+extern GUID MEDIASUBTYPE_I420;
#endif
diff --git a/src/libw32dll/libwin32.h b/src/libw32dll/libwin32.h
index c4774c731..e256ebf47 100644
--- a/src/libw32dll/libwin32.h
+++ b/src/libw32dll/libwin32.h
@@ -31,7 +31,7 @@ typedef struct _FatalError
typedef struct _CodecInfo
{
char* dll;
- GUID guid;
+ GUID* guid;
}CodecInfo;
@@ -88,6 +88,8 @@ struct IAudioEncoder
CAP_UYVY = 8,
CAP_YVYU = 16,
CAP_I420 = 32,
+ CAP_YVU9 = 64,
+ CAP_IF09 = 128,
};
enum DecodingMode
{
@@ -230,7 +232,7 @@ struct IRtConfig
#define fccVCR2 mmioFOURCC('V', 'C', 'R', '2')
#define fccVCR1 mmioFOURCC('V', 'C', 'R', '1')
#define fccVYUY mmioFOURCC('V', 'Y', 'U', 'Y')
-#define fccYVU9 mmioFOURCC('I', 'Y', 'U', '9')
+#define fccIYU9 mmioFOURCC('I', 'Y', 'U', '9') // it was defined as fccYVU9
/* Asus codecs */
#define fccASV1 mmioFOURCC('A', 'S', 'V', '1')
@@ -255,5 +257,7 @@ struct IRtConfig
#define fccIYUV mmioFOURCC('I', 'Y', 'U', 'V')/* Planar mode: Y + U + V (3 planes) */
#define fccUYVY mmioFOURCC('U', 'Y', 'V', 'Y')/* Packed mode: U0+Y0+V0+Y1 (1 plane) */
#define fccYVYU mmioFOURCC('Y', 'V', 'Y', 'U')/* Packed mode: Y0+V0+Y1+U0 (1 plane) */
+#define fccYVU9 mmioFOURCC('Y', 'V', 'U', '9')/* Planar 4:1:0 */
+#define fccIF09 mmioFOURCC('I', 'F', '0', '9')/* Planar 4:1:0 + delta */
#endif
diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c
index 29c174168..4fb30368e 100644
--- a/src/libw32dll/w32codec.c
+++ b/src/libw32dll/w32codec.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: w32codec.c,v 1.84 2002/07/05 17:32:04 mroi Exp $
+ * $Id: w32codec.c,v 1.85 2002/07/05 20:54:37 miguelfreitas Exp $
*
* routines for using w32 codecs
* DirectShow support by Miguel Freitas (Nov/2001)
@@ -87,6 +87,12 @@ static GUID msmpeg4_clsid =
{ 0x9f, 0xe5, 0x00, 0x60, 0x97, 0x78, 0xea, 0x66}
};
+static GUID mss1_clsid =
+{
+ 0x3301a7c4, 0x0a8d, 0x11d4,
+ { 0x91, 0x4d, 0x00, 0xc0, 0x4f, 0x61, 0x0d, 0x24 }
+};
+
/* some data is shared inside wine loader.
* this mutex seems to avoid some segfaults
@@ -107,7 +113,7 @@ typedef struct w32v_decoder_s {
int64_t video_step;
int decoder_ok;
- BITMAPINFOHEADER bih, o_bih;
+ BITMAPINFOHEADER *bih, o_bih;
char scratch1[16]; /* some codecs overflow o_bih */
HIC hic;
int yuv_supported ;
@@ -383,6 +389,11 @@ static char* get_vids_codec_name(w32v_decoder_t *this,
this->flipped=1;
return "vp31vfw.dll";
+ case BUF_VIDEO_MSS1:
+ this->ds_driver = 1;
+ this->guid=&mss1_clsid;
+ return "msscds32.ax";
+
}
printf ("w32codec: this didn't happen: unknown video buf type %08x\n",
@@ -419,7 +430,8 @@ static int w32v_can_handle (video_decoder_t *this_gen, int buf_type) {
buf_type == BUF_VIDEO_DV ||
buf_type == BUF_VIDEO_WMV7 ||
buf_type == BUF_VIDEO_WMV8 ||
- buf_type == BUF_VIDEO_VP31 );
+ buf_type == BUF_VIDEO_VP31 ||
+ buf_type == BUF_VIDEO_MSS1 );
}
static void w32v_init (video_decoder_t *this_gen, vo_instance_t *video_out) {
@@ -454,23 +466,23 @@ static void w32v_init_codec (w32v_decoder_t *this, int buf_type) {
}
this->hic = ICOpen (mmioFOURCC('v','i','d','c'),
- this->bih.biCompression,
+ this->bih->biCompression,
ICMODE_FASTDECOMPRESS);
if(!this->hic){
xine_log (this->xine, XINE_LOG_MSG,
"w32codec: ICOpen failed! unknown codec %08lx / wrong parameters?\n",
- this->bih.biCompression);
+ this->bih->biCompression);
this->decoder_ok = 0;
return;
}
- ret = ICDecompressGetFormat(this->hic, &this->bih, &this->o_bih);
+ ret = ICDecompressGetFormat(this->hic, this->bih, &this->o_bih);
if(ret){
xine_log (this->xine, XINE_LOG_MSG,
"w32codec: ICDecompressGetFormat (%.4s %08lx/%d) failed: Error %ld\n",
- (char*)&this->o_bih.biCompression, this->bih.biCompression,
- this->bih.biBitCount, (long)ret);
+ (char*)&this->o_bih.biCompression, this->bih->biCompression,
+ this->bih->biBitCount, (long)ret);
this->decoder_ok = 0;
return;
}
@@ -488,7 +500,7 @@ static void w32v_init_codec (w32v_decoder_t *this, int buf_type) {
* this->o_bih.biBitCount / 8;
if (this->flipped)
- this->o_bih.biHeight=-this->bih.biHeight;
+ this->o_bih.biHeight=-this->bih->biHeight;
if(outfmt==IMGFMT_YUY2 && !this->yuv_hack_needed)
this->o_bih.biCompression = mmioFOURCC('Y','U','Y','2');
@@ -496,8 +508,8 @@ static void w32v_init_codec (w32v_decoder_t *this, int buf_type) {
this->o_bih.biCompression = 0;
ret = (!this->ex_functions)
- ?ICDecompressQuery(this->hic, &this->bih, &this->o_bih)
- :ICDecompressQueryEx(this->hic, &this->bih, &this->o_bih);
+ ?ICDecompressQuery(this->hic, this->bih, &this->o_bih)
+ :ICDecompressQueryEx(this->hic, this->bih, &this->o_bih);
if(ret){
xine_log (this->xine, XINE_LOG_MSG,
@@ -507,8 +519,8 @@ static void w32v_init_codec (w32v_decoder_t *this, int buf_type) {
}
ret = (!this->ex_functions)
- ?ICDecompressBegin(this->hic, &this->bih, &this->o_bih)
- :ICDecompressBeginEx(this->hic, &this->bih, &this->o_bih);
+ ?ICDecompressBegin(this->hic, this->bih, &this->o_bih)
+ :ICDecompressBeginEx(this->hic, this->bih, &this->o_bih);
if(ret){
xine_log (this->xine, XINE_LOG_MSG,
@@ -549,12 +561,12 @@ static void w32v_init_ds_codec (w32v_decoder_t *this, int buf_type) {
this->ldt_fs = Setup_LDT_Keeper();
this->ds_dec = DS_VideoDecoder_Open(win32_codec_name, this->guid,
- &this->bih, this->flipped, 0);
+ this->bih, this->flipped, 0);
if(!this->ds_dec){
xine_log (this->xine, XINE_LOG_MSG,
"w32codec: DS_VideoDecoder failed! unknown codec %08lx / wrong parameters?\n",
- this->bih.biCompression);
+ this->bih->biCompression);
this->decoder_ok = 0;
return;
}
@@ -571,14 +583,14 @@ static void w32v_init_ds_codec (w32v_decoder_t *this, int buf_type) {
else
this->o_bih.biBitCount=outfmt&0xFF;
- this->o_bih.biWidth = this->bih.biWidth;
- this->o_bih.biHeight = this->bih.biHeight;
+ this->o_bih.biWidth = this->bih->biWidth;
+ this->o_bih.biHeight = this->bih->biHeight;
this->o_bih.biSizeImage = this->o_bih.biWidth * this->o_bih.biHeight
* this->o_bih.biBitCount / 8;
if (this->flipped)
- this->o_bih.biHeight=-this->bih.biHeight;
+ this->o_bih.biHeight=-this->bih->biHeight;
if(outfmt==IMGFMT_YUY2 && !this->yuv_hack_needed)
this->o_bih.biCompression = mmioFOURCC('Y','U','Y','2');
@@ -631,7 +643,10 @@ static void w32v_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
#endif
/* init package containing bih */
- memcpy ( &this->bih, buf->content, sizeof (BITMAPINFOHEADER));
+ if( this->bih )
+ free( this->bih );
+ this->bih = malloc(buf->size);
+ memcpy ( this->bih, buf->content, buf->size );
this->video_step = buf->decoder_info[1];
#ifdef LOG
printf ("w32codec: video_step is %lld\n", this->video_step);
@@ -699,11 +714,11 @@ static void w32v_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
/* decoder video frame */
- this->bih.biSizeImage = this->size;
+ this->bih->biSizeImage = this->size;
img = this->video_out->get_frame (this->video_out,
- this->bih.biWidth,
- this->bih.biHeight,
+ this->bih->biWidth,
+ this->bih->biHeight,
42,
IMGFMT_YUY2,
VO_BOTH_FIELDS);
@@ -727,10 +742,10 @@ static void w32v_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
if( !this->ds_driver )
ret = (!this->ex_functions)
?ICDecompress(this->hic, flags,
- &this->bih, this->buf, &this->o_bih,
+ this->bih, this->buf, &this->o_bih,
(this->skipframes)?NULL:img_buffer)
:ICDecompressEx(this->hic, flags,
- &this->bih, this->buf, &this->o_bih,
+ this->bih, this->buf, &this->o_bih,
(this->skipframes)?NULL:img_buffer);
else {
ret = DS_VideoDecoder_DecodeInternal(this->ds_dec, this->buf, this->size,
@@ -755,7 +770,7 @@ static void w32v_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
xine_profiler_start_count (this->prof_rgb2yuv);
- for (row=0; row<this->bih.biHeight; row++) {
+ for (row=0; row<this->bih->biHeight; row++) {
uint16_t *pixel, *out;
@@ -862,9 +877,9 @@ static void w32v_reset (video_decoder_t *this_gen) {
if( this->hic )
{
if (!this->ex_functions)
- ICDecompressBegin(this->hic, &this->bih, &this->o_bih);
+ ICDecompressBegin(this->hic, this->bih, &this->o_bih);
else
- ICDecompressBeginEx(this->hic, &this->bih, &this->o_bih);
+ ICDecompressBeginEx(this->hic, this->bih, &this->o_bih);
}
} else {
}
@@ -913,6 +928,11 @@ static void w32v_close (video_decoder_t *this_gen) {
this->buf = NULL;
}
+ if( this->bih ) {
+ free( this->bih );
+ this->bih = NULL;
+ }
+
if( this->decoder_ok )
{
this->decoder_ok = 0;
@@ -1268,7 +1288,6 @@ static void w32a_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
return;
if (buf->decoder_flags & BUF_FLAG_HEADER) {
- /* init package containing bih */
#ifdef LOG
printf ("w32codec: got audio header\n");
diff --git a/src/libw32dll/wine/vfw.h b/src/libw32dll/wine/vfw.h
index 7889a1822..bc32aff5e 100644
--- a/src/libw32dll/wine/vfw.h
+++ b/src/libw32dll/wine/vfw.h
@@ -30,9 +30,6 @@ typedef struct __attribute__((__packed__))
long biYPelsPerMeter;
long biClrUsed;
long biClrImportant;
- /* very, very dirty HACK to make WMV8 work.
- we must fix DS_VideoDecoder.c to remove the line below */
- int colors[3];
} BITMAPINFOHEADER, *PBITMAPINFOHEADER, *LPBITMAPINFOHEADER;
typedef struct {
BITMAPINFOHEADER bmiHeader;
diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h
index 15eac4969..5d0ec1397 100644
--- a/src/xine-engine/buffer.h
+++ b/src/xine-engine/buffer.h
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: buffer.h,v 1.54 2002/07/01 17:56:05 miguelfreitas Exp $
+ * $Id: buffer.h,v 1.55 2002/07/05 20:54:38 miguelfreitas Exp $
*
*
* contents:
@@ -117,6 +117,7 @@ extern "C" {
#define BUF_VIDEO_ROQ 0x02240000
#define BUF_VIDEO_SORENSON_V3 0x02250000
#define BUF_VIDEO_MSMPEG4_V1 0x02260000
+#define BUF_VIDEO_MSS1 0x02270000
/* audio buffer types: (please keep in sync with buffer_types.c) */
diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c
index d0e94ad81..66e120108 100644
--- a/src/xine-engine/buffer_types.c
+++ b/src/xine-engine/buffer_types.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: buffer_types.c,v 1.29 2002/07/04 19:36:55 miguelfreitas Exp $
+ * $Id: buffer_types.c,v 1.30 2002/07/05 20:54:38 miguelfreitas Exp $
*
*
* contents:
@@ -402,6 +402,14 @@ static video_db_t video_db[] = {
BUF_VIDEO_DUCKTM1,
"Duck Truemotion v1"
},
+{
+ {
+ meFOURCC('M', 'S', 'S', '1'),
+ 0
+ },
+ BUF_VIDEO_MSS1,
+ "Windows Screen Video"
+},
{ { 0 }, 0, "last entry" }
};