Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate class MediaCodecBridge$GetOutputFormatResult to jni_generator #4759

Merged
merged 1 commit into from
Jan 25, 2025

Conversation

haozheng-cobalt
Copy link
Contributor

@haozheng-cobalt haozheng-cobalt commented Jan 23, 2025

This PR demonstrates jni_generator/jni_zero migration in cobalt/media.

This PR primarily migrates the subclass GetOutputFormatResult in class MediaCodecBridge.

I also have to migrate every native function in class MediaCodecBridge in this same PR because the old native implementations conflict with jni_generator; The jni header generated by jni_generator cobalt/android/jni_headers/MediaCodecBridge_jni.h would generate duplicated native function signatures as the old native implementations.

Local tests:
Call Native functions in Java: https://paste.googleplex.com/6062051978641408
Call Java functions in Native: https://paste.googleplex.com/6124614082887680

b/390481510

@haozheng-cobalt haozheng-cobalt marked this pull request as draft January 23, 2025 23:29
@haozheng-cobalt haozheng-cobalt force-pushed the jni-media-0 branch 3 times, most recently from bf1e906 to b69359b Compare January 24, 2025 17:46
@haozheng-cobalt haozheng-cobalt marked this pull request as ready for review January 24, 2025 17:57
@haozheng-cobalt haozheng-cobalt force-pushed the jni-media-0 branch 2 times, most recently from 4d6d127 to 40c78ea Compare January 24, 2025 23:40
@haozheng-cobalt haozheng-cobalt changed the title Migrate class MediaCodecBridge to jni_generator Migrate class MediaCodecBridge$GetOutputFormatResult to jni_generator Jan 24, 2025
@haozheng-cobalt haozheng-cobalt enabled auto-merge (squash) January 24, 2025 23:46
@haozheng-cobalt haozheng-cobalt self-assigned this Jan 25, 2025
@haozheng-cobalt haozheng-cobalt merged commit 7299dad into youtube:main Jan 25, 2025
89 of 90 checks passed
andrewsavage1 pushed a commit to andrewsavage1/cobalt that referenced this pull request Jan 27, 2025
…youtube#4759)

This PR demonstrates jni_generator/jni_zero migration in cobalt/media.

This PR primarily migrates the subclass GetOutputFormatResult in class
MediaCodecBridge.

I also have to migrate every native function in class MediaCodecBridge
in this same PR because the old native implementations conflict with
jni_generator; The jni header generated by jni_generator
cobalt/android/jni_headers/MediaCodecBridge_jni.h would generate
duplicated native function signatures as the old native implementations.

Local tests:
Call Native functions in Java:
https://paste.googleplex.com/6062051978641408
Call Java functions in Native:
https://paste.googleplex.com/6124614082887680

b/390481510
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants