...
 
Commits (5)
include: "https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/master/gitlab/ci_template.yml"
include: "https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/1.16/gitlab/ci_template.yml"
......@@ -375,7 +375,7 @@ else
case $host_os in
mingw32*)
WIN32_LIBS="-lws2_32"
WIN32_LIBS="-lws2_32 -lbcrypt"
;;
*)
WIN32_LIBS=
......
......@@ -48,7 +48,7 @@ static GMutex gst_avcodec_mutex;
static inline gboolean
gst_ffmpeg_avcodec_is_ffmpeg (void)
{
guint av_version = avutil_version ();
guint av_version = avcodec_version ();
GST_DEBUG ("Using libavcodec version %d.%d.%d",
av_version >> 16, (av_version & 0x00ff00) >> 8, av_version & 0xff);
......
......@@ -254,6 +254,10 @@ gst_ffmpegvidenc_set_format (GstVideoEncoder * encoder,
/* additional avcodec settings */
gst_ffmpeg_cfg_fill_context (G_OBJECT (ffmpegenc), ffmpegenc->context);
if (GST_VIDEO_INFO_IS_INTERLACED (&state->info))
ffmpegenc->context->flags |=
AV_CODEC_FLAG_INTERLACED_DCT | AV_CODEC_FLAG_INTERLACED_ME;
/* and last but not least the pass; CBR, 2-pass, etc */
ffmpegenc->context->flags |= ffmpegenc->pass;
switch (ffmpegenc->pass) {
......@@ -554,12 +558,14 @@ gst_ffmpegvidenc_send_frame (GstFFMpegVidEnc * ffmpegenc,
gst_ffmpegvidenc_add_cc (frame->input_buffer, picture);
if (ffmpegenc->context->flags & (AV_CODEC_FLAG_INTERLACED_DCT |
AV_CODEC_FLAG_INTERLACED_ME)) {
if (GST_VIDEO_INFO_IS_INTERLACED (&ffmpegenc->input_state->info)) {
picture->interlaced_frame = TRUE;
/* if this is not the case, a filter element should be used to swap fields */
picture->top_field_first =
GST_BUFFER_FLAG_IS_SET (frame->input_buffer, GST_VIDEO_BUFFER_FLAG_TFF);
GST_BUFFER_FLAG_IS_SET (frame->input_buffer, GST_VIDEO_BUFFER_FLAG_TFF)
|| GST_VIDEO_INFO_FIELD_ORDER (&ffmpegenc->input_state->info) ==
GST_VIDEO_FIELD_ORDER_TOP_FIELD_FIRST;
picture->repeat_pict =
GST_BUFFER_FLAG_IS_SET (frame->input_buffer, GST_VIDEO_BUFFER_FLAG_RFF);
}
if (GST_VIDEO_INFO_MULTIVIEW_MODE (info) != GST_VIDEO_MULTIVIEW_MODE_NONE) {
......