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

Implement an FfmpegVideoRenderer #1591

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix the Compile Ffmpeg Options & Update Some Comments.
rabbitknight committed Aug 4, 2024
commit bb281936ca6b945d8f646fef49b62a63eb92f6a3
Original file line number Diff line number Diff line change
@@ -39,11 +39,11 @@
import androidx.media3.exoplayer.video.DecoderVideoRenderer;
import androidx.media3.exoplayer.video.VideoRendererEventListener;

// TODO: Merge actual implementation in https://github.com/google/ExoPlayer/pull/7132.
/**
* <b>NOTE: This class if under development and is not yet functional.</b>
*
* <p>Decodes and renders video using FFmpeg.
* <p>Merge actual implementation in https://github.com/google/ExoPlayer/pull/7132.
*/
@UnstableApi
public final class ExperimentalFfmpegVideoRenderer extends DecoderVideoRenderer {
6 changes: 3 additions & 3 deletions libraries/decoder_ffmpeg/src/main/jni/build_ffmpeg.sh
Original file line number Diff line number Diff line change
@@ -30,13 +30,13 @@ JOBS="$(nproc 2> /dev/null || sysctl -n hw.ncpu 2> /dev/null || echo 4)"
echo "Using $JOBS jobs for make"
COMMON_OPTIONS="
--target-os=android
--enable-static
--disable-shared
--disable-static
--enable-shared
--disable-doc
--disable-programs
--disable-everything
--disable-avdevice
--disable-avformat
--enable-avformat
--enable-swscale
--disable-postproc
--disable-avfilter
4 changes: 2 additions & 2 deletions libraries/decoder_ffmpeg/src/main/jni/ffmpeg_jni.cc
Original file line number Diff line number Diff line change
@@ -501,12 +501,12 @@ struct JniContext {

ANativeWindow *native_window = nullptr;
jobject surface = nullptr;
// 旋转角度
// rorate degree from InputFormat
int rotate_degree = 0;
int native_window_width = 0;
int native_window_height = 0;

// 接收数据的线程
// Thread to Convert Frame
std::thread *poll_image_thread;
bool released = false;
BlockingQueue<AVFrame *> *image_output_buffer = nullptr;