Add other media test and set caps to limit to audio for scanner
This commit is contained in:
parent
c247e1455b
commit
2ebaa38ed9
@ -47,11 +47,13 @@ class Scanner(object):
|
||||
self.error_callback = error_callback
|
||||
self.loop = gobject.MainLoop()
|
||||
|
||||
caps = gst.Caps('audio/x-raw-int')
|
||||
fakesink = gst.element_factory_make('fakesink')
|
||||
pad = fakesink.get_pad('sink')
|
||||
|
||||
self.uribin = gst.element_factory_make('uridecodebin')
|
||||
self.uribin.connect('pad-added', self.process_new_pad, pad)
|
||||
self.uribin.set_property('caps', caps)
|
||||
|
||||
self.pipe = gst.element_factory_make('pipeline')
|
||||
self.pipe.add(fakesink)
|
||||
|
||||
BIN
tests/data/scanner/image/test.png
Normal file
BIN
tests/data/scanner/image/test.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 176 B |
@ -89,3 +89,7 @@ class ScannerTest(unittest.TestCase):
|
||||
def test_track_is_set(self):
|
||||
self.scan('scanner/simple')
|
||||
self.check('scanner/simple/song1.mp3', 'title', 'trackname')
|
||||
|
||||
def test_other_media_is_ignored(self):
|
||||
self.scan('scanner/image')
|
||||
self.assert_(self.errors)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user