Commit 803540f7 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Handle FIR in mediacodec H264 encoder.

parent 54dadacc
...@@ -322,6 +322,12 @@ static int enc_notify_pli(MSFilter *f, void *data) { ...@@ -322,6 +322,12 @@ static int enc_notify_pli(MSFilter *f, void *data) {
return 0; return 0;
} }
static int enc_notify_fir(MSFilter *f, void *data) {
EncData *d = (EncData *)f->data;
d->force_keyframe = TRUE;
return 0;
}
static MSFilterMethod mediacodec_h264_enc_methods[]={ static MSFilterMethod mediacodec_h264_enc_methods[]={
{ MS_FILTER_SET_FPS, enc_set_fps }, { MS_FILTER_SET_FPS, enc_set_fps },
{ MS_FILTER_SET_BITRATE, enc_set_br }, { MS_FILTER_SET_BITRATE, enc_set_br },
...@@ -329,6 +335,7 @@ static MSFilterMethod mediacodec_h264_enc_methods[]={ ...@@ -329,6 +335,7 @@ static MSFilterMethod mediacodec_h264_enc_methods[]={
{ MS_FILTER_GET_FPS, enc_get_fps }, { MS_FILTER_GET_FPS, enc_get_fps },
{ MS_FILTER_GET_VIDEO_SIZE, enc_get_vsize }, { MS_FILTER_GET_VIDEO_SIZE, enc_get_vsize },
{ MS_VIDEO_ENCODER_NOTIFY_PLI, enc_notify_pli }, { MS_VIDEO_ENCODER_NOTIFY_PLI, enc_notify_pli },
{ MS_VIDEO_ENCODER_NOTIFY_FIR, enc_notify_fir },
{ MS_FILTER_SET_VIDEO_SIZE, enc_set_vsize }, { MS_FILTER_SET_VIDEO_SIZE, enc_set_vsize },
{ MS_VIDEO_ENCODER_ENABLE_AVPF, enc_enable_avpf }, { MS_VIDEO_ENCODER_ENABLE_AVPF, enc_enable_avpf },
{ 0, NULL } { 0, NULL }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment