diff --git a/src/zvbi/bcd.h b/src/zvbi/bcd.h index f27a3047..dd302a90 100644 --- a/src/zvbi/bcd.h +++ b/src/zvbi/bcd.h @@ -24,8 +24,7 @@ #ifndef BCD_H #define BCD_H -//#include "misc.h" - +#include "ccx_common_platform.h" /** * @addtogroup BCD BCD arithmetic for Teletext page numbers * @ingroup HiDec diff --git a/src/zvbi/decoder.c b/src/zvbi/decoder.c index 086fe852..7a3ebfed 100644 --- a/src/zvbi/decoder.c +++ b/src/zvbi/decoder.c @@ -27,8 +27,6 @@ the old API in libzvbi 0.3. Other modules (e.g. io-v4l2k.c) should already use the new raw VBI decoder directly. */ -#include - #include "misc.h" #include "zvbi_decoder.h" #include "raw_decoder.h" @@ -512,13 +510,8 @@ int vbi_raw_decode (vbi_raw_decoder * rd, rd3 = (vbi3_raw_decoder *) rd->pattern; n_lines = rd->count[0] + rd->count[1]; - pthread_mutex_lock (&rd->mutex); - { - n_lines = vbi3_raw_decoder_decode (rd3, out, n_lines, raw); - } - - pthread_mutex_unlock (&rd->mutex); + n_lines = vbi3_raw_decoder_decode (rd3, out, n_lines, raw); return n_lines; } @@ -544,14 +537,12 @@ vbi_raw_decoder_resize (vbi_raw_decoder * rd, rd3 = (vbi3_raw_decoder *) rd->pattern; - pthread_mutex_lock (&rd->mutex); { if ((rd->start[0] == start[0]) && (rd->start[1] == start[1]) && (rd->count[0] == (int) count[0]) && (rd->count[1] == (int) count[1])) { - pthread_mutex_unlock (&rd->mutex); return; } @@ -564,7 +555,7 @@ vbi_raw_decoder_resize (vbi_raw_decoder * rd, (rd3, (vbi_sampling_par *) rd, /* strict */ 0); } - pthread_mutex_unlock (&rd->mutex); + } /** @@ -591,15 +582,11 @@ vbi_raw_decoder_remove_services (vbi_raw_decoder * rd, rd3 = (vbi3_raw_decoder *) rd->pattern; service_set = services; - pthread_mutex_lock (&rd->mutex); - { service_set = vbi3_raw_decoder_remove_services (rd3, service_set); } - pthread_mutex_unlock (&rd->mutex); - return service_set; } @@ -625,14 +612,12 @@ vbi_raw_decoder_check_services (vbi_raw_decoder * rd, service_set = services; - pthread_mutex_lock (&rd->mutex); { service_set = vbi_sampling_par_check_services ((vbi_sampling_par *) rd, service_set, strict); } - pthread_mutex_unlock (&rd->mutex); return (unsigned int) service_set; } @@ -673,7 +658,7 @@ vbi_raw_decoder_add_services (vbi_raw_decoder * rd, rd3 = (vbi3_raw_decoder *) rd->pattern; service_set = services; - pthread_mutex_lock (&rd->mutex); + { vbi3_raw_decoder_set_sampling_par @@ -683,8 +668,6 @@ vbi_raw_decoder_add_services (vbi_raw_decoder * rd, (rd3, service_set, strict); } - pthread_mutex_unlock (&rd->mutex); - return service_set; } @@ -739,7 +722,6 @@ vbi_raw_decoder_parameters (vbi_raw_decoder * rd, service_set = services; - pthread_mutex_lock (&rd->mutex); { service_set = vbi_sampling_par_from_services @@ -748,8 +730,6 @@ vbi_raw_decoder_parameters (vbi_raw_decoder * rd, videostd_set, service_set); } - pthread_mutex_unlock(&rd->mutex); - return (unsigned int) service_set; } @@ -773,13 +753,10 @@ vbi_raw_decoder_reset (vbi_raw_decoder * rd) rd3 = (vbi3_raw_decoder *) rd->pattern; - pthread_mutex_lock (&rd->mutex); { vbi3_raw_decoder_reset (rd3); } - - pthread_mutex_unlock (&rd->mutex); } /** @@ -799,8 +776,6 @@ vbi_raw_decoder_destroy (vbi_raw_decoder * rd) vbi3_raw_decoder_delete (rd3); - pthread_mutex_destroy (&rd->mutex); - CLEAR (*rd); } @@ -818,7 +793,6 @@ vbi_raw_decoder_init (vbi_raw_decoder * rd) CLEAR (*rd); - pthread_mutex_init (&rd->mutex, NULL); rd3 = vbi3_raw_decoder_new (/* sampling_par */ NULL); assert (NULL != rd3); diff --git a/src/zvbi/misc.h b/src/zvbi/misc.h index 53c63fb3..a459a2c4 100644 --- a/src/zvbi/misc.h +++ b/src/zvbi/misc.h @@ -296,68 +296,6 @@ _vbi_grow_vector_capacity (void ** vector, size_t element_size) _vbi_nonnull ((1, 2)); -/* Logging stuff. */ - -extern _vbi_log_hook _vbi_global_log; - -extern void -_vbi_log_vprintf (vbi_log_fn * log_fn, - void * user_data, - vbi_log_mask level, - const char * source_file, - const char * context, - const char * templ, - va_list ap) - _vbi_nonnull ((1, 4, 5, 6)); -extern void -_vbi_log_printf (vbi_log_fn * log_fn, - void * user_data, - vbi_log_mask level, - const char * source_file, - const char * context, - const char * templ, - ...) - _vbi_nonnull ((1, 4, 5, 6)) _vbi_format ((printf, 6, 7)); - -#define _vbi_log(hook, level, templ, args...) \ -do { \ - _vbi_log_hook *_h = hook; \ - \ - if ((NULL != _h && 0 != (_h->mask & level)) \ - || (_h = &_vbi_global_log, 0 != (_h->mask & level))) \ - _vbi_log_printf (_h->fn, _h->user_data, \ - level, __FILE__, __FUNCTION__, \ - templ , ##args); \ -} while (0) - -#define _vbi_vlog(hook, level, templ, ap) \ -do { \ - _vbi_log_hook *_h = hook; \ - \ - if ((NULL != _h && 0 != (_h->mask & level)) \ - || (_h = &_vbi_global_log, 0 != (_h->mask & level))) \ - _vbi_log_vprintf (_h->fn, _h->user_data, \ - level, __FILE__, __FUNCTION__, \ - templ, ap); \ -} while (0) - -/* -#define error(hook, templ, args...) \ - _vbi_log (hook, VBI_LOG_ERROR, templ , ##args) -#define warning(hook, templ, args...) \ - _vbi_log (hook, VBI_LOG_ERROR, templ , ##args) -#define notice(hook, templ, args...) \ - _vbi_log (hook, VBI_LOG_NOTICE, templ , ##args) -#define info(hook, templ, args...) \ - _vbi_log (hook, VBI_LOG_INFO, templ , ##args) -#define debug1(hook, templ, args...) \ - _vbi_log (hook, VBI_LOG_DEBUG, templ , ##args) -#define debug2(hook, templ, args...) \ - _vbi_log (hook, VBI_LOG_DEBUG2, templ , ##args) -#define debug3(hook, templ, args...) \ - _vbi_log (hook, VBI_LOG_DEBUG3, templ , ##args) - -*/ #define debug1 debug #define debug2 debug #define debug3 debug diff --git a/src/zvbi/zvbi_decoder.h b/src/zvbi/zvbi_decoder.h index 5f6cbc7e..04882db7 100644 --- a/src/zvbi/zvbi_decoder.h +++ b/src/zvbi/zvbi_decoder.h @@ -27,9 +27,6 @@ #include "bcd.h" #include "sliced.h" -/* Public */ - -#include /* Bit slicer */ @@ -363,10 +360,6 @@ typedef struct vbi_raw_decoder { */ int synchronous; - /*< private >*/ - - pthread_mutex_t mutex; - unsigned int services; int num_jobs; diff --git a/windows/ccextractor.vcxproj b/windows/ccextractor.vcxproj index 21ce8b2d..7f8a3c28 100644 --- a/windows/ccextractor.vcxproj +++ b/windows/ccextractor.vcxproj @@ -77,6 +77,13 @@ + + + + + + + @@ -153,10 +160,12 @@ + + @@ -164,6 +173,7 @@ + @@ -197,6 +207,10 @@ + + + + {0F0063C4-BCBC-4379-A6D5-84A5669C940A} @@ -238,7 +252,7 @@ Disabled - ../src/win_spec_incld;../src/gpacmp4;../src/libpng;../src/zlib;../src;../src/lib_ccx;%(AdditionalIncludeDirectories) + ../src/win_spec_incld;../src/gpacmp4;../src/libpng;../src/zlib;../src;../src/lib_ccx;C:\Users\Anshul\Documents\GitHub\ccextractor\src\zvbi;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) true EnableFastChecks diff --git a/windows/ccextractor.vcxproj.filters b/windows/ccextractor.vcxproj.filters index ebcefc43..9d12be4d 100644 --- a/windows/ccextractor.vcxproj.filters +++ b/windows/ccextractor.vcxproj.filters @@ -49,6 +49,12 @@ {2b841054-ad06-429d-9b44-fabd29fbeef0} + + {d86f4f94-df28-4fed-a455-c54bc521c86a} + + + {288f48c3-470a-45ad-a70a-8f062c51aeb1} + @@ -255,6 +261,27 @@ Header Files + + Header Files\zvbi + + + Header Files\zvbi + + + Header Files\zvbi + + + Header Files\zvbi + + + Header Files\zvbi + + + Header Files\zvbi + + + Header Files\zvbi + @@ -617,5 +644,26 @@ Source Files\ccx_decoders + + Source Files\zvbi + + + Source Files\zvbi + + + Source Files\zvbi + + + Source Files\zvbi + + + Source Files + + + Source Files\ccx_decoders + + + Source Files\ccx_decoders + \ No newline at end of file