This commit is contained in:
Joachim Schoeberl 2009-10-31 21:03:52 +00:00
parent f0a97767bd
commit a5aec7630c
4 changed files with 18 additions and 5 deletions

View File

@ -997,5 +997,4 @@ namespace netgen
PrintMessage (3, "Elements after Remove: ", mesh.GetNE()); PrintMessage (3, "Elements after Remove: ", mesh.GetNE());
} }
} }

View File

@ -51,10 +51,8 @@ public:
void Update(); void Update();
int GetNEdges () const int GetNEdges () const { return edge2vert.Size(); }
{ return edge2vert.Size(); } int GetNFaces () const { return face2vert.Size(); }
int GetNFaces () const
{ return face2vert.Size(); }
static inline int GetNVertices (ELEMENT_TYPE et); static inline int GetNVertices (ELEMENT_TYPE et);
static inline int GetNPoints (ELEMENT_TYPE et); static inline int GetNPoints (ELEMENT_TYPE et);

View File

@ -4483,6 +4483,7 @@ namespace netgen
if (strcmp (scalname, newscalname) != 0) if (strcmp (scalname, newscalname) != 0)
Tcl_SetVar ( interp, "::visoptions.scalfunction", newscalname, TCL_GLOBAL_ONLY ); Tcl_SetVar ( interp, "::visoptions.scalfunction", newscalname, TCL_GLOBAL_ONLY );
scalname = Tcl_GetVar (interp, "::visoptions.scalfunction", TCL_GLOBAL_ONLY);
} }
if (strcmp (vssolution.soldata[i]->name, vecname) == 0) if (strcmp (vssolution.soldata[i]->name, vecname) == 0)
{ {

View File

@ -3543,13 +3543,19 @@ namespace netgen
buff.YUV = (uint8_t*)malloc(3*(PIXsize/2)); buff.YUV = (uint8_t*)malloc(3*(PIXsize/2));
buff.MPG = (uint8_t*)malloc(MPGbufsize); buff.MPG = (uint8_t*)malloc(MPGbufsize);
cout << "z0" << endl;
// Initialize libavcodec: // Initialize libavcodec:
//----------------------- //-----------------------
if( !initialized ) { if( !initialized ) {
cout << "call register" << endl;
av_register_all(); av_register_all();
cout << "reg done" << endl;
initialized = 1; initialized = 1;
} }
cout << "a" << endl;
// Choose codec: // Choose codec:
//-------------- //--------------
codec = avcodec_find_encoder( codec_id ); codec = avcodec_find_encoder( codec_id );
@ -3560,9 +3566,14 @@ namespace netgen
return TCL_ERROR; return TCL_ERROR;
} }
cout << "b" << endl;
// Init codec context etc.: // Init codec context etc.:
//-------------------------- //--------------------------
context = avcodec_alloc_context(); context = avcodec_alloc_context();
cout << "b01" << endl;
context->bit_rate = bitrate; context->bit_rate = bitrate;
context->width = nx; context->width = nx;
context->height = ny; context->height = ny;
@ -3572,6 +3583,8 @@ namespace netgen
context->pix_fmt = PIX_FMT_YUV420P; context->pix_fmt = PIX_FMT_YUV420P;
context->flags |= CODEC_FLAG_PSNR; context->flags |= CODEC_FLAG_PSNR;
cout << "b1" << endl;
if( avcodec_open( context, codec ) < 0 ) { if( avcodec_open( context, codec ) < 0 ) {
cout << "can't open codec" << endl; cout << "can't open codec" << endl;
avcodec_close( context ); avcodec_close( context );
@ -3581,6 +3594,8 @@ namespace netgen
return TCL_ERROR; return TCL_ERROR;
} }
cout << "c" << endl;
YUVpicture = avcodec_alloc_frame(); YUVpicture = avcodec_alloc_frame();
YUVpicture->data[0] = buff.YUV; YUVpicture->data[0] = buff.YUV;