[go: up one dir, main page]

CN113225508A - Section acquisition method based on recording mode - Google Patents

Section acquisition method based on recording mode Download PDF

Info

Publication number
CN113225508A
CN113225508A CN202110474113.5A CN202110474113A CN113225508A CN 113225508 A CN113225508 A CN 113225508A CN 202110474113 A CN202110474113 A CN 202110474113A CN 113225508 A CN113225508 A CN 113225508A
Authority
CN
China
Prior art keywords
recording
data
demux
channel
pid
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
CN202110474113.5A
Other languages
Chinese (zh)
Other versions
CN113225508B (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.)
Zhongshan Yilian Intelligent Technology Co ltd
Original Assignee
Zhongshan Yilian Intelligent 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 Zhongshan Yilian Intelligent Technology Co ltd filed Critical Zhongshan Yilian Intelligent Technology Co ltd
Priority to CN202110474113.5A priority Critical patent/CN113225508B/en
Publication of CN113225508A publication Critical patent/CN113225508A/en
Application granted granted Critical
Publication of CN113225508B publication Critical patent/CN113225508B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/547Messaging middleware
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

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

本发明涉及一种基于录制方式实现的获取Section方法,包括以下步骤:初始化录制,获取DEMUX绑定的输入源,创建录制通道句柄;录制通道句柄创建成功则注册此通道句柄的回调,并创建消息队列池,设置DEMUX对应的输入端口;创建句柄对应的DEMUX录制通道;录制通道创建成功则添加要录制的PID的数据;启动录制通道,启动录制线程和推流线程,开始进行录制;当录制有数据的时候,录制线程中,从DEMUX中获取到当前录制通道的TS数据;在推流线程中,从消息队列池中获取TS数据,回调相关的录制数据,拿到某PID相应的Section数据。通过DEMUX录制PID的TS包,通过消息队列推流,将TS数据放在一个消息队列池中,另外一个线程通过获取消息队列池中的数据,通过组数据包算法实现Section数据的获取。

Figure 202110474113

The invention relates to a method for acquiring Section based on a recording method, comprising the following steps: initializing recording, acquiring an input source bound by DEMUX, and creating a recording channel handle; registering the callback of the channel handle when the recording channel handle is successfully created, and creating a message Queue pool, set the input port corresponding to DEMUX; create the DEMUX recording channel corresponding to the handle; add the PID data to be recorded when the recording channel is created successfully; start the recording channel, start the recording thread and the streaming thread, and start recording; In the recording thread, the TS data of the current recording channel is obtained from DEMUX; in the streaming thread, the 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. Record the TS packet of the PID through DEMUX, push the stream through the message queue, and put the TS data in a message queue pool.

Figure 202110474113

Description

Section acquisition method based on recording mode
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 some remote areas have limited network services, 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 PID (Packet identifier, PID) corresponding to a DEMUX (Demultiplexer, DEMUX) and are obtained, if a part of platform filters some PID related data from a plurality of DEMUXs, all the PID related data are collected into one thread to be processed, but the PID related data cannot be separated, at this time, if the data volume is too large, the processing of the related data of each PID causes some operations such as time consumption, and the like, so that the data of a part of PID is finally taken, and especially, in the obtaining of data of some Section (data corresponding to data tables such as various PIDs such as audio and video, and are referred to as Section hereinafter), it is important that some desired effects are difficult to achieve if the data are missing.
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 acquisition method implemented based on a recording manner, aiming at the above-mentioned defects in the prior art.
The technical scheme adopted by the invention for solving the technical problems 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 a plurality of PIDs.
The Section acquisition method 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 section acquiring method implemented based on a recording manner 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 the DEMUX, then stream pushing is carried out through the 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 Section data corresponding to 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 (5)

