summaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* wasapi: Fix infinite loop when the device disappearsNirbheek Chauhan2019-01-153-27/+67
| | | | | | When the audio device goes away during playback or capture, we were going into an infinite loop of AUDCLNT_E_DEVICE_INVALIDATED. Return -1 and post an error message so the ringbuffer thread exits with an error.
* msdk: set the right BRCParamMultiplierHaihao Xiang2019-01-111-4/+21
| | | | | | | | BRCParamMultiplier in mfxInfoMFX is a parameter which specifies a multiplier for bitrate control parameters [1], it impacts TargetKbps, MaxKbps, BufferSizeInKB and InitialDelayInKB. [1]: https://software.intel.com/en-us/node/628473
* msdk: set the upper bound of max-vbv-bitrate to 2048000 kbpsHaihao Xiang2019-01-111-1/+2
| | | | | | | The upper bound of bitrate is also 2048000 kbps which should be large enough in practice. Fix https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/863
* meson: Fix building of MSDK plugin on WindowsNirbheek Chauhan2019-01-101-1/+1
| | | | Variable name was typoed in 604c8d5232eba961ca34c9e98de8d5454cd5ab5f
* msdk: needn't call MFXJoinSession after MFXCloneSessionHaihao Xiang2019-01-091-7/+0
| | | | | | | | | | | | | | | | | | | | | According to the MSDK documation[1], MFXCloneSession is a light-weight equivalent of MFXJoinSession after MFXInit, so MFXJoinSession call isn't needed in the msdk plugin, otherwise the cloned session is joined to the parent session twice, and we will get a MFX error when closing the parent session example pipeline: gst-launch-1.0 videotestsrc num-buffers=100 ! \ video/x-raw,format=NV12,width=352,height=288 ! msdkh264enc ! msdkh264dec ! \ msdkh264enc ! fakesink Error message: 0:00:00.211948518 21733 0x5586ee741c60 ERROR msdk msdk.c:148:msdk_close_session: Close failed (undefined behavior) [1]: https://software.intel.com/en-us/node/628429#MFXCloneSession
* msdk: check whether mfx function call failsHaihao Xiang2019-01-093-5/+22
| | | | And log the failures for debugging
* msdkenc: return NULL instead of FALSEHaihao Xiang2019-01-091-4/+4
| | | | The returned type is a pointer
* msdk: release resources if failing to create the buffer poolHaihao Xiang2019-01-093-6/+10
| | | | | Needn't check the pointers against NULL because the pointers are non-NULL
* msdk: meson: compile vp9dec if availableVíctor Manuel Jáquez Leal2019-01-081-0/+5
| | | | based on the patches provided by Haihao Xiang <haihao.xiang@intel.com>
* msdk: add mfx in include pathVíctor Manuel Jáquez Leal2019-01-089-49/+13
| | | | Thus removing the preprocessor's directives to included if found.
* msdk: meson: use libmfx pkg-config if availableVíctor Manuel Jáquez Leal2019-01-081-34/+45
| | | | | | Refactoring to bail out early if MediaSDK is not found. based on the patches provided by Haihao Xiang <haihao.xiang@intel.com>
* msdk: don't reset the external frame allocatorHaihao Xiang2019-01-084-4/+29
| | | | | | | | | | | In gst-msdk, a mfx session may be shared between different gst elements, each element tries to set the frame allocator. However, per the MSDK documation[1], the behavior is undefined if reset the frame allocator while the previous allocator is in use. Fortunately all elements use the same frame allocator, so we can avoid to call MFXVideoCORE_SetFrameAllocator again. [1]: https://software.intel.com/en-us/node/628430#MFXVideoCORE3
* msdkvpp: don't use NV12 as default output in normal modeHaihao Xiang2019-01-081-1/+1
| | | | | | | | | If so, BGRA is the preferred output format hence BGRA will be selected as input format by default, e.g. in the pipleline below, BGRA instead of NV12 is selected without renegotiation, so we can avoid the NV12 issue (see commit 3f2314a) by default. gst-launch-1.0 videotestsrc ! msdkvpp ! glimagesink
* msdkvpp: close the current VPP session if this session has been initializedHaihao Xiang2019-01-081-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Otherwise MFXVideoVPP_Init will fail because it is called twice without a close. Example pipeline: gst-launch-1.0 videotestsrc ! msdkvpp ! glimagesink Sometimes glimagesink emits GST_EVENT_RECONFIGURE event which results in that MFXVideoVPP_Init is called twice, then get the negotiation failure below: 0:00:00.093715518 21218 0x558ef56231e0 ERROR msdkvpp gstmsdkvpp.c:995:gst_msdkvpp_initialize:<msdkvpp0> Init failed (undefined behavior) WARNING: from element /GstPipeline:pipeline0/GstMsdkVPP:msdkvpp0: not negotiated After applying this commit, the pipeline above may run without negotiation failure, however NV12 layout in dmabuf mode is selected in renegotiation, the display image is corrupted due to the NV12 issue which was mentioned in commit 3f2314a. Some other fixes are needed to avoid renegotiation by default
* msdkvpp: don't update pads' info if nothing have changedHaihao Xiang2019-01-081-3/+3
|
* msdkenc: break out of flush frames loop on errorU. Artie Eoff2019-01-061-0/+1
| | | | | | | | | | | | | | In general, we should assume any unhandled error is non-recoverable. In the flush frames loop, some error states can cause us to never increment the task and therefore we get stuck in an infinite loop and generate GST_ELEMENT_ERROR over and over again. This eventually consumes all system memory and triggers OOM. Thus, assume the worst and break out of the loop upon the first "unhandled" error. https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/859
* wasapi: Fix double call to Start when resetting the elementNirbheek Chauhan2019-01-042-0/+2
| | | | | | | | When either the source or sink goes from PLAYING -> NULL -> PLAYING, we call _reset() which sets client_needs_restart, and then we call prepare() which calls IAudioClient_Start(), so we don't need to call it again in src_read() or sink_write(). Unlike when we're just going PLAYING -> PAUSED -> PLAYING.
* wasapisink: Don't call CoUninitialize() twice in unprepare()Sebastian Dröge2019-01-031-2/+0
| | | | | It has to be symmetric with CoInitialize(), otherwise everything else will fail.
* decklinkvideosink: Don't forget to unref clock after usageSebastian Dröge2019-01-021-13/+3
| | | | And don't unref a clock that is potentially NULL.
* msdk: Fix invalid return type build warningSeungha Yang2018-12-251-1/+1
| | | | | | | void function cannot have return value gst-plugins-bad/sys/msdk/gstmsdkbufferpool.c(332): warning C4098: 'gst_msdk_buffer_pool_release_buffer': ...
* decklinkvideosink: Fix support for raw CEA608 input and add support for raw ↵Sebastian Dröge2018-12-192-7/+139
| | | | | | | CEA708 input The former was only considering the first byte pair, for the latter we have to convert raw CEA708 cc_data into CDP.
* Fix build when we have tinyalsa but not its headerXavier Claessens2018-12-181-1/+1
|
* kmssink: Accept underscore in propertyNicolas Dufresne2018-12-181-1/+4
| | | | | Otherwise sdi_mode and similar properties would be canonicalised to sdi-mode.
* kmssink: fix tmp_kmsmem leaksGuillaume Desmottes2018-12-181-0/+2
| | | | | | | configure_mode_setting() keeps a ref on tmp_kmsmem which is released in gst_kms_sink_show_frame(). But if for some reason configure_mode_setting() is re-called before showing a frame or if none is showed this memory was leaked.
* Remove acmmp3dec and acmenc pluginsTim-Philipp Müller2018-12-186-1130/+2
| | | | | | | | | | | | | ACM is an ancient legacy API, and there's no point in keeping it around for a licensed mp3 decoder now that mp3 patents have expired and we have a decoder in -good. We didn't ship this in cerbero anyway. If there's a good case for the AAC encoder (which is LC only anyway) someone should write a new plugin based on current APIs, that can actually be built out of the box. Fixes #850
* meson: build vdpau pluginTim-Philipp Müller2018-12-172-1/+30
|
* meson: build tinyalsa pluginTim-Philipp Müller2018-12-172-0/+30
|
* meson: build vcdsrc pluginTim-Philipp Müller2018-12-172-2/+18
|
* closedcaption: Replace GST_VIDEO_CAPTION_TYPE_CEA608_IN_CEA708_RAW with ↵Sebastian Dröge2018-12-152-23/+3
| | | | | | | | | CEA608_S334_1A As a side-effect we can now actually store the line offset in the line21dec element, and have to perform fewer transformations in the decklink elements (which were also buggy as they assumed a single byte triplet per meta).
* sys: applemedia: meson: Add dependencies by using appleframeworksJustin Kim2018-12-141-1/+1
| | | | gst-build#13
* nvdec: Rely on upstream's value for interlace-mode with hevcMatthew Waters2018-12-121-2/+9
| | | | | The nvdec API doesn't seem to produce interlacing information with hevc streams so rely on upstreams value for interlace-mode
* msdk: change the wait time for encoder and vppHaihao Xiang2018-12-122-3/+10
| | | | | In MSDK samples, the wait time for encoder, decoder and vpp is 300000. Let's set the wait time to the same value in msdk plugin
* msdk: correct the error messageHaihao Xiang2018-12-121-1/+1
| | | | It is VPP session instead of Encoder session
* msdk: check the created context against NULL pointerHaihao Xiang2018-12-123-6/+27
| | | | gst_msdk_context_new_with_parent() may return NULL
* msdk: decrease the reference count of objectHaihao Xiang2018-12-121-0/+2
| | | | | Otherwise there are reference leaks if failed to clone or join a mfx session
* msdk: assign the returned value to status variableHaihao Xiang2018-12-121-2/+2
| | | | | Othervise the subsequent check will use the stale value of status variable
* msdkh265enc: output main-10 bitstream if the input is P010_10LEXiang, Haihao2018-12-121-3/+10
| | | | | | | | Tested on KBL using the following command: gst-launch-1.0 videotestsrc num_buffers=100 ! video/x-raw,format=P010_10LE ! \ msdkh265enc ! filesink location=a.hevc This fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/829
* msdkh265enc: add P010_10LE to the sink pad templateXiang, Haihao2018-12-121-1/+1
|
* msdkh265enc: re-add the sink pad templateXiang, Haihao2018-12-121-0/+14
| | | | | | We will add more profiles in the sink caps of msdkh265enc, so let msdkh265enc re-add the sink pad template. Note this change doesn't impact any capability
* msdkenc: handle P010_10LE input formatXiang, Haihao2018-12-121-3/+19
| | | | Note it is up to each codec to support P010_10LE format
* msdkenc: use macro GST_VIDEO_INFO_FORMAT if possibleXiang, Haihao2018-12-121-2/+2
|
* decklink: calculate the decklink output time from the internal clockMatthew Waters2018-12-122-72/+68
| | | | | | | | | | | | | | | | Fixes the time calculations when dealing with a slaved clock (as will occur with more than one decklink video sink), when performing flushing seeks causing stalls in the output timeline, pausing. Tighten up the calculations by relying solely on the internal time (from the internal clock) for determining when to schedule display frames instead attempting to track pause lengths from the external clock and converting to internal time. This results in a much easier offset calculation for choosing the output time and ensures that the clock is always advancing when we need it to. This is fixup to the 'monotonically increasing output timestamps' goal in: bf849e9a69442f7a6f9d4f0a1ef30d5a8009f689
* androidmedia: also install java sourcesMatthew Waters2018-12-071-0/+10
| | | | As needed by our ndk-build integration
* kmssink: Avoiding get_property to take ownership of object membersNaveen Cherukuri2018-12-041-2/+2
| | | | Double free will happen if application frees string retuned by _get_property
* msdk: add missing breaksXiang, Haihao2018-12-032-0/+2
|
* msdk: fix the wrong operatorXiang, Haihao2018-12-031-1/+1
| | | | | The condition is for video memory only, so the operator should be & instead of |
* meson: build opencv and ipcpipeline examplesTim-Philipp Müller2018-11-291-2/+2
| | | | https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/576
* Run gst-indent through the filesJordan Petridis2018-11-283-55/+76
| | | | | | This is required before we enabled an indent test in the CI. https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/33
* msdk: remove unnecessary assignmentXiang, Haihao2018-11-261-1/+0
| | | | | | CodecProfile will be set in MFXVideoDECODE_DecodeHeader() to match the input stream. Setting the hard-coded profile here will mislead user that msdkh265dec supports a special profile only.
* msdk: update the sink and src caps of msdkh265decXiang, Haihao2018-11-261-2/+3
| | | | | | | Now hevc 10bit video can be decoded correctly, so update the sink and src caps accordingly. This fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/720