Re: [PATCH 5/9] core: Create relation with key "url"




On Mon, 21 Feb 2011 10:36:31 +0100, "Juan A. Suarez Romero" <jasuarez igalia com> wrote:
Keys "url", "mime-type", "bitrate", "framerate", "height" and "width"
are correlated.

Mmm... this is only for video, actually they would not be correlated for audio, since width and height would not make sense there for example. And I wonder if that would be the case also for relations in other keys. That said, I don't know if this is a real problem or not, but it is something that is not quite right and I want to confirm that is not going to be a source of trouble in the future, have you thought about this?

Iago

Signed-off-by: Juan A. Suarez Romero <jasuarez igalia com>
---
 src/grl-metadata-key.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/src/grl-metadata-key.c b/src/grl-metadata-key.c
index 92e7a10..df9b3d2 100644
--- a/src/grl-metadata-key.c
+++ b/src/grl-metadata-key.c
@@ -322,6 +322,23 @@ GRL_METADATA_KEY_STUDIO =
0,

G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE),
                                                NULL);
+
+  /* Create the relations */
+  grl_plugin_registry_register_metadata_relation (registry,
+ GRL_METADATA_KEY_URL, + GRL_METADATA_KEY_MIME);
+  grl_plugin_registry_register_metadata_relation (registry,
+ GRL_METADATA_KEY_URL, + GRL_METADATA_KEY_BITRATE);
+  grl_plugin_registry_register_metadata_relation (registry,
+ GRL_METADATA_KEY_URL,
+
GRL_METADATA_KEY_FRAMERATE);
+  grl_plugin_registry_register_metadata_relation (registry,
+ GRL_METADATA_KEY_URL, + GRL_METADATA_KEY_HEIGHT);
+  grl_plugin_registry_register_metadata_relation (registry,
+ GRL_METADATA_KEY_URL, + GRL_METADATA_KEY_WIDTH);
 }

 /**



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