[grilo] metadata-keys: add metadata keys from camera pictures



commit af52d33985cbfa3eb90f46c68180edf5d32b56c1
Author: Lionel Landwerlin <lionel g landwerlin linux intel com>
Date:   Fri Mar 18 14:00:26 2011 +0000

    metadata-keys: add metadata keys from camera pictures
    
        * Creation date
        * Camera model
        * Flash used
        * Exposure time
        * Original width
        * Original height
    
    Signed-off-by: Lionel Landwerlin <lionel g landwerlin linux intel com>
    Signed-off-by: Juan A. Suarez Romero <jasuarez igalia com>

 src/grl-metadata-key.c |   87 ++++++++++++++++++++++++++++++++++++++++++++++++
 src/grl-metadata-key.h |    8 ++++
 2 files changed, 95 insertions(+), 0 deletions(-)
---
diff --git a/src/grl-metadata-key.c b/src/grl-metadata-key.c
index f2658a6..9ae507b 100644
--- a/src/grl-metadata-key.c
+++ b/src/grl-metadata-key.c
@@ -65,6 +65,16 @@ GrlKeyID GRL_METADATA_KEY_SEASON = NULL;
 GrlKeyID GRL_METADATA_KEY_EPISODE = NULL;
 GrlKeyID GRL_METADATA_KEY_SHOW = NULL;
 
+GrlKeyID GRL_METADATA_KEY_CREATION_DATE = NULL;
+
+GrlKeyID GRL_METADATA_KEY_CAMERA_MODEL = NULL;
+GrlKeyID GRL_METADATA_KEY_ORIENTATION = NULL;
+GrlKeyID GRL_METADATA_KEY_FLASH_USED = NULL;
+GrlKeyID GRL_METADATA_KEY_EXPOSURE_TIME = NULL;
+GrlKeyID GRL_METADATA_KEY_ISO_SPEED = NULL;
+GrlKeyID GRL_METADATA_KEY_ORIGINAL_WIDTH = NULL;
+GrlKeyID GRL_METADATA_KEY_ORIGINAL_HEIGHT = NULL;
+
 void
 grl_metadata_key_setup_system_keys (GrlPluginRegistry *registry)
 {
@@ -356,6 +366,83 @@ GRL_METADATA_KEY_STUDIO =
                                                                     G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
                                                NULL);
 
+  GRL_METADATA_KEY_CREATION_DATE =
+    grl_plugin_registry_register_metadata_key (registry,
+                                               g_param_spec_string ("creation-date",
+                                                                    "Creation date",
+                                                                    "Creation date",
+                                                                    NULL,
+                                                                    G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+                                               NULL);
+
+  GRL_METADATA_KEY_CAMERA_MODEL =
+    grl_plugin_registry_register_metadata_key (registry,
+                                               g_param_spec_string ("camera-model",
+                                                                    "Camera model",
+                                                                    "Name of the camera model used to take the photo",
+                                                                    NULL,
+                                                                    G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+                                               NULL);
+
+  GRL_METADATA_KEY_ORIENTATION =
+    grl_plugin_registry_register_metadata_key (registry,
+                                               g_param_spec_int ("orientation",
+                                                                 "Picture orientation",
+                                                                 "Orientation of the photo in degree (clockwise)",
+                                                                 0, 360,
+                                                                 0,
+                                                                 G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+                                               NULL);
+
+  GRL_METADATA_KEY_FLASH_USED =
+    grl_plugin_registry_register_metadata_key (registry,
+                                               g_param_spec_boolean ("flash-used",
+                                                                     "Flash used",
+                                                                     "Whether or not a flash was used to take that picture",
+                                                                     FALSE,
+                                                                     G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+                                               NULL);
+
+  GRL_METADATA_KEY_EXPOSURE_TIME =
+    grl_plugin_registry_register_metadata_key (registry,
+                                               g_param_spec_float ("exposure-time",
+                                                                   "Exposure time",
+                                                                   "Exposure time of the photo in seconds",
+                                                                   0, G_MAXFLOAT,
+                                                                   0,
+                                                                   G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+                                               NULL);
+
+  GRL_METADATA_KEY_ISO_SPEED =
+    grl_plugin_registry_register_metadata_key (registry,
+                                               g_param_spec_float ("iso-speed",
+                                                                   "ISO speed",
+                                                                   "Photographic film's sensitivity to light as ISO value",
+                                                                   0, G_MAXFLOAT,
+                                                                   0,
+                                                                   G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+                                               NULL);
+
+  GRL_METADATA_KEY_ORIGINAL_WIDTH =
+    grl_plugin_registry_register_metadata_key (registry,
+                                               g_param_spec_int ("original-width",
+                                                                 "Original width",
+                                                                 "Original width of the photo",
+                                                                 0, G_MAXINT,
+                                                                 0,
+                                                                 G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+                                               NULL);
+
+  GRL_METADATA_KEY_ORIGINAL_HEIGHT =
+    grl_plugin_registry_register_metadata_key (registry,
+                                               g_param_spec_int ("original-height",
+                                                                 "Original height",
+                                                                 "Original height of the photo",
+                                                                 0, G_MAXINT,
+                                                                 0,
+                                                                 G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
+                                               NULL);
+
   /* Create the relations */
   grl_plugin_registry_register_metadata_key_relation (registry,
                                                       GRL_METADATA_KEY_URL,
diff --git a/src/grl-metadata-key.h b/src/grl-metadata-key.h
index 652d87f..84c5f4f 100644
--- a/src/grl-metadata-key.h
+++ b/src/grl-metadata-key.h
@@ -76,6 +76,14 @@ extern GrlKeyID GRL_METADATA_KEY_WIDTH;
 extern GrlKeyID GRL_METADATA_KEY_SEASON;
 extern GrlKeyID GRL_METADATA_KEY_EPISODE;
 extern GrlKeyID GRL_METADATA_KEY_SHOW;
+extern GrlKeyID GRL_METADATA_KEY_CREATION_DATE;
+extern GrlKeyID GRL_METADATA_KEY_CAMERA_MODEL;
+extern GrlKeyID GRL_METADATA_KEY_ORIENTATION;
+extern GrlKeyID GRL_METADATA_KEY_FLASH_USED;
+extern GrlKeyID GRL_METADATA_KEY_EXPOSURE_TIME;
+extern GrlKeyID GRL_METADATA_KEY_ISO_SPEED;
+extern GrlKeyID GRL_METADATA_KEY_ORIGINAL_WIDTH;
+extern GrlKeyID GRL_METADATA_KEY_ORIGINAL_HEIGHT;
 
 const gchar *grl_metadata_key_get_name (GrlKeyID key);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]