Commit Graph

37 Commits

Author SHA1 Message Date
Nils ANDRÉ-CHANG
af6d8282cb
[IMPROVEMENT] Move dependencies to a third party directory (#1219)
* Move dependencies in a folder

* Windows

* MacOS
2020-01-30 04:58:37 -08:00
kdrag0n
c5bed1e3b2 [FIX] GCC warning fixes (#1204)
* cea708: Fix missing new line in log message

* subtype: Remove unused CC_708 type

CEA-708 inputs are coerced to CC_608 before hitting encode_sub.

GCC warns:

src/lib_ccx/ccx_encoders_common.c: In function ‘encode_sub’:
src/lib_ccx/ccx_encoders_common.c:1119:2: warning: enumeration value ‘CC_708’ not handled in switch [-Wswitch]
 1119 |  switch (sub->type)
      |  ^~~~~~

* build: Disable pointer-sign warning

This warning triggers all over the codebase due to the widespread use of
unsigned char arrays for parsed subtitle strings and them being passed
to string functions that expect signed ones. Since this won't actually
cause issues, silence the warning across the entire codebase.

* splitbysentence: Fix warnings

GCC warns:

src/lib_ccx/ccx_encoders_splitbysentence.c: In function ‘sbs_is_pointer_on_sentence_breaker’:
src/lib_ccx/ccx_encoders_splitbysentence.c:170:7: warning: variable ‘p’ set but not used [-Wunused-but-set-variable]
  170 |  char p = *(current - 1);
      |       ^
src/lib_ccx/ccx_encoders_splitbysentence.c: In function ‘sbs_find_insert_point_partial’:
src/lib_ccx/ccx_encoders_splitbysentence.c:231:1: warning: multi-line comment [-Wcomment]
  231 | //   sprintf(fmtbuf, "SBS: sbs_find_insert_point_partial: compare\n\
      | ^
src/lib_ccx/ccx_encoders_splitbysentence.c:263:1: warning: multi-line comment [-Wcomment]
  263 | //   LOG_DEBUG("SBS: sbs_find_insert_point_partial: LEFT CHANGED,\n\tbuf:[%s]\n\tstr:[%s]\n\
      | ^
src/lib_ccx/ccx_encoders_splitbysentence.c:297:1: warning: multi-line comment [-Wcomment]
  297 | //   sprintf(fmtbuf, "SBS: sbs_find_insert_point_partial: REPLACE ENTIRE TAIL !!\n\
      | ^
src/lib_ccx/ccx_encoders_splitbysentence.c:222:6: warning: unused variable ‘i’ [-Wunused-variable]
  222 |  int i; // top level indexer for strings
      |      ^
src/lib_ccx/ccx_encoders_splitbysentence.c: In function ‘reformat_cc_bitmap_through_sentence_buffer’:
src/lib_ccx/ccx_encoders_splitbysentence.c:730:8: warning: unused variable ‘str’ [-Wunused-variable]
  730 |  char *str;
      |        ^~~
src/lib_ccx/ccx_encoders_splitbysentence.c:729:6: warning: unused variable ‘i’ [-Wunused-variable]
  729 |  int i = 0;
      |      ^
src/lib_ccx/ccx_encoders_splitbysentence.c:728:6: warning: unused variable ‘used’ [-Wunused-variable]
  728 |  int used;
      |      ^~~~
src/lib_ccx/ccx_encoders_splitbysentence.c:727:18: warning: unused variable ‘ms_end’ [-Wunused-variable]
  727 |  LLONG ms_start, ms_end;
      |                  ^~~~~~
src/lib_ccx/ccx_encoders_splitbysentence.c:727:8: warning: unused variable ‘ms_start’ [-Wunused-variable]
  727 |  LLONG ms_start, ms_end;
      |        ^~~~~~~~
src/lib_ccx/ccx_encoders_splitbysentence.c:726:20: warning: unused variable ‘rect’ [-Wunused-variable]
  726 |  struct cc_bitmap* rect;
      |                    ^~~~

* spupng: Fix warnings

GCC warns:

src/lib_ccx/ccx_encoders_spupng.c: In function ‘init_face’:
src/lib_ccx/ccx_encoders_spupng.c:644:6: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  644 |  if (error = FT_New_Face(ft_library, font, 0, face))
      |      ^~~~~
src/lib_ccx/ccx_encoders_spupng.c:651:6: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  651 |  if (error = FT_Set_Pixel_Sizes(*face, 0, FONT_SIZE))
      |      ^~~~~
src/lib_ccx/ccx_encoders_spupng.c: In function ‘spupng_export_string2png’:
src/lib_ccx/ccx_encoders_spupng.c:698:7: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  698 |   if (error = FT_Init_FreeType(&ft_library))
      |       ^~~~~
src/lib_ccx/ccx_encoders_spupng.c:706:6: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  706 |  if (error = init_face(&face_regular, ccx_options.enc_cfg.render_font))
      |      ^~~~~
src/lib_ccx/ccx_encoders_spupng.c:708:6: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  708 |  if (error = init_face(&face_italics, ccx_options.enc_cfg.render_font_italics))
      |      ^~~~~
src/lib_ccx/ccx_encoders_spupng.c:850:9: warning: unused variable ‘height’ [-Wunused-variable]
  850 |     int height = slot->bitmap.rows;
      |         ^~~~~~
src/lib_ccx/ccx_encoders_spupng.c:849:9: warning: unused variable ‘width’ [-Wunused-variable]
  849 |     int width = slot->bitmap.width;
      |         ^~~~~
src/lib_ccx/ccx_encoders_webvtt.c: In function ‘write_webvtt_header’:
src/lib_ccx/ccx_encoders_webvtt.c:263:1: warning: control reaches end of non-void function [-Wreturn-type]
  263 | }
      | ^

* webvtt: Fix missing return warning

The return value of this function is never used, so just drop the
values.

GCC warns:

src/lib_ccx/ccx_encoders_webvtt.c: In function ‘write_webvtt_header’:
src/lib_ccx/ccx_encoders_webvtt.c:263:1: warning: control reaches end of non-void function [-Wreturn-type]
  263 | }
      | ^

