Let's add another video manipulation feature to the command-line video player developed earlier.
The file we need here is the one used in the earlier section,
VideoManipulations.py
.Once again, we will focus our attention on the
constructVideoPipeline
method of the classVideoPlayer
. The following code snippet is from this method. The rest of the code in this method is identical to the one reviewed in the earlier section.1 self.videobox = gst.element_factory_make("videobox") 2 self.videobox.set_property("bottom", self.crop_bottom ) 3 self.videobox.set_property("top", self.crop_top ) 4 self.videobox.set_property("left", self.crop_left ) 5 self.videobox.set_property("right", self.crop_right ) 6 7 self.player.add(self.videoQueue, 8 self.autoconvert, 9 self.videobox, 10 self.capsFilter, 11 self.colorSpace, 12 self.videosink) 13 14 gst.element_link_many(self.videoQueue, 15 ...