diff options
Diffstat (limited to 'src/main/extractor.c')
-rw-r--r-- | src/main/extractor.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/main/extractor.c b/src/main/extractor.c index 830eac8..09a99e9 100644 --- a/src/main/extractor.c +++ b/src/main/extractor.c | |||
@@ -35,7 +35,7 @@ | |||
35 | /** | 35 | /** |
36 | * Size used for the shared memory segment. | 36 | * Size used for the shared memory segment. |
37 | */ | 37 | */ |
38 | #define DEFAULT_SHM_SIZE (16 * 1024) | 38 | #define DEFAULT_SHM_SIZE (160 * 1024) |
39 | 39 | ||
40 | 40 | ||
41 | /** | 41 | /** |
@@ -382,6 +382,8 @@ do_extract (struct EXTRACTOR_PluginList *plugins, | |||
382 | ssize_t ready; | 382 | ssize_t ready; |
383 | int done; | 383 | int done; |
384 | int have_in_memory; | 384 | int have_in_memory; |
385 | |||
386 | LOG ("Stating !\n"); | ||
385 | 387 | ||
386 | plugin_count = 0; | 388 | plugin_count = 0; |
387 | for (pos = plugins; NULL != pos; pos = pos->next) | 389 | for (pos = plugins; NULL != pos; pos = pos->next) |
@@ -401,6 +403,7 @@ do_extract (struct EXTRACTOR_PluginList *plugins, | |||
401 | start.reserved2 = 0; | 403 | start.reserved2 = 0; |
402 | start.shm_ready_bytes = (uint32_t) ready; | 404 | start.shm_ready_bytes = (uint32_t) ready; |
403 | start.file_size = EXTRACTOR_datasource_get_size_ (ds, 0); | 405 | start.file_size = EXTRACTOR_datasource_get_size_ (ds, 0); |
406 | LOG ("Have %d\ !\n",plugin_count); | ||
404 | for (pos = plugins; NULL != pos; pos = pos->next) | 407 | for (pos = plugins; NULL != pos; pos = pos->next) |
405 | { | 408 | { |
406 | if (EXTRACTOR_OPTION_IN_PROCESS == pos->flags) | 409 | if (EXTRACTOR_OPTION_IN_PROCESS == pos->flags) |
@@ -424,6 +427,7 @@ do_extract (struct EXTRACTOR_PluginList *plugins, | |||
424 | done = 0; | 427 | done = 0; |
425 | while (! done) | 428 | while (! done) |
426 | { | 429 | { |
430 | //LOG ("In !done while\n"); | ||
427 | struct EXTRACTOR_Channel *channels[plugin_count]; | 431 | struct EXTRACTOR_Channel *channels[plugin_count]; |
428 | 432 | ||
429 | /* calculate current 'channels' array */ | 433 | /* calculate current 'channels' array */ |
@@ -433,15 +437,18 @@ do_extract (struct EXTRACTOR_PluginList *plugins, | |||
433 | if (-1 == pos->seek_request) | 437 | if (-1 == pos->seek_request) |
434 | { | 438 | { |
435 | /* channel is not seeking, must be running or done */ | 439 | /* channel is not seeking, must be running or done */ |
440 | //LOG ("No seeking, done\n"); | ||
436 | channels[plugin_off] = pos->channel; | 441 | channels[plugin_off] = pos->channel; |
437 | } | 442 | } |
438 | else | 443 | else |
439 | { | 444 | { |
440 | /* not running this round, seeking! */ | 445 | /* not running this round, seeking! */ |
446 | //LOG ("Nor running, seeking\n"); | ||
441 | channels[plugin_off] = NULL; | 447 | channels[plugin_off] = NULL; |
442 | } | 448 | } |
443 | plugin_off++; | 449 | plugin_off++; |
444 | } | 450 | } |
451 | //LOG ("Will call EXTRACTOR_IPC_channel_recv_\n"); | ||
445 | /* give plugins chance to send us meta data, seek or finished messages */ | 452 | /* give plugins chance to send us meta data, seek or finished messages */ |
446 | if (-1 == | 453 | if (-1 == |
447 | EXTRACTOR_IPC_channel_recv_ (channels, | 454 | EXTRACTOR_IPC_channel_recv_ (channels, |
@@ -450,7 +457,7 @@ do_extract (struct EXTRACTOR_PluginList *plugins, | |||
450 | &prp)) | 457 | &prp)) |
451 | { | 458 | { |
452 | /* serious problem in IPC; reset *all* channels */ | 459 | /* serious problem in IPC; reset *all* channels */ |
453 | LOG ("Failed to receive message from channels; full reset\n"); | 460 | //LOG ("Failed to receive message from channels; full reset\n"); |
454 | abort_all_channels (plugins); | 461 | abort_all_channels (plugins); |
455 | break; | 462 | break; |
456 | } | 463 | } |
@@ -463,10 +470,14 @@ do_extract (struct EXTRACTOR_PluginList *plugins, | |||
463 | { | 470 | { |
464 | plugin_off++; | 471 | plugin_off++; |
465 | if ( (1 == pos->round_finished) || | 472 | if ( (1 == pos->round_finished) || |
466 | (NULL == pos->channel) ) | 473 | (NULL == pos->channel) ){ |
474 | //LOG ("Inative plugin\n"); | ||
467 | continue; /* inactive plugin */ | 475 | continue; /* inactive plugin */ |
476 | |||
477 | } | ||
468 | if (-1 == pos->seek_request) | 478 | if (-1 == pos->seek_request) |
469 | { | 479 | { |
480 | //LOG ("pos->seek_request\n"); | ||
470 | /* possibly more meta data at current position, at least | 481 | /* possibly more meta data at current position, at least |
471 | this plugin is still working on it... */ | 482 | this plugin is still working on it... */ |
472 | done = 0; | 483 | done = 0; |