Advertisement
Guest User

Untitled

a guest
Dec 6th, 2013
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. Index: gst-omx/omx/gstomxh264enc.c
  2. ===================================================================
  3. --- gst-omx.org/omx/gstomxh264enc.c 2013-12-04 00:22:26.331876206 +0000
  4. +++ gst-omx/omx/gstomxh264enc.c 2013-10-31 18:21:00.000000000 +0000
  5. @@ -36,6 +36,10 @@
  6. GstOMXPort * port, GstVideoCodecState * state);
  7. static GstFlowReturn gst_omx_h264_enc_handle_output_frame (GstOMXVideoEnc *
  8. self, GstOMXPort * port, GstOMXBuffer * buf, GstVideoCodecFrame * frame);
  9. +static void gst_omx_h264_enc_set_property (GObject * object, guint prop_id,
  10. + const GValue * value, GParamSpec * pspec);
  11. +static void gst_omx_h264_enc_get_property (GObject * object, guint prop_id,
  12. + GValue * value, GParamSpec * pspec);
  13.  
  14. enum
  15. {
  16. @@ -87,6 +91,7 @@
  17. GstCaps *peercaps;
  18. OMX_PARAM_PORTDEFINITIONTYPE port_def;
  19. OMX_VIDEO_PARAM_PROFILELEVELTYPE param;
  20. + OMX_VIDEO_CONFIG_AVCINTRAPERIOD AVCINTRAPERIODparam;
  21. OMX_ERRORTYPE err;
  22. const gchar *profile_string, *level_string;
  23.  
  24. @@ -99,6 +104,22 @@
  25. if (err != OMX_ErrorNone)
  26. return FALSE;
  27.  
  28. + GST_OMX_INIT_STRUCT (&AVCINTRAPERIODparam);
  29. + AVCINTRAPERIODparam.nPortIndex = GST_OMX_VIDEO_ENC (self)->enc_out_port->index;
  30. + err = gst_omx_component_get_parameter (GST_OMX_VIDEO_ENC (self)->enc, OMX_IndexConfigVideoAVCIntraPeriod, &AVCINTRAPERIODparam);
  31. +
  32. + GST_WARNING_OBJECT (self, "1:AVCINTRAPERIOD nPFrames:%u, nIDRPeriod:%u", AVCINTRAPERIODparam.nPFrames, AVCINTRAPERIODparam.nIDRPeriod);
  33. + AVCINTRAPERIODparam.nPFrames = 250;
  34. + AVCINTRAPERIODparam.nIDRPeriod = 250;
  35. +
  36. + err = gst_omx_component_set_parameter (GST_OMX_VIDEO_ENC (self)->enc,
  37. + OMX_IndexConfigVideoAVCIntraPeriod, &AVCINTRAPERIODparam);
  38. + if (err != OMX_ErrorNone) {
  39. + GST_ERROR_OBJECT (self,
  40. + "can't set nPFrames nIDRPeriod");
  41. + return TRUE;
  42. + }
  43. +
  44. GST_OMX_INIT_STRUCT (&param);
  45. param.nPortIndex = GST_OMX_VIDEO_ENC (self)->enc_out_port->index;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement