]> git.sesse.net Git - mlt/commitdiff
Cleanup some logging from work in opengl branch.
authorDan Dennedy <dan@dennedy.org>
Thu, 21 Feb 2013 04:44:41 +0000 (20:44 -0800)
committerDan Dennedy <dan@dennedy.org>
Thu, 21 Feb 2013 04:44:41 +0000 (20:44 -0800)
src/modules/opengl/consumer_xgl.c
src/modules/opengl/filter_glsl_manager.cpp
src/modules/opengl/filter_movit_convert.cpp

index 6eae9f1d3c6fd3da42a4371256bcced853905a1b..49230d5593d97d340a9b51b99388c0896c5a5517 100644 (file)
@@ -36,7 +36,6 @@
 #include <time.h>
 #include <sys/time.h>
 #include <pthread.h>
-#include <sys/syscall.h>
 
 #include <framework/mlt.h>
 
@@ -178,8 +177,6 @@ static void update()
 
 static void show_frame()
 {
-//     fprintf(stderr,"show_frame threadID : %ld\n", syscall(SYS_gettid));
-       
        if ( (fb.width != new_frame.width) || (fb.height != new_frame.height) ) {
                glDeleteFramebuffers( 1, &fb.fbo );
                glDeleteTextures( 1, &fb.texture );
@@ -255,7 +252,7 @@ void* video_thread( void *arg )
                next = mlt_consumer_rt_frame( consumer );
 
                if ( !mlt_properties_get_int( MLT_FILTER_PROPERTIES( glsl_manager ), "glsl_supported" ) ) {
-                       fprintf( stderr, "OpenGL Shading Language is not supported on this machine.\n" );
+                       mlt_log_error( MLT_CONSUMER_SERVICE(consumer), "OpenGL Shading Language is not supported on this machine.\n" );
                        xgl->running = 0;
                        break;
                }
@@ -414,8 +411,6 @@ static void createGLWindow()
        XGetGeometry( GLWin.dpy, GLWin.win, &winDummy, &GLWin.x, &GLWin.y,
                &GLWin.width, &GLWin.height, &borderDummy, &GLWin.depth );
 
-       fprintf(stderr, "Direct Rendering: %s\n",glXIsDirect( GLWin.dpy, GLWin.ctx ) ? "true" : "false" );
-       
        // Verify GLSL works on this machine
        hiddenctx.ctx = glXCreateContext( GLWin.dpy, vi, GLWin.ctx, GL_TRUE );
        if ( hiddenctx.ctx ) {
@@ -527,7 +522,6 @@ void start_xgl( consumer_xgl consumer )
 
 static void on_consumer_thread_started( mlt_properties owner, HiddenContext* context )
 {
-       fprintf(stderr, "%s: %ld\n", __FUNCTION__, syscall(SYS_gettid));
        // Initialize this thread's OpenGL state
        glXMakeCurrent( context->dpy, context->win, context->ctx );
        mlt_events_fire( MLT_FILTER_PROPERTIES(glsl_manager), "init glsl", NULL );
@@ -550,7 +544,6 @@ static void *consumer_thread( void * );
 
 mlt_consumer consumer_xgl_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
 {
-       fprintf(stderr, "consumer_xgl_init\n");
        // Create the consumer object
        consumer_xgl this = calloc( sizeof( struct consumer_xgl_s ), 1 );
 
index e89471085565aa3dd6614f6f9d296795ef74aa51..34c638a2136afe4b526879720c34e1f1e0566a37 100644 (file)
@@ -30,14 +30,6 @@ extern "C" {
 #include <framework/mlt_factory.h>
 }
 
-#ifdef WIN32
-#define SYS_gettid (224)
-#define syscall(X) (((X == SYS_gettid) && GetCurrentThreadId()) || 0)
-#else
-#include <unistd.h>
-#include <sys/syscall.h>
-#endif
-
 void deleteManager(GlslManager *p)
 {
        delete p;
@@ -177,7 +169,7 @@ glsl_pbo GlslManager::get_pbo(int size)
 
 void GlslManager::onInit( mlt_properties owner, GlslManager* filter )
 {
-       mlt_log_verbose( filter->get_service(), "%s: %d\n", __FUNCTION__, syscall(SYS_gettid) );
+       mlt_log_debug( filter->get_service(), "%s: %d\n", __FUNCTION__ );
 #ifdef WIN32
        std::string path = std::string(mlt_environment("MLT_APPDIR")).append("\\share\\movit");
 #elif defined(__DARWIN__) && defined(RELOCATABLE)
index 12c75dadf92ab6875c96c146b25f6023507613c9..baf8bef7a20649efa48b5dfa3b35ce0d38796b04 100644 (file)
@@ -67,7 +67,7 @@ static int convert_image( mlt_frame frame, uint8_t **image, mlt_image_format *fo
 
        mlt_properties properties = MLT_FRAME_PROPERTIES( frame );
 
-       mlt_log_verbose( NULL, "filter_movit_convert: %s -> %s\n",
+       mlt_log_debug( NULL, "filter_movit_convert: %s -> %s\n",
                mlt_image_format_name( *format ), mlt_image_format_name( output_format ) );
 
        // Use CPU if glsl not initialized or not supported.