diff options
author | Zaheer Abbas Merali <zaheermerali@gmail.com> | 2015-01-13 11:32:03 -0800 |
---|---|---|
committer | Zaheer Abbas Merali <zaheermerali@gmail.com> | 2015-01-13 11:32:03 -0800 |
commit | 3a4d988a293ba2cc39b8016fea50ba824829067c (patch) | |
tree | f88bbe687d7a5e29269d88b043377ae21523caad /ext/openh264 | |
parent | 21b7ce550474316a4905f30b9cff1135d66a3231 (diff) | |
download | gstreamer-plugins-bad-3a4d988a293ba2cc39b8016fea50ba824829067c.tar.gz |
Revert "Revert "openh264: fix to work with released versions and master of upstream""
This reverts commit 329f0ccba1aa604da1bd80293fd1fe717447df5d.
Diffstat (limited to 'ext/openh264')
-rw-r--r-- | ext/openh264/gstopenh264dec.cpp | 4 | ||||
-rw-r--r-- | ext/openh264/gstopenh264enc.cpp | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/ext/openh264/gstopenh264dec.cpp b/ext/openh264/gstopenh264dec.cpp index 428a884a3..e8fb3d2bb 100644 --- a/ext/openh264/gstopenh264dec.cpp +++ b/ext/openh264/gstopenh264dec.cpp @@ -190,8 +190,8 @@ gst_openh264dec_start (GstVideoDecoder * decoder) WelsCreateDecoder (&(openh264dec->priv->decoder)); dec_param.uiTargetDqLayer = 255; - dec_param.uiEcActiveFlag = 1; - dec_param.iOutputColorFormat = videoFormatI420; + dec_param.eEcActiveIdc = ERROR_CON_FRAME_COPY; + dec_param.eOutputColorFormat = videoFormatI420; dec_param.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_AVC; ret = openh264dec->priv->decoder->Initialize (&dec_param); diff --git a/ext/openh264/gstopenh264enc.cpp b/ext/openh264/gstopenh264enc.cpp index f3896871b..a50fd1077 100644 --- a/ext/openh264/gstopenh264enc.cpp +++ b/ext/openh264/gstopenh264enc.cpp @@ -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_LOW_BW_MODE, "Low bandwidth mode", "bandwidth"}, + {RC_BUFFERBASED_MODE, "No bitrate control, just using buffer status", "buffer"}, {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_LOW_BW_MODE: - openh264enc->priv->rate_control = RC_LOW_BW_MODE; + case RC_BUFFERBASED_MODE: + openh264enc->priv->rate_control = RC_BUFFERBASED_MODE; break; case RC_OFF_MODE: openh264enc->priv->rate_control = RC_OFF_MODE; @@ -633,6 +633,7 @@ 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", @@ -670,7 +671,6 @@ 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; @@ -704,6 +704,8 @@ 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); |