// This file is from: http://code.google.com/p/thrift-protobuf-compare

package serializers.protobuf;

option java_package = "serializers.protobuf";
option java_outer_classname = "MediaContentHolder";
option optimize_for = SPEED;

message Image {
  required string uri = 1;      //url to the thumbnail
  optional string title = 2;    //used in the html ALT
  optional int32 width = 3;     // of the image
  optional int32 height = 4;    // of the image
  enum Size {
    SMALL = 0;
    LARGE = 1;
  }
  optional Size size = 5;       // of the image (in relative terms, provided by cnbc for example)
}

message Media {
  required string uri = 1;      //uri to the video, may not be an actual URL
  optional string title = 2;    //used in the html ALT
  optional int32 width = 3;     // of the video
  optional int32 height = 4;    // of the video
  optional string format = 5;   //avi, jpg, youtube, cnbc, audio/mpeg formats ...
  optional int64 duration = 6;  //time in miliseconds
  optional int64 size = 7;      //file size
  optional int32 bitrate = 8;   //video 
  repeated string person = 9;   //name of a person featured in the video
  enum Player {
    JAVA = 0;
    FLASH = 1;
  }
  optional Player player = 10;   //in case of a player specific media
  optional string copyright = 11;//media copyright
}

message MediaContent {
  repeated Image image = 1;
  optional Media media = 2;
}

service MediaServer {
  rpc updateMedia(MediaContent) returns(MediaContent);
}

