vfs: check userland buffers before reading them.
[haiku.git] / src / add-ons / accelerants / common / video_configuration.cpp
bloba6ed5bd1b9631ea05fc469f9363873df5da41d36
1 /*
2 * Copyright 2011, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Alexander von Gluck, kallisti5@unixzen.com
7 */
10 #include <KernelExport.h>
11 #include <stdio.h>
13 #include "video_configuration.h"
16 const char*
17 get_connector_name(uint32 connector)
19 switch (connector) {
20 case VIDEO_CONNECTOR_VGA:
21 return "VGA";
22 case VIDEO_CONNECTOR_DVII:
23 return "DVI-I (Digital and Analog)";
24 case VIDEO_CONNECTOR_DVID:
25 return "DVI-D (Digital Only)";
26 case VIDEO_CONNECTOR_DVIA:
27 return "DVI-A (Analog Only)";
28 case VIDEO_CONNECTOR_COMPOSITE:
29 return "Composite";
30 case VIDEO_CONNECTOR_SVIDEO:
31 return "S-Video";
32 case VIDEO_CONNECTOR_LVDS:
33 return "LVDS Panel";
34 case VIDEO_CONNECTOR_COMPONENT:
35 return "Component";
36 case VIDEO_CONNECTOR_9DIN:
37 return "9-Pin DIN";
38 case VIDEO_CONNECTOR_DP:
39 return "DisplayPort";
40 case VIDEO_CONNECTOR_EDP:
41 return "Embedded DisplayPort";
42 case VIDEO_CONNECTOR_HDMIA:
43 return "HDMI A";
44 case VIDEO_CONNECTOR_HDMIB:
45 return "HDMI B";
46 case VIDEO_CONNECTOR_TV:
47 return "TV";
48 case VIDEO_CONNECTOR_UNKNOWN:
49 return "Unknown";
51 return "Undefined";
55 const char*
56 get_encoder_name(uint32 encoder)
58 switch (encoder) {
59 case VIDEO_ENCODER_NONE:
60 return "None";
61 case VIDEO_ENCODER_DAC:
62 return "DAC";
63 case VIDEO_ENCODER_TMDS:
64 return "TMDS";
65 case VIDEO_ENCODER_LVDS:
66 return "LVDS";
67 case VIDEO_ENCODER_TVDAC:
68 return "TV DAC";
70 return "Undefined";