[gnac/devel] Retrieve and display framerate
- From: Benoît Dupasquier <bdupasqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnac/devel] Retrieve and display framerate
- Date: Sun, 11 Jul 2010 11:10:26 +0000 (UTC)
commit d0032e962ef3f945295fd36af26760698117487b
Author: Benoît Dupasquier <bdupasqu src gnome org>
Date: Sun Jul 11 12:10:11 2010 +0100
Retrieve and display framerate
src/gnac-properties.c | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/src/gnac-properties.c b/src/gnac-properties.c
index b001a6e..70163d5 100644
--- a/src/gnac-properties.c
+++ b/src/gnac-properties.c
@@ -97,6 +97,7 @@ static const gchar *displayed_properties[] = {
GST_TAG_BITRATE,
GST_TAG_TRACK_GAIN,
GST_TAG_TRACK_PEAK,
+ GNAC_TAG_FRAMERATE,
NULL
};
@@ -115,6 +116,7 @@ static const gchar *nice_properties[] = {
N_("Bitrate"),
N_("Track gain"),
N_("Track peak"),
+ N_("Framerate"),
NULL
};
@@ -365,9 +367,11 @@ gnac_properties_get_property_from_value(const gchar *name,
/* convert the bitrate from bps to kbps */
val /= 1000;
if (libgnac_metadata_tag_exists(tags, GNAC_TAG_VBR)) {
- return g_strdup_printf("~%d kbps (VBR)", val);
+ /* Translators: variable bitrate */
+ return g_strdup_printf(_("~%d kbps (VBR)"), val);
} else {
- return g_strdup_printf("%d kbps", val);
+ /* Translators: bitrate */
+ return g_strdup_printf(_("%d kbps"), val);
}
}
if (LIBGNAC_METADATA_TAG_IS_FILE_SIZE(name))
@@ -382,7 +386,15 @@ gnac_properties_get_property_from_value(const gchar *name,
{
gint val = g_value_get_int(value);
if (val == 0) return NULL;
- else return g_strdup_printf("%d Hz", val);
+ /* Translators: rate */
+ else return g_strdup_printf(_("%d Hz"), val);
+ }
+ if (LIBGNAC_METADATA_TAG_IS_FRAMERATE(name))
+ {
+ gfloat val = g_value_get_float(value);
+ if (val == 0) return NULL;
+ /* Translators: framerate */
+ else return g_strdup_printf(_("%.3lf fps"), val);
}
if (LIBGNAC_METADATA_TAG_IS_CHANNELS(name))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]