summaryrefslogtreecommitdiff
path: root/libardrone/test_h264_decoder.py
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2015-01-07 17:51:55 +0100
committerFlorian Jung <flo@windfisch.org>2015-01-07 17:51:55 +0100
commit5772af4eed51e45de06b1329ed3be3158c4c2ccf (patch)
tree33d67d69bfa7a5a1b18d73203119c263a8815ded /libardrone/test_h264_decoder.py
parenta1de75322f87cd6adea4afcf3470d2466d0881b8 (diff)
server2
Diffstat (limited to 'libardrone/test_h264_decoder.py')
-rw-r--r--libardrone/test_h264_decoder.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/libardrone/test_h264_decoder.py b/libardrone/test_h264_decoder.py
new file mode 100644
index 0000000..1107fd7
--- /dev/null
+++ b/libardrone/test_h264_decoder.py
@@ -0,0 +1,17 @@
+import paveparser
+import mock
+import h264decoder
+import os
+
+
+def test_h264_decoder():
+ outfileobj = mock.Mock()
+ decoder = h264decoder.H264Decoder(outfileobj)
+ example_video_stream = open(os.path.join(os.path.dirname(__file__), 'paveparser.output'))
+ while True:
+ data = example_video_stream.read(1000)
+ if len(data) == 0:
+ break
+ decoder.write(data)
+
+ assert outfileobj.image_ready.called