CN111385630A - Processing method, device and storage medium for closed caption data - Google Patents

Processing method, device and storage medium for closed caption data Download PDF

Info

Publication number
CN111385630A
CN111385630A CN201811643095.3A CN201811643095A CN111385630A CN 111385630 A CN111385630 A CN 111385630A CN 201811643095 A CN201811643095 A CN 201811643095A CN 111385630 A CN111385630 A CN 111385630A
Authority
CN
China
Prior art keywords
closed caption
image
setting
information
display
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811643095.3A
Other languages
Chinese (zh)
Other versions
CN111385630B (en
Inventor
卢刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL Digital Technology Co Ltd
Original Assignee
Shenzhen TCL Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen TCL Digital Technology Co Ltd filed Critical Shenzhen TCL Digital Technology Co Ltd
Priority to CN201811643095.3A priority Critical patent/CN111385630B/en
Publication of CN111385630A publication Critical patent/CN111385630A/en
Application granted granted Critical
Publication of CN111385630B publication Critical patent/CN111385630B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/488Data services, e.g. news ticker
    • H04N21/4884Data services, e.g. news ticker for displaying subtitles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/485End-user interface for client configuration
    • H04N21/4858End-user interface for client configuration for modifying screen layout parameters, e.g. fonts, size of the windows
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/278Subtitling

Abstract

The invention provides a processing method, a device and a storage medium of closed caption data, which analyze the received grouped closed caption data stream, and do not execute the following steps: setting the size of the physical canvas and setting the character width; drawing an image according to the analyzed closed caption information, and setting the size of a physical canvas for drawing the image and the size of a display character; and performing subtitle display according to the drawing image. The method disclosed by the invention cancels the character width setting and the physical canvas setting which are originally executed in the PES data analysis process, and executes the image zooming without calling a third-party interface in the image drawing process, thereby improving the processing speed of two processing threads, accelerating the display speed of CC data and providing convenience for users to watch.

Description

Processing method, device and storage medium for closed caption data
Technical Field
The present invention relates to the field of display control technologies, and in particular, to a method and an apparatus for processing closed caption data, and a storage medium.
Background
With the development of electronic technology, the types of electronic products are increasing, and the types of electronic products with communication functions are also increasing, so that great convenience is brought to the life of people. Due to the popularization of communication devices, a large number of sessions often appear in a concentrated manner for a while during holidays, and these sessions mean that a large number of CC (Closed Caption) data are processed in a short time, and a strong CC data processing capability is required, and in order to ensure the normal display of CC data, the CC data processing speed and the display speed need to be further improved to keep the synchronization with the session content.
Therefore, the prior art is subject to further improvement.
Disclosure of Invention
In view of the above-mentioned shortcomings in the prior art, an object of the present invention is to provide a method, an apparatus and a storage medium for processing closed caption data, which overcome the defect in the prior art that the display of information is delayed and cannot be synchronized with the dialog content when a large amount of CC data is processed.
A first embodiment disclosed in the present invention is a method for processing closed caption data, comprising the following steps:
analyzing the received grouped closed original caption data stream to obtain closed caption information;
respectively carrying out drawing physical canvas size setting and display character width setting on the original physical canvas and the original character width contained in the analyzed closed caption information, and carrying out image drawing according to the analyzed closed caption information, the set physical canvas size and the display character width;
and displaying subtitles according to the drawn image.
Optionally, after the steps of setting the size of the physical canvas for drawing the image and setting the width of the display character are respectively performed on the original physical canvas and the original character width included in the analyzed closed caption information, the method further includes:
the rendered image patch on the subsurface is transferred to the major surface.
Optionally, the step of performing data parsing on the received packet-closed original subtitle data stream further includes:
and decoding the information contained in the packet closed-captioning data stream and storing the decoded information in a cache.
Optionally, the step of drawing the image according to the parsed closed caption information, the set physical canvas size, and the display character width further includes:
and automatically displaying character information in a line-feed manner according to the display area.
Optionally, before the step of performing the setting of the size of the physical canvas for drawing the image and the setting of the width of the display character on the original physical canvas and the original character width included in the analyzed closed caption information respectively, the method further includes:
the display area is set and refreshed.
Optionally, the step of drawing the image according to the parsed closed caption information, the set physical canvas size, and the display character width further includes:
acquiring the analyzed closed caption information from the cache, and constructing a display control according to the closed caption information;
and drawing a display image corresponding to the closed caption information according to the constructed display control.
A second embodiment of the present invention is a device for processing closed caption data, which includes: a memory, a processor, and a processing program of closed caption data stored on the memory and executable on the processor, the processing program of closed caption data implementing the following steps when executed by the processor:
analyzing the received grouped closed original caption data stream to obtain closed caption information;
respectively carrying out drawing physical canvas size setting and display character width setting on the original physical canvas and the original character width contained in the analyzed closed caption information, and carrying out image drawing according to the analyzed closed caption information, the set physical canvas size and the display character width;
and displaying subtitles according to the drawn image.
A third embodiment of the present disclosure is a computer-readable storage medium, wherein a processing program of closed caption data is stored on the computer-readable storage medium, and when being executed by a processor, the processing program of closed caption data implements the steps of the processing method of closed caption data.
The invention has the beneficial effects that the invention provides a processing method, a device and a storage medium of closed caption data, which analyzes the data of the received grouped closed original caption data stream; respectively carrying out drawing physical canvas size setting and display character width setting on the original physical canvas and the original character width contained in the analyzed closed caption information, and carrying out image drawing according to the analyzed closed caption information, the set physical canvas size and the display character width; and displaying subtitles according to the drawn image. The method disclosed by the invention cancels the character width setting and the physical canvas setting which are originally executed in the PES data analysis process, and executes the image zooming without calling a third-party interface in the image drawing process, thereby improving the processing speed of two processing threads, accelerating the display speed of CC data and providing convenience for users to watch.
Drawings
FIG. 1 is a flow chart of the steps of a prior art method of processing closed caption data;
FIG. 2 is a flowchart illustrating a method for processing closed caption data according to the present invention;
FIG. 3 is a flowchart illustrating the steps of a PES processing data thread in the processing method provided by the present invention;
FIG. 4 is a schematic flow chart illustrating steps of drawing an image thread in the processing method according to the present invention;
fig. 5 is a schematic structural diagram of the processing device provided by the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the prior art, as shown in fig. 1, when CC data sent from a bottom layer is received, sequentially performing (CC raw data) CC RAW DATA- > PES (Packetized Elementary Stream) data parsing- > drawing an image- > submitting to a drawing module to display the three threads for processing, where a character width part is involved in the PES data parsing process, so as to implement line change logic and set a physical canvas size, and the drawing image thread further includes: scaling problem when doing surface blt action. Therefore, when a large amount of CC data needs to be processed, not only the delay caused by the two functions needing to acquire the mutex lock at the same time, but also the processing of the character width part and the setting of the physical canvas size is required, which results in display timeout or even abnormal display due to display timeout. In order to solve the above problems, the present invention discloses an optimized processing method for closed caption data.
Example 1
A first embodiment of the present invention is a method for processing closed caption data, as shown in fig. 2, including the following steps:
step S1, performing data parsing on the received packet closed-captioning original data stream to obtain closed-captioning information.
In this step, the closed caption data transmitted at the bottom layer is received first, and the closed caption data is analyzed, specifically, as shown in fig. 3, the data analysis respectively includes: recording the relevant configuration information of the closed caption data, controlling and setting the fonts contained in the closed caption data, and performing corresponding character transcoding on the character strings of the closed caption data.
Unlike the PES data analysis thread in the prior art, the following steps are not performed: the method comprises the steps of setting the size of a physical canvas and setting the width of a character, carrying out corresponding character transcoding on a character string of closed caption data, not carrying out operation of calling a function to calculate and send the character contained in a current line, not carrying out operation step of calling the function to set the size of the physical canvas, and carrying out corresponding control setting and transcoding on the character string only on the color, the coordinate, the flicker and the font size of the character during display.
It is conceivable that, in order to achieve smooth performance of the data analysis, the present step further includes:
decoding the information contained in the original packet stream and storing the decoded information in a cache;
and the step of drawing an image according to the parsed closed caption information further comprises:
when the closed caption image is displayed, the character information is automatically displayed in a line-feed manner according to the display area.
Step S2, respectively performing rendering image physical canvas size setting and display character width setting on the original physical canvas and the original character width included in the parsed closed caption information, and performing image rendering according to the parsed closed caption information, the set physical canvas size, and the display character width.
When the PES data analysis thread is completed in step S1, the rendering thread corresponding to this step is started, and as shown in fig. 4, the display area is first set and refreshed after the rendering thread is started.
The step of completing the image drawing according to the analyzed closed caption information, the set size of the physical canvas and the set size of the display character further comprises the following steps:
and automatically displaying character information in a line-feed manner according to the display area.
The method also comprises the following steps: the rendered image patch on the subsurface is transferred to the major surface. But unlike the prior art step of transferring the subsurface rendered image patch to the principal surface: the step of transferring the subsurface-surface rendered image patch to the major surface does not perform: a zoom operation of drawing an image.
Acquiring the analyzed closed caption information from the cache, and constructing a display control according to the closed caption information; and drawing a display image corresponding to the closed caption information according to the constructed display control.
Step S3 is performed to display subtitles from the drawn image.
The step S2 includes: setting the size of a physical canvas on which an image is drawn and setting the size of a display character.
As shown in fig. 4, the method disclosed by the present invention includes the following steps in performing a rendering image processing thread:
h1, after receiving the closed caption information processed in the PES data analysis thread, starting a drawing image processing thread;
h2, setting a refresh area;
h3, the processing of the closed caption information obtained from the cache by the control instruction specifically includes: setting the size of a physical canvas;
h4, adjusting the box of the set character from the logic size to the physical size;
h5, calling a function to draw the drawing image to the child function;
h6, drawing BLT of the sub-surface area to the main surface;
h7, the rendering image thread ends.
In order to improve the processing efficiency of closed caption data, the method disclosed by the invention cancels the steps of setting the size of a physical canvas and setting the width of a character in the original PES data processing thread, thereby improving the processing speed of the PES data processing thread. Because the steps of carrying out equipment on the size of the physical canvas and setting the width of the character are cancelled in the PES data processing thread, the step of controlling and setting the size of the physical canvas is added in the process of drawing the image, but because the character bmp filled in the box of the character is already zoomed to the physical size and does not need to be zoomed in the blt, compared with the original operation of needing to call a third-party interface to carry out zooming, the time for drawing the image thread is also shortened, and the efficiency of data processing is improved.
Example 2
A second embodiment of the present invention is a processing apparatus for closed caption data, as shown in fig. 5, wherein the processing apparatus 50 includes: a memory 510, a processor 520 and a processing program of closed caption data stored on the memory and executable on the processor, the processing program of closed caption data realizing the following steps when executed by the processor 520:
analyzing the received grouped closed-captioning data stream to obtain closed-captioning information;
respectively carrying out drawing physical canvas size setting and display character width setting on the original physical canvas and the original character width contained in the analyzed closed caption information, and carrying out image drawing according to the analyzed closed caption information, the set physical canvas size and the display character width;
and displaying subtitles according to the drawn image.
Further, the processing procedure of the closed caption data is implemented by the processor 520 to realize the following steps:
transferring the rendered image patch on the subsurface to the primary surface; the step of transferring the subsurface-surface rendered image patch to the major surface does not perform: a zoom operation of drawing an image.
Decoding the information contained in the grouped original stream, storing the decoded information in a cache to obtain the analyzed closed caption information from the cache, and constructing a display control according to the closed caption information; and drawing a display image corresponding to the closed caption information according to the constructed display control.
Example 3
A third embodiment of the present disclosure is a computer-readable storage medium, wherein a processing program of closed caption data is stored on the computer-readable storage medium, and when being executed by a processor, the processing program of closed caption data implements the steps of the processing method of closed caption data.
The storage medium may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data used or received by the industrial equipment management method, and the like. Further, the storage medium may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
The computer equipment can execute the method provided by the embodiment of the invention, and has corresponding functional modules for executing the method and corresponding beneficial effects. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
The invention provides a processing method, a device and a storage medium of closed caption data, which analyze the data of a received grouped closed original caption data stream; drawing an image according to the parsed closed caption information; displaying subtitles according to the drawn image; the step of data analysis of the received packet closed-captioning data stream does not perform: setting the size of the physical canvas and setting the character width; the step of drawing an image according to the parsed closed caption information includes: setting the size of a physical canvas on which an image is drawn and setting the size of a display character. The method disclosed by the invention cancels the character width setting and the physical canvas setting which are originally executed in the PES data analysis process, and executes the image zooming without calling a third-party interface in the image drawing process, thereby improving the processing speed of two processing threads, accelerating the display speed of CC data and providing convenience for users to watch.
It should be understood that equivalents and modifications of the technical solution and inventive concept thereof may occur to those skilled in the art, and all such modifications and alterations should fall within the scope of the appended claims.

Claims (8)

1. A method for processing closed caption data, comprising the steps of:
analyzing the received grouped closed original caption data stream to obtain closed caption information;
respectively carrying out drawing physical canvas size setting and display character width setting on the original physical canvas and the original character width contained in the analyzed closed caption information, and carrying out image drawing according to the analyzed closed caption information, the set physical canvas size and the display character width;
and displaying subtitles according to the drawn image.
2. The method for processing closed caption data according to claim 1, wherein after the steps of setting a size of a physical canvas for drawing an image and setting a width of a display character for the original physical canvas and the original character width respectively included in the parsed closed caption information, the method further comprises:
the rendered image patch on the subsurface is transferred to the major surface.
3. The method of claim 2, wherein the step of parsing the received packetized closed captioning data stream further comprises:
and decoding the information contained in the packet closed-captioning data stream and storing the decoded information in a cache.
4. The method for processing closed caption data according to claim 2, wherein the step of rendering the image according to the parsed closed caption information, the set physical canvas size and the display character width further comprises:
and automatically displaying character information in a line-feed manner according to the display area.
5. The method for processing closed caption data according to claim 1, wherein the steps of setting the size of the physical canvas for drawing the image and setting the width of the display character for the original physical canvas and the original character width respectively included in the parsed closed caption information further comprise:
the display area is set and refreshed.
6. The method of claim 3, wherein the step of rendering the image according to the parsed closed caption information, the set physical canvas size and the display character width further comprises:
acquiring the analyzed closed caption information from the cache, and constructing a display control according to the closed caption information;
and drawing a display image corresponding to the closed caption information according to the constructed display control.
7. A device for processing closed caption data, comprising: a memory, a processor, and a processing program of closed caption data stored on the memory and executable on the processor, the processing program of closed caption data implementing the following steps when executed by the processor:
analyzing the received grouped closed original caption data stream to obtain closed caption information;
respectively carrying out drawing physical canvas size setting and display character width setting on the original physical canvas and the original character width contained in the analyzed closed caption information, and carrying out image drawing according to the analyzed closed caption information, the set physical canvas size and the display character width;
and displaying subtitles according to the drawn image.
8. A computer-readable storage medium, on which a processing program of closed caption data is stored, the processing program of closed caption data implementing the steps of the processing method of closed caption data as claimed in any one of claims 1 to 6 when executed by a processor.
CN201811643095.3A 2018-12-29 2018-12-29 Processing method, device and storage medium for closed caption data Active CN111385630B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811643095.3A CN111385630B (en) 2018-12-29 2018-12-29 Processing method, device and storage medium for closed caption data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811643095.3A CN111385630B (en) 2018-12-29 2018-12-29 Processing method, device and storage medium for closed caption data

Publications (2)

Publication Number Publication Date
CN111385630A true CN111385630A (en) 2020-07-07
CN111385630B CN111385630B (en) 2022-07-29

Family

ID=71218223

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811643095.3A Active CN111385630B (en) 2018-12-29 2018-12-29 Processing method, device and storage medium for closed caption data

Country Status (1)

Country Link
CN (1) CN111385630B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070101162A1 (en) * 2005-09-13 2007-05-03 Hideo Ando Information storage medium, information reproducing apparatus, and information reproducing method
CN107025098A (en) * 2016-01-29 2017-08-08 北京国双科技有限公司 The method and device of rendering text
CN107484035A (en) * 2017-08-17 2017-12-15 深圳Tcl数字技术有限公司 Closed caption display methods, device and computer-readable recording medium
CN108965983A (en) * 2018-09-03 2018-12-07 深圳Tcl数字技术有限公司 It can closed caption data analytic method, smart television, storage medium and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070101162A1 (en) * 2005-09-13 2007-05-03 Hideo Ando Information storage medium, information reproducing apparatus, and information reproducing method
CN107025098A (en) * 2016-01-29 2017-08-08 北京国双科技有限公司 The method and device of rendering text
CN107484035A (en) * 2017-08-17 2017-12-15 深圳Tcl数字技术有限公司 Closed caption display methods, device and computer-readable recording medium
CN108965983A (en) * 2018-09-03 2018-12-07 深圳Tcl数字技术有限公司 It can closed caption data analytic method, smart television, storage medium and device

Also Published As

Publication number Publication date
CN111385630B (en) 2022-07-29

Similar Documents

Publication Publication Date Title
CN107493448B (en) Image processing system, image display method and display device
CN112184856A (en) Multimedia processing device supporting multi-layer special effect and animation mixing
EP3905100A1 (en) Scene-based image processing method, apparatus, smart terminal and storage medium
US11678024B2 (en) Subtitle information display method and apparatus, and electronic device, and computer readable medium
CN114331820A (en) Image processing method, image processing device, electronic equipment and storage medium
CN110401866B (en) Live video display method, device, terminal and storage medium
US20190245903A1 (en) Web-based content recording and adaptive streaming
CN112330543A (en) Video super-resolution method and system based on self-supervision learning
US9380189B2 (en) Method of providing information configuration function in video play device and video play device
WO2017162015A1 (en) Data processing method and apparatus, and storage medium
CN111294600A (en) Compression method, decompression method and device for video sequence frame
CN111385630B (en) Processing method, device and storage medium for closed caption data
CN110572715B (en) Method for solving problem of webp blockage during Android TV playing
US20230412891A1 (en) Video processing method, electronic device and medium
TWI586144B (en) Multiple stream processing for video analytics and encoding
CN112929682B (en) Method, device and system for transparently processing image background and electronic equipment
CN112235628B (en) Multi-window opening method, device, equipment and medium for television operating system
KR101970787B1 (en) Video decoding apparatus and method based on android platform using dual memory
CN109413350B (en) Remote desktop video key frame creation method and device
JP2014041455A (en) Image processing device, image processing method, and program
WO2022161199A1 (en) Image editing method and device
CN112752164B (en) Closed caption display method, intelligent terminal and storage medium
KR100487374B1 (en) Apparatus for generating thumbnail image of digital video
US20230095692A1 (en) Parallel metadata generation based on a window of overlapped frames
CN117499663B (en) Video decoding system and method, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant