Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 431988bc authored by Ray Essick's avatar Ray Essick Committed by Gerrit Code Review
Browse files

Merge "Benchmark: add Extractor"

parents 1b418069 dc204de2
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
BasedOnStyle: Google
Standard: Cpp11
AccessModifierOffset: -2
AllowShortFunctionsOnASingleLine: Inline
ColumnLimit: 100
CommentPragmas: NOLINT:.*
DerivePointerAlignment: false
IncludeBlocks: Preserve
IndentWidth: 4
ContinuationIndentWidth: 8
PointerAlignment: Right
TabWidth: 4
UseTab: Never
+20 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

subdirs = [
    "src",
    "tests",
]
 No newline at end of file
+30 −0
Original line number Diff line number Diff line
# Benchmark tests

Run the following steps to build the test suite:
```
mmm frameworks/av/media/tests/benchmark/
```

The binaries will be created in the following path : ${OUT}/data/nativetest64/

adb push $(OUT)/data/nativetest64/* /data/local/tmp/

Eg. adb push $(OUT)/data/nativetest64/extractorTest/extractorTest /data/local/tmp/

To run the binary, follow the commands mentioned below under each module.

The resource files for the tests are taken from [here](https://drive.google.com/open?id=1ghMr17BBJ7n0pqbm7oREiTN_MNemJUqy)

## Extractor

The test extracts elementary stream and benchmarks the extractors available in NDK.

Push the resource files to /sdcard/res on the device.

You can use a different location, but you have to modify the rest of the instructions to replace /sdcard/res with wherever you chose to put the files.

The path to these files on the device is required to be given for the test.

```
adb shell /data/local/tmp/extractorTest -P /sdcard/res/
```
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <utils/Log.h>

#include <media/NdkMediaCodec.h>
#include <media/NdkMediaError.h>

constexpr uint32_t kQueueDequeueTimeoutUs = 1000;
constexpr uint32_t kMaxCSDStrlen = 16;
+29 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

cc_library_static {
    name: "libbenchmark_extractor",
    defaults: [
        "libbenchmark_common-defaults",
        "libbenchmark_soft_sanitize_all-defaults",
    ],

    srcs: ["Extractor.cpp"],

    export_include_dirs: ["."],

    ldflags: ["-Wl,-Bsymbolic"]
}
Loading