1. VideoTester — Base package

class VideoTester.VTBase(conf=None)

Superclass that gathers several common functionalities shared by the client and the server.

parseConf(file, section)

Extract a section from a configuration file.

Parameters:
  • file (string) –
  • section (string) – Path to the configuration file.
Returns:

A list of (name, value) pairs for each option in the given section.

Return type:

list of tuples

run()

Do nothing.

Note

This method MUST be overwritten by the subclasses.

class VideoTester.VTServer(conf=None)

Bases: VideoTester.core.VTBase, SimpleXMLRPCServer.SimpleXMLRPCServer

VT Server class.

run(bitrate, framerate)

Run a subprocess for an RTSP server with a given bitrate and framerate (if not running) or add a client (if running).

Parameters:
  • bitrate (int) – The bitrate (in kbps).
  • framerate (int) – The framerate (in fps).
Returns:

The RTSP server port.

Return type:

int

stop(bitrate, framerate)

Stop an RTSP server with a given bitrate and framerate (if no remaining clients) or remove a client (if remaining clients).

Parameters:
  • bitrate (int) – The bitrate (in kbps).
  • framerate (int) – The framerate (in fps).
Returns:

True.

Return type:

boolean

class VideoTester.VTClient(conf=None)

Bases: VideoTester.core.VTBase

VT Client class.

run()
Run the client and perform all the operations:
  • Connect to the server.
  • Receive video while sniffing packets.
  • Close connection.
  • Process data and extract information.
  • Run measures.
Returns:A dictionary of video files received (see VideoTester.gstreamer.RTSPClient.files), a dictionary of caps (see VideoTester.gstreamer.RTSPClient.caps) and a list of results
Return type:list
class VideoTester.RTSPServer(port)

GStreamer RTSP server.

addMedia(videos, bitrate, framerate, path)

Add videos to the server.

Parameters:
  • videos (list) – List of available videos.
  • bitrate (int) – The bitrate (in kbps).
  • framerate (int) – The framerate (in fps).
  • path (string) – Path to the video directory.
run()

Attach server and run the loop.

class VideoTester.RTSPClient(path, codec, bitrate, framerate)

GStreamer RTSP client.

makeReference(video)

Make the reference videos.

Parameters:video (string) – Path to the selected video.
receive(url, proto)

Connect to the RTSP server and receive the selected video (see video).

Parameters:
  • url (string) – RTSP server URL.
  • proto (int) – Transport protocol for the RTP transmission.
class VideoTester.VTApp(conf)

Bases: wx._core.App

WxPython application class.

class VideoTester.PcapIter(cap, filter='')

Bases: pcap.pcapObject

Iterable PCAP Object.

class VideoTester.Sniffer(iface, ip, cap)

Network sniffer and packet parser.

parsePkts(proto, caps)

Parse packets and extract lengths, times, sequences, timestamps and rtt.

Parameters:caps (dict) – Caps recolected from the GStreamer pipeline (see VideoTester.gstreamer.RTSPClient.caps).
Returns:lengths, times, sequences, timestamps and rtt.
Return type:tuple
run()

Start packet sniffing and save a capture file.

VideoTester.multiSort(*args)

Efficient sort of multiple lists as the first one passed.

class VideoTester.YUVVideo(file, (width, height, fmt))

YUV parser.

class VideoTester.CodedVideo(file, codec)

Coded video parser.