[vlc-commits] atmo: revert rename of BITMAPFILEHEADER

Rafaël Carré git at videolan.org
Tue Aug 28 19:25:24 CEST 2012


vlc/vlc-2.0 | branch: master | Rafaël Carré <funman at videolan.org> | Fri Aug 17 21:39:25 2012 +0900| [683f40b76c918bfa8b4091099972f2c999b1527c] | committer: Jean-Baptiste Kempf

atmo: revert rename of BITMAPFILEHEADER

vlc headers don't declare it
This should perhaps be changed but that requires special look to atmo
code since this plugins mixes cross-platform and windows code, and vlc
and undocumented standalone compilation
(cherry picked from commit c61bc9f4f972f5a78990370650960b1ee91c102d)

Signed-off-by: KO Myung-Hun <komh at chollian.net>
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=683f40b76c918bfa8b4091099972f2c999b1527c
---

 modules/video_filter/atmo/AtmoDefs.h             |    6 +++---
 modules/video_filter/atmo/AtmoZoneDefinition.cpp |    4 ++--
 modules/video_filter/atmo/atmo.cpp               |    8 ++++----
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/modules/video_filter/atmo/AtmoDefs.h b/modules/video_filter/atmo/AtmoDefs.h
index 9e7c5b7..a7719a0 100644
--- a/modules/video_filter/atmo/AtmoDefs.h
+++ b/modules/video_filter/atmo/AtmoDefs.h
@@ -59,8 +59,8 @@ typedef unsigned long DWORD;
 
 #define BI_RGB 0L
 
-#if !defined(_VLC_BITMAPFILEHEADER_)
-#define _VLC_BITMAPFILEHEADER_
+#if !defined(_BITMAPFILEHEADER_)
+#define _BITMAPFILEHEADER_
 typedef struct
 #ifdef HAVE_ATTRIBUTE_PACKED
     __attribute__((__packed__))
@@ -71,7 +71,7 @@ typedef struct
         uint16_t   bfReserved1;
         uint16_t   bfReserved2;
         uint32_t   bfOffBits;
-} VLC_BITMAPFILEHEADER, *VLC_LPBITMAPFILEHEADER, *VLC_PBITMAPFILEHEADER;
+} BITMAPFILEHEADER, *LPBITMAPFILEHEADER, *PBITMAPFILEHEADER;
 #endif
 
 #endif
diff --git a/modules/video_filter/atmo/AtmoZoneDefinition.cpp b/modules/video_filter/atmo/AtmoZoneDefinition.cpp
index 36ffe25..997884b 100644
--- a/modules/video_filter/atmo/AtmoZoneDefinition.cpp
+++ b/modules/video_filter/atmo/AtmoZoneDefinition.cpp
@@ -192,7 +192,7 @@ int CAtmoZoneDefinition::LoadGradientFromBitmap(char *pszBitmap)
   // into m_basicWeight or use the GREEN value of a 24bit image!
   // channel of a true color bitmap!
   VLC_BITMAPINFO bmpInfo;
-  VLC_BITMAPFILEHEADER  bmpFileHeader;
+  BITMAPFILEHEADER  bmpFileHeader;
 
   /*
   ATMO_LOAD_GRADIENT_FILENOTFOND
@@ -206,7 +206,7 @@ int CAtmoZoneDefinition::LoadGradientFromBitmap(char *pszBitmap)
    if(!bmp)
     return ATMO_LOAD_GRADIENT_FILENOTFOND;
 
-    if(fread(&bmpFileHeader, sizeof(VLC_BITMAPFILEHEADER), 1, bmp) != 1)
+    if(fread(&bmpFileHeader, sizeof(BITMAPFILEHEADER), 1, bmp) != 1)
     {
         fclose(bmp);
         return ATMO_LOAD_GRADIENT_FAILED_SIZE;
diff --git a/modules/video_filter/atmo/atmo.cpp b/modules/video_filter/atmo/atmo.cpp
index f1ab6c6..52f3d18 100644
--- a/modules/video_filter/atmo/atmo.cpp
+++ b/modules/video_filter/atmo/atmo.cpp
@@ -2193,7 +2193,7 @@ void SaveBitmap(filter_sys_t *p_sys, uint8_t *p_pixels, char *psz_filename)
 {
     /* for debug out only used*/
     VLC_BITMAPINFO bmp_info;
-    VLC_BITMAPFILEHEADER  bmp_fileheader;
+    BITMAPFILEHEADER  bmp_fileheader;
     FILE *fp_bitmap;
 
     memset(&bmp_info, 0, sizeof(VLC_BITMAPINFO));
@@ -2208,17 +2208,17 @@ void SaveBitmap(filter_sys_t *p_sys, uint8_t *p_pixels, char *psz_filename)
 
     bmp_fileheader.bfReserved1 = 0;
     bmp_fileheader.bfReserved2 = 0;
-    bmp_fileheader.bfSize = sizeof(VLC_BITMAPFILEHEADER) +
+    bmp_fileheader.bfSize = sizeof(BITMAPFILEHEADER) +
                             sizeof(VLC_BITMAPINFOHEADER) +
                             bmp_info.bmiHeader.biSizeImage;
     bmp_fileheader.bfType = VLC_TWOCC('B','M');
-    bmp_fileheader.bfOffBits = sizeof(VLC_BITMAPFILEHEADER) +
+    bmp_fileheader.bfOffBits = sizeof(BITMAPFILEHEADER) +
                                sizeof(VLC_BITMAPINFOHEADER);
 
     fp_bitmap = fopen(psz_filename,"wb");
     if( fp_bitmap != NULL)
     {
-        fwrite(&bmp_fileheader, sizeof(VLC_BITMAPFILEHEADER), 1, fp_bitmap);
+        fwrite(&bmp_fileheader, sizeof(BITMAPFILEHEADER), 1, fp_bitmap);
         fwrite(&bmp_info.bmiHeader, sizeof(VLC_BITMAPINFOHEADER), 1, fp_bitmap);
         fwrite(p_pixels, bmp_info.bmiHeader.biSizeImage, 1, fp_bitmap);
         fclose(fp_bitmap);



More information about the vlc-commits mailing list