summaryrefslogtreecommitdiff
path: root/src/libsputext/xine_decoder_ogm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsputext/xine_decoder_ogm.c')
-rw-r--r--src/libsputext/xine_decoder_ogm.c56
1 files changed, 23 insertions, 33 deletions
diff --git a/src/libsputext/xine_decoder_ogm.c b/src/libsputext/xine_decoder_ogm.c
index 98cee9746..21ad356b6 100644
--- a/src/libsputext/xine_decoder_ogm.c
+++ b/src/libsputext/xine_decoder_ogm.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder_ogm.c,v 1.7 2003/11/11 18:44:55 f1rmb Exp $
+ * $Id: xine_decoder_ogm.c,v 1.8 2003/11/26 19:43:36 f1rmb Exp $
*
*/
@@ -30,15 +30,17 @@
#include <fcntl.h>
#include <ctype.h>
+#define LOG_MODULE "sputext_ogm_decoder"
+#define LOG_VERBOSE
+/*
+#define LOG
+*/
+
#include "buffer.h"
#include "xine_internal.h"
#include "xineutils.h"
#include "osd.h"
-/*
-#define LOG 1
-*/
-
#define SUB_MAX_TEXT 5
@@ -260,11 +262,9 @@ static void draw_subtitle(spuogm_decoder_t *this, int64_t sub_start, int64_t sub
this->renderer->show (this->osd, sub_start);
this->renderer->hide (this->osd, sub_end);
-#ifdef LOG
- printf ("spuogm: scheduling subtitle >%s< at %lld until %lld, current time is %lld\n",
- this->text[0], sub_start, sub_end,
- this->stream->xine->clock->get_current_time (this->stream->xine->clock));
-#endif
+ lprintf ("scheduling subtitle >%s< at %lld until %lld, current time is %lld\n",
+ this->text[0], sub_start, sub_end,
+ this->stream->xine->clock->get_current_time (this->stream->xine->clock));
}
@@ -313,18 +313,17 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) {
this->lines++;
}
+ lprintf("lines %d\n", this->lines);
#ifdef LOG
- printf("libspuogm: lines %d\n", this->lines);
for(i=0;i<this->lines;i++)
- printf("libspuogm: decoder data [%s]\n", this->text[i]);
- printf("libspuogm: timing %d->%d\n", start, end);
+ lprintf("libspuogm: decoder data [%s]\n", this->text[i]);
#endif
+ lprintf("timing %d->%d\n", start, end);
- if( end <= start ) {
#ifdef LOG
+ if( end <= start )
printf("libspuogm: discarding subtitle with invalid timing\n");
#endif
- }
spu_offset = this->stream->master->metronom->get_option (this->stream->master->metronom,
METRONOM_SPU_OFFSET);
@@ -359,9 +358,7 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) {
/* discard old subtitles */
if( diff < 0 ) {
-#ifdef LOG
- printf("libspuogm: discarding old\n");
-#endif
+ lprintf("discarding old\n");
return;
}
@@ -381,9 +378,8 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) {
if( this->master_started && (status == XINE_STATUS_QUIT ||
status == XINE_STATUS_STOP) ) {
-#ifdef LOG
- printf("libspuogm: master stopped\n");
-#endif
+ lprintf("master stopped\n");
+
this->width = this->height = 0;
return;
}
@@ -394,9 +390,8 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) {
if( this->slave_started && (status == XINE_STATUS_QUIT ||
status == XINE_STATUS_STOP) ) {
-#ifdef LOG
- printf("libspuogm: slave stopped\n");
-#endif
+ lprintf("slave stopped\n");
+
this->width = this->height = 0;
return;
}
@@ -407,9 +402,8 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) {
_x_get_current_info (this->stream->master, &extra_info, sizeof(extra_info) );
}
-#ifdef LOG
- printf("libspuogm: seek_count mismatch\n");
-#endif
+
+ lprintf("seek_count mismatch\n");
}
@@ -470,9 +464,7 @@ static spu_decoder_t *spuogm_class_open_plugin (spu_decoder_class_t *class_gen,
spuogm_decoder_t *this ;
static char *subtitle_size_strings[] = { "small", "normal", "large", NULL };
-#ifdef LOG
- printf ("libspuogm: plugin opened\n");
-#endif
+ lprintf ("plugin opened\n");
this = (spuogm_decoder_t *) xine_xmalloc (sizeof (spuogm_decoder_t));
@@ -532,9 +524,7 @@ static void *init_spu_decoder_plugin (xine_t *xine, void *data) {
spuogm_class_t *this ;
-#ifdef LOG
- printf("libspuogm: init class\n");
-#endif
+ lprintf("init class\n");
this = (spuogm_class_t *) xine_xmalloc (sizeof (spuogm_class_t));