kmssink: Do not drain if imported buffer are from KMS

This adds a check to avoid draining when the imported buffers are in
fact own by kmssink. This happens since we export our kms buffer as
DMABuf. They are not really imported back as we pre-fill the cache,
but uses the same format as if they were external. This fixes
performance issues seen with videocrop2-test (found in -good).
22 jobs for kmssink-do-not-alway-drain in 54 minutes and 24 seconds (queued for 3 seconds)
Status Job ID Name Coverage
  Preparation
passed #914431
gst indent

00:00:25

passed #914430
manifest

00:00:23

 
  Build
passed #914441
build cerbero cross-android universal

00:12:22

manual #914445
gst-ios-12.2 allowed to fail manual
build cerbero cross-ios universal
passed #914442
build cerbero cross win32

00:08:57

passed #914443
build cerbero cross win64

00:04:06

failed #914440
build cerbero fedora x86_64

00:08:45

passed #914444
gst-macos-10.14
build cerbero macos x86_64

00:09:14

passed #914436
build clang fedora x86_64

00:11:00

passed #914432
build fedora x86_64

00:11:47

passed #914439
docker windows 1607
build msys2

00:14:14

failed #914433
build nodebug fedora x86_64

00:08:45

passed #914434
build static fedora x86_64

00:16:25

failed #914435
build static nodebug fedora x86_64

00:07:11

passed #914437
docker windows 1607
build vs2017 amd64

00:11:55

passed #914438
docker windows 1607
build vs2017 x86

00:12:05

 
  Test
passed #914446
gstreamer
check fedora

00:03:10

passed #914447
gstreamer
integration testsuites fedora

00:40:33

passed #914448
gstreamer
valgrind bad

00:07:54

 
  Integrate
passed #914449
cross-android universal examples

00:04:53

skipped #914451
gst-ios-12.2 allowed to fail manual
cross-ios universal examples
passed #914450
documentation

00:03:27

 
Name Stage Failure
failed
build cerbero fedora x86_64 Build
0:06:10.601896 Recipe 'gst-plugins-bad-1.0' failed at the build step 'compile'
Fatal Error: Running ['sh', '-c', 'ninja -v -d keeprsp'], returncode 1

Uploading artifacts...
manifest.xml: found 1 matching files
cerbero-build/logs: found 43 matching files

WARNING: *.tar.bz2: no matching files
Uploading artifacts to coordinator... ok
id=914440 responseStatus=201 Created token=U93rmJt5
ERROR: Job failed: exit code 1
failed
build nodebug fedora x86_64 Build
[3480/4452] Compiling C++ object 'subprojects/gst-plugins-bad/ext/opencv/59711a8@@gstopencv@sha/gstmotioncells.cpp.o'.
[3481/4452] Compiling C++ object 'subprojects/gst-plugins-bad/ext/opencv/59711a8@@gstopencv@sha/gstfacedetect.cpp.o'.
ninja: build stopped: subcommand failed.
Running after script...
$ cd gst-build/
$ test -d build && find build -name '*.[ao]' -delete
$ rm -rf subprojects/*/.git/
$ rm -rf build/subprojects/*/.git/
ERROR: Job failed: exit code 1
failed
build static nodebug fedora x86_64 Build
[2329/4063] Linking target subprojects/gst-plugins-good/tests/check/elements_jpegdec.
[2330/4063] Linking target subprojects/gst-plugins-good/tests/check/elements_gdkpixbufsink.
ninja: build stopped: subcommand failed.
Running after script...
$ cd gst-build/
$ test -d build && find build -name '*.[ao]' -delete
$ rm -rf subprojects/*/.git/
$ rm -rf build/subprojects/*/.git/
ERROR: Job failed: exit code 1