When I wanted to compile the source code, the terminal gave me an error as below:
In function ‘void RecordSample(std::string, std::string)’:
/home/chuyi/codes/Pangolin/SimpleRecord.cpp:7:5: error: ‘VideoInput’ is not a member of ‘pangolin’
pangolin::VideoInput video(input_uri);
^
though I found "VideoInput" is explained in
http://docs.ros.org/fuerte/api/pangolin_wrapper/html/structpangolin_1_1VideoInput.html
And I checked pangolin.h and pangolin/video.h, I found 'VideoInput' is already there:
in pangolin/pangolin.h:
in pangolin/video.h:
and in video_output.h:
I changed the class intostruct, according to this introduction about the difference betweenclass and struct: http://blog.csdn.net/snlying/article/details/2887543
And, I added #include <pangolin/video.h> and #include <pangolin/video_output.h> into the source code, strangely it did make some difference. I thought it wouldn't because they were already included in <pangolin/pangolin.h>, and that's why Steven Lovegrave didn't add them.
Then the terminal reported:
/home/chuyi/codes/Pangolin/SimpleRecord.cpp: In function ‘void RecordSample(std::string, std::string)’:
/home/chuyi/codes/Pangolin/SimpleRecord.cpp:15:14: error: ‘struct pangolin::VideoOutput’ has no member named ‘SetStreams’
recorder.SetStreams(video.Streams());
^
/home/chuyi/codes/Pangolin/SimpleRecord.cpp:40:22: error: ‘struct pangolin::VideoOutput’ has no member named ‘WriteStreams’
recorder.WriteStreams(img);
^
Then I checked video_output.h again and found yay there was not a member named 'SetStream'......then I re-checked Steven Lovegrove's github and found he updated a new video_output.h........fine.
Then I got many errors like:
video_output.h:71:103: error: ‘json’ does not name a type
virtual void SetStreams(const std::vector<StreamInfo>& streams, const std::string& uri ="", const json::value& properties = json::value() ) = 0;
^
I checked <pangolin/utils/picojson.h> file and found:
——so I guess I should use pangolin::json, instead of only json, in video_output.h?
——No, it didn't help.
(To Be Continued)