Exposing Colour information from first video track in WebmFile

Change-Id: I7a790b9bf3b59d5251ebb0f133b5f1892ec81aad
diff --git a/shared/webm_file.cc b/shared/webm_file.cc
index 4fbcfc1..feb1745 100644
--- a/shared/webm_file.cc
+++ b/shared/webm_file.cc
@@ -1179,6 +1179,13 @@
   return (GetVideoTrack() != NULL);
 }
 
+const mkvparser::Colour* WebMFile::VideoColour() const {
+  const mkvparser::VideoTrack* const vid_track = GetVideoTrack();
+  if (vid_track)
+    return vid_track->GetColour();
+  return NULL;
+}
+
 double WebMFile::VideoFramerate() const {
   double rate = 0.0;
   const mkvparser::VideoTrack* const vid_track = GetVideoTrack();
diff --git a/shared/webm_file.h b/shared/webm_file.h
index 9148364..07b64f1 100644
--- a/shared/webm_file.h
+++ b/shared/webm_file.h
@@ -22,6 +22,7 @@
 class AudioTrack;
 class Block;
 class Cluster;
+class Colour;
 class CuePoint;
 class Cues;
 class IMkvReader;
@@ -328,6 +329,11 @@
   // must be >= kParsingClusters for output to be valid.
   bool HasVideo() const;
 
+  // Returns the Colour information of the first video track. Returns 0 if there
+  // is no video track or if the video track has no colour element. Parser state
+  // must be >= kParsingClusters for output to be valid.
+  const mkvparser::Colour* VideoColour() const;
+
   // Returns the average framerate of the first video track. Returns 0.0 if
   // there is no video track or there is no FrameRate element.
   double VideoFramerate() const;