summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7d713a6)
raw | patch | inline | side by side (parent: 7d713a6)
author | Subhajit Paul <subhajit_paul@ti.com> | |
Thu, 11 Oct 2012 04:48:45 +0000 (10:18 +0530) | ||
committer | Subhajit Paul <subhajit_paul@ti.com> | |
Thu, 11 Oct 2012 04:48:45 +0000 (10:18 +0530) |
* Added some new "\n"to teh code to make the output more readable.
* Removed some redundant macros used earlier
* check_XXX(arg) : not required any more
* debug : moved to include/gui.h
* Added few debug statements
* Added error domain and error code in debug message for unhandled
bus errors. This will help in adding error handling code in
later bug fixes.
* Removed some redundant macros used earlier
* check_XXX(arg) : not required any more
* debug : moved to include/gui.h
* Added few debug statements
* Added error domain and error code in debug message for unhandled
bus errors. This will help in adding error handling code in
later bug fixes.
include/gui.h | patch | blob | history | |
src/gui.c | patch | blob | history | |
src/media-play.c | patch | blob | history |
diff --git a/include/gui.h b/include/gui.h
index dd26c55c140420b008348d67c7704dc0b18eafbb..bb3f714383baaee990025e4eb59618200e657862 100644 (file)
--- a/include/gui.h
+++ b/include/gui.h
#include<gst/gst.h>
#ifdef GST_APP_DEBUG
-#define debug(args...) g_print(args)
+#define debug(args...) g_printerr(args)
#else
#define debug(args...)
#endif
*/
void init_gui (int *argc, char **argv[], GstElement *inpipeline);
-#endif
+#endif /*__GUI_H__*/
diff --git a/src/gui.c b/src/gui.c
index ff65dc56a7b66260257aa6976756994df53e895e..6f9ff0a32919b063eec329abf67e13aee334c96b 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
\r
level = gtk_main_level(); \r
if(level != 0){\r
- debug("calling gtk_main_quit");\r
+ debug("calling gtk_main_quit\n");\r
gtk_main_quit(); \r
}\r
}\r
diff --git a/src/media-play.c b/src/media-play.c
index df98efaf5a4bbc275cb3e03db3cd58e912e53506..5ca49e1058902c463f752202a9abcc42fbea1407 100644 (file)
--- a/src/media-play.c
+++ b/src/media-play.c
#include <gui.h>
#include <string.h>
-#ifdef GST_APP_DEBUG
-#define debug(args...) g_print(args)
-#else
-#define debug(args...)
-#endif
-
-#define check_core_error(arg) {\
- if(err->domain==GST_CORE_ERROR && err->code == GST_CORE_ERROR_##arg)\
- g_print("CORE ERROR : " #arg "\n");\
-}
-
/**
* @brief The message handler for the pipeline bus
*
exit_application();
g_main_loop_quit(loop);
}else{
- debug("unhandled error : %s <debug> : %s\n", err->message,
+ debug("unhandled error : (%d,%d) %s <debug> : %s\n",
+ err->domain,err->code,
+ err->message,
debugMsg);
}
g_free(debugMsg);
debug("not found position\n");
position = -1;
}
- if(duration != -1 && position != -1)
+ if(duration != -1 && position != -1){
+ debug("setting to %ld/%ld\n",position,duration);
set_duration(duration,position);
+ }
return TRUE;
}