video_encode_accelerator: use Config struct for Initialize and add output_level

Currently VideoEncodeAccelerator::Initialize() does not take level into account
which is a factor of AVC encoding. Instead, it always set the fixed level in
VEA implementation. For upstream Android CTS, it requires AVC level setting and
checks the level of output encoded stream is within configured one. To satisfy
this we need to pass level on initialization.

Since there is a bunch of parameters we decide to refactor VEA::Initialize() to
use Config struct bundling all parameters as VideoDecodeAccelerator did.

This CL only modifies VEA::Initialize() API to use Config struct as input to
cover original parameters and output_level. Once this is approved to change, we
will implement the utilization of output_level inside VEA.

BUG=b:110811755
BUG=863321
TEST=build and deplot chrome on eve
TEST=build and run video_encoder_accelerator_unittest on eve
TEST=build media_unittests
TEST=build content_unittests

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I002169634a2b2d23a00178eb5015a14f4ddcf5dc
Reviewed-on: https://chromium-review.googlesource.com/1130570
Commit-Queue: Pin-chih Lin <[email protected]>
Reviewed-by: Devlin <[email protected]>
Reviewed-by: Pawel Osciak <[email protected]>
Reviewed-by: Henrik Boström <[email protected]>
Reviewed-by: Jamie Walch <[email protected]>
Reviewed-by: Miguel Casas <[email protected]>
Reviewed-by: Dan Sanders <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Bill Budge <[email protected]>
Cr-Commit-Position: refs/heads/master@{#578595}
diff --git a/content/renderer/pepper/video_encoder_shim.h b/content/renderer/pepper/video_encoder_shim.h
index e48700b1..771fa5ea 100644
--- a/content/renderer/pepper/video_encoder_shim.h
+++ b/content/renderer/pepper/video_encoder_shim.h
@@ -39,10 +39,7 @@
   // media::VideoEncodeAccelerator implementation.
   media::VideoEncodeAccelerator::SupportedProfiles GetSupportedProfiles()
       override;
-  bool Initialize(media::VideoPixelFormat input_format,
-                  const gfx::Size& input_visible_size,
-                  media::VideoCodecProfile output_profile,
-                  uint32_t initial_bitrate,
+  bool Initialize(const media::VideoEncodeAccelerator::Config& config,
                   media::VideoEncodeAccelerator::Client* client) override;
   void Encode(const scoped_refptr<media::VideoFrame>& frame,
               bool force_keyframe) override;