From f76b2f2046d1eaefae8bf6f46c6388817d8bc284 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Tue, 3 Nov 2009 07:58:10 +0000 Subject: Initial recording screen skin support (usable in .sbs skins only for now) new skin tokens: %Rp - does the target have recording? %Rf - samplerate %Re - encoder %Rb - bitrate %Rm - mono/stereo Please put all bugs from these (which very probably dont work 100%) into FS#10755. And someone who knows how the recoding capabilities work please look this over... ideally the same value should be returned for the middle three tags no matter what the capabilities of the target are. CustomWPS on the wiki for more details git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23491 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/skin_engine/skin_parser.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'apps/gui/skin_engine/skin_parser.c') diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index ae33e907f0..a72dcb8f02 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c @@ -360,7 +360,16 @@ static const struct wps_tag all_tags[] = { { WPS_TOKEN_LASTTOUCH, "Tl", WPS_REFRESH_DYNAMIC, parse_timeout }, { WPS_TOKEN_CURRENT_SCREEN, "cs", WPS_REFRESH_DYNAMIC, NULL }, { WPS_NO_TOKEN, "T", 0, parse_touchregion }, - + + + /* Recording Tokens */ + { WPS_TOKEN_HAVE_RECORDING, "Rp", WPS_REFRESH_STATIC, NULL }, +#ifdef HAVE_RECORDING + { WPS_TOKEN_REC_FREQ, "Rf", WPS_REFRESH_DYNAMIC, NULL }, + { WPS_TOKEN_REC_ENCODER, "Re", WPS_REFRESH_DYNAMIC, NULL }, + { WPS_TOKEN_REC_BITRATE, "Rb", WPS_REFRESH_DYNAMIC, NULL }, + { WPS_TOKEN_REC_MONO, "Rm", WPS_REFRESH_DYNAMIC, NULL }, +#endif { WPS_TOKEN_UNKNOWN, "", 0, NULL } /* the array MUST end with an empty string (first char is \0) */ }; @@ -1461,6 +1470,12 @@ static int check_feature_tag(const char *wps_bufptr, const int type) #else return find_false_branch(wps_bufptr); #endif + case WPS_TOKEN_HAVE_RECORDING: +#ifdef HAVE_RECORDING + return 0; +#else + return find_false_branch(wps_bufptr); +#endif default: /* not a tag we care about, just don't skip */ return 0; } -- cgit v1.2.3