mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
Revert "openh264: fix to work with released versions and master of upstream"
This reverts commit 15394aa705
.
The latest release (v1.1) does not have pkg-config support
yet, so this plugin won't be built with the latest release.
Cerbero uses the latest release, so this makes cerbero
builds fail, which expect the plugin to be built.
We can re-commit this once there's a release that includes
pkg-config support.
This commit is contained in:
parent
15394aa705
commit
329f0ccba1
3 changed files with 27 additions and 9 deletions
22
configure.ac
22
configure.ac
|
@ -2521,7 +2521,27 @@ AG_GST_CHECK_FEATURE(OPENEXR, [openexr library], openexr, [
|
|||
dnl *** openh264 ***
|
||||
translit(dnm, m, l) AM_CONDITIONAL(USE_OPENH264, true)
|
||||
AG_GST_CHECK_FEATURE(OPENH264, [openh264 library], openh264, [
|
||||
AG_GST_PKG_CHECK_MODULES(OPENH264, openh264)
|
||||
AC_LANG_PUSH([C++])
|
||||
AG_GST_CHECK_LIBHEADER(OPENH264, openh264, WelsSnprintf, $PTHREAD_LIBS,
|
||||
wels/codec_api.h, [
|
||||
AC_MSG_CHECKING([for right openh264 version/snapshot])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <wels/codec_app_def.h>
|
||||
#include <wels/codec_api.h>]], [[
|
||||
SFrameBSInfo frame_info;
|
||||
SEncParamExt enc_params;
|
||||
enc_params.iInputCsp = videoFormatI420;
|
||||
int *p = (int *) &frame_info.eFrameType;
|
||||
*p = RC_LOW_BW_MODE;
|
||||
]])], [
|
||||
AC_MSG_RESULT(yes)
|
||||
OPENH264_LIBS="-lopenh264 $PTHREAD_LIBS"
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
HAVE_OPENH264="no"
|
||||
])
|
||||
])
|
||||
AC_LANG_POP([C++])
|
||||
AC_SUBST(OPENH264_LIBS)
|
||||
])
|
||||
|
||||
dnl *** OpenJPEG ***
|
||||
|
|
|
@ -190,8 +190,8 @@ gst_openh264dec_start (GstVideoDecoder * decoder)
|
|||
WelsCreateDecoder (&(openh264dec->priv->decoder));
|
||||
|
||||
dec_param.uiTargetDqLayer = 255;
|
||||
dec_param.eEcActiveIdc = ERROR_CON_FRAME_COPY;
|
||||
dec_param.eOutputColorFormat = videoFormatI420;
|
||||
dec_param.uiEcActiveFlag = 1;
|
||||
dec_param.iOutputColorFormat = videoFormatI420;
|
||||
dec_param.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_AVC;
|
||||
|
||||
ret = openh264dec->priv->decoder->Initialize (&dec_param);
|
||||
|
|
|
@ -74,7 +74,7 @@ gst_openh264enc_rc_modes_get_type (void)
|
|||
static GEnumValue rc_modes_types[] = {
|
||||
{RC_QUALITY_MODE, "Quality mode", "quality"},
|
||||
{RC_BITRATE_MODE, "Bitrate mode", "bitrate"},
|
||||
{RC_BUFFERBASED_MODE, "No bitrate control, just using buffer status", "buffer"},
|
||||
{RC_LOW_BW_MODE, "Low bandwidth mode", "bandwidth"},
|
||||
{RC_OFF_MODE, "Rate control off mode", "off"},
|
||||
{0, NULL, NULL},
|
||||
};
|
||||
|
@ -407,8 +407,8 @@ gst_openh264enc_set_rate_control (GstOpenh264Enc * openh264enc, gint rc_mode)
|
|||
case RC_BITRATE_MODE:
|
||||
openh264enc->priv->rate_control = RC_BITRATE_MODE;
|
||||
break;
|
||||
case RC_BUFFERBASED_MODE:
|
||||
openh264enc->priv->rate_control = RC_BUFFERBASED_MODE;
|
||||
case RC_LOW_BW_MODE:
|
||||
openh264enc->priv->rate_control = RC_LOW_BW_MODE;
|
||||
break;
|
||||
case RC_OFF_MODE:
|
||||
openh264enc->priv->rate_control = RC_OFF_MODE;
|
||||
|
@ -633,7 +633,6 @@ gst_openh264enc_set_format (GstVideoEncoder * encoder,
|
|||
GstCaps *outcaps;
|
||||
GstVideoCodecState *output_state;
|
||||
openh264enc->priv->frame_count = 0;
|
||||
int video_format = videoFormatI420;
|
||||
|
||||
debug_caps = gst_caps_to_string (state->caps);
|
||||
GST_DEBUG_OBJECT (openh264enc, "gst_e26d4_enc_set_format called, caps: %s",
|
||||
|
@ -668,6 +667,7 @@ gst_openh264enc_set_format (GstVideoEncoder * encoder,
|
|||
enc_params.iTemporalLayerNum = 1;
|
||||
enc_params.iSpatialLayerNum = 1;
|
||||
enc_params.iLtrMarkPeriod = 30;
|
||||
enc_params.iInputCsp = videoFormatI420;
|
||||
enc_params.iMultipleThreadIdc = openh264enc->priv->multi_thread;
|
||||
enc_params.bEnableDenoise = openh264enc->priv->enable_denoise;
|
||||
enc_params.uiIntraPeriod = priv->gop_size;
|
||||
|
@ -701,8 +701,6 @@ gst_openh264enc_set_format (GstVideoEncoder * encoder,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
priv->encoder->SetOption(ENCODER_OPTION_DATAFORMAT, &video_format);
|
||||
|
||||
memset (&bsInfo, 0, sizeof (SFrameBSInfo));
|
||||
|
||||
ret = priv->encoder->EncodeParameterSets (&bsInfo);
|
||||
|
|
Loading…
Reference in a new issue