This may have happened because you forgot to add the transient modifier in front of your VideoCapture field inside of the Video class. (See the code in the SharedClassRepo for an example of doing that.)
Basically, the error happens because GSON can't serialize a native (C++ code) object like VideoCapture. Making that field "transient" causes GSON to skip serializing it. (Skipping it also means that we need to make sure we initialize it properly back when you load the object from JSON, which is what the connectVideoCapture()
method is about...)