Re-post: I should proof-read my posts more thoroughly. Please ignore the previous one!

Just an observation - would it be better to use sequential numbers rather than powers of 2 for these settings as there would never be more than one selected in a parameter at a time... This would then also remove the restriction of a maximum of 32 different settings.

Another observation - would it be worth having settings for things like 29.97Hz that are separate from exactly 30Hz?

Regards,
James.


Quoting Daniel Laird <[EMAIL PROTECTED]>:

Sorry forgot to give the context:
We are using directfb on an embedded device and we have muliple layers etc which can all have their resolution set. However the device can also output to various connectors. (SCART/CVBS/YPBPR/HDMI) As this connections are connected to other display devices we need to be able to say we are outputing [EMAIL PROTECTED] or [EMAIL PROTECTED] Having looked at DirectFB these are sort off implied by PAL/NTSC/SECAM currently but for HD/HDMI this is not true. We need to be able to set encoder to output at a given resolution, scan type and frequency.

I think the easiest way to do this is to add a frequency enum. And extend the Signals types with the resolution combinations for example
/*
* TV standards.
*/
typedef enum {
    DSETV_UNKNOWN        = 0x00000000, /* Unknown standard */

    DSETV_PAL            = 0x00000001, /* PAL */
    DSETV_NTSC           = 0x00000002, /* NTSC */
    DSETV_SECAM          = 0x00000004, /* SECAM */
    DSETV_PAL60          = 0x00000008, /* PAL 60 Support*/
    DSETV_640_480        = 0x00000010, /* 640*480 */
    DSETV_640_720        = 0x00000020, /* 640*720 */
    DSETV_720_240        = 0x00000040, /* 720*240 */
    DSETV_720_288        = 0x00000080, /* 720*288 */
    DSETV_720_480        = 0x00000100, /* 720*480 */
    DSETV_720_576        = 0x00000200, /* 720*576 */
    DSETV_720_960        = 0x00000400, /* 720*960 */
    DSETV_800_480        = 0x00000800, /* 800*480 */
    DSETV_800_600        = 0x00001000, /* 800*600 */
    DSETV_960_1080       = 0x00002000, /* 960*1080 */
    DSETV_1024_576       = 0x00004000, /* 1024*576 */
    DSETV_1024_768       = 0x00008000, /* 1024*768 */
    DSETV_1280_720       = 0x00010000, /* 1280*720 */
    DSETV_1280_768       = 0x00020000, /* 1280*768 */
    DSETV_1440_1080      = 0x00040000, /* 1440*1080 */
    DSETV_1920_1080      = 0x00080000, /* 1920*1080 */
} DFBScreenEncoderTVStandards; (some of the above values may be removed)

/*
* Frequency of output signal.
*/
typedef enum {
    DSOF_UNKNOWN        = 0x00000000, /* Unknown Frequency */
    DSOF_25HZ           = 0x00000001, /* 25 Hz Output. */
    DSOF_30HZ           = 0x00000002, /* 30 Hz Output. */
    DSOF_50HZ           = 0x00000004, /* 50 Hz Output. */
    DSOF_60HZ           = 0x00000008, /* 60 Hz Output. */
    DSOF_75HZ           = 0x00000010, /* 75 Hz Output. */
    DSOF_100HZ          = 0x00000020, /* 100 Hz Output. */
} DFBScreenEncoderFrequency; (some of the above values may be removed)

We can then use the frequency and scan type enums along with the above enum to form most output type combinations.

Hope this clears things up.



_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to