Changeset 1505 for trunk/packages
- Timestamp:
- Jun 10, 2009, 9:18:49 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/FlowCmd.cpp
r1504 r1505 1897 1897 } 1898 1898 // Save the old dimensions of the offscreen buffer. 1899 int oldWidth, oldHeight;1899 size_t oldWidth, oldHeight; 1900 1900 oldWidth = NanoVis::win_width; 1901 1901 oldHeight = NanoVis::win_height; 1902 1902 1903 char fileName[200]; 1904 sprintf(fileName,"/tmp/flow%d.mp4", getpid()); 1905 1906 Trace("FLOW started\n"); 1907 1908 Rappture::Outcome context; 1909 1910 Rappture::AVTranslate movie(width, height, bitRate, frameRate); 1911 if (!movie.init(context, fileName)) { 1912 Tcl_AppendResult(interp, "can't initialized movie \"", fileName, 1913 "\": ", context.remark(), (char *)NULL); 1914 return TCL_ERROR; 1915 } 1903 1916 if ((width != oldWidth) || (height != oldHeight)) { 1904 1917 // Resize to the requested size. 1905 1918 NanoVis::resize_offscreen_buffer(width, height); 1906 1919 } 1907 1908 char fileName[128]; 1909 sprintf(fileName,"/tmp/flow%d.mp4", getpid()); 1910 1911 Trace("FLOW started\n"); 1912 1913 Rappture::Outcome context; 1914 Rappture::AVTranslate movie(width, height, bitRate, frameRate); 1915 1920 // Now compute the line padding for the offscreen buffer. 1916 1921 int pad = 0; 1917 1922 if ((3*NanoVis::win_width) % 4 > 0) { 1918 1923 pad = 4 - ((3*NanoVis::win_width) % 4); 1919 1924 } 1920 1921 movie.init(context, fileName); 1922 1925 NanoVis::ResetFlows(); 1923 1926 for (int i = 0; i < numFrames; i++) { 1924 1927 // Generate the latest frame and send it back to the client … … 1964 1967 NanoVis::resize_offscreen_buffer(oldWidth, oldHeight); 1965 1968 } 1969 NanoVis::ResetFlows(); 1966 1970 NanoVis::licRenderer->make_patterns(); 1967 1971 if (unlink(fileName) != 0) {
Note: See TracChangeset
for help on using the changeset viewer.