* gxf: Fix MIN macro redefinition warning

GCC warns:

src/lib_ccx/ccx_gxf.c:23: warning: "MIN" redefined
   23 | #define MIN(a, b) ( (a < b) ? a : b)
      |
In file included from src/lib_ccx/ccx_demuxer.h:8,
                 from src/lib_ccx/ccx_gxf.h:4,
                 from src/lib_ccx/ccx_gxf.c:13:
src/lib_ccx/utility.h:8: note: this is the location of the previous definition
    8 | #define MIN(X, Y) (((X) < (Y)) ? (X) : (Y))
      |

* dvd: Fix unused variable warnings

GCC warns:

src/lib_ccx/dvd_subtitle_decoder.c: In function ‘get_bitmap’:
src/lib_ccx/dvd_subtitle_decoder.c:133:9: warning: unused variable ‘discard’ [-Wunused-variable]
  133 |     int discard = get_bits(ctx, &nextbyte, &pos, &m);
      |         ^~~~~~~
src/lib_ccx/dvd_subtitle_decoder.c:172:9: warning: unused variable ‘discard’ [-Wunused-variable]
  172 |     int discard = get_bits(ctx, &nextbyte, &pos, &m);
      |         ^~~~~~~
src/lib_ccx/dvd_subtitle_decoder.c: In function ‘write_dvd_sub’:
src/lib_ccx/dvd_subtitle_decoder.c:320:6: warning: unused variable ‘ret’ [-Wunused-variable]
  320 |  int ret =0;
      |      ^~~

* es_functions: Fix unused variable warning

This also removes the stale commented code that used this variable.

GCC warns:

src/lib_ccx/es_functions.c: In function ‘read_pic_info’:
src/lib_ccx/es_functions.c:682:7: warning: unused variable ‘frame_type_to_char’ [-Wunused-variable]
  682 |  char frame_type_to_char[] = { '?', 'I', 'P','B', 'D', '?', '?','?' };
      |       ^~~~~~~~~~~~~~~~~~

* dvb: Fix unused variable warning when OCR is disabled

GCC warns:

src/lib_ccx/dvb_subtitle_decoder.c: In function ‘write_dvb_sub’:
src/lib_ccx/dvb_subtitle_decoder.c:1509:6: warning: unused variable ‘ret’ [-Wunused-variable]
 1509 |  int ret = 0;
      |      ^~~

* general_loop: Fix warnings

GCC warns:

src/lib_ccx/general_loop.c: In function ‘general_loop’:
src/lib_ccx/general_loop.c:1113:15: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
 1113 |      (enc_ctx && (enc_ctx->srt_counter || enc_ctx->cea_708_counter) ||
      |       ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At top level:
src/lib_ccx/general_loop.c:25:28: warning: ‘DO_NOTHING’ defined but not used [-Wunused-const-variable=]
   25 | const static unsigned char DO_NOTHING[] = {0x80, 0x80};
      |                            ^~~~~~~~~~

* networking: Fix unknown pragma warning for non-MSVC compilers

GCC warns:

src/lib_ccx/networking.c:22: warning: ignoring #pragma warning  [-Wunknown-pragmas]
   22 | #pragma warning( suppress : 4005)
      |

* networking: Fix unused variable warnings on non-Windows platforms

GCC warns:

src/lib_ccx/networking.c: In function ‘net_udp_read’:
src/lib_ccx/networking.c:342:12: warning: variable ‘addr’ set but not used [-Wunused-but-set-variable]
  342 |  in_addr_t addr;
      |            ^~~~
src/lib_ccx/networking.c:340:12: warning: unused variable ‘len’ [-Wunused-variable]
  340 |  socklen_t len = sizeof(source_addr);
      |            ^~~
src/lib_ccx/networking.c:338:7: warning: unused variable ‘ip’ [-Wunused-variable]
  338 |  char ip[INET_ADDRSTRLEN];
      |       ^~

* params: Fix unused variable warning when OCR is disabled

GCC warns:

src/lib_ccx/params.c: In function ‘version’:
src/lib_ccx/params.c:1015:8: warning: unused variable ‘leptversion’ [-Wunused-variable]
 1015 |  char *leptversion;
      |        ^~~~~~~~~~~

* params_dump: Fix empty encoding when ASCII is used

GCC warns:

src/lib_ccx/params_dump.c: In function ‘params_dump’:
src/lib_ccx/params_dump.c:110:2: warning: enumeration value ‘CCX_ENC_ASCII’ not handled in switch [-Wswitch]
  110 |  switch (ccx_options.enc_cfg.encoding)
      |  ^~~~~~

* params_dump: Fix comparison between mismatching enums

GCC warns:

src/lib_ccx/params_dump.c: In function ‘print_file_report’:
src/lib_ccx/params_dump.c:402:18: warning: comparison between ‘enum ccx_stream_type’ and ‘enum ccx_stream_mode_enum’ [-Wenum-compare]
  402 |    (info->stream == CCX_SM_TRANSPORT ||
      |                  ^~
src/lib_ccx/params_dump.c:403:18: warning: comparison between ‘enum ccx_stream_type’ and ‘enum ccx_stream_mode_enum’ [-Wenum-compare]
  403 |     info->stream == CCX_SM_PROGRAM ||
      |                  ^~
src/lib_ccx/params_dump.c:404:18: warning: comparison between ‘enum ccx_stream_type’ and ‘enum ccx_stream_mode_enum’ [-Wenum-compare]
  404 |     info->stream == CCX_SM_ASF ||
      |                  ^~
src/lib_ccx/params_dump.c:405:18: warning: comparison between ‘enum ccx_stream_type’ and ‘enum ccx_stream_mode_enum’ [-Wenum-compare]
  405 |     info->stream == CCX_SM_WTV))
      |                  ^~

* telxcc: Fix unused variable warning

GCC warns:

src/lib_ccx/telxcc.c: In function ‘process_telx_packet’:
src/lib_ccx/telxcc.c:928:10: warning: unused variable ‘flag_subtitle’ [-Wunused-variable]
  928 |  uint8_t flag_subtitle;
      |          ^~~~~~~~~~~~~

* ts_functions: Fix unused variable warnings

GCC warns:

src/lib_ccx/ts_functions.c: In function ‘get_pts’:
src/lib_ccx/ts_functions.c:642:11: warning: variable ‘pes_packet_length’ set but not used [-Wunused-but-set-variable]
  642 |  uint16_t pes_packet_length;
      |           ^~~~~~~~~~~~~~~~~
src/lib_ccx/ts_functions.c:641:10: warning: variable ‘pes_stream_id’ set but not used [-Wunused-but-set-variable]
  641 |  uint8_t pes_stream_id;
      |          ^~~~~~~~~~~~~

* ts_tables_epg: Fix warnings

GCC warns:

src/lib_ccx/ts_tables_epg.c: In function ‘EPG_add_event’:
src/lib_ccx/ts_tables_epg.c:380:6: warning: unused variable ‘isnew’ [-Wunused-variable]
  380 |  int isnew=true, j;
      |      ^~~~~
src/lib_ccx/ts_tables_epg.c: In function ‘EPG_DVB_decode_string’:
src/lib_ccx/ts_tables_epg.c:469:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
  469 |  int ret=-1;
      |      ^~~
src/lib_ccx/ts_tables_epg.c: In function ‘EPG_ATSC_decode_EIT’:
src/lib_ccx/ts_tables_epg.c:802:25: warning: variable ‘emt_location’ set but not used [-Wunused-but-set-variable]
  802 |   uint8_t title_length, emt_location;
      |                         ^~~~~~~~~~~~
src/lib_ccx/ts_tables_epg.c:764:10: warning: variable ‘table_id’ set but not used [-Wunused-but-set-variable]
  764 |  uint8_t table_id;
      |          ^~~~~~~~
src/lib_ccx/ts_tables_epg.c: In function ‘EPG_ATSC_decode_VCT’:
src/lib_ccx/ts_tables_epg.c:837:10: warning: variable ‘table_id’ set but not used [-Wunused-but-set-variable]
  837 |  uint8_t table_id;
      |          ^~~~~~~~
src/lib_ccx/ts_tables_epg.c: In function ‘EPG_DVB_decode_EIT’:
src/lib_ccx/ts_tables_epg.c:883:10: warning: variable ‘segment_last_section_number’ set but not used [-Wunused-but-set-variable]
  883 |  uint8_t segment_last_section_number;
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lib_ccx/ts_tables_epg.c:882:10: warning: variable ‘last_section_number’ set but not used [-Wunused-but-set-variable]
  882 |  uint8_t last_section_number;
      |          ^~~~~~~~~~~~~~~~~~~
src/lib_ccx/ts_tables_epg.c: In function ‘parse_EPG_packet’:
src/lib_ccx/ts_tables_epg.c:1041:11: warning: unused variable ‘transport_error_indicator’ [-Wunused-variable]
 1041 |  unsigned transport_error_indicator = (tspacket[1]&0x80)>>7;
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~

* matroska: Fix unused variable warning

The call is left alone since it might create a decoder context.
GCC warns:

src/lib_ccx/matroska.c: In function ‘matroska_save_all’:
src/lib_ccx/matroska.c:1182:27: warning: unused variable ‘dec_ctx’ [-Wunused-variable]
 1182 |     struct lib_cc_decode *dec_ctx = update_decoder_list(mkv_ctx->ctx);
      |                           ^~~~~~~

* utility: Only define MIN when necessary

GCC warns:

In file included from src/lib_ccx/ccx_demuxer.h:8,
                 from src/lib_ccx/lib_ccx.h:15,
                 from src/gpacmp4/mp4.c:6:
src/lib_ccx/utility.h:8: warning: "MIN" redefined
    8 | #define MIN(X, Y) (((X) < (Y)) ? (X) : (Y))
      |
In file included from src/gpacmp4/gpac/tools.h:33,
                 from src/gpacmp4/gpac/isomedia.h:50,
                 from src/gpacmp4/mp4.c:5:
src/gpacmp4/gpac/setup.h:324: note: this is the location of the previous definition
  324 | #define MIN(X, Y) ((X)<(Y)?(X):(Y))
      |
2020-01-23 18:49:16 -08:00
Nils ANDRÉ-CHANG
6281e128aa Use shebang line that can work on different distributions (#1156) 2019-12-22 13:43:57 -08:00
Carlos Fernandez
bf478c0ee2 build and builddebug: Updated reference to package in Ubuntu (tesseract has been renamed) 2019-05-21 11:34:18 -07:00
Udit Sanghi
b8c1499111 Fixed some warnings (#1030) 2018-10-29 17:06:06 -07:00
lennonwoo
180da3ed5a update build scripts 2018-01-24 15:46:22 +08:00
Carlos Fernandez
5b124c0ce2 linux build script (non-debug): Don't hide warnings from compiler.
linux build script (debug): Display what's step of the build script
we're in.
2018-01-12 00:05:23 +00:00
Null
8d9e54130d More build files 2018-01-11 15:01:02 +08:00
Null
930ca716ca [FEATURE] FreeType-based text renderer (-out=spupng with teletext/EIA608) (#877)
* Implementation of text renderer

* Fix some characters being cut

* Fix encoding and other bugs

* Add black background & fix bugs

* Fix more bugs

* Change to relative path

* Add a font option & Default font for MacOS & Fix anti-aliasing

* Document -font & enlarge default canvas
2018-01-09 10:24:26 -08:00
Saurabh Shrivastava
2eb5fd26de [FIX] Move files into appropriate directories & fix build scripts. (#781)
* Move wrappers and extracters inside src/ and update CMakeLists.

* Reflect change in path across build scripts.

* Remove redundant source file inclusion.

* Always use supplied libpng.
2017-10-02 12:16:04 -07:00
Diptanshu Jamgade
47c5a6e73b Cleaning up the codebase and additional changes in Python SRT generator. (#771)
* Removed all extractors except the grid extractor.
Removed the call to transcript extractor in ccx_encoders_transcript.c

* Removed unnecessary array appening statements in python_grid_extractor.
WIP: switch in extractor.

* Added switch in g608 grid extractor.

* Deleted comments from wrappers.

* Refactored code in ccextractor.c and .h files.
Removed all the commented part.
Made proper changes according to the coding conventions.

* Removed calls to extractor from all the encoders.
The only call made to extractor is from ccx_encoders_python.c.

* Removed a comment from wrapper.c.
In init_write function of output.c added a call to free the output string returned by asprintf in case of
sending filename to callback function.

* Added calls to free the char* which is malloced by asprintf in
extractor.c
WIP: Free the global variable elements.

* Sample testing correctly for italics tag.
Also added a hack to print only 32 characters when unicode fails.
WIP: Font tag.

* Added support for handling font and italics in Python SRT generator.

* modified the font generator.
Also, added count method for checking blank strings in
python_srt_generator.

* Added free statements for avoiding memory leaks.

* added return code for failure of asprintf calls.

* Removing unnecessary code from api_testing.py

* Made modifications to Makefile and build script.

* Added recursive_tester.py
Autoconf builds successfully.

* BUG: Made change to get_line_encoded to encode the last \0 character in a
line. Otherwise the EOL characted is absent causing garbage value to be
present in SRT.

* Exporting the encoding of the captions from CCExtractor to Python so
that the python SRT generator can generate proper SRT files.

* Modified the include statement in extractor.h
2017-08-25 11:03:00 -07:00
Diptanshu Jamgade
21eaa3de04 Python bindings with extraction of CE608 grid and writing to a SRT output. (#768)
* added python_extract to encoders_srt and the captions are being
extracted in needed format. Search for an alternative to asprintf

* Checking if the alternative to asprintf generate proper srts

* CC captions accessible via python script

* Removing python caption code from __wrap_write function

* removing old cc_to_python functions

* Removing python_subs structure and all the changes done for that struct

* Removing filename functions from ccextractor.*

* Renaming make_message to time_wrapper

* Applying to python_extract codebase: SSA format

* Added python_extract_time_based and done validation for ssa

* pplying python_extract_time_based: Done validation for srt and webvtt

* led attempt for SAMI support of python_extract. Code is commented

* Appluing python_extract_time_based: validate support for SMPTETT

* Added python_extract_transcript and made changes for time printing.

* added show_extracted_captions_wtih_timings function

* Added show_extracted_captions_with_timings to python script for testing
purpose.

* refactored extractors to api directory. commented out show captions in main()

* build and build library working for the extractors.

* made caption generator work with a 0.1 time sleep. Start refactoring

* added asprintf for windows.

* file being written in the running directory

* Auto -deletion of python temporary file

* Python captions printing status set to proper.

* termination of tail successful

* Writing successful for the sample

* Generating unalternating output

* adding api_support.py

* Adding bld_flags in build_api

* Added  to build_library

* Auto deletion of temporary file on SIGINT

* Discussing Seg fault with Izaron

* working for python and linux with samples. testing -out=pythonapi with stream

* Done adding bitmap support

* added -out=pythonapi support for bitmap

* Setting the messages_target to 0 for output = pythonapi

* Added wrapper for setting -out=pythonapi. Checking if -stdout value can be used in python.

* adding the cc_to_stdout=1 value for -out=pythonapi. Thus generation of output file has been avoided. May be needed to change in future.

* added extractor for g608 grid. removed sami extractor. need to work on overlap of -out=pythonapi and -out=g608

* Removed overlap of -out=pythonapi by adding -pythonapi and
signal_python_api global variable.

* added support for seperate c608 grid catching. Need to test the output
via python.

* added support for seperate printing of text font and color in CE608.
Need to make sure that the function is inbuilt.

* ADDED ce608 GRID SUPPORT FROM PYTHON
need to discuss whether to keep the print_cc_grid function specific to
the module or make it user accessible.
Mostly it would be better to make it user accessible.

* made changes in the call_from_python_api function such that only
api_options is needed to be passed.
An if statement before the call to g608_extractor has also been added.
Waiting for Carlos to comment on the output generated till this stage.

* added a signal_python_api check before calling every write function.
Thus basic writing output can be avoided.

* Commented all calls to python_extract_time_based.
making changes to python_extract_g608 to be called only from the point
when a g608 caption is detected.

* Added pass_cc_buffer_to_python in encoders_common.c temporarily
redefined get_*_encoded from static to normal
included the above functions in encoders_common.h

* Added if-else statement for switch in encode_sub function.
This is done mainly for making sure no output is generated in the api
call.

* Added ccx_encoders_python.c
Defined pass_cc_buffer_to_python in ccx_encoders_python.c
added if else statement in encode_sub's switch to make sure that the output is not generated in case of -pythonapi call

* Removed __wrap_write from the entire code base.
It's declaration and definition are only present in CCExtractor.*

* Commented out the /dev/null part in ccx_encoders_common.c.
Proceeding further on checking for file generation.

* Added output_filename in array global variable and is generated in
init_write function.
included ccextractor.h in output.c to access global variable
signal_python_api for avoiding output generation in init_write and
invalid free in dinit_write.

* Modified the definition of init_write function for accessing
signal_python_api.

* Deleted the commented part of /dev/null in ccx_encoders_common.c.

* Added target_message=0 in -pythonapi param parsing in param.c to avoid
the API from printing to STDOUT.
Deleted the commented part of -out=pythonapi.
Thinking of adding a different param for silencing the output when the
call is made from python api.

* Removed __wrap_write from ccextractor.c and ccextractor.h.

* Added ccx_to_python_g608 and modified api_support.py file.
added documentation in ccextractor.c.

* added the generate srt script. However, some random characters are
coming in first line. Need to talk about this.

* Added SRT generator for python.
Using string to remove the garbage value.
Add code for srt counter and also the start_time and end_time
conversion.

* removed the trash characters and added code to print the timings.
However, the last blank frame also results in a print. Need to take care
of this.

* rectified the mistake of writing only timings and not captions.
now next step is to just make the timings print properly

* some minor changes before diving into extracting srt_counter from the made codebase

* Added extraction of srt_counter in python_extract via fflush
srt_counter-value.
Need to modify the processing in python.

* Added the entire method to extract captions and generate srt files. Next, step would be a to define a concise function for writing the srt

* Processing into a srt working properly.
Next step is to add the information of font into the caption text.

* the data is getting generated for proper SRT counters.

* A turning point to the appraoch.
Added END OF FRAME line for printing the data for every particular
srt_counter.
Proceeding further with the generation of srt by data manipulation.

* some minor bugs but the output srt is being generated correctly. However, The font and colour encoding needs to be done.

* Taken care of random characters. Need to discuss this with Carlos. Moving further to font/color processing.

* Taken care of random characters. Need to discuss this with Carlos. Moving further to font/color processing.

* Added fflush and cleaned up the python code of srt generation

* Added <i> tag for italics.
Proceeding further with other types.

* Added the code to check for underline.
However, need to check how CCExtractor generates srt when both italics
and underline are present. For now a new line is added if both are
present.

* Shifting for making changes in th i/O work.

* Stable ouput for samples with italics is being generated.

* Added the PYTHONAPI macro definition and testing for its existence in the set_python_api function.

* build script for linux is working correctly.
Build_library is showing error of invalid def of set_pythonapi.
Moreover, extractor has some memory seg fault.

* Added mod to set a MACRO as my_python_api to set the callback function.
Till now all calls to the reporter are commented.
Working on getting the reporter to print the lines.

* Changes have been implemented to bring reporter in working state.
For now a constant string is passed from extractor. Need to make the
proper parsing possible.

* Changed the code in extractor such that entire grid is returned to the
callback function.
Need to provide this grid to the write function and also cleanup the
codebase.

* Writing the outputted srt in a file called "temp.srt".
Need to modify init_write to push filename that is to be created in
python using callback.

* Added code to get start and end time simultaneously.
entire SRT is getting generated.

* removed ccx_python_encoders.c

* Compiling and executing on Windows

* Moved definitions get_line_encoded, get_color_encoded, get_font_encoded from ccx_encoders_g608.c to ccx_encoders_common.c.
Also, deleted the static definition of get_font_encoded from
ccx_encoders_webvtt.c

* added a write statement in write_cc_bitmap_as_srt

* Rectified transfer of get_line_encoded, get_color_encoded and
get_font_encoded from ccx_decoders_common.c to ccx_encoders_common.c.
2017-08-20 08:54:35 -07:00
Diptanshu8
02b4427260 making changes to write wrapper 2017-07-17 08:59:00 +00:00
Diptanshu8
2ced408994 build and build_library working correctly 2017-07-11 21:21:18 +00:00
captions
2fd71f00d6 Minor gramatical error 2016-12-15 11:32:17 -08:00
Carlos Fernandez
0301a40560 Merge branch 'pr/n538_Izaron' 2016-12-15 11:31:38 -08:00
Evgeny Shulgin
5bbf27de9c Fixed linux/build script
Last PR #534
2016-12-15 21:07:29 +04:00
Carlos Fernandez
9996836253 Removed LIBCURL in linux build script, since that stuff is not complete 2016-12-14 01:41:38 +00:00
Carlos Fernandez
f28698f71a Corrected linux/build 2016-09-28 13:05:09 -07:00
Carlos Fernandez
56719e7bcd Libcurl 2016-09-28 13:02:54 -07:00
Carlos Fernandez Sanz
a734aa2b26 Fixed compilation in linux 2016-09-21 11:43:08 -07:00
captions
9833090318 Removed leftover line that caused a (harmless) error message 2016-09-12 12:15:47 -07:00
Carlos Fernandez
789ae74e0a New dir added to include list 2016-08-25 16:16:16 -07:00
Carlos Fernandez
abdf5423f5 Missing dir for proto. 2016-08-25 16:05:50 -07:00
Carlos Fernandez
8775436cdb Stupid typo 2016-08-25 16:03:18 -07:00
Carlos Fernandez
e5e62fd2d9 Added protobuf-c to build 2016-08-25 15:57:33 -07:00
canihavesomecoffee
98a79e0e55 Re-add the VERSION_FILE_PRESENT flag 2016-07-30 18:37:32 +02:00
Carlos Fernandez
c8bd4e22a5 Added missing library for OCR 2016-07-21 14:59:56 -07:00
Carlos Fernandez
a918bc2798 Added OCR to linux build script
Skip another to the SCTE 57 2003 sections in PMT
2016-07-21 14:56:17 -07:00
canihavesomecoffee
5655db6cd2 Update Linux & Mac build
Update the Linux & Mac build to reflect the changes made for the version
file.
2016-07-05 18:10:19 +02:00
canihavesomecoffee
ff3be07df5 Add linux/mac build scripts
-
2016-05-22 09:44:55 +02:00
canihavesomecoffee
f694c95510 Add hashing library and update makefiles
- Adds a open-source hashing lib for SHA2 (SHA-256, SHA-386, SHA-512)
from http://www.aarongifford.com/computers/sha.html, with some small
modifications to make it work unders windows too
- Updates build commands to reflect this change
2016-05-22 03:49:31 +02:00
Anshul Maheshwari
2ca835ea1b update linux build scripts
Signed-off-by: Anshul Maheshwari <anshul.ffmpeg@gmail.com>
2016-02-09 16:27:49 +01:00
Oleg Kisselef
7179796365 fixed linux build scripts 2015-08-27 13:50:55 +03:00
wforums
47264425df Fix of build script + moving ccfont2 2014-10-10 16:47:30 +02:00
Anshul Maheshwari
6a67a646bd fix build script using 2014-05-27 17:14:58 +05:30
cfsmp3
6e0db8aa1d Initial git. 2014-04-12 12:41:27 +02:00