[gnac/devel] Retrieve and display tag 'encoder' and 'container'
- From: Benoît Dupasquier <bdupasqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnac/devel] Retrieve and display tag 'encoder' and 'container'
- Date: Sun, 31 Oct 2010 22:29:00 +0000 (UTC)
commit 0870753c1f9a2bab5181e1b94df2b475d0e2ff2a
Author: Benoît Dupasquier <bdupasqu src gnome org>
Date: Sun Oct 31 22:28:52 2010 +0000
Retrieve and display tag 'encoder' and 'container'
libgnac/libgnac-metadata-tags.h | 24 ++++++++++++++++-----
src/gnac-properties.c | 42 +++++++++++++++++++++-----------------
2 files changed, 41 insertions(+), 25 deletions(-)
---
diff --git a/libgnac/libgnac-metadata-tags.h b/libgnac/libgnac-metadata-tags.h
index dc03d31..049ad71 100644
--- a/libgnac/libgnac-metadata-tags.h
+++ b/libgnac/libgnac-metadata-tags.h
@@ -54,18 +54,20 @@ typedef GHashTable LibgnacTags;
(g_str_equal((tag), GST_TAG_ARTIST))
#define LIBGNAC_METADATA_TAG_IS_AUDIO_CODEC(tag) \
(g_str_equal((tag), GST_TAG_AUDIO_CODEC))
-#define LIBGNAC_METADATA_TAG_IS_VIDEO_CODEC(tag) \
- (g_str_equal((tag), GST_TAG_VIDEO_CODEC))
#define LIBGNAC_METADATA_TAG_IS_BITRATE(tag) \
(g_str_equal((tag), GST_TAG_BITRATE))
#define LIBGNAC_METADATA_TAG_IS_CHANNELS(tag) \
(g_str_equal((tag), GNAC_TAG_CHANNELS))
#define LIBGNAC_METADATA_TAG_IS_COMMENT(tag) \
(g_str_equal((tag), GST_TAG_COMMENT))
+#define LIBGNAC_METADATA_TAG_IS_CONTAINER(tag) \
+ (g_str_equal((tag), GST_TAG_CONTAINER_FORMAT))
#define LIBGNAC_METADATA_TAG_IS_DATE(tag) \
(g_str_equal((tag), GST_TAG_DATE))
#define LIBGNAC_METADATA_TAG_IS_DURATION(tag) \
(g_str_equal((tag), GST_TAG_DURATION))
+#define LIBGNAC_METADATA_TAG_IS_ENCODER(tag) \
+ (g_str_equal((tag), GST_TAG_ENCODER))
#define LIBGNAC_METADATA_TAG_IS_FILE_SIZE(tag) \
(g_str_equal((tag), GNAC_TAG_FILE_SIZE))
#define LIBGNAC_METADATA_TAG_IS_FILENAME(tag) \
@@ -90,14 +92,16 @@ typedef GHashTable LibgnacTags;
(g_str_equal((tag), GST_TAG_TITLE))
#define LIBGNAC_METADATA_TAG_IS_TRACK_COUNT(tag) \
(g_str_equal((tag), GST_TAG_TRACK_COUNT))
-#define LIBGNAC_METADATA_TAG_IS_TRACK_NUMBER(tag) \
- (g_str_equal((tag), GST_TAG_TRACK_NUMBER))
#define LIBGNAC_METADATA_TAG_IS_TRACK_GAIN(tag) \
(g_str_equal((tag), GST_TAG_TRACK_GAIN))
+#define LIBGNAC_METADATA_TAG_IS_TRACK_NUMBER(tag) \
+ (g_str_equal((tag), GST_TAG_TRACK_NUMBER))
#define LIBGNAC_METADATA_TAG_IS_TRACK_PEAK(tag) \
(g_str_equal((tag), GST_TAG_TRACK_PEAK))
#define LIBGNAC_METADATA_TAG_IS_VBR(tag) \
(g_str_equal((tag), GNAC_TAG_VBR))
+#define LIBGNAC_METADATA_TAG_IS_VIDEO_CODEC(tag) \
+ (g_str_equal((tag), GST_TAG_VIDEO_CODEC))
#define LIBGNAC_METADATA_TAG_IS_WIDTH(tag) \
(g_str_equal((tag), GNAC_TAG_WIDTH))
@@ -111,18 +115,20 @@ typedef GHashTable LibgnacTags;
(g_hash_table_lookup((GHashTable*)(tags), GST_TAG_ARTIST))
#define LIBGNAC_METADATA_TAG_AUDIO_CODEC(tags) \
(g_hash_table_lookup((GHashTable*)(tags), GST_TAG_AUDIO_CODEC))
-#define LIBGNAC_METADATA_TAG_VIDEO_CODEC(tags) \
- (g_hash_table_lookup((GHashTable*)(tags), GST_TAG_VIDEO_CODEC))
#define LIBGNAC_METADATA_TAG_BITRATE(tags) \
(g_hash_table_lookup((GHashTable*)(tags), GST_TAG_BITRATE))
#define LIBGNAC_METADATA_TAG_CHANNELS(tags) \
(g_hash_table_lookup((GHashTable*)(tags), GNAC_TAG_CHANNELS))
#define LIBGNAC_METADATA_TAG_COMMENT(tags) \
(g_hash_table_lookup((GHashTable*)(tags), GST_TAG_COMMENT))
+#define LIBGNAC_METADATA_TAG_CONTAINER_FORMAT(tags) \
+ (g_hash_table_lookup((GHashTable*)(tags), GST_TAG_CONTAINER_FORMAT))
#define LIBGNAC_METADATA_TAG_DATE(tags) \
(g_hash_table_lookup((GHashTable*)(tags), GST_TAG_DATE))
#define LIBGNAC_METADATA_TAG_DURATION(tags) \
(g_hash_table_lookup((GHashTable*)(tags), GST_TAG_DURATION))
+#define LIBGNAC_METADATA_TAG_ENCODER(tags) \
+ (g_hash_table_lookup((GHashTable*)(tags), GST_TAG_ENCODER))
#define LIBGNAC_METADATA_TAG_FILE_SIZE(tags) \
(g_hash_table_lookup((GHashTable*)(tags), GNAC_TAG_FILE_SIZE))
#define LIBGNAC_METADATA_TAG_FILENAME(tags) \
@@ -147,10 +153,16 @@ typedef GHashTable LibgnacTags;
(g_hash_table_lookup((GHashTable*)(tags), GST_TAG_TITLE))
#define LIBGNAC_METADATA_TAG_TRACK_COUNT(tags) \
(g_hash_table_lookup((GHashTable*)(tags), GST_TAG_TRACK_COUNT))
+#define LIBGNAC_METADATA_TAG_TRACK_GAIN(tag) \
+ (g_hash_table_lookup((GHashTable*)(tags), GST_TAG_TRACK_GAIN))
#define LIBGNAC_METADATA_TAG_TRACK_NUMBER(tags) \
(g_hash_table_lookup((GHashTable*)(tags), GST_TAG_TRACK_NUMBER))
+#define LIBGNAC_METADATA_TAG_TRACK_PEAK(tag) \
+ (g_hash_table_lookup((GHashTable*)(tags), GST_TAG_TRACK_PEAK))
#define LIBGNAC_METADATA_TAG_VBR(tags) \
(g_hash_table_lookup((GHashTable*)(tags), GNAC_TAG_VBR))
+#define LIBGNAC_METADATA_TAG_VIDEO_CODEC(tags) \
+ (g_hash_table_lookup((GHashTable*)(tags), GST_TAG_VIDEO_CODEC))
#define LIBGNAC_METADATA_TAG_WIDTH(tags) \
(g_hash_table_lookup((GHashTable*)(tags), GNAC_TAG_WIDTH))
diff --git a/src/gnac-properties.c b/src/gnac-properties.c
index adc34c3..729a657 100644
--- a/src/gnac-properties.c
+++ b/src/gnac-properties.c
@@ -85,21 +85,23 @@ static const gchar *displayed_tags[] = {
};
static const gchar *displayed_properties[][2] = {
- { GNAC_TAG_FILENAME, N_("Filename") },
- { GST_TAG_LOCATION, N_("Location") },
- { GST_TAG_DURATION, N_("Duration") },
- { GNAC_TAG_FILE_SIZE, N_("File size") },
- { GNAC_TAG_CHANNELS, N_("Channels") },
- /* Translators: Audio mode, e.g., mono or stereo */
- { GNAC_TAG_MODE, N_("Mode") },
+ { GNAC_TAG_FILENAME, N_("Filename") },
+ { GST_TAG_LOCATION, N_("Location") },
+ { GST_TAG_DURATION, N_("Duration") },
+ { GNAC_TAG_FILE_SIZE, N_("File size") },
+ { GNAC_TAG_CHANNELS, N_("Channels") },
+ /* Translators: Audio mode, e.g., mono or stereo */
+ { GNAC_TAG_MODE, N_("Mode") },
/* Translators: sample rate */
- { GNAC_TAG_RATE, N_("Rate") },
- { GST_TAG_AUDIO_CODEC, N_("Audio codec") },
- { GST_TAG_VIDEO_CODEC, N_("Video codec") },
- { GST_TAG_BITRATE, N_("Bitrate") },
- { GST_TAG_TRACK_GAIN, N_("Track gain") },
- { GST_TAG_TRACK_PEAK, N_("Track peak") },
- { GNAC_TAG_FRAMERATE, N_("Framerate") },
+ { GNAC_TAG_RATE, N_("Rate") },
+ { GST_TAG_CONTAINER_FORMAT, N_("Container") },
+ { GST_TAG_AUDIO_CODEC, N_("Audio codec") },
+ { GST_TAG_VIDEO_CODEC, N_("Video codec") },
+ { GST_TAG_BITRATE, N_("Bitrate") },
+ { GST_TAG_TRACK_GAIN, N_("Track gain") },
+ { GST_TAG_TRACK_PEAK, N_("Track peak") },
+ { GNAC_TAG_FRAMERATE, N_("Framerate") },
+ { GST_TAG_ENCODER, N_("Encoder") },
{ NULL, NULL }
};
@@ -392,11 +394,13 @@ gnac_properties_get_property_from_value(const gchar *name,
if (val == 0) return NULL;
else return g_strdup_printf("%g", val);
}
- if (LIBGNAC_METADATA_TAG_IS_FILENAME(name) ||
- LIBGNAC_METADATA_TAG_IS_LOCATION(name) ||
- LIBGNAC_METADATA_TAG_IS_AUDIO_CODEC(name) ||
- LIBGNAC_METADATA_TAG_IS_VIDEO_CODEC(name) ||
- LIBGNAC_METADATA_TAG_IS_MODE(name))
+ if (LIBGNAC_METADATA_TAG_IS_AUDIO_CODEC(name)
+ || LIBGNAC_METADATA_TAG_IS_CONTAINER(name)
+ || LIBGNAC_METADATA_TAG_IS_ENCODER(name)
+ || LIBGNAC_METADATA_TAG_IS_FILENAME(name)
+ || LIBGNAC_METADATA_TAG_IS_LOCATION(name)
+ || LIBGNAC_METADATA_TAG_IS_MODE(name)
+ || LIBGNAC_METADATA_TAG_IS_VIDEO_CODEC(name))
{
const gchar *str = g_value_get_string(value);
if (!str) return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]