summaryrefslogtreecommitdiff
path: root/src/xine-engine/vo_scale.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xine-engine/vo_scale.c')
-rw-r--r--src/xine-engine/vo_scale.c43
1 files changed, 17 insertions, 26 deletions
diff --git a/src/xine-engine/vo_scale.c b/src/xine-engine/vo_scale.c
index b2f3001d0..567b3984a 100644
--- a/src/xine-engine/vo_scale.c
+++ b/src/xine-engine/vo_scale.c
@@ -15,10 +15,8 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
- * $Id: vo_scale.c,v 1.39 2006/09/26 08:00:02 dgp85 Exp $
- *
* Contains common code to calculate video scaling parameters.
* In short, it will map frame dimensions to screen/window size.
* Takes into account aspect ratio correction and zooming.
@@ -34,8 +32,8 @@
#define LOG
*/
-#include "xine_internal.h"
-#include "vo_scale.h"
+#include <xine/xine_internal.h>
+#include <xine/vo_scale.h>
/*
* convert delivered height/width to ideal width/height
@@ -313,28 +311,21 @@ void _x_vo_scale_translate_gui2video(vo_scale_t *this,
*vid_y = y;
}
-/*
- * Returns description of a given ratio code
+/*/
+ * @brief Table for description of a given ratio code.
+ *
+ * @note changing the size of the elements of the array will break
+ * ABI, so please don't do that unless you absolutely can't continue
+ * with the current size.
*/
-
-char *_x_vo_scale_aspect_ratio_name(int a) {
-
- switch (a) {
- case XINE_VO_ASPECT_AUTO:
- return "auto";
- case XINE_VO_ASPECT_SQUARE:
- return "square";
- case XINE_VO_ASPECT_4_3:
- return "4:3";
- case XINE_VO_ASPECT_ANAMORPHIC:
- return "16:9";
- case XINE_VO_ASPECT_DVB:
- return "2:1";
- default:
- return "unknown";
- }
-}
-
+const char _x_vo_scale_aspect_ratio_name_table[][8] = {
+ "auto", /* XINE_VO_ASPECT_AUTO */
+ "square", /* XINE_VO_ASPECT_SQUARE */
+ "4:3", /* XINE_VO_ASPECT_4_3 */
+ "16:9", /* XINE_VO_ASPECT_ANAMORPHIC */
+ "2:1", /* XINE_VO_ASPECT_DVB */
+ "unknown" /* All the rest */
+};
/*
* config callbacks