[IMPROVEMENT] Minor styling improvement. (#1149)

* Add, remove spaces. Optimise if-clause.

* Update cnf file. Correct and comment constants.

* Unite style. Add/Remove spaces. Correct errors.

* Add URLs to standards.

* Correct order in enum.
This commit is contained in:
Fonseverin
2019-12-15 20:39:43 +03:00
committed by Carlos Fernandez Sanz
parent b27c6fe415
commit e906585287
4 changed files with 1138 additions and 1105 deletions

View File

@@ -1,5 +1,5 @@
#######################################################
# Version 0.01
# Version 0.02
#
# To enable required option please uncomment option
#
@@ -12,12 +12,15 @@
# 0 = file
# 1 = stdin
# 2 = network
# 3 = tcp
INPUT_SOURCE=0
# The Buffer Input tag
# This tag takes number in its input.
# Is it ccx_bufferdata_type ?
#BUFFER_INPUT=0
# The Direct Rollup tag
@@ -45,22 +48,28 @@ INPUT_SOURCE=0
#NOTYPE_SETTING=
# The Codec Tag takes the preference of codec
# tag CCX_CODEC_ANY is by default
# tag CCX_CODEC_ANY by default
# This tag takes number in its input and their meanings
# are following
# 0 = CCX_CODEC_ANY (default)
# 1 = CCX_CODEC_TELETEXT
# 2 = CCX_CODEC_DVB
# 3 = CCX_CODEC_ISDB_CC
# 4 = CCX_CODEC_ATSC_CC
# 5 = CCX_CODEC_NONE
#CODEC=
# The NO Codec Tag uses codec specified
# tag CCX_CODEC_NONE by default
# This tag takes number in its input and their meanings
# are following
# 0 = CCX_CODEC_ANY
# 1 = CCX_CODEC_TELETEXT
# 2 = CCX_CODEC_DVB
#CODEC=
# The NO Codec Tag do not use codec specified
# tag CCX_CODEC_NONE is by default
# This tag takes number in its input and their meanings
# are following
# 1 = CCX_CODEC_TELETEXT
# 2 = CCX_CODEC_DVB
# 3 = CCX_CODEC_NONE
# 3 = CCX_CODEC_ISDB_CC
# 4 = CCX_CODEC_ATSC_CC
# 5 = CCX_CODEC_NONE (default)
#NOCODEC=
@@ -68,15 +77,21 @@ INPUT_SOURCE=0
# by default output format is srt
# This tag takes number in its input and their meanings
# are following
# 0 = CCX_OF_RAW
# 1 = CCX_OF_SRT (default)
# 2 = CCX_OF_SAMI
# 3 = CCX_OF_TRANSCRIPT
# 4 = CCX_OF_RCWT
# 5 = CCX_OF_NULL
# 6 = CCX_OF_SMPTETT
# 7 = CCX_OF_SPUPNG
# 8 = CCX_OF_DVDRAW
# 0 = CCX_OF_RAW
# 1 = CCX_OF_SRT (default)
# 2 = CCX_OF_SAMI
# 3 = CCX_OF_TRANSCRIPT
# 4 = CCX_OF_RCWT
# 5 = CCX_OF_NULL
# 6 = CCX_OF_SMPTETT
# 7 = CCX_OF_SPUPNG
# 8 = CCX_OF_DVDRAW
# 9 = CCX_OF_WEBVTT
# 10 = CCX_OF_SIMPLE_XML
# 11 = CCX_OF_G608
# 12 = CCX_OF_CURL
# 13 = CCX_OF_SSA
# 14 = CCX_OF_MCC
#OUTPUT_FORMAT=

View File

@@ -69,16 +69,20 @@ int api_start(struct ccx_s_options api_options)
i++;
}
#endif
if (!ctx && errno == ENOMEM)
fatal (EXIT_NOT_ENOUGH_MEMORY, "Not enough memory, could not initialize libraries\n");
else if (!ctx && errno == EINVAL)
fatal (CCX_COMMON_EXIT_BUG_BUG, "Invalid option to CCextractor Library\n");
else if (!ctx && errno == EPERM)
fatal (CCX_COMMON_EXIT_FILE_CREATION_FAILED, "Unable to create output file: Operation not permitted.\n");
else if (!ctx && errno == EACCES)
fatal (CCX_COMMON_EXIT_FILE_CREATION_FAILED, "Unable to create output file: Permission denied\n");
else if (!ctx)
fatal (EXIT_NOT_CLASSIFIED, "Unable to create Library Context %d\n",errno);
if (!ctx)
{
if (errno == ENOMEM)
fatal(EXIT_NOT_ENOUGH_MEMORY, "Not enough memory, could not initialize libraries\n");
else if (errno == EINVAL)
fatal(CCX_COMMON_EXIT_BUG_BUG, "Invalid option to CCextractor Library\n");
else if (errno == EPERM)
fatal(CCX_COMMON_EXIT_FILE_CREATION_FAILED, "Unable to create output file: Operation not permitted.\n");
else if (errno == EACCES)
fatal(CCX_COMMON_EXIT_FILE_CREATION_FAILED, "Unable to create output file: Permission denied\n");
else
fatal(EXIT_NOT_CLASSIFIED, "Unable to create Library Context %d\n", errno);
}
#ifdef WITH_LIBCURL
curl_global_init(CURL_GLOBAL_ALL);
@@ -88,7 +92,7 @@ int api_start(struct ccx_s_options api_options)
if (!curl)
{
curl_global_cleanup(); // Must be done even on init fail
fatal (EXIT_NOT_CLASSIFIED, "Unable to init curl.");
fatal(EXIT_NOT_CLASSIFIED, "Unable to init curl.");
}
#endif
@@ -107,7 +111,7 @@ int api_start(struct ccx_s_options api_options)
if (api_options.write_format != CCX_OF_TRANSCRIPT)
{
api_options.transcript_settings.xds = 0;
mprint ("Warning: -xds ignored, XDS can only be exported to transcripts at this time.\n");
mprint("Warning: -xds ignored, XDS can only be exported to transcripts at this time.\n");
}
}
@@ -117,7 +121,7 @@ int api_start(struct ccx_s_options api_options)
if (api_options.binary_concat)
{
ctx->total_inputsize=get_total_file_size(ctx);
ctx->total_inputsize = get_total_file_size(ctx);
if (ctx->total_inputsize < 0)
{
switch (ctx->total_inputsize)
@@ -177,7 +181,7 @@ int api_start(struct ccx_s_options api_options)
case CCX_SM_RCWT:
case CCX_SM_MP4:
#ifdef WTV_DEBUG
case CCX_SM_HEX_DUMP:
case CCX_SM_HEX_DUMP:
#endif
ccx_common_timing_settings.disable_sync_check = 1;
break;
@@ -200,38 +204,38 @@ int api_start(struct ccx_s_options api_options)
case CCX_SM_GXF:
case CCX_SM_MXF:
#ifdef ENABLE_FFMPEG
case CCX_SM_FFMPEG:
case CCX_SM_FFMPEG:
#endif
if (!api_options.use_gop_as_pts) // If !0 then the user selected something
api_options.use_gop_as_pts = 0;
if (api_options.ignore_pts_jumps)
ccx_common_timing_settings.disable_sync_check = 1;
mprint ("\rAnalyzing data in general mode\n");
mprint("\rAnalyzing data in general mode\n");
tmp = general_loop(ctx);
if (!ret) ret = tmp;
break;
case CCX_SM_MCPOODLESRAW:
mprint ("\rAnalyzing data in McPoodle raw mode\n");
mprint("\rAnalyzing data in McPoodle raw mode\n");
tmp = raw_loop(ctx);
if (!ret) ret = tmp;
break;
case CCX_SM_RCWT:
mprint ("\rAnalyzing data in CCExtractor's binary format\n");
mprint("\rAnalyzing data in CCExtractor's binary format\n");
tmp = rcwt_loop(ctx);
if (!ret) ret = tmp;
break;
case CCX_SM_MYTH:
mprint ("\rAnalyzing data in MythTV mode\n");
mprint("\rAnalyzing data in MythTV mode\n");
show_myth_banner = 1;
tmp = myth_loop(ctx);
if (!ret) ret = tmp;
break;
case CCX_SM_MP4:
mprint ("\rAnalyzing data with GPAC (MP4 library)\n");
mprint("\rAnalyzing data with GPAC (MP4 library)\n");
close_input_file(ctx); // No need to have it open. GPAC will do it for us
if (ctx->current_file == -1) // We don't have a file to open, must be stdin, and GPAC is incompatible with stdin
{
fatal (EXIT_INCOMPATIBLE_PARAMETERS, "MP4 requires an actual file, it's not possible to read from a stream, including stdin.\n");
fatal(EXIT_INCOMPATIBLE_PARAMETERS, "MP4 requires an actual file, it's not possible to read from a stream, including stdin.\n");
}
if(api_options.extract_chapters)
{
@@ -246,7 +250,7 @@ int api_start(struct ccx_s_options api_options)
if (!ret) ret = tmp;
break;
case CCX_SM_MKV:
mprint ("\rAnalyzing data in Matroska mode\n");
mprint("\rAnalyzing data in Matroska mode\n");
tmp = matroska_loop(ctx);
if (!ret) ret = tmp;
break;
@@ -278,17 +282,17 @@ int api_start(struct ccx_s_options api_options)
if (dec_ctx->codec == CCX_CODEC_ATSC_CC)
{
mprint ("\nTotal frames time: %s (%u frames at %.2ffps)\n",
mprint("\nTotal frames time: %s (%u frames at %.2ffps)\n",
print_mstime_static( (LLONG)(total_frames_count*1000/current_fps) ),
total_frames_count, current_fps);
}
if (dec_ctx->stat_hdtv)
{
mprint ("\rCC type 0: %d (%s)\n", dec_ctx->cc_stats[0], cc_types[0]);
mprint ("CC type 1: %d (%s)\n", dec_ctx->cc_stats[1], cc_types[1]);
mprint ("CC type 2: %d (%s)\n", dec_ctx->cc_stats[2], cc_types[2]);
mprint ("CC type 3: %d (%s)\n", dec_ctx->cc_stats[3], cc_types[3]);
mprint("\rCC type 0: %d (%s)\n", dec_ctx->cc_stats[0], cc_types[0]);
mprint("CC type 1: %d (%s)\n", dec_ctx->cc_stats[1], cc_types[1]);
mprint("CC type 2: %d (%s)\n", dec_ctx->cc_stats[2], cc_types[2]);
mprint("CC type 3: %d (%s)\n", dec_ctx->cc_stats[3], cc_types[3]);
}
// Add one frame as fts_max marks the beginning of the last frame,
// but we need the end.
@@ -297,9 +301,9 @@ int api_start(struct ccx_s_options api_options)
// timing (cb_fields having a huge number and fts_now and fts_global being 0 all
// the time), so we need to take that into account in fts_global before resetting
// counters.
if (cb_field1!=0)
if (cb_field1 != 0)
dec_ctx->timing->fts_global += cb_field1*1001/3;
else if (cb_field2!=0)
else if (cb_field2 != 0)
dec_ctx->timing->fts_global += cb_field2*1001/3;
else
dec_ctx->timing->fts_global += cb_708*1001/3;
@@ -318,21 +322,21 @@ int api_start(struct ccx_s_options api_options)
#endif //ENABLE_SHARING
if (dec_ctx->total_pulldownframes)
mprint ("incl. pulldown frames: %s (%u frames at %.2ffps)\n",
mprint("incl. pulldown frames: %s (%u frames at %.2ffps)\n",
print_mstime_static( (LLONG)(dec_ctx->total_pulldownframes*1000/current_fps) ),
dec_ctx->total_pulldownframes, current_fps);
if (dec_ctx->timing->pts_set >= 1 && dec_ctx->timing->min_pts != 0x01FFFFFFFFLL)
{
LLONG postsyncms = (LLONG) (dec_ctx->frames_since_last_gop*1000/current_fps);
mprint ("\nMin PTS: %s\n",
print_mstime_static( dec_ctx->timing->min_pts/(MPEG_CLOCK_FREQ/1000) - dec_ctx->timing->fts_offset));
mprint("\nMin PTS: %s\n",
print_mstime_static(dec_ctx->timing->min_pts/(MPEG_CLOCK_FREQ/1000) - dec_ctx->timing->fts_offset));
if (pts_big_change)
mprint ("(Reference clock was reset at some point, Min PTS is approximated)\n");
mprint ("Max PTS: %s\n",
print_mstime_static( dec_ctx->timing->sync_pts/(MPEG_CLOCK_FREQ/1000) + postsyncms));
mprint("(Reference clock was reset at some point, Min PTS is approximated)\n");
mprint("Max PTS: %s\n",
print_mstime_static(dec_ctx->timing->sync_pts/(MPEG_CLOCK_FREQ/1000) + postsyncms));
mprint ("Length: %s\n",
print_mstime_static( dec_ctx->timing->sync_pts/(MPEG_CLOCK_FREQ/1000) + postsyncms
mprint("Length: %s\n",
print_mstime_static(dec_ctx->timing->sync_pts/(MPEG_CLOCK_FREQ/1000) + postsyncms
- dec_ctx->timing->min_pts/(MPEG_CLOCK_FREQ/1000) + dec_ctx->timing->fts_offset ));
}
@@ -340,21 +344,21 @@ int api_start(struct ccx_s_options api_options)
// dvr-ms files have invalid GOPs
if (gop_time.inited && first_gop_time.inited && stream_mode != CCX_SM_ASF)
{
mprint ("\nInitial GOP time: %s\n",
mprint("\nInitial GOP time: %s\n",
print_mstime_static(first_gop_time.ms));
mprint ("Final GOP time: %s%+3dF\n",
mprint("Final GOP time: %s%+3dF\n",
print_mstime_static(gop_time.ms),
dec_ctx->frames_since_last_gop);
mprint ("Diff. GOP length: %s%+3dF",
mprint("Diff. GOP length: %s%+3dF",
print_mstime_static(gop_time.ms - first_gop_time.ms),
dec_ctx->frames_since_last_gop);
mprint (" (%s)\n\n",
mprint(" (%s)\n\n",
print_mstime_static(gop_time.ms - first_gop_time.ms
+(LLONG) ((dec_ctx->frames_since_last_gop)*1000/29.97)) );
}
if (dec_ctx->false_pict_header)
mprint ("Number of likely false picture headers (discarded): %d\n",dec_ctx->false_pict_header);
mprint ("Number of likely false picture headers (discarded): %d\n", dec_ctx->false_pict_header);
if (dec_ctx->num_key_frames)
mprint("Number of key frames: %d\n", dec_ctx->num_key_frames);
@@ -387,15 +391,15 @@ int api_start(struct ccx_s_options api_options)
break;
} // file loop
close_input_file(ctx);
free((void *) ctx->extension);
free((void *)ctx->extension);
prepare_for_new_file (ctx); // To reset counters used by handle_end_of_data()
prepare_for_new_file(ctx); // To reset counters used by handle_end_of_data()
time (&final);
time(&final);
long proc_time=(long) (final-start);
mprint ("\rDone, processing time = %ld seconds\n", proc_time);
mprint("\rDone, processing time = %ld seconds\n", proc_time);
#if 0
if (proc_time>0)
{
@@ -409,8 +413,8 @@ int api_start(struct ccx_s_options api_options)
if (is_decoder_processed_enough(ctx) == CCX_TRUE)
{
mprint ("\rNote: Processing was canceled before all data was processed because\n");
mprint ("\rone or more user-defined limits were reached.\n");
mprint("\rNote: Processing was canceled before all data was processed because\n");
mprint("\rone or more user-defined limits were reached.\n");
}
#ifdef CURL
@@ -524,7 +528,7 @@ int main(int argc, char* argv[])
if (compile_ret == EXIT_NO_INPUT_FILES)
{
print_usage();
fatal (EXIT_NO_INPUT_FILES, "(This help screen was shown because there were no input files)\n");
fatal(EXIT_NO_INPUT_FILES, "(This help screen was shown because there were no input files)\n");
}
else if (compile_ret == EXIT_WITH_HELP)
{

View File

@@ -58,9 +58,9 @@ enum ccx_debug_message_types
CCX_DMT_LEVENSHTEIN = 0x1000, // Levenshtein distance calculations
CCX_DMT_DVB = 0x2000, // DVB
#ifdef ENABLE_SHARING
CCX_DMT_SHARE = 0x2000, // Extracted captions sharing service
CCX_DMT_SHARE = 0x2000, // Extracted captions sharing service
#endif //ENABLE_SHARING
CCX_DMT_DUMPDEF=0x4000, // Dump defective TS packets
CCX_DMT_DUMPDEF = 0x4000 // Dump defective TS packets
};
// AVC NAL types
@@ -104,95 +104,105 @@ enum ccx_avc_nal_types
enum ccx_stream_type
{
CCX_STREAM_TYPE_UNKNOWNSTREAM = 0,
CCX_STREAM_TYPE_VIDEO_MPEG1 = 0x01,
CCX_STREAM_TYPE_VIDEO_MPEG2 = 0x02,
CCX_STREAM_TYPE_AUDIO_MPEG1 = 0x03,
CCX_STREAM_TYPE_AUDIO_MPEG2 = 0x04,
CCX_STREAM_TYPE_PRIVATE_TABLE_MPEG2 = 0x05,
CCX_STREAM_TYPE_PRIVATE_MPEG2 = 0x06,
CCX_STREAM_TYPE_MHEG_PACKETS = 0x07,
CCX_STREAM_TYPE_MPEG2_ANNEX_A_DSM_CC = 0x08,
CCX_STREAM_TYPE_ITU_T_H222_1 = 0x09,
/*
The later constants are defined by MPEG-TS standard
Explore at: https://exiftool.org/TagNames/M2TS.html
*/
CCX_STREAM_TYPE_VIDEO_MPEG1 = 0x01,
CCX_STREAM_TYPE_VIDEO_MPEG2 = 0x02,
CCX_STREAM_TYPE_AUDIO_MPEG1 = 0x03,
CCX_STREAM_TYPE_AUDIO_MPEG2 = 0x04,
CCX_STREAM_TYPE_PRIVATE_TABLE_MPEG2 = 0x05,
CCX_STREAM_TYPE_PRIVATE_MPEG2 = 0x06,
CCX_STREAM_TYPE_MHEG_PACKETS = 0x07,
CCX_STREAM_TYPE_MPEG2_ANNEX_A_DSM_CC = 0x08,
CCX_STREAM_TYPE_ITU_T_H222_1 = 0x09,
CCX_STREAM_TYPE_ISO_IEC_13818_6_TYPE_A = 0x0A,
CCX_STREAM_TYPE_ISO_IEC_13818_6_TYPE_B = 0x0B,
CCX_STREAM_TYPE_ISO_IEC_13818_6_TYPE_C = 0x0C,
CCX_STREAM_TYPE_ISO_IEC_13818_6_TYPE_D = 0x0D,
CCX_STREAM_TYPE_AUDIO_AAC = 0x0f,
CCX_STREAM_TYPE_VIDEO_MPEG4 = 0x10,
CCX_STREAM_TYPE_VIDEO_H264 = 0x1b,
CCX_STREAM_TYPE_PRIVATE_USER_MPEG2=0x80,
CCX_STREAM_TYPE_AUDIO_AC3 = 0x81,
CCX_STREAM_TYPE_AUDIO_HDMV_DTS = 0x82,
CCX_STREAM_TYPE_AUDIO_DTS = 0x8a,
CCX_STREAM_TYPE_AUDIO_AAC = 0x0f,
CCX_STREAM_TYPE_VIDEO_MPEG4 = 0x10,
CCX_STREAM_TYPE_VIDEO_H264 = 0x1b,
CCX_STREAM_TYPE_PRIVATE_USER_MPEG2 = 0x80,
CCX_STREAM_TYPE_AUDIO_AC3 = 0x81,
CCX_STREAM_TYPE_AUDIO_HDMV_DTS = 0x82,
CCX_STREAM_TYPE_AUDIO_DTS = 0x8a
};
enum ccx_mpeg_descriptor
{
CCX_MPEG_DSC_REGISTRATION = 0x05,
CCX_MPEG_DSC_DATA_STREAM_ALIGNMENT = 0x06,
CCX_MPEG_DSC_ISO639_LANGUAGE = 0x0A,
CCX_MPEG_DSC_VBI_DATA_DESCRIPTOR = 0x45,
/*
The later constants are defined by ETSI EN 300 468 standard
Explore at: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.11.01_60/en_300468v011101p.pdf
*/
CCX_MPEG_DSC_REGISTRATION = 0x05,
CCX_MPEG_DSC_DATA_STREAM_ALIGNMENT = 0x06,
CCX_MPEG_DSC_ISO639_LANGUAGE = 0x0A,
CCX_MPEG_DSC_VBI_DATA_DESCRIPTOR = 0x45,
CCX_MPEG_DSC_VBI_TELETEXT_DESCRIPTOR = 0x46,
CCX_MPEG_DSC_TELETEXT_DESCRIPTOR = 0x56,
CCX_MPEG_DSC_DVB_SUBTITLE = 0x59,
CCX_MPEG_DSC_CAPTION_SERVICE = 0x86,
CCX_MPEG_DESC_DATA_COMP = 0xfd,
CCX_MPEG_DSC_TELETEXT_DESCRIPTOR = 0x56,
CCX_MPEG_DSC_DVB_SUBTITLE = 0x59,
/* User defined */
CCX_MPEG_DSC_CAPTION_SERVICE = 0x86,
CCX_MPEG_DESC_DATA_COMP = 0xfd // Consider to change DESC to DSC
};
enum
{
CCX_MESSAGES_QUIET = 0,
CCX_MESSAGES_STDOUT =1,
CCX_MESSAGES_STDERR =2
CCX_MESSAGES_QUIET = 0,
CCX_MESSAGES_STDOUT = 1,
CCX_MESSAGES_STDERR = 2
};
enum ccx_datasource
{
CCX_DS_FILE=0,
CCX_DS_STDIN=1,
CCX_DS_NETWORK=2,
CCX_DS_TCP=3
CCX_DS_FILE = 0,
CCX_DS_STDIN = 1,
CCX_DS_NETWORK = 2,
CCX_DS_TCP = 3
};
enum ccx_output_format
{
CCX_OF_RAW = 0,
CCX_OF_SRT = 1,
CCX_OF_SAMI = 2,
CCX_OF_RAW = 0,
CCX_OF_SRT = 1,
CCX_OF_SAMI = 2,
CCX_OF_TRANSCRIPT = 3,
CCX_OF_RCWT = 4,
CCX_OF_NULL = 5,
CCX_OF_SMPTETT = 6,
CCX_OF_SPUPNG = 7,
CCX_OF_DVDRAW = 8, // See -d at http://www.theneitherworld.com/mcpoodle/SCC_TOOLS/DOCS/SCC_TOOLS.HTML#CCExtract
CCX_OF_WEBVTT = 9,
CCX_OF_RCWT = 4,
CCX_OF_NULL = 5,
CCX_OF_SMPTETT = 6,
CCX_OF_SPUPNG = 7,
CCX_OF_DVDRAW = 8, // See -d at http://www.theneitherworld.com/mcpoodle/SCC_TOOLS/DOCS/SCC_TOOLS.HTML#CCExtract
CCX_OF_WEBVTT = 9,
CCX_OF_SIMPLE_XML = 10,
CCX_OF_G608 = 11,
CCX_OF_CURL = 12,
CCX_OF_SSA = 13,
CCX_OF_MCC = 14,
CCX_OF_G608 = 11,
CCX_OF_CURL = 12,
CCX_OF_SSA = 13,
CCX_OF_MCC = 14
};
enum ccx_output_date_format
{
ODF_NONE = 0,
ODF_HHMMSS = 1,
ODF_SECONDS = 2,
ODF_DATE =3,
ODF_HHMMSSMS = 4, // HH:MM:SS,MILIS (.srt style)
ODF_NONE = 0,
ODF_HHMMSS = 1,
ODF_SECONDS = 2,
ODF_DATE = 3,
ODF_HHMMSSMS = 4 // HH:MM:SS,MILIS (.srt style)
};
enum ccx_stream_mode_enum
{
CCX_SM_ELEMENTARY_OR_NOT_FOUND=0,
CCX_SM_TRANSPORT=1,
CCX_SM_PROGRAM=2,
CCX_SM_ASF=3,
CCX_SM_ELEMENTARY_OR_NOT_FOUND = 0,
CCX_SM_TRANSPORT = 1,
CCX_SM_PROGRAM = 2,
CCX_SM_ASF = 3,
CCX_SM_MCPOODLESRAW = 4,
CCX_SM_RCWT = 5, // Raw Captions With Time, not used yet.
CCX_SM_MYTH = 6, // Use the myth loop
CCX_SM_MP4 = 7, // MP4, ISO-
CCX_SM_MP4 = 7, // MP4, ISO-
#ifdef WTV_DEBUG
CCX_SM_HEX_DUMP = 8, // Hexadecimal dump generated by wtvccdump
#endif
@@ -211,8 +221,8 @@ enum ccx_encoding_type
{
CCX_ENC_UNICODE = 0,
CCX_ENC_LATIN_1 = 1,
CCX_ENC_UTF_8 = 2,
CCX_ENC_ASCII = 3
CCX_ENC_UTF_8 = 2,
CCX_ENC_ASCII = 3
};
enum ccx_bufferdata_type
@@ -228,7 +238,7 @@ enum ccx_bufferdata_type
CCX_ISDB_SUBTITLE = 8,
/* BUffer where cc data contain 3 byte cc_valid ccdata 1 ccdata 2 */
CCX_RAW_TYPE = 9,
CCX_DVD_SUBTITLE =10,
CCX_DVD_SUBTITLE = 10
};
enum ccx_frame_type
@@ -241,26 +251,31 @@ enum ccx_frame_type
};
typedef enum {
NO = 0,
YES = 1,
NO = 0,
UNDEFINED = 0xff
} bool_t;
enum ccx_code_type
{
CCX_CODEC_ANY,
CCX_CODEC_TELETEXT,
CCX_CODEC_DVB,
CCX_CODEC_ISDB_CC,
CCX_CODEC_ATSC_CC,
CCX_CODEC_NONE,
CCX_CODEC_ANY = 0,
CCX_CODEC_TELETEXT = 1,
CCX_CODEC_DVB = 2,
CCX_CODEC_ISDB_CC = 3,
CCX_CODEC_ATSC_CC = 4,
CCX_CODEC_NONE = 5
};
/* Caption Distribution Packet */
enum cdp_section_type
{
CDP_SECTION_DATA = 0x72,
/*
The later constants are defined by SMPTE ST 334
Purchase for 80$ at: https://ieeexplore.ieee.org/document/8255806
*/
CDP_SECTION_DATA = 0x72,
CDP_SECTION_SVC_INFO = 0x73,
CDP_SECTION_FOOTER = 0x74
CDP_SECTION_FOOTER = 0x74
};
/*
@@ -295,9 +310,9 @@ enum cdp_section_type
* to parse.
*/
#define IS_FEASIBLE(u_sel,u_nsel,f_sel) ( ( (u_sel) == CCX_CODEC_ANY && (u_nsel) != (f_sel) ) || (u_sel) == (f_sel) )
#define CCX_TXT_FORBIDDEN 0 // Ignore teletext packets
#define CCX_TXT_FORBIDDEN 0 // Ignore teletext packets
#define CCX_TXT_AUTO_NOT_YET_FOUND 1
#define CCX_TXT_IN_USE 2 // Positive auto-detected, or forced, etc
#define CCX_TXT_IN_USE 2 // Positive auto-detected, or forced, etc
#define NB_LANGUAGE 100
extern const char *language[NB_LANGUAGE];
@@ -308,5 +323,5 @@ extern const char *language[NB_LANGUAGE];
#define DEF_VAL_STARTCREDITSFORATLEAST "2"
#define DEF_VAL_STARTCREDITSFORATMOST "5"
#define DEF_VAL_ENDCREDITSFORATLEAST "2"
#define DEF_VAL_ENDCREDITSFORATMOST "5"
#define DEF_VAL_ENDCREDITSFORATMOST "5"
#endif

File diff suppressed because it is too large Load Diff