Revert "Revert "Add image codec support to MediaCodec""

This reverts commit ad9644347b24233fd3b1f456d07596d25bd8a8e7.

Reason for revert:
The CTS test mentioned in b/217948676 still fails on tip-of-tree even after this revert. The CTS test also still fails even after reverting the other CL associated (ag/16637984) with this feature. It appears the CTS failure is unrelated to these changes.

Current tip-of-tree run that fails:
https://android-build.googleplex.com/builds/abtd/run/L99800000953201100

Current tip-of-tree run with the associated ag/16637984 reverted, which also fails:
https://android-build.googleplex.com/builds/abtd/run/L69700000953468178

The root cause of the failure seems to be unrelated to the original feature implementation:
ag/16637984
ag/16655730

Re-opening the bug and assigning to the feature owner.

Bug: 217948676
Change-Id: I0afdca9412f832e109b3500f3a32ab24ede3f9ca
diff --git a/media/libmedia/MediaResource.cpp b/media/libmedia/MediaResource.cpp
index ec52a49..a6f0b60 100644
--- a/media/libmedia/MediaResource.cpp
+++ b/media/libmedia/MediaResource.cpp
@@ -43,10 +43,10 @@
 }
 
 //static
-MediaResource MediaResource::CodecResource(bool secure, bool video, int64_t instanceCount) {
+MediaResource MediaResource::CodecResource(bool secure, SubType subType, int64_t instanceCount) {
     return MediaResource(
             secure ? Type::kSecureCodec : Type::kNonSecureCodec,
-            video ? SubType::kVideoCodec : SubType::kAudioCodec,
+            subType,
             instanceCount);
 }