1. 19 Feb, 2019 7 commits
    • Alex Ashley's avatar
      curlhttpsrc: export same HTTP error status as souphttpsrc · 2d806477
      Alex Ashley authored
      To make it closer to a drop-in replacement for souphttpsrc,
      expose the same gst_error_message_with_details as souphttpsrc,
      so that applications can received the HTTP status code and reason
      when an error occurs.
      2d806477
    • Alex Ashley's avatar
      curlhttpsrc: fix various leaks and thread safety issues · c2fe4e58
      Alex Ashley authored
      curlhttpsrc uses a single thread running the
      gst_curl_http_src_curl_multi_loop() function to handle receiving
      data and messages from libcurl. Each instance of curlhttpsrc adds
      an entry into a queue in GstCurlHttpSrcMultiTaskContext and waits
      for the multi_loop to perform the HTTP request.
      
      Valgrind has shown up race conditions and memory leaks:
      1. gst_curl_http_src_change_state() does not wait for the multi_loop
         to complete before going to the NULL state, which means that
         an instance of GstCurlHttpSrc can be released while
         gst_curl_http_src_curl_multi_loop() still has a reference to it.
      2. if multiple elements try to be removed from the queue at once,
         only the last one is deleted.
      3. source->caps is leaked
      4. curl multi_handle is leaked
      5. leak of curl_handle if URI not set
      6. leak of http_headers when reusing element
      7. null pointer dereference in negotiate caps
      8. double-free of the default user-agent string
      9. leak of multi_task_context.task
      
      This commit changes the logic so that each element has a connection
      status, which is used by the multi_loop to decide when to remove an
      element from its queue. An instance of curlhttpsrc will not enter
      the NULL state until its reference has been removed from the queue.
      
      When shutting down the curl multi loop, the memory allocated from the
      call to curl_multi_init() is now released.
      
      When gstadaptivedemux uses a URI source element, it will re-use
      it for multiple requests, moving it between READY and PLAYING
      between each request. curlhttpsrc was leaking the http_headers
      structure in this use case.
      
      The gst_curl_http_src_negotiate_caps() function extracts the
      "response-headers" field from the http_headers, but did not check
      that this field might be NULL.
      
      If the user-agent property is set, the global user-agent string
      was freed. This caused a double-free error if the user-agent is
      ever set a second time during the execution of the process.
      
      There are situations within curlhttpsrc where the code needs
      both the global multi_task_context mutex and the per-element
      buffer_mutex. To avoid deadlocks, it is vital that the order in
      which these are requested is always the same. This commit modifies
      the locking order to always be in the order:
       1. multi_task_context.task_rec_mutex
       2. buffer_mutex
      
      Fixes #876
      c2fe4e58
    • Alex Ashley's avatar
      tests: curlhttpsrc: add unit tests · d2d912f3
      Alex Ashley authored
      Based upon the souphttpsrc tests, add unit tests for the curlhttpsrc
      element. The souphttpsrc tests are able to use an HTTP server that
      is provided as part of the soup library. This does not exist in the
      curl library, therefore these tests provide a very simple HTTP server
      using the GIO library.
      
      These curlhttpsrc tests contain one new test that does not come from
      the souphttpsrc tests. The test_multiple_http_requests test tries to
      reproduce the way in which GstAdaptiveDemux makes use of URI source
      elements. GstAdaptiveDemux creates a bin with the httpsrc element
      and a queue element and sets the locked state of that bin to TRUE,
      so that it does not follow the state transitions of its parent. It
      then moves this bin to the PLAYING state to start each download and
      back to READY when the download completes.
      d2d912f3
    • Haihao Xiang's avatar
      msdkvpp: allow UYVY in DMABuf mode in the sink pad · 8213d0b8
      Haihao Xiang authored
      Tested with the pipeline below:
      
      gst-launch-1.0 videotestsrc num-buffers=1 ! msdkvpp ! \
      video/x-raw\(memory:DMABuf\),format=UYVY ! msdkvpp ! video/x-raw, \
      format=YUY2 ! filesink location=a.yuv
      8213d0b8
    • Haihao Xiang's avatar
      msdkvpp: allow UYVY in the src pad · 56cada69
      Haihao Xiang authored
      This make the pipeline below works:
      
      gst-launch-1.0 videotestsrc num-buffers=1 ! msdkvpp ! \
      video/x-raw,format=UYVY ! filesink location=a.yuv
      
      Once https://github.com/intel/media-driver/pull/526 in the media-driver
      is merged, the pipeline below also works:
      
      gst-launch-1.0 videotestsrc num-buffers=1 ! msdkvpp ! \
      video/x-raw\(memory:DMABuf\),format=UYVY ! filesink location=a.yuv
      56cada69
    • Haihao Xiang's avatar
      ac9423fa
    • Haihao Xiang's avatar
      msdkvpp: allow BGRx in DMABuf mode in the src pad · ea6789fe
      Haihao Xiang authored
      Tested with the pipeline below:
      
      gst-launch-1.0 videotestsrc ! msdkvpp ! \
      video/x-raw\(memory:DMABuf\),format=BGRx ! glimagesink
      ea6789fe
  2. 18 Feb, 2019 1 commit
    • Bastien Nocera's avatar
      vcdsrc: Remove unusable VCD source · 2d5ed459
      Bastien Nocera authored
      The VCD source was ported in 2014 (commit 89eb1e9a), but the necessary
      "cdxaparse" plugin, which is used to "Parse a .dat file (VCD) into
      raw mpeg1" was never ported.
      
      This means that the probable main user for the feature, totem, hasn't
      actually been able to play back VCDs, since 2012, when it switched to
      using GStreamer 1.0.
      
      Note that even if cdxaparse was finally ported, a lot of work would
      still be necessary before it is considered usable. Notably, it is
      missing disc image support [1] and some VCDs just cannot be opened for
      reading [2].
      
      [1]: gstreamer/gst-plugins-bad#898
      [2]: gstreamer/gst-plugins-bad#899
      2d5ed459
  3. 15 Feb, 2019 4 commits
  4. 13 Feb, 2019 3 commits
  5. 12 Feb, 2019 5 commits
  6. 11 Feb, 2019 2 commits
    • Justin Kim's avatar
      srt: re-enable passphrase · e8fd000a
      Justin Kim authored
      With refactoring, supporting passphrase was removed accidently.
      This commit re-enables srt encryption and validates 'passphrase'
      by checking the return value of 'srt_setsockopt'.
      
      fix: #694
      e8fd000a
    • Seungha Yang's avatar
      openh264dec: Fix build with msvc · f1d5f1fa
      Seungha Yang authored
      Fix following build error
      ../subprojects/gst-plugins-bad/ext/openh264/gstopenh264dec.cpp(76): error C2121:
      
      Note that msvc usually complains #if inside macro
      f1d5f1fa
  7. 08 Feb, 2019 1 commit
  8. 05 Feb, 2019 1 commit
    • Nirbheek Chauhan's avatar
      misc: Fix warnings on Cerbero MinGW · fffb2aa1
      Nirbheek Chauhan authored
      gstladspa.c:360:5: error: zero-length ms_printf format string [-Werror=format-zero-length]
      
      vad_private.c:108:3: error: this decimal constant is unsigned only in ISO C90 [-Werror]
      
      gstdecklinkvideosink.cpp:478:32: error: comparison between 'BMDTimecodeFormat {aka enum _BMDTimecodeFormat}' and 'enum GstDecklinkTimecodeFormat' [-Werror=enum-compare]
      
      win/DeckLinkAPI_i.c:72:8: error: extra tokens at end of #endif directive [-Werror]
      
      win/DeckLinkAPIDispatch.cpp:35:10: error: unused variable 'res' [-Werror=unused-variable]
      
      gstwasapiutil.c:733:3: error: format '%x' expects argument of type 'unsigned int', but argument 8 has type 'DWORD' [-Werror=format]
      gstwasapiutil.c:733:3: error: format '%x' expects argument of type 'unsigned int', but argument 9 has type 'guint64' [-Werror=format]
      
      kshelpers.c:446:3: error: missing braces around initializer [-Werror=missing-braces]
      kshelpers.c:446:3: error: (near initialization for 'known_property_sets[0].guid.Data4') [-Werror=missing-braces]
      fffb2aa1
  9. 03 Feb, 2019 1 commit
    • Haihao Xiang's avatar
      msdkdec: Release occupied surface for MFX_ERR_MORE_DATA · 6c953438
      Haihao Xiang authored
      An output surface is returned but without sync point when when
      MFXVideoDECODE_DecodeFrameAsync () returns MFX_ERR_MORE_DATA, this
      surface should be released too, otherwise the surface is occupied
      and it is easy to exhaust all pre-allocated mfx surfaces.
      
      Example pipeline (input_vp8.webm contains lots of frame with show_frame
      set to 0):
      
      gst-launch-1.0 filesrc location=input_vp8.webm ! matroskademux !
      msdkvp8dec ! msdkvpp ! fakesink
      
      0:00:05.995959693 19866 0x563f30f14590 ERROR                default
      gstmsdkvideomemory.c:77:gst_msdk_video_allocator_get_surface: failed to
      get surface available
      ERROR: from element
      /GstPipeline:pipeline0/GstMatroskaDemux:matroskademux0: Internal data
      stream error.
      6c953438
  10. 02 Feb, 2019 5 commits
  11. 31 Jan, 2019 5 commits
  12. 30 Jan, 2019 5 commits