Let's write a simple video player utility. Here we will not use the playbin
plugin. The use of playbin
will be illustrated in a later sub-section. We will develop this utility by constructing a GStreamer pipeline. The key here is to use the queue as a data buffer. The audio and video data needs to be directed so that this 'flows' through audio or video processing sections of the pipeline respectively.
Download the file
PlayingVidio.py
from the Packt website. The file has the source code for this video player utility.The following code gives an overview of the Video player class and its methods.
import time import thread import gobject import pygst pygst.require("0.10") import gst import os class VideoPlayer: def __init__(self): pass def constructPipeline(self): pass def connectSignals(self): pass def decodebin_pad_added(self, decodebin, pad): pass def play(self): pass def message_handler(self,...