Could we change protobuf version of cobalt?

214 views Asked by At

could we change protobuf version of cobalt ?
current protobuf is 2.4, but widevine(2.0.8) need protobuf version 2.5.
in google_streaming_api.pb.h, it hard coded "2004000" and warn us "DO NOT EDIT!" at top.

could you give us some suggestion?

1

There are 1 answers

0
David Ghandehari On

Protobuf was actually included primarily for Widevine support, but it was included for an older version of Widevine. Also, Cobalt now also uses it for other purposes.

If Widevine requires a particular version of protobuf, it is most likely because it requires some feature of protobuf that was introduced in that version, so just changing the version number is probably not going to work.

Assuming protobuf maintains backwards compatibility, it should be fine to rebase to a later version. But, you would need to port it to Starboard as has been done for the bundled version of protobuf.

Another option that might end up being more expedient is to link to Widevine as a shared object, so Cobalt can use its version of protobuf and Widevine can use its version of protobuf. You would need to make sure neither Cobalt or the Widevine library export any protobuf symbols.

I've filed an internal ticket to update the protobuf version, so eventually Cobalt will bundle an updated version of the protobuf library that has been ported to Starboard.