1.一种基于录制方式实现的获取Section方法,其特征在于,包括以下步骤:1. a kind of acquisition Section method realized based on recording mode, is characterized in that, comprises the following steps: 初始化录制,获取DEMUX绑定的输入源,创建录制通道句柄;Initialize the recording, get the input source bound by DEMUX, and create the record channel handle; 所述录制通道句柄创建成功则注册此通道句柄的回调,并创建消息队列池,设置DEMUX对应的输入端口;If the recording channel handle is successfully created, the callback of the channel handle is registered, and a message queue pool is created, and the input port corresponding to DEMUX is set; 创建句柄对应的DEMUX录制通道;Create a DEMUX recording channel corresponding to the handle; 所述录制通道创建成功则添加要录制的PID的数据;If the recording channel is created successfully, then add the data of the PID to be recorded; 启动录制通道,启动录制线程和推流线程,开始进行录制;Start the recording channel, start the recording thread and the push thread, and start recording; 当录制有数据的时候,录制线程中获取从DEMUX中获取到当前录制通道的TS数据;When there is data recorded, the recording thread obtains the TS data obtained from the current recording channel from DEMUX; 在推流线程中从消息队列池中获取TS数据;Get TS data from the message queue pool in the push thread; 回调相关的录制数据,拿到所述PID相应的Section数据。The related recording data is called back, and the Section data corresponding to the PID is obtained. 2.根据权利要求1所述的基于录制方式实现的获取Section方法,其特征在于,所述步骤当录制有数据的时候,录制线程中获取从DEMUX中获取到当前通道的TS数据中,将拿到的TS数据插入到消息队列池,使用推流线程,从消息队列池中获取插上的TS。2. the acquisition Section method realized based on recording mode according to claim 1, is characterized in that, when described step is recorded with data, in the recording thread, obtain in the TS data that obtains from DEMUX to current channel, will take The received TS data is inserted into the message queue pool, and the inserted TS is obtained from the message queue pool using the push thread. 3.根据权利要求1所述的基于录制方式实现的获取Section方法,其特征在于,所述步骤回调相关的录制数据,拿到所述PID相应的Section数据中,通过组包和组Section,拿到所述PID相应的Section数据。3. the acquisition Section method realized based on recording mode according to claim 1, is characterized in that, described step recalls the relevant recording data, gets in the corresponding Section data of described PID, by group package and group Section, get to the corresponding Section data of the PID. 4.根据权利要求1所述的基于录制方式实现的获取Section方法,其特征在于,创建句柄对应的DEMUX录制通道时,如果创建失败则结束或者返回初始化录制。4. the acquisition Section method realized based on the recording mode according to claim 1, is characterized in that, when creating the DEMUX recording channel corresponding to the handle, if the creation fails, end or return to initialize recording. 5.根据权利要求1所述的基于录制方式实现的获取Section方法,其特征在于,所述方法录制单个PID或者多个PID的TS包。5 . The method for obtaining Sections based on a recording method according to claim 1 , wherein the method records TS packets of a single PID or multiple PIDs. 6 .
CN202110474113.5A 2021-04-29 2021-04-29 Section acquisition method based on recording mode Active CN113225508B (en)

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 true CN113225508A (en) 2021-08-06
CN113225508B 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)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1452395A (en) * 2002-04-16 2003-10-29 松下电器产业株式会社 Recording device, computer-readable program, and method
CN1949824A (en) * 2005-10-10 2007-04-18 中央电视台 Set-top box EPG application transplanting development interface system
CN101720036A (en) * 2009-12-15 2010-06-02 青岛海信宽带多媒体技术有限公司 System for distributing DVB data to multiple users
CN101924865A (en) * 2010-08-10 2010-12-22 福建新大陆通信科技股份有限公司 Method for quickly obtaining data of set top box
WO2017005064A1 (en) * 2015-07-07 2017-01-12 深圳Tcl数字技术有限公司 Playing method and device for programme information
CN108124182A (en) * 2016-11-28 2018-06-05 深圳市中兴微电子技术有限公司 A kind of demultiplexing method and device
CN108235108A (en) * 2018-03-20 2018-06-29 青岛海信电器股份有限公司 A kind of PVR method for recording, system and television set
CN111131881A (en) * 2019-12-30 2020-05-08 深圳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
CN112153410A (en) * 2020-09-30 2020-12-29 郑州信大捷安信息技术股份有限公司 High-concurrency testing method and system for streaming media service

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1452395A (en) * 2002-04-16 2003-10-29 松下电器产业株式会社 Recording device, computer-readable program, and method
CN1949824A (en) * 2005-10-10 2007-04-18 中央电视台 Set-top box EPG application transplanting development interface system
CN101720036A (en) * 2009-12-15 2010-06-02 青岛海信宽带多媒体技术有限公司 System for distributing DVB data to multiple users
CN101924865A (en) * 2010-08-10 2010-12-22 福建新大陆通信科技股份有限公司 Method for quickly obtaining data of set top box
WO2017005064A1 (en) * 2015-07-07 2017-01-12 深圳Tcl数字技术有限公司 Playing method and device for programme information
CN108124182A (en) * 2016-11-28 2018-06-05 深圳市中兴微电子技术有限公司 A kind of demultiplexing method and device
CN108235108A (en) * 2018-03-20 2018-06-29 青岛海信电器股份有限公司 A kind of PVR method for recording, system and television set
CN111131881A (en) * 2019-12-30 2020-05-08 深圳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
CN112153410A (en) * 2020-09-30 2020-12-29 郑州信大捷安信息技术股份有限公司 High-concurrency testing method and system for streaming media service

Also Published As

Publication number Publication date
CN113225508B (en) 2022-09-23

Similar Documents

Publication Publication Date Title
CN101213835B (en) Method and apparatus for providing additional information on digital broadcasting program to IPTV in home network
US10070188B2 (en) Method of processing non-real time service and broadcast receiver
EP2731346A2 (en) Micro-filtering of streaming entertainment content based on parental control setting
WO2017097149A1 (en) Live comment implementation method for broadcast television terminal and broadcast television system server
US9838642B2 (en) Method for signaling broadcast video content, and recording method and device using the signaling
JP2013516133A5 (en)
EP3270601A1 (en) Self-adaptive streaming medium processing method and apparatus
CN111031385B (en) Video playing method and device
WO2006085667A1 (en) Broadcast recording apparatus
JP2006211679A (en) Mpeg-4 object information management method in mpeg-2 transmission stream
CA2919970A1 (en) Transmitting apparatus, transmitting method, receiving apparatus and receiving method
US20130003869A1 (en) Frame identification
WO2012071931A1 (en) Method and system for dynamically inserting cut-in program into segmented program
US20080037956A1 (en) Systems and Methods of Generating Encapsulated MPEG Program Streams
CN113225508B (en) Section acquisition method based on recording mode
EP3242490B1 (en) Self-adaptive streaming media processing method and device
WO2017190661A1 (en) Method and apparatus for recording program
CN1234231C (en) Method for recording digital video-frequency data and digital video-frequency recorder
US20080184325A1 (en) Information monitoring and updating method and system for transport stream
CN107592558B (en) Interaction method and device for CA middleware in set top box
US10491948B2 (en) Service acquisition for special video streams
KR101533474B1 (en) Device and method for receiving video data packets
JP2001268516A (en) Digital broadcast receiver
US8009967B2 (en) Information processing apparatus, information processing method, and program
JP4965591B2 (en) TS separation / section editing apparatus, TS separation / section editing method, and TS separation / section editing program

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