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

Muxers: integrate native muxer with LiTr #253

Merged
merged 1 commit into from
Mar 6, 2023

Conversation

IanDBird
Copy link
Contributor

After adding ffmpeg and the native wrapper code, this PR integrates it with LiTr along with exposing it via the demo app. The demo app now provides options to try the native muxer with a normal file transcode, as well as a camera capture. For the camera example, I've also configured the native muxer to generate a single fMP4 which demonstrates something that isn't possible with Android's built in MediaMuxer.

You'll notice that orientationHint is not yet used in the new muxer. I plan to add this next, as will require some plumbing/support for file based metadata, rather than stream information.

public static final String VIDEO_VP9 = BASE_TYPE_VIDEO + "/x-vnd.on2.vp9";
public static final String VIDEO_RAW = BASE_TYPE_VIDEO + "/raw";

public static boolean IsVideo(@Nullable String mimeType) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jc: why do method names start with capital letter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its a habit when naming static methods. Can change to lower case to be similar to LiTr

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, let's keep it consistent with the rest of the code.

const val KEY_CHANNEL_COUNT = MediaFormat.KEY_CHANNEL_COUNT
const val KEY_SAMPLE_RATE = MediaFormat.KEY_SAMPLE_RATE

fun MediaFormat.isVideo(): Boolean {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Doesn't have to happen in this PR, but this a very useful class that could be moved into main litr module.

@izzytwosheds izzytwosheds merged commit c3c0c4b into linkedin:main Mar 6, 2023
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.

2 participants