diff options
-rw-r--r-- | src/demuxers/demux_asf.c | 4 | ||||
-rw-r--r-- | src/demuxers/demux_avi.c | 4 | ||||
-rw-r--r-- | src/demuxers/demux_film.c | 20 | ||||
-rw-r--r-- | src/demuxers/demux_ogg.c | 15 | ||||
-rw-r--r-- | src/demuxers/demux_qt.c | 19 | ||||
-rw-r--r-- | src/libdivx4/xine_decoder.c | 21 | ||||
-rw-r--r-- | src/libffmpeg/xine_decoder.c | 20 | ||||
-rw-r--r-- | src/libxinevdec/cinepak.c | 20 | ||||
-rw-r--r-- | src/libxinevdec/msvc.c | 21 | ||||
-rw-r--r-- | src/libxvid/xine_decoder.c | 18 | ||||
-rw-r--r-- | src/xine-engine/buffer.h | 19 | ||||
-rw-r--r-- | src/xine-engine/buffer_types.c | 14 |
12 files changed, 53 insertions, 142 deletions
diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c index 15691bda8..ca28d2037 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.40 2002/05/25 19:19:16 siggi Exp $ + * $Id: demux_asf.c,v 1.41 2002/06/03 13:31:13 miguelfreitas Exp $ * * demultiplexer for asf streams * @@ -380,7 +380,7 @@ static unsigned long str2ulong(unsigned char *str) { static void asf_send_video_header (demux_asf_t *this, int stream_id) { buf_element_t *buf; - BITMAPINFOHEADER *bih = (BITMAPINFOHEADER *) this->bih; + xine_bmiheader *bih = (xine_bmiheader *) this->bih; this->streams[this->num_streams].buf_type = fourcc_to_buf_video((void*)&bih->biCompression); diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c index e168427cf..a217e84f2 100644 --- a/src/demuxers/demux_avi.c +++ b/src/demuxers/demux_avi.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_avi.c,v 1.90 2002/05/25 19:19:16 siggi Exp $ + * $Id: demux_avi.c,v 1.91 2002/06/03 13:31:13 miguelfreitas Exp $ * * demultiplexer for avi streams * @@ -160,7 +160,7 @@ typedef struct long max_idx; /* number of index entries actually allocated */ unsigned char (*idx)[16]; /* index entries (AVI idx1 tag) */ video_index_t video_idx; - BITMAPINFOHEADER bih; + xine_bmiheader bih; off_t movi_start; } avi_t; diff --git a/src/demuxers/demux_film.c b/src/demuxers/demux_film.c index 46289f993..f025607af 100644 --- a/src/demuxers/demux_film.c +++ b/src/demuxers/demux_film.c @@ -21,7 +21,7 @@ * For more information on the FILM file format, visit: * http://www.pcisys.net/~melanson/codecs/ * - * $Id: demux_film.c,v 1.6 2002/05/28 17:50:15 miguelfreitas Exp $ + * $Id: demux_film.c,v 1.7 2002/06/03 13:31:13 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -55,22 +55,6 @@ #define VALID_ENDS "cpk,cak,film" -/* TODO: lobby the xine team to revise the API so that it's no longer - necessary to ship around this inane Win32-specific structure */ -typedef struct { - long biSize; - long biWidth; - long biHeight; - short biPlanes; - short biBitCount; - long biCompression; - long biSizeImage; - long biXPelsPerMeter; - long biYPelsPerMeter; - long biClrUsed; - long biClrImportant; -} BITMAPINFOHEADER; - typedef struct { off_t sample_offset; unsigned int sample_size; @@ -105,7 +89,7 @@ typedef struct { /* video information */ unsigned int video_codec; unsigned int video_type; - BITMAPINFOHEADER bih; + xine_bmiheader bih; /* audio information */ unsigned int audio_type; diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c index 8a9d66852..0d58126a3 100644 --- a/src/demuxers/demux_ogg.c +++ b/src/demuxers/demux_ogg.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_ogg.c,v 1.26 2002/05/25 19:19:17 siggi Exp $ + * $Id: demux_ogg.c,v 1.27 2002/06/03 13:31:13 miguelfreitas Exp $ * * demultiplexer for ogg streams * @@ -36,11 +36,6 @@ #include <ogg/ogg.h> -#define WINE_TYPEDEFS_ONLY -#include "libw32dll/wine/avifmt.h" -#include "libw32dll/wine/windef.h" -#include "libw32dll/wine/vfw.h" - #include "xine_internal.h" #include "xineutils.h" #include "demux.h" @@ -228,7 +223,7 @@ static void demux_ogg_send_package (demux_ogg_t *this) { dsogg_header_t *oggh; buf_element_t *buf; - BITMAPINFOHEADER bih; + xine_bmiheader bih; #ifdef LOG printf ("demux_ogg: direct show filter created stream detected, hexdump:\n"); @@ -251,7 +246,7 @@ static void demux_ogg_send_package (demux_ogg_t *this) { printf ("demux_ogg: buf_type %08x\n",this->buf_types[stream_num]); #endif - bih.biSize=sizeof(BITMAPINFOHEADER); + bih.biSize=sizeof(xine_bmiheader); bih.biWidth = oggh->hubba.video.width; bih.biHeight= oggh->hubba.video.height; bih.biPlanes= 0; @@ -268,8 +263,8 @@ static void demux_ogg_send_package (demux_ogg_t *this) { buf->decoder_flags = BUF_FLAG_HEADER; this->frame_duration = oggh->time_unit * 9 / 1000; buf->decoder_info[1] = this->frame_duration; - memcpy (buf->content, &bih, sizeof (BITMAPINFOHEADER)); - buf->size = sizeof (BITMAPINFOHEADER); + memcpy (buf->content, &bih, sizeof (xine_bmiheader)); + buf->size = sizeof (xine_bmiheader); buf->type = this->buf_types[stream_num]; this->video_fifo->put (this->video_fifo, buf); diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index 3d0f010e7..526e9a4c1 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.c @@ -30,7 +30,7 @@ * build_frame_table * free_qt_info * - * $Id: demux_qt.c,v 1.36 2002/06/03 12:43:22 f1rmb Exp $ + * $Id: demux_qt.c,v 1.37 2002/06/03 13:31:13 miguelfreitas Exp $ * */ @@ -95,21 +95,6 @@ typedef unsigned int qt_atom; #define VALID_ENDS "mov,mp4,qt" -/* still needed, though it shouldn't be... */ -typedef struct { - long biSize; - long biWidth; - long biHeight; - short biPlanes; - short biBitCount; - long biCompression; - long biSizeImage; - long biXPelsPerMeter; - long biYPelsPerMeter; - long biClrUsed; - long biClrImportant; -} BITMAPINFOHEADER; - /* these are things that can go wrong */ typedef enum { QT_OK, @@ -252,7 +237,7 @@ typedef struct { int status; qt_info *qt; - BITMAPINFOHEADER bih; + xine_bmiheader bih; unsigned int current_frame; unsigned int last_frame; diff --git a/src/libdivx4/xine_decoder.c b/src/libdivx4/xine_decoder.c index 9ed719327..6d084584d 100644 --- a/src/libdivx4/xine_decoder.c +++ b/src/libdivx4/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.34 2002/05/25 19:19:18 siggi Exp $ + * $Id: xine_decoder.c,v 1.35 2002/06/03 13:31:12 miguelfreitas Exp $ * * xine decoder plugin using divx4 * @@ -79,21 +79,6 @@ void catch_sigsegv(int sig) } #endif -/* now this is ripped of wine's vfw.h */ -typedef struct { - long biSize; - long biWidth; - long biHeight; - short biPlanes; - short biBitCount; - long biCompression; - long biSizeImage; - long biXPelsPerMeter; - long biYPelsPerMeter; - long biClrUsed; - long biClrImportant; -} BITMAPINFOHEADER; - typedef struct divx4_decoder_s { video_decoder_t video_decoder; @@ -101,7 +86,7 @@ typedef struct divx4_decoder_s { int video_step; int decoder_ok; - BITMAPINFOHEADER bih; + xine_bmiheader bih; long biWidth; long biHeight; unsigned char *buf; @@ -246,7 +231,7 @@ static int divx4_init_decoder(divx4_decoder_t *this, buf_element_t *buf) { printf ("divx4: init_decoder\n"); #endif - memcpy ( &this->bih, buf->content, sizeof (BITMAPINFOHEADER)); + memcpy ( &this->bih, buf->content, sizeof (xine_bmiheader)); this->biWidth = str2ulong(&this->bih.biWidth); this->biHeight = str2ulong(&this->bih.biHeight); this->video_step = buf->decoder_info[1]; diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c index 08e60f9ed..d2aef4949 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.37 2002/05/25 19:19:18 siggi Exp $ + * $Id: xine_decoder.c,v 1.38 2002/06/03 13:31:12 miguelfreitas Exp $ * * xine decoder plugin using ffmpeg * @@ -46,20 +46,6 @@ #define LOG */ -/* now this is ripped of wine's vfw.h */ -typedef struct { - long biSize; - long biWidth; - long biHeight; - short biPlanes; - short biBitCount; - long biCompression; - long biSizeImage; - long biXPelsPerMeter; - long biYPelsPerMeter; - long biClrUsed; - long biClrImportant; -} BITMAPINFOHEADER; #ifndef mmioFOURCC #define mmioFOURCC( ch0, ch1, ch2, ch3 ) \ ( (long)(unsigned char)(ch0) | ( (long)(unsigned char)(ch1) << 8 ) | \ @@ -73,7 +59,7 @@ typedef struct ff_decoder_s { int video_step; int decoder_ok; - BITMAPINFOHEADER bih; + xine_bmiheader bih; long biWidth; long biHeight; unsigned char *buf; @@ -151,7 +137,7 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { /* init package containing bih */ - memcpy ( &this->bih, buf->content, sizeof (BITMAPINFOHEADER)); + memcpy ( &this->bih, buf->content, sizeof (xine_bmiheader)); this->biWidth = str2ulong(&this->bih.biWidth); this->biHeight = str2ulong(&this->bih.biHeight); this->video_step = buf->decoder_info[1]; diff --git a/src/libxinevdec/cinepak.c b/src/libxinevdec/cinepak.c index 798f42bd1..b8c55ac01 100644 --- a/src/libxinevdec/cinepak.c +++ b/src/libxinevdec/cinepak.c @@ -22,7 +22,7 @@ * based on overview of Cinepak algorithm and example decoder * by Tim Ferguson: http://www.csse.monash.edu.au/~timf/ * - * $Id: cinepak.c,v 1.5 2002/05/25 19:19:19 siggi Exp $ + * $Id: cinepak.c,v 1.6 2002/06/03 13:31:12 miguelfreitas Exp $ */ #include <stdlib.h> @@ -37,20 +37,6 @@ #define MAX_STRIPS 32 #define VIDEOBUFSIZE 128 * 1024 -/* now this is ripped of wine's vfw.h */ -typedef struct { - long biSize; - long biWidth; - long biHeight; - short biPlanes; - short biBitCount; - long biCompression; - long biSizeImage; - long biXPelsPerMeter; - long biYPelsPerMeter; - long biClrUsed; - long biClrImportant; -} BITMAPINFOHEADER; typedef struct { uint8_t y0, y1, y2, y3; @@ -323,9 +309,9 @@ static void cvid_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { return; if (buf->decoder_flags & BUF_FLAG_HEADER) { - BITMAPINFOHEADER *bih; + xine_bmiheader *bih; - bih = (BITMAPINFOHEADER *) buf->content; + bih = (xine_bmiheader *) buf->content; this->biWidth = (le2me_32 (bih->biWidth) + 3) & ~0x03; this->biHeight = (le2me_32 (bih->biHeight) + 3) & ~0x03; this->video_step = buf->decoder_info[1]; diff --git a/src/libxinevdec/msvc.c b/src/libxinevdec/msvc.c index eddf34236..f072cd16d 100644 --- a/src/libxinevdec/msvc.c +++ b/src/libxinevdec/msvc.c @@ -22,7 +22,7 @@ * based on overview of Microsoft Video-1 algorithm * by Mike Melanson: http://www.pcisys.net/~melanson/codecs/video1.txt * - * $Id: msvc.c,v 1.3 2002/05/25 19:19:19 siggi Exp $ + * $Id: msvc.c,v 1.4 2002/06/03 13:31:12 miguelfreitas Exp $ */ #include <stdlib.h> @@ -36,21 +36,6 @@ #define VIDEOBUFSIZE 128 * 1024 -/* now this is ripped of wine's vfw.h */ -typedef struct { - long biSize; - long biWidth; - long biHeight; - short biPlanes; - short biBitCount; - long biCompression; - long biSizeImage; - long biXPelsPerMeter; - long biYPelsPerMeter; - long biClrUsed; - long biClrImportant; -} BITMAPINFOHEADER; - typedef struct { uint16_t yu; uint16_t yv; @@ -222,9 +207,9 @@ static void msvc_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { return; if (buf->decoder_flags & BUF_FLAG_HEADER) { - BITMAPINFOHEADER *bih; + xine_bmiheader *bih; - bih = (BITMAPINFOHEADER *) buf->content; + bih = (xine_bmiheader *) buf->content; this->biWidth = (le2me_32 (bih->biWidth) + 3) & ~0x03; this->biHeight = (le2me_32 (bih->biHeight) + 3) & ~0x03; this->biBitCount = le2me_32 (bih->biBitCount); diff --git a/src/libxvid/xine_decoder.c b/src/libxvid/xine_decoder.c index 6e235722c..c97a0b7de 100644 --- a/src/libxvid/xine_decoder.c +++ b/src/libxvid/xine_decoder.c @@ -44,20 +44,6 @@ #define LOG */ -/* word is that this is lifted from wine's vfw.h */ -typedef struct { - long biSize; - long biWidth; - long biHeight; - short biPlanes; - short biBitCount; - long biCompression; - long biSizeImage; - long biXPelsPerMeter; - long biYPelsPerMeter; - long biClrUsed; - long biClrImportant; -} BITMAPINFOHEADER; typedef struct xvid_decoder_s { video_decoder_t video_decoder; @@ -108,11 +94,11 @@ static void xvid_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { #endif if (buf->decoder_flags & BUF_FLAG_HEADER) { - BITMAPINFOHEADER *bih; + xine_bmiheader *bih; XVID_DEC_PARAM xparam; /* initialize data describing video stream */ - bih = (BITMAPINFOHEADER *) buf->content; + bih = (xine_bmiheader *) buf->content; this->frame_duration = buf->decoder_info[1]; /* FIXME: is BITMAPINFOHEADER always little-endian? ffmpeg plugin uses */ /* weird way to ensure correct endianess */ diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h index 0e1921ace..e893a41ff 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.45 2002/06/02 16:32:46 tmmm Exp $ + * $Id: buffer.h,v 1.46 2002/06/03 13:31:12 miguelfreitas Exp $ * * * contents: @@ -258,6 +258,23 @@ uint32_t formattag_to_buf_audio( uint32_t formattag ); /* return codec name given BUF_VIDEO_xxx */ char * buf_audio_name( uint32_t buf_type ); + +/* this version of BITMAPINFOHEADER should be safe to compile on 64bits machines */ +typedef struct { + int32_t biSize; + int32_t biWidth; + int32_t biHeight; + int16_t biPlanes; + int16_t biBitCount; + int32_t biCompression; + int32_t biSizeImage; + int32_t biXPelsPerMeter; + int32_t biYPelsPerMeter; + int32_t biClrUsed; + int32_t biClrImportant; +} xine_bmiheader; + + #ifdef __cplusplus } #endif diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c index 98e9dfb99..f487d64fc 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.18 2002/06/02 16:32:46 tmmm Exp $ + * $Id: buffer_types.c,v 1.19 2002/06/03 13:31:13 miguelfreitas Exp $ * * * contents: @@ -37,11 +37,13 @@ #include <inttypes.h> #include "buffer.h" -#define WINE_TYPEDEFS_ONLY -#include "libw32dll/wine/avifmt.h" -#include "libw32dll/wine/windef.h" -#include "libw32dll/wine/vfw.h" -#include "libw32dll/wine/mmreg.h" + +#ifndef mmioFOURCC +#define mmioFOURCC( ch0, ch1, ch2, ch3 ) \ + ( (long)(unsigned char)(ch0) | ( (long)(unsigned char)(ch1) << 8 ) | \ + ( (long)(unsigned char)(ch2) << 16 ) | ( (long)(unsigned char)(ch3) << 24 ) ) +#endif + typedef struct video_db_s { uint32_t fourcc[20]; |