# Path: utils/process.py
# def get_stdout(cmd, shell=False):
#     rc, stdout, stderr = run_cmd(cmd, shell=shell)
#     return stdout
# 
# Path: utils/v4l.py
# def v4l_get_current_device():
#     return os.environ.get('V4L2_TEST_DEVICE', '/dev/video0')


import os
from utils.process import get_stdout
from utils.v4l import v4l_get_current_device
    from utils.run import run_test
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2015, Florent Thiery 


cmd_pattern = "gst-launch-1.0 v4l2src device=%s num-buffers=10 ! fakesink silent=false -v | grep chain"

def run():
    failed = False
    for i in range(10):
        success, msg = _run()
        if not success:
            return success, msg
    return success, msg

def _run():
    try:

# Path: utils/process.py
# def get_stdout(cmd, shell=False):
#     rc, stdout, stderr = run_cmd(cmd, shell=shell)
#     return stdout
# 
# Path: utils/v4l.py
# def v4l_get_current_device():
#     return os.environ.get('V4L2_TEST_DEVICE', '/dev/video0')


# Path: tests/v4l/first_N_buffers.py
import os
from utils.process import get_stdout
from utils.v4l import v4l_get_current_device
    from utils.run import run_test

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2015, Florent Thiery 


cmd_pattern = "gst-launch-1.0 v4l2src device=%s num-buffers=10 ! fakesink silent=false -v | grep chain"

def run():
    failed = False
    for i in range(10):
        success, msg = _run()
        if not success:
            return success, msg
    return success, msg

def _run():
    try:

        data = get_stdout(cmd_pattern %v4l_get_current_device(), shell=True).strip().split('\n')