CN113225508B - Section acquisition method based on recording mode - Google Patents
Section acquisition method based on recording mode Download PDFInfo
- Publication number
- CN113225508B CN113225508B CN202110474113.5A CN202110474113A CN113225508B CN 113225508 B CN113225508 B CN 113225508B CN 202110474113 A CN202110474113 A CN 202110474113A CN 113225508 B CN113225508 B CN 113225508B
- Authority
- CN
- China
- Prior art keywords
- recording
- data
- demux
- channel
- thread
- 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/542—Event management; Broadcasting; Multicasting; Notifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/547—Messaging middleware
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/548—Queue
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Signal Processing (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
- Television Signal Processing For Recording (AREA)
Abstract
The invention relates to a Section acquisition method based on a recording mode, which comprises the following steps: initializing recording, acquiring an input source bound by the DEMUX, and creating a recording channel handle; registering callback of the channel handle if the recorded channel handle is successfully created, creating a message queue pool, and setting an input port corresponding to the DEMUX; creating a DEMUX recording channel corresponding to the handle; if the recording channel is successfully established, adding PID data to be recorded; starting a recording channel, starting a recording thread and a stream pushing thread, and starting recording; when data are recorded, in a recording thread, TS data of a current recording channel are obtained from the DEMUX; and in the push stream thread, TS data is obtained from the message queue pool, the related recording data is called back, and the Section data corresponding to a PID is obtained. And recording TS packets of the PID through the DEMUX, pushing streams through the message queue, putting TS data in a message queue pool, and acquiring Section data through a group data packet algorithm by acquiring data in the message queue pool by another thread.
Description
Technical Field
The invention relates to the field of communication, in particular to a Section acquisition method based on a recording mode.
Background
Nowadays, with the rapid development of technology, multimedia technology is also changing day by day, however, DVB (Digital Video Broadcasting, hereinafter referred to as DVB) and related application technologies of Digital Video Broadcasting still have important application scenarios, especially in the aspect of satellite Broadcasting, because the foreign market is open to satellite Broadcasting and network services in some remote areas are limited, mobile networks and broadband are not covered, which leads to information obstruction, and the satellite Broadcasting technology is a relatively effective solution.
In the related technology of DVB, after received data is modulated and demodulated, channel decoded, source decoded and demultiplexed, descrambling and the like are certainly required to be performed on the encrypted data, and then a TS (Transport Stream, hereinafter referred to as TS) data Stream sent by a satellite is taken to acquire related data such as related frequency point data, audio and video of a program, EPG and the like, and then playing and related display can be realized.
Generally, data such as audio and video are obtained by filtering through a Packet Identifier (PID) corresponding to a DEMUX (Demultiplexer, hereinafter referred to as a DEMUX), if some PID related data filtered by a part of platforms through the DEMUX are all collected into one thread for processing, but cannot be separated, if the data amount is too large, the processing of the related data of each PID is time-consuming, and some operations are caused, so that the data of a part of PIDs are finally taken, and especially in the acquisition of data of sections (data corresponding to data tables such as various PIDs of audio and video, hereinafter referred to as sections), it is very important that some desired effects are difficult to achieve if some data are omitted.
To solve this problem, we can use recording mode, and usually the recording is to filter the acquired data with part of PID, and process it separately on DEMUX, so as to avoid the above mentioned situation.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a Section acquiring method based on a recording mode, aiming at the above defects in the prior art.
The technical scheme adopted by the invention for solving the technical problem is as follows: a Section acquisition method based on a recording mode is constructed, and the method comprises the following steps:
initializing recording, acquiring an input source bound by the DEMUX, and creating a recording channel handle;
if the record channel handle is successfully created, the callback of the channel handle is registered, a message queue pool is created, and an input port corresponding to the DEMUX is set;
creating a DEMUX recording channel corresponding to the handle;
if the recording channel is successfully established, adding PID data to be recorded;
starting a recording channel, starting a recording thread and a stream pushing thread, and starting recording;
when data are recorded, TS data of a current recording channel obtained from the DEMUX are obtained in the recording thread;
acquiring TS data from a message queue pool in a plug flow thread;
and calling back the relevant recorded data and taking the Section data corresponding to the PID.
Preferably, in the step, when data is recorded, the recording thread acquires TS data acquired from the DEMUX in the TS data of the current channel, inserts the acquired TS data into the message queue pool, and acquires the inserted TS from the message queue pool by using the stream pushing thread.
Preferably, the recording data related to the step is called back, and is taken into the Section data corresponding to the PID, and the Section data corresponding to the PID is taken through a group package and a group Section.
Preferably, when the DEMUX recording channel corresponding to the handle is created, if the creation fails, the recording is ended or the initial recording is returned.
Preferably, the method records TS packets of a single PID or multiple PIDs.
The method for acquiring the Section based on the recording mode has the following beneficial effects: and recording TS packets of a single PID or a plurality of PIDs through the DEMUX, pushing streams through the message queue, putting TS data in a message queue pool, acquiring data in the message queue pool by another thread, and acquiring Section data through a group data packet algorithm to acquire the corresponding Section data on one or a plurality of PIDs.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
fig. 1 is a schematic flow chart of a section obtaining method implemented based on a recording mode in an embodiment of the present invention.
Detailed Description
For a more clear understanding of the technical features, objects and effects of the present invention, embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
As shown in fig. 1, a method for acquiring a section based on a recording mode in a preferred embodiment of the present invention includes the following steps:
initializing recording, acquiring an input source bound by the DEMUX, and creating a recording channel handle;
registering callback of the channel handle if the recorded channel handle is successfully created, creating a message queue pool, and setting an input port corresponding to the DEMUX;
creating a DEMUX recording channel corresponding to the handle;
if the recording channel is successfully established, adding PID data to be recorded;
starting a recording channel, starting a recording thread and a stream pushing thread, and starting recording;
when data are recorded, TS data of a current recording channel obtained from the DEMUX are obtained in the recording thread;
acquiring TS data from a message queue pool in a plug flow thread;
and calling back the related recorded data and taking the Section data corresponding to the PID.
According to the scheme, TS packets of a single PID or a plurality of PIDs are recorded through a DEMUX, then stream pushing is carried out through a message queue, TS data are placed in a message queue pool, then another thread obtains data in the message queue pool through a group data packet algorithm, and then Section data are obtained through a group data packet algorithm, and corresponding Section data on one or a plurality of PIDs are obtained.
When data are recorded, the recording thread acquires TS data acquired from a DEMUX (digital multiplexer) to a current channel, the acquired TS data are inserted into a message queue pool, and a stream pushing thread is used for acquiring the inserted TS from the message queue pool.
And calling back related recorded data, taking the recorded data into the Section data corresponding to the PID, and taking the Section data corresponding to the PID through the group package and the Section group.
And when the DEMUX recording channel corresponding to the handle is created, if the creation fails, ending or returning to the initial recording.
The scheme aims to solve the problem that Section data of some PIDs can be effectively acquired in DVB data stream acquisition, and avoids the problem that data is processed in one thread because all DEMUX filters data of the PIDs on a part of platforms, and if the data is not processed, data leakage is caused, and a recording stream pushing mode is adopted, so that the situation can be solved.
It is to be understood that the above-described respective technical features may be used in any combination without limitation.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (2)
1. A Section acquisition method based on a recording mode is characterized by comprising the following steps:
initializing recording, acquiring an input source bound by the DEMUX, and creating a recording channel handle;
if the record channel handle is successfully created, the callback of the channel handle is registered, a message queue pool is created, and an input port corresponding to the DEMUX is set;
creating a DEMUX recording channel corresponding to the handle;
if the recording channel is successfully established, adding PID data to be recorded;
starting a recording channel, starting a recording thread and a stream pushing thread, and starting recording;
when data are recorded, TS data of a current recording channel obtained from the DEMUX are obtained in the recording thread;
inserting the TS data into a message queue pool, and acquiring the TS data from the message queue pool in a push flow thread;
and calling back the relevant recorded data, and taking the Section data corresponding to the PID through the group package and the group Section.
2. The method for obtaining a Section based on a recording mode as claimed in claim 1, wherein when a DEMUX recording channel corresponding to a handle is created, if the creation fails, the method ends or returns to initial recording.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110474113.5A CN113225508B (en) | 2021-04-29 | 2021-04-29 | Section acquisition method based on recording mode |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110474113.5A CN113225508B (en) | 2021-04-29 | 2021-04-29 | Section acquisition method based on recording mode |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113225508A CN113225508A (en) | 2021-08-06 |
CN113225508B true CN113225508B (en) | 2022-09-23 |
Family
ID=77090030
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110474113.5A Active CN113225508B (en) | 2021-04-29 | 2021-04-29 | Section acquisition method based on recording mode |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113225508B (en) |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7298966B2 (en) * | 2002-04-16 | 2007-11-20 | Matsushita Electric Industrial Co., Ltd. | Recording device, recording method, and computer-readable program |
CN100377568C (en) * | 2005-10-10 | 2008-03-26 | 中央电视台 | Set-top box EPG application transplanting development interface system |
CN101720036B (en) * | 2009-12-15 | 2011-11-16 | 青岛海信宽带多媒体技术有限公司 | System for distributing DVB data to multiple users |
CN101924865B (en) * | 2010-08-10 | 2012-01-25 | 福建新大陆通信科技股份有限公司 | Method for quickly obtaining data of set top box |
CN105163133B (en) * | 2015-07-07 | 2019-01-01 | 深圳Tcl数字技术有限公司 | The playback method and device of programme information |
CN108124182B (en) * | 2016-11-28 | 2020-10-27 | 深圳市中兴微电子技术有限公司 | Multi-path demultiplexing method and device |
CN108235108A (en) * | 2018-03-20 | 2018-06-29 | 青岛海信电器股份有限公司 | A kind of PVR method for recording, system and television set |
CN111131881B (en) * | 2019-12-30 | 2022-09-02 | 深圳Tcl数字技术有限公司 | PVR (personal video recorder) recording method, smart television and computer readable storage medium |
CN111447475A (en) * | 2020-03-27 | 2020-07-24 | 四川长虹电器股份有限公司 | Multi-channel PVR control system based on digital set-top box and recording and playback method |
CN112153410B (en) * | 2020-09-30 | 2022-02-22 | 郑州信大捷安信息技术股份有限公司 | High-concurrency testing method and system for streaming media service |
-
2021
- 2021-04-29 CN CN202110474113.5A patent/CN113225508B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN113225508A (en) | 2021-08-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CA2919970C (en) | Transmitting apparatus, transmitting method, receiving apparatus and receiving method | |
EP3270601B1 (en) | Self-adaptive streaming medium processing method and apparatus | |
EP2731346A2 (en) | Micro-filtering of streaming entertainment content based on parental control setting | |
CN101213835A (en) | Method and apparatus for providing additional information on digital broadcasting program to iptv in home network | |
WO2017097149A1 (en) | Live comment implementation method for broadcast television terminal and broadcast television system server | |
WO2006085667A1 (en) | Broadcast recording apparatus | |
US20120308010A1 (en) | Method and Apparatus for Processing Entitlement Control Message Packets | |
US20130024900A1 (en) | Method and apparatus for processing non-real-time broadcast service and content transmitted by broadcast signal | |
US8989280B2 (en) | Frame identification | |
US8170009B2 (en) | Method and apparatus for receiving broadcasting data | |
CN113225508B (en) | Section acquisition method based on recording mode | |
EP3242490B1 (en) | Self-adaptive streaming media processing method and device | |
CN108924634A (en) | A kind of TS stream method for quickly identifying and device | |
WO2017190661A1 (en) | Method and apparatus for recording program | |
US8272005B2 (en) | Information monitoring and updating method and system for transport stream | |
CN1234231C (en) | Method for recording digital video-frequency data and digital video-frequency recorder | |
CN107592558B (en) | Interaction method and device for CA middleware in set top box | |
US9918123B2 (en) | Thwarting removal of a commercial in an IPTV network | |
US20090235310A1 (en) | Method and apparatus for displaying electronic program guide of recorded transport stream file | |
US20060269225A1 (en) | Information recording device, information output device, information recording program, information output program, recording medium, and information recording medium | |
JP2007202013A (en) | Broadcast receiver and channel selection method | |
US8009967B2 (en) | Information processing apparatus, information processing method, and program | |
KR101533474B1 (en) | Device and method for receiving video data packets | |
US20110150412A1 (en) | Receiving device | |
EP2357820A1 (en) | System and method for signaling programs from different Transport Streams |
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 |