* add video_electronics.c

(.c to keep compatibility with older C accelerants)
* use functions for decoding video_electronics
* thanks for the guidance Axel!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42668 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Alexander von Gluck IV
2011-08-21 17:30:55 +00:00
parent ed32703038
commit 3671476941
3 changed files with 86 additions and 32 deletions
@@ -27,28 +27,6 @@
#define VIDEO_CONNECTOR_TV 0x0E
const struct video_connectors {
uint32 type;
const char* name;
} kVideoConnector[] = {
{VIDEO_CONNECTOR_UNKNOWN, "Unknown"},
{VIDEO_CONNECTOR_VGA, "VGA" },
{VIDEO_CONNECTOR_DVII, "DVI-I"},
{VIDEO_CONNECTOR_DVID, "DVI-D"},
{VIDEO_CONNECTOR_DVIA, "DVI-A"},
{VIDEO_CONNECTOR_COMPOSITE, "Composite"},
{VIDEO_CONNECTOR_SVIDEO, "S-Video"},
{VIDEO_CONNECTOR_LVDS, "LVDS"},
{VIDEO_CONNECTOR_COMPONENT, "Component"},
{VIDEO_CONNECTOR_9DIN, "DIN"},
{VIDEO_CONNECTOR_DP, "DisplayPort"},
{VIDEO_CONNECTOR_EDP, "Embedded DisplayPort"},
{VIDEO_CONNECTOR_HDMIA, "HDMI A"},
{VIDEO_CONNECTOR_HDMIB, "HDMI B"},
{VIDEO_CONNECTOR_TV, "TV"},
};
// Video encoder types
#define VIDEO_ENCODER_NONE 0x00
#define VIDEO_ENCODER_DAC 0x01
@@ -57,16 +35,20 @@ const struct video_connectors {
#define VIDEO_ENCODER_TVDAC 0x04
const struct video_encoders {
uint32 type;
const char* name;
} kVideoEncoder[] = {
{VIDEO_ENCODER_NONE, "None"},
{VIDEO_ENCODER_DAC, "DAC"},
{VIDEO_ENCODER_TMDS, "TMDS"},
{VIDEO_ENCODER_LVDS, "LVDS"},
{VIDEO_ENCODER_TVDAC, "TV"},
};
// to ensure compatibility with C accelerants
#ifdef __cplusplus
extern "C" {
#endif
// mostly for debugging detected monitors
const char* decode_connector_name(uint32 connector);
const char* decode_encoder_name(uint32 encoder);
#ifdef __cplusplus
}
#endif
#endif /* _VIDEO_ELECTRONICS_H */