Kaydet (Commit) 1ec7d8c3 authored tarafından Caolán McNamara's avatar Caolán McNamara

tweak some of the DBGS to trigger at different levels

i.e. errors at level 1 and the rest at crazy verbose level
üst 0933b4e6
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#define AVMEDIA_GST_MANAGER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Manager_GStreamer" #define AVMEDIA_GST_MANAGER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Manager_GStreamer"
#define AVMEDIA_GST_MANAGER_SERVICENAME "com.sun.star.media.Manager" #define AVMEDIA_GST_MANAGER_SERVICENAME "com.sun.star.media.Manager"
#if DEBUG #if OSL_DEBUG_LEVEL > 2
#define DBG OSL_TRACE #define DBG OSL_TRACE
#else #else
#define DBG(...) #define DBG(...)
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#define AVMEDIA_GST_PLAYER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Player_GStreamer" #define AVMEDIA_GST_PLAYER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Player_GStreamer"
#define AVMEDIA_GST_PLAYER_SERVICENAME "com.sun.star.media.Player_GStreamer" #define AVMEDIA_GST_PLAYER_SERVICENAME "com.sun.star.media.Player_GStreamer"
#if DEBUG #if OSL_DEBUG_LEVEL > 2
#define DBG OSL_TRACE #define DBG OSL_TRACE
#else #else
#define DBG(...) #define DBG(...)
...@@ -159,13 +159,14 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message ) ...@@ -159,13 +159,14 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message )
{ {
DBG( "%p processSyncMessage: %s", this, GST_MESSAGE_TYPE_NAME( message ) ); DBG( "%p processSyncMessage: %s", this, GST_MESSAGE_TYPE_NAME( message ) );
#if DEBUG #if OSL_DEBUG_LEVEL > 0
if ( GST_MESSAGE_TYPE( message ) == GST_MESSAGE_ERROR ) { if ( GST_MESSAGE_TYPE( message ) == GST_MESSAGE_ERROR )
{
GError* error; GError* error;
gchar* error_debug; gchar* error_debug;
gst_message_parse_error( message, &error, &error_debug ); gst_message_parse_error( message, &error, &error_debug );
DBG("error: '%s' debug: '%s'", error->message, error_debug); OSL_TRACE("gstreamer error: '%s' debug: '%s'", error->message, error_debug);
} }
#endif #endif
...@@ -230,7 +231,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message ) ...@@ -230,7 +231,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message )
} }
} }
#if DEBUG #if OSL_DEBUG_LEVEL > 2
sal_Bool aSuccess = sal_Bool aSuccess =
#endif #endif
osl_setCondition( maSizeCondition ); osl_setCondition( maSizeCondition );
...@@ -241,7 +242,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message ) ...@@ -241,7 +242,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message )
} else if( GST_MESSAGE_TYPE( message ) == GST_MESSAGE_ERROR ) { } else if( GST_MESSAGE_TYPE( message ) == GST_MESSAGE_ERROR ) {
if( mnWidth == 0 ) { if( mnWidth == 0 ) {
// an error occurred, set condition so that OOo thread doesn't wait for us // an error occurred, set condition so that OOo thread doesn't wait for us
#if DEBUG #if OSL_DEBUG_LEVEL > 2
sal_Bool aSuccess = sal_Bool aSuccess =
#endif #endif
osl_setCondition( maSizeCondition ); osl_setCondition( maSizeCondition );
...@@ -536,7 +537,7 @@ awt::Size SAL_CALL Player::getPreferredPlayerWindowSize( ) ...@@ -536,7 +537,7 @@ awt::Size SAL_CALL Player::getPreferredPlayerWindowSize( )
DBG( "%p Player::getPreferredPlayerWindowSize, member %d x %d", this, mnWidth, mnHeight ); DBG( "%p Player::getPreferredPlayerWindowSize, member %d x %d", this, mnWidth, mnHeight );
TimeValue aTimeout = { 10, 0 }; TimeValue aTimeout = { 10, 0 };
#if DEBUG #if OSL_DEBUG_LEVEL > 2
oslConditionResult aResult = oslConditionResult aResult =
#endif #endif
osl_waitCondition( maSizeCondition, &aTimeout ); osl_waitCondition( maSizeCondition, &aTimeout );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment