mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2024-12-25 04:11:38 +00:00
make code windows compatible
Signed-off-by: Anshul Maheshwari <er.anshul.maheshwari@gmail.com>
This commit is contained in:
parent
2ca835ea1b
commit
0023c6545b
@ -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
|
||||
|
@ -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 <pthread.h>
|
||||
|
||||
#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);
|
||||
|
@ -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
|
||||
|
@ -27,9 +27,6 @@
|
||||
#include "bcd.h"
|
||||
#include "sliced.h"
|
||||
|
||||
/* Public */
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
/* Bit slicer */
|
||||
|
||||
@ -363,10 +360,6 @@ typedef struct vbi_raw_decoder {
|
||||
*/
|
||||
int synchronous;
|
||||
|
||||
/*< private >*/
|
||||
|
||||
pthread_mutex_t mutex;
|
||||
|
||||
unsigned int services;
|
||||
int num_jobs;
|
||||
|
||||
|
@ -77,6 +77,13 @@
|
||||
<ClInclude Include="..\src\zlib\zconf.h" />
|
||||
<ClInclude Include="..\src\zlib\zlib.h" />
|
||||
<ClInclude Include="..\src\zlib\zutil.h" />
|
||||
<ClInclude Include="..\src\zvbi\bcd.h" />
|
||||
<ClInclude Include="..\src\zvbi\bit_slicer.h" />
|
||||
<ClInclude Include="..\src\zvbi\macros.h" />
|
||||
<ClInclude Include="..\src\zvbi\misc.h" />
|
||||
<ClInclude Include="..\src\zvbi\raw_decoder.h" />
|
||||
<ClInclude Include="..\src\zvbi\sampling_par.h" />
|
||||
<ClInclude Include="..\src\zvbi\sliced.h" />
|
||||
<ClInclude Include="include\inttypes.h" />
|
||||
<ClInclude Include="include\stdint.h" />
|
||||
</ItemGroup>
|
||||
@ -153,10 +160,12 @@
|
||||
<ClCompile Include="..\src\lib_ccx\ccx_decoders_708_output.c" />
|
||||
<ClCompile Include="..\src\lib_ccx\ccx_decoders_common.c" />
|
||||
<ClCompile Include="..\src\lib_ccx\ccx_decoders_isdb.c" />
|
||||
<ClCompile Include="..\src\lib_ccx\ccx_decoders_vbi.c" />
|
||||
<ClCompile Include="..\src\lib_ccx\ccx_decoders_xds.c" />
|
||||
<ClCompile Include="..\src\lib_ccx\ccx_demuxer.c" />
|
||||
<ClCompile Include="..\src\lib_ccx\ccx_dtvcc.c" />
|
||||
<ClCompile Include="..\src\lib_ccx\ccx_encoders_common.c" />
|
||||
<ClCompile Include="..\src\lib_ccx\ccx_encoders_g608.c" />
|
||||
<ClCompile Include="..\src\lib_ccx\ccx_encoders_helpers.c" />
|
||||
<ClCompile Include="..\src\lib_ccx\ccx_encoders_sami.c" />
|
||||
<ClCompile Include="..\src\lib_ccx\ccx_encoders_smptett.c" />
|
||||
@ -164,6 +173,7 @@
|
||||
<ClCompile Include="..\src\lib_ccx\ccx_encoders_srt.c" />
|
||||
<ClCompile Include="..\src\lib_ccx\ccx_encoders_webvtt.c" />
|
||||
<ClCompile Include="..\src\lib_ccx\ccx_encoders_xds.c" />
|
||||
<ClCompile Include="..\src\lib_ccx\ccx_gxf.c" />
|
||||
<ClCompile Include="..\src\lib_ccx\cc_bitstream.c" />
|
||||
<ClCompile Include="..\src\lib_ccx\configuration.c" />
|
||||
<ClCompile Include="..\src\lib_ccx\dvb_subtitle_decoder.c" />
|
||||
@ -197,6 +207,10 @@
|
||||
<ClCompile Include="..\src\zlib\inftrees.c" />
|
||||
<ClCompile Include="..\src\zlib\trees.c" />
|
||||
<ClCompile Include="..\src\zlib\zutil.c" />
|
||||
<ClCompile Include="..\src\zvbi\bit_slicer.c" />
|
||||
<ClCompile Include="..\src\zvbi\decoder.c" />
|
||||
<ClCompile Include="..\src\zvbi\raw_decoder.c" />
|
||||
<ClCompile Include="..\src\zvbi\sampling_par.c" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{0F0063C4-BCBC-4379-A6D5-84A5669C940A}</ProjectGuid>
|
||||
@ -238,7 +252,7 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../src/win_spec_incld;../src/gpacmp4;../src/libpng;../src/zlib;../src;../src/lib_ccx;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../src/win_spec_incld;../src/gpacmp4;../src/libpng;../src/zlib;../src;../src/lib_ccx;C:\Users\Anshul\Documents\GitHub\ccextractor\src\zvbi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
|
@ -49,6 +49,12 @@
|
||||
<Filter Include="Source Files\ccx_common">
|
||||
<UniqueIdentifier>{2b841054-ad06-429d-9b44-fabd29fbeef0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\zvbi">
|
||||
<UniqueIdentifier>{d86f4f94-df28-4fed-a455-c54bc521c86a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\zvbi">
|
||||
<UniqueIdentifier>{288f48c3-470a-45ad-a70a-8f062c51aeb1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\gpacmp4\gpac\avparse.h">
|
||||
@ -255,6 +261,27 @@
|
||||
<ClInclude Include="..\src\lib_ccx\utility.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\zvbi\bcd.h">
|
||||
<Filter>Header Files\zvbi</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\zvbi\bit_slicer.h">
|
||||
<Filter>Header Files\zvbi</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\zvbi\macros.h">
|
||||
<Filter>Header Files\zvbi</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\zvbi\misc.h">
|
||||
<Filter>Header Files\zvbi</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\zvbi\raw_decoder.h">
|
||||
<Filter>Header Files\zvbi</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\zvbi\sampling_par.h">
|
||||
<Filter>Header Files\zvbi</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\zvbi\sliced.h">
|
||||
<Filter>Header Files\zvbi</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\ccextractor.c">
|
||||
@ -617,5 +644,26 @@
|
||||
<ClCompile Include="..\src\lib_ccx\ccx_decoders_isdb.c">
|
||||
<Filter>Source Files\ccx_decoders</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\zvbi\bit_slicer.c">
|
||||
<Filter>Source Files\zvbi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\zvbi\decoder.c">
|
||||
<Filter>Source Files\zvbi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\zvbi\raw_decoder.c">
|
||||
<Filter>Source Files\zvbi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\zvbi\sampling_par.c">
|
||||
<Filter>Source Files\zvbi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\lib_ccx\ccx_gxf.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\lib_ccx\ccx_decoders_vbi.c">
|
||||
<Filter>Source Files\ccx_decoders</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\lib_ccx\ccx_encoders_g608.c">
|
||||
<Filter>Source Files\ccx_decoders</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user