title: GStreamer Pipeline problems when using appsrc and vaapiencode_h264 plugin
body: <p>I am working on an app that accepts Opencv frames (originated via opencv camera Api) and tries to send those frames into the network after encoding them to H264 frames. </p>
  
  <p>For this project I was asked to perform the encoding via hardware. </p>
  
  <p>I used the below pipeline to do the encoding bit of the transmitter: </p>
  
  <pre><code>gst-launch-1.0 appsrc name=applicationSource ! videoconvert ! video/x-raw,width=640,format=I420,height=480,framerate=15/1 ! vaapiencode_h264 ! vaapiparse_h264 config-interval=1 ! rtph264pay config-interval=1 ! gdppay ! tcpserversink host=127.0.0.1 port=5002 sync=false
  </code></pre>
  
  <p>The Caps for my Appsrc are : </p>
  
  <pre><code>video/x-raw","format""RGB","width"640,"height",G_TYPE_INT,480,
                                                 "framerate", 15, 1,
                                                 "pixel-aspect-ratio" 1, 1,
  </code></pre>
  
  <p>This pipeline however gives me the below error when i try to run it: </p>
  
  <blockquote>
    <p>libva info: VA-API version 0.37.0</p>
    
    <p>libva info: va_getDriverName() returns 0</p>
    
    <p>libva info: Trying to open /usr/lib64/dri/i965_drv_video.so</p>
    
    <p>libva info: Found init function __vaDriverInit_0_37</p>
    
    <p>libva info: va_openDriver() returns 0</p>
    
    <p>0:00:04.597696251 23508 0x7f724003f940 WARN                GST_PADS
    gstpad.c:3739:gst_pad_peer_query: could not
    send sticky events</p>
    
    <p>0:00:05.030818739 23508 0x7f724003f940 WARN                 basesrc
    gstbasesrc.c:2933:gst_base_src_loop: error:
    Internal data flow error.</p>
    
    <p>0:00:05.030864404 23508 0x7f724003f940 WARN                 basesrc
    gstbasesrc.c:2933:gst_base_src_loop: <strong>error:
    streaming task paused, reason not-negotiated (-4)</strong></p>
    
    <p>Error : Internal data flow error. </p>
    
    <p>0:00:05.032763231 23508 0x7f724003f940 WARN               baseparse
    gstbaseparse.c:1155:gst_base_parse_sink_event_default:
    error: No valid frames found before end of stream</p>
    
    <p>Error : No valid frames found before end of stream</p>
  </blockquote>
  
  <p>As I  have highlighted, the pipeline does not start due to negotiation issues</p>
  
  <p>I have tested my Appsrc and it seems to be working (receiving data).</p>
  
  <p>Could anyone suggest any other plugins to overcome this ?? </p>
  
  <p>PS: I had tried this pipeline with a camera v4l2src plugin and the pipeline seems to be working in good condition ! </p>
  
  <p>Any help would be nice ! </p>
  
  <p>Thanks ! </p>