MCPcopy Create free account
hub / github.com/alibaba/CicadaPlayer / configureVideo

Method configureVideo

framework/codec/Android/jni/MediaCodec_Decoder.cpp:172–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172int MediaCodec_Decoder::configureVideo(const std::string &mime, int width, int height, int angle,
173 void *surface) {
174 JniEnv jniEnv{};
175
176 JNIEnv *env = jniEnv.getEnv();
177 if (env == nullptr) {
178 return MC_ERROR;
179 }
180
181 if (mMediaCodec == nullptr) {
182 return MC_ERROR;
183 }
184
185 mCodecCategory = CATEGORY_VIDEO;
186 NewStringUTF jMime(env, mime.c_str());
187 int ret = env->CallIntMethod(mMediaCodec, jMediaCodec_configureVideo, jMime.getString(),
188 (jint) width, (jint) height, (jint) angle, (jobject) surface);
189
190 return ret;
191}
192
193int MediaCodec_Decoder::configureAudio(const std::string &mime, int sampleRate, int channelCount,
194 int isADTS) {

Callers 1

configDecoderMethod · 0.45

Calls 3

getEnvMethod · 0.80
CallIntMethodMethod · 0.45
getStringMethod · 0.45

Tested by

no test coverage detected