Improved Json methods to correct work with swig and inheritance.

This commit is contained in:
Jonathan Thomas
2013-12-07 21:09:55 -06:00
parent e3d41808b9
commit cd7743fb88
44 changed files with 787 additions and 221 deletions

View File

@@ -41,13 +41,13 @@ using namespace tr1;
int main(int argc, char* argv[])
{
Color c;
std::string a;
a = "{\"blue\":{\"Auto_Handle_Percentage\":0.4000000059604645,\"Points\":[]},\"red\":{\"Auto_Handle_Percentage\":0.4000000059604645,\"Points\":[{\"co\":{\"X\":0,\"Y\":243,\"delta\":0,\"increasing\":true,\"repeated\":{\"den\":1,\"num\":1}},\"handle_left\":{\"X\":0,\"Y\":243,\"delta\":0,\"increasing\":true,\"repeated\":{\"den\":1,\"num\":1}},\"handle_right\":{\"X\":0,\"Y\":243,\"delta\":0,\"increasing\":true,\"repeated\":{\"den\":1,\"num\":1}},\"handle_type\":0,\"interpolation\":0}]}}";
c.Json(a);
FFmpegReader r2("/home/jonathan/Videos/sintel_trailer-720p.mp4");
r2.Open();
cout << r2.Json() << endl;
r2.SetJson("{\"acodec\":\"\",\"audio_bit_rate\":0,\"audio_stream_index\":-1,\"audio_timebase\":{\"den\":1,\"num\":1},\"channels\":0,\"display_ratio\":{\"den\":9,\"num\":16},\"duration\":10.03333377838135,\"file_size\":\"208835074\",\"fps\":{\"den\":1,\"num\":30},\"has_audio\":false,\"has_video\":true,\"height\":1080,\"interlaced_frame\":false,\"path\":\"/home/jonathan/Videos/space_undulation_hd.mov\",\"pixel_format\":13,\"pixel_ratio\":{\"den\":72,\"num\":72},\"sample_rate\":0,\"top_field_first\":false,\"type\":\"FFmpegReader\",\"vcodec\":\"mjpeg\",\"video_bit_rate\":166513021,\"video_length\":\"301\",\"video_stream_index\":0,\"video_timebase\":{\"den\":30,\"num\":1},\"width\":1920}");
return 0;
// FFmpegReader r2("/home/jonathan/Videos/sintel_trailer-720p.mp4");
// r2.Open();
// SDLPlayer p;
// p.Reader(&r2);
// p.Play();