Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: gst-omx/omx/gstomxh264enc.c
- ===================================================================
- --- gst-omx.org/omx/gstomxh264enc.c 2013-12-04 00:22:26.331876206 +0000
- +++ gst-omx/omx/gstomxh264enc.c 2013-10-31 18:21:00.000000000 +0000
- @@ -36,6 +36,10 @@
- GstOMXPort * port, GstVideoCodecState * state);
- static GstFlowReturn gst_omx_h264_enc_handle_output_frame (GstOMXVideoEnc *
- self, GstOMXPort * port, GstOMXBuffer * buf, GstVideoCodecFrame * frame);
- +static void gst_omx_h264_enc_set_property (GObject * object, guint prop_id,
- + const GValue * value, GParamSpec * pspec);
- +static void gst_omx_h264_enc_get_property (GObject * object, guint prop_id,
- + GValue * value, GParamSpec * pspec);
- enum
- {
- @@ -87,6 +91,7 @@
- GstCaps *peercaps;
- OMX_PARAM_PORTDEFINITIONTYPE port_def;
- OMX_VIDEO_PARAM_PROFILELEVELTYPE param;
- + OMX_VIDEO_CONFIG_AVCINTRAPERIOD AVCINTRAPERIODparam;
- OMX_ERRORTYPE err;
- const gchar *profile_string, *level_string;
- @@ -99,6 +104,22 @@
- if (err != OMX_ErrorNone)
- return FALSE;
- + GST_OMX_INIT_STRUCT (&AVCINTRAPERIODparam);
- + AVCINTRAPERIODparam.nPortIndex = GST_OMX_VIDEO_ENC (self)->enc_out_port->index;
- + err = gst_omx_component_get_parameter (GST_OMX_VIDEO_ENC (self)->enc, OMX_IndexConfigVideoAVCIntraPeriod, &AVCINTRAPERIODparam);
- +
- + GST_WARNING_OBJECT (self, "1:AVCINTRAPERIOD nPFrames:%u, nIDRPeriod:%u", AVCINTRAPERIODparam.nPFrames, AVCINTRAPERIODparam.nIDRPeriod);
- + AVCINTRAPERIODparam.nPFrames = 250;
- + AVCINTRAPERIODparam.nIDRPeriod = 250;
- +
- + err = gst_omx_component_set_parameter (GST_OMX_VIDEO_ENC (self)->enc,
- + OMX_IndexConfigVideoAVCIntraPeriod, &AVCINTRAPERIODparam);
- + if (err != OMX_ErrorNone) {
- + GST_ERROR_OBJECT (self,
- + "can't set nPFrames nIDRPeriod");
- + return TRUE;
- + }
- +
- GST_OMX_INIT_STRUCT (¶m);
- param.nPortIndex = GST_OMX_VIDEO_ENC (self)->enc_out_port->index;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement