We static_cast Decryptor::StreamType to mojom::DemuxerStream::Type:
https://cs.chromium.org/chromium/src/media/mojo/clients/mojo_decryptor.cc?rcl=0&l=78
But these are actually two different enums. Decryptor::StreamType::kAudio is 0, but mojom::DemuxerStream::Type::AUDIO is 1.
This works today because the Decryptor actually doesn't care about the type, since we only support one stream per type, the type basically serves as a stream ID.
Long term, we'll probably use a stream ID instead of stream type. Short term, we'll just define mojom::Decryptor::StreamType to be consistent with the C++ interface.
Comment 1 by bugdroid1@chromium.org
, Oct 15 2016