Commit Graph

99 Commits

Author SHA1 Message Date
Saurabh Shrivastava
8f2f38bf07 Fix builddebug to include Python API changes. (#770) 2017-08-21 13:21:48 -07:00
Mayank Gupta
32710eff1d Fix failing build with autoconf due to ccextractor.h (#765) 2017-08-20 08:54:51 -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
Diptanshu8
fe6813736c segregating the code and changing myarguments and argument_count. Also, gsoc directory has been created. 2017-07-06 22:58:23 +00:00
Diptanshu8
69a956f3c2 removing api.so 2017-07-04 09:48:44 +00:00
Diptanshu8
6e50104da4 Cyclic rotation and python script argv passing solved 2017-06-28 21:35:32 +00:00
Diptanshu8
cf4aa9021d Modified build_library script for generating the python module 2017-06-27 10:00:47 +00:00
Diptanshu8
2ed2c27906 First phase evaluation outputs generated 2017-06-27 10:00:47 +00:00
Diptanshu8
a79bab670f modifying the test code for 5 samples 2017-06-27 10:00:47 +00:00
Diptanshu8
a7e2ac7686 Adding auto deletion of obj files to build_library 2017-06-27 10:00:47 +00:00
Diptanshu8
98e295e768 Commiting the build_library file 2017-06-27 10:00:47 +00:00
Diptanshu8
751a22fe68 Resolving merge conflicts in .gitignore 2017-06-27 10:00:47 +00:00
Diptanshu8
dba1d7b6eb Debugging the core dumped error 2017-06-27 10:00:07 +00:00
Diptanshu8
9fa2e3ebb0 adding the ccextractorapi.py file 2017-06-27 10:00:07 +00:00
Diptanshu8
644d26546c Facing VERSION attribute error in generated module 2017-06-27 10:00:07 +00:00
Mayank Gupta
bc361a2e86 Add ocr, hardsubx and autotools support for mac 2017-05-11 06:19:16 +03:00
Mayank Gupta
8aa6aac2a7 Updated execution permissions for cleanup script 2017-03-22 11:17:38 +05:30
Mayank Gupta
23e6e44073 Updated cleanup script for complete cleanup after build 2017-03-22 11:16:26 +05:30
Mayank Gupta
5342b83345 Updated execute permissions for autogen.sh and tarball.sh 2017-03-22 10:49:38 +05:30
Mayank Gupta
b80e466533 Changed text in AC_MSG_ERROR to remove configure error 2017-03-21 23:06:08 +05:30
Mayank Gupta
77b54feeb6 Added check for pkg-config m4 macros 2017-03-21 19:33:21 +05:30
Mayank Gupta
6b08c123e2 Redirected error stderr stream to stdout stream 2017-03-21 14:59:01 +05:30
Mayank Gupta
c710b4c9b2 Corrected wrong flag order of LDADD 2017-03-21 12:07:58 +05:30
Mayank Gupta
3ecacd3fa9 Updated .gitignore and configure.ac 2017-03-19 23:25:06 +05:30
Mayank Gupta
316f959234 Corrected minor mistake in configure.ac 2017-03-17 23:48:27 +05:30
Mayank Gupta
6fdd4b75e8 Updated .gitignore, README.md, added checks in configure.ac, updated package creation scripts 2017-03-17 23:18:26 +05:30
Mayank Gupta
486d7ea002 Changed location of scripts and made tarball creation to work 2017-03-17 17:29:54 +05:30
Mayank Gupta
c44e9ecfed Modifications for man pages to work 2017-03-15 22:12:12 +05:30
Mayank Gupta
b0ec1a073b Added man pages for ccextractor 2017-03-15 00:30:42 +05:30
Carlos Fernandez
14418d6fa1 Added +x to build-static.sh 2017-01-09 22:42:20 +00:00
Carlos Fernandez
2db16f09c7 Added static binary build script (linux). 2017-01-09 12:08:36 -08:00
Evgeny Shulgin
e2f6fce850 Added build script for .deb (#574)
* Added build script for .deb

* Added tip for users and automatically build
2016-12-26 21:31:00 +01:00
Saurabh Shrivastava
f2770b4609 Corrected filename. 2016-12-16 10:59:20 +05:30
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
Saurabh Shrivastava
8221a26c2d Fixed missing directory in Makefile for linux.
There was a missing directory /src/protobuf-c in makefile for linux installation.
2016-12-14 14:20:02 +05:30
Carlos Fernandez
9996836253 Removed LIBCURL in linux build script, since that stuff is not complete 2016-12-14 01:41:38 +00:00
Juan Potato
3553b4da51 Fix Makefile compatibility issues with Raspberry pi
Along with adding utf8proc to actually be compiled
2016-12-02 21:14:25 -05: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
Abhinav Shukla
fc3c841d03 Updating HardsubX build script 2016-08-25 16:25:25 -07:00
Abhinav Shukla
bcccc5d1d5 Merge remote-tracking branch 'upstream/master' 2016-08-25 16:15:56 -07:00
Carlos Fernandez
789ae74e0a New dir added to include list 2016-08-25 16:16:16 -07:00
Abhinav Shukla
5c7a766658 Merge remote-tracking branch 'upstream/master' 2016-08-25 16:06:23 -07:00
Carlos Fernandez
abdf5423f5 Missing dir for proto. 2016-08-25 16:05:50 -07:00