DescriptionUpdate Decryptor interface to support audio decoding.
We were discussing the use of
decryptor_->DeinitializeDecoder(Decryptor::kVideo);
- vs -
decryptor_->DeinitializeVideoDecoder();
I choose to use parameterized methods so that we have less code (duplication). The non-parameterized methods are cleaner for callers. But I feel the former is slightly better in general.
Later on we'll have two Decryptors (ProxyDecryptor will not be a Decryptor anymore):
1) AesDecryptor, which doesn't care the stream type at all, not even for CancelDecrypt().
2) PpapiDecryptor, which merely passes similar calls to the PluginInstance which then make similar PPP calls. It seems to me that for passing calls it's slightly cleaner to use parameterized methods. Also we have parameterized PPP calls already for the same reason (less functions through multiple layers).
So in both cases, using parameterized methods results in less code.
It's unfortunate that InitializeXXXDecoder and DecryptAndDecodeXXX are exceptions, due to different types they take/return.
BUG=123421
TEST=media_unittest, content_unittest
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=162768
Patch Set 1 #Patch Set 2 : Ready for review! #Patch Set 3 : simplify AudioBuffers #
Total comments: 35
Patch Set 4 : resolve comments #
Total comments: 5
Patch Set 5 : nit #Patch Set 6 : rebase only #Patch Set 7 : rebase #Patch Set 8 : fix compile error on Windows #Patch Set 9 : remove leftover unretained #
Messages
Total messages: 11 (0 generated)
|