0

mates,I have a set top box which I am communicating through serial port.This box has Gstreamer media frame-work(linux platform and C language). I am trying to automate Gstreamer i.e gst-launch,gst-inspect....there are also other frame work like Qt which I want to automate. Following are my attempts toward this problems : Attempt 1: Tried using Pyserial and was successful toward working of it,but by using Pyserial I was able to access my port and communicate to my board,but I found no way to automate things.

import serial
import time

port = "COM1"
baud = 115200

ser = serial.Serial(port, baud,xonxoff=False, rtscts=False, dsrdtr=False,timeout=None)
ser.flushInput()
ser.flushOutput()  
if ser.isOpen():
     print(ser.name + ' is open...')



while True :
     cmd = input("Enter command or 'exit':")
     if cmd == 'exit':
          ser.close()
          exit()
     else:
               ser.write(cmd.encode() + b'\r\n' )

               bytesToRead = ser.inWaiting()

               out=ser.read(bytesToRead)
               print(out.decode(),sep='')

Attempt 2 : To have a communicator install in my board which can communicate to my box. If this is correct ,I have no Idea how to proceed with this.

Any help toward STB automation will be greatly appreciated.

nsr
  • 855
  • 7
  • 10
  • you want to control some gst-launch commands through serial console? – nayana Mar 02 '16 at 09:49
  • I am novice to this sitiuation,my aim is to automate gstreamer plugins. using Pyserial was one of my attempt. I am seeking a correct approach toward this problem. – nsr Mar 02 '16 at 10:33
  • I dont understand what do you call "automate".. do you want to execute some gst-launch shell command, or run some script or what? – nayana Mar 02 '16 at 10:38
  • By automate I mean,I want to validate gstreamer plugins through some application,where I can run my test scripts and the application should be able to validate the test cases. These test cases include validation of Media frameworks etc.. – nsr Mar 02 '16 at 10:49
  • Apart from media frmaework ,other components are device settings,resolution...etc... – nsr Mar 02 '16 at 10:59
  • ok, now I get it, what exactly do you want to test on gstreamer - maybe just if the plugins are installed (like doing gst-inspect x264enc and check if the element is there)? – nayana Mar 02 '16 at 11:03
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/105136/discussion-between-nsr-and-otopolsky). – nsr Mar 02 '16 at 12:22

0 Answers0