Skip to content

Commit

Permalink
[Camera2Video] Add note that MediaRecorder is not supporting HDR Vide…
Browse files Browse the repository at this point in the history
…o capture

Bug: b/308178715
Test: test on real devices
Change-Id: Ide226dd460ff05737f21850260ffc315cfdd423d
  • Loading branch information
kailianc committed Nov 28, 2023
1 parent f346b02 commit 7b0a878
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class EncodeApiFragment : Fragment() {
view as RecyclerView
view.apply {
layoutManager = LinearLayoutManager(requireContext())
val modeList = enumerateModes()
val modeList = enumerateModes(args.dynamicRange)
val layoutId = android.R.layout.simple_list_item_1
adapter = GenericListAdapter(modeList, itemLayoutId = layoutId) { view, item, _ ->
view.findViewById<TextView>(android.R.id.text1).text = item.name
Expand All @@ -79,11 +79,13 @@ class EncodeApiFragment : Fragment() {
val value: Boolean)

@SuppressLint("InlinedApi")
private fun enumerateModes(): List<ApiInfo> {
private fun enumerateModes(dynamicRange: Long): List<ApiInfo> {
val modeList: MutableList<ApiInfo> = mutableListOf()

modeList.add(ApiInfo("MediaCodec", false))
modeList.add(ApiInfo("MediaRecorder", true))
if (dynamicRange == DynamicRangeProfiles.STANDARD) {
modeList.add(ApiInfo("MediaRecorder", true))
}

return modeList
}
Expand Down

0 comments on commit 7b0a878

Please sign in to comment.