]> git.sesse.net Git - vlc/blobdiff - include/codecs.h
* modules/codec/spudec/*: automatic cropping of fullscreen subpictures (most of them...
[vlc] / include / codecs.h
index 2e3361d4c2623f14e51b2b8446a9080bc7001913..8dc1ee877034d577a331250e72b5da2b2bbd9258 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright (C) 1999-2001 VideoLAN
  * $Id$
  *
- * Author: Gildas Bazin <gbazin@netcourrier.com>
+ * Author: Gildas Bazin <gbazin@videolan.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -120,11 +120,38 @@ typedef struct {
 } BITMAPINFO, *LPBITMAPINFO;
 #endif
 
-/* dvb_spuinfo_t exports the id of the selected track to the decoder */
+#ifndef _RECT32_
+#define _RECT32_
 typedef struct
+#ifdef HAVE_ATTRIBUTE_PACKED
+    __attribute__((__packed__))
+#endif
 {
-    unsigned int i_id;
-} dvb_spuinfo_t;
+    int left, top, right, bottom;
+} RECT32;
+#endif
+
+#ifndef _REFERENCE_TIME_
+#define _REFERENCE_TIME_
+typedef int64_t REFERENCE_TIME;
+#endif
+
+#ifndef _VIDEOINFOHEADER_
+#define _VIDEOINFOHEADER_
+typedef struct
+#ifdef HAVE_ATTRIBUTE_PACKED
+    __attribute__((__packed__))
+#endif
+{
+    RECT32            rcSource;
+    RECT32            rcTarget;
+    uint32_t          dwBitRate;
+    uint32_t          dwBitErrorRate;
+    REFERENCE_TIME    AvgTimePerFrame;
+    BITMAPINFOHEADER  bmiHeader;
+    //int               reserved[3];
+} VIDEOINFOHEADER;
+#endif
 
 /* WAVE format wFormatTag IDs */
 #define WAVE_FORMAT_UNKNOWN             0x0000 /* Microsoft Corporation */
@@ -207,25 +234,26 @@ wave_format_tag_to_fourcc[] =
     { WAVE_FORMAT_UNKNOWN,  VLC_FOURCC( 'u', 'n', 'd', 'f' ), "Unknown" }
 };
 
-static inline void wf_tag_to_fourcc( uint16_t i_tag,
-                                     vlc_fourcc_t *fcc, char **ppsz_name )
+static inline void wf_tag_to_fourcc( uint16_t i_tag, vlc_fourcc_t *fcc,
+                                     char **ppsz_name )
 {
     int i;
     for( i = 0; wave_format_tag_to_fourcc[i].i_tag != 0; i++ )
     {
-        if( wave_format_tag_to_fourcc[i].i_tag == i_tag )
-        {
-            break;
-        }
+        if( wave_format_tag_to_fourcc[i].i_tag == i_tag ) break;
     }
-    if( fcc )
-    {
-        *fcc = wave_format_tag_to_fourcc[i].i_fourcc;
-    }
-    if( ppsz_name )
+    if( fcc ) *fcc = wave_format_tag_to_fourcc[i].i_fourcc;
+    if( ppsz_name ) *ppsz_name = wave_format_tag_to_fourcc[i].psz_name;
+}
+
+static inline void fourcc_to_wf_tag( vlc_fourcc_t fcc, uint16_t *pi_tag )
+{
+    int i;
+    for( i = 0; wave_format_tag_to_fourcc[i].i_tag != 0; i++ )
     {
-        *ppsz_name = wave_format_tag_to_fourcc[i].psz_name;
+        if( wave_format_tag_to_fourcc[i].i_fourcc == fcc ) break;
     }
+    if( pi_tag ) *pi_tag = wave_format_tag_to_fourcc[i].i_tag;
 }
 
 /**
@@ -252,6 +280,7 @@ typedef struct es_sys_t
     vlc_bool_t          b_forced_subs;
     unsigned int        palette[16];
     unsigned int        colors[4];
+
 } subtitle_data_t;
 
 #endif /* "codecs.h" */