From dbd73daf8d117c0566cb4ac7a2d254ec975d256e Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Thu, 22 Apr 2010 11:44:07 +0000 Subject: [PATCH] test output, warning removal --- ng/ngpkg.cpp | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/ng/ngpkg.cpp b/ng/ngpkg.cpp index 223dcbed..45559707 100644 --- a/ng/ngpkg.cpp +++ b/ng/ngpkg.cpp @@ -2197,7 +2197,8 @@ namespace netgen if (occgeometry->ErrorInSurfaceMeshing()) { char script[] = "rebuildoccdialog"; - int errcode = Tcl_GlobalEval (tcl_interp, script); + // int errcode = + Tcl_GlobalEval (tcl_interp, script); } } #endif @@ -3551,19 +3552,14 @@ namespace netgen buff.YUV = (uint8_t*)malloc(3*(PIXsize/2)); buff.MPG = (uint8_t*)malloc(MPGbufsize); - cout << "z0" << endl; // Initialize libavcodec: //----------------------- if( !initialized ) { - cout << "call register" << endl; av_register_all(); - cout << "reg done" << endl; initialized = 1; } - cout << "a" << endl; - // Choose codec: //-------------- codec = avcodec_find_encoder( codec_id ); @@ -3574,14 +3570,10 @@ namespace netgen return TCL_ERROR; } - cout << "b" << endl; - // Init codec context etc.: //-------------------------- context = avcodec_alloc_context(); - cout << "b01" << endl; - context->bit_rate = bitrate; context->width = nx; context->height = ny; @@ -3591,8 +3583,6 @@ namespace netgen context->pix_fmt = PIX_FMT_YUV420P; context->flags |= CODEC_FLAG_PSNR; - cout << "b1" << endl; - if( avcodec_open( context, codec ) < 0 ) { cout << "can't open codec" << endl; avcodec_close( context ); @@ -3602,8 +3592,6 @@ namespace netgen return TCL_ERROR; } - cout << "c" << endl; - YUVpicture = avcodec_alloc_frame(); YUVpicture->data[0] = buff.YUV; @@ -3734,7 +3722,8 @@ namespace netgen static int Ng_VideoClip (struct Togl * togl, int argc, tcl_const char *argv[]) { - return TCL_OK; + Tcl_SetResult (Togl_Interp(togl), (char*)"Video not available, Netgen was not compiled with FFMPEG library", TCL_STATIC); + return TCL_ERROR; } #endif