Blog post after a few days now. Moved on to a new city, and sadly I don't have a reliable internet connection here.Hopefully my new 3G SIM gets activated really fast! (im realizing life without fast internet is so hard :( )
Working mostly offline, for past few days I am trying to implement to Controller class I had earlier just made and left there.
The remote methods allowed to interact with the gst-switch-srv through dbus are:
- get_compose_port: Returns compose port (default is 3001)
- get_encode_port: Returns encode port
- get_audio_port: Returns audio port
- get_preview_ports: Returns a string of all preview ports
- set_composite_mode: Sets the PIP mode (0 to 3). Returns true/false
- set_encode_mode: Sets the encode mode (A or B). Returns true/false
- new_record
- adjust_pip: Inputs are dx, dy, dw, dh
- switch: Inputs are channel and port
- click_video: Inputs are x, y, fw, fh
- mark_face: Input is dictionary (a, b, c, d) of faces
- mark_tracking: Inputs is faces(dictionary)
The main controller class uses a dbus Connection class. This Connection class provides the low level interaction with the dbus. The Controller class is majorly a top level interface which hides all the dbus interactions from the user.
The functons defined in the Controller class are almost stubs, but each of them have different parsers based on what the function does. Giving defination of each and every method will be too long, so I have tried to put some in-line documentation.
The Connection class handles making connection to the dbus and then calling remote functions. Each function has a different type of calling and objects returned are different and have to be parsed accordingly. I have implemented most of these functions, though still some are left. The interesting functions which will require more attention are adjust_pip, switch, click_video, mark_face, and mark_tracking.
Comments Section
Feel free to comment on the post but keep it clean and on topic.
blog comments powered by Disqus