CN1368681A - Date receiving method based on CPU able to receive basic data stream - Google Patents

Date receiving method based on CPU able to receive basic data stream Download PDF

Info

Publication number
CN1368681A
CN1368681A CN01101851A CN01101851A CN1368681A CN 1368681 A CN1368681 A CN 1368681A CN 01101851 A CN01101851 A CN 01101851A CN 01101851 A CN01101851 A CN 01101851A CN 1368681 A CN1368681 A CN 1368681A
Authority
CN
China
Prior art keywords
data
receive
buffer
processing unit
message
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
CN01101851A
Other languages
Chinese (zh)
Other versions
CN1172243C (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.)
SUANTONG DIGITAL TECHNOLOGY RESEARCH CENTER Co Ltd BEIJING
Original Assignee
SUANTONG DIGITAL TECHNOLOGY RESEARCH CENTER Co Ltd BEIJING
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 SUANTONG DIGITAL TECHNOLOGY RESEARCH CENTER Co Ltd BEIJING filed Critical SUANTONG DIGITAL TECHNOLOGY RESEARCH CENTER Co Ltd BEIJING
Priority to CNB011018518A priority Critical patent/CN1172243C/en
Publication of CN1368681A publication Critical patent/CN1368681A/en
Application granted granted Critical
Publication of CN1172243C publication Critical patent/CN1172243C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a method for accepting data based on that CPU could accept basic data stream. Each PES data stream receiver is controlled by one process, which makes the receiver transport PES data to circular data buffer only. The program for controlling PES data stream reception monitors and tracks the head of PES data packet and transports received new data to other memory area so as to overcome shortcoming of former hardware of PES receiving module. The said former module does not give any notice when PES data are copid to a circular memory buffer. Thus, the invention prevent PES data from being lost.

Description

Data receive method based on the central processing unit that can receive elementary stream
The present invention relates to a kind of data receive method, belong to the computer data transmission field based on the central processing unit that can receive elementary stream (Packeted E1ementary Stream is called for short PES).
At present, the data broadcasting service of commercial television station turns to the digital form of being supported by the data broadcast standard in the European digital video-frequency broadcast standard series (EN301 192, are called for short DVB-DATA) by traditional flyback graphics context mode; Wherein, the PES transmission mode is one of data broadcasting mode of this standard support.
Use can receive multichannel PES data stream central processing unit (as: STi5500 is embedded 32 RISC CPU of STMicroelectronic design) reception PES and have certain degree of difficulty, its reason is: when the hardware PES receiver module that is positioned at this central processing unit inside constantly will belong to PES copying data to the predetermined circulating memory buffer zone of identical traffic bag sign (PID), do not send any interruption or other forms of notice, adopt single process to control all data stream receivers, occur PES loss of data phenomenon unavoidably; In addition, because the send buffer of data stream receiver is " but backrush " (recycling), therefore if untimely the PES data are shifted, the data in the send buffer will be covered by new data, thereby can cause the PES loss of data that received.Obtain correct data and just must know the head of PES packet, therefore, the head of monitoring and tracking PES packet is very crucial.
Fundamental purpose of the present invention is to provide a kind of data receive method based on the central processing unit that can receive elementary stream, each PES data stream receiver is responsible for control by a process, PES data stream receiver only is responsible for the PES data are sent in the annular data buffer, and the data that the PES receiving control program will newly be received are transferred to other region of memorys again.
Another object of the present invention is to provide a kind of data receive method based on the central processing unit that can receive elementary stream, it is to the monitoring and the tracking of the PES packet head that received.
The objective of the invention is to realize by the following technical solutions:
A kind of data receive method based on the central processing unit that can receive elementary stream, its process object is an elementary stream based on digital video-frequency broadcast standard, the central processing unit that this method can receive the multichannel elementary stream utilizes a control corresponding protocol information, by elementary stream duplicated the reception of realization to the multichannel elementary stream.
The central processing unit of above-mentioned received multichannel elementary stream can be the STi5500 central processing unit.
Above-mentioned control protocol information comprises: control process pointer, message queue pointer, the control information of annular data buffer and a plurality of elementary stream data packet buffer; Wherein, annular data buffer control information comprises the information of this base address, annular data buffer information, this annular data buffer write pointer, this annular data buffer read pointer and this annular data buffer size; The elementary stream data packet buffer comprises that one points to the total length information of master data stream packets of this elementary stream data packet buffer base address of a region of memory that has distributed, default buffer size information, current reception and the byte number information of current reception.
The method that above-mentioned basic flow data copies as the extremely basic stream packets buffer zone of a transferring data and carries out the tracking of basic flow data head, it comprises the steps:
1, whether the basic stream packets buffer zone of judging current reception can hold the data that needs shift;
2, if can hold, then directly copies data is to basic stream packets buffer zone, and basic flow data reproduction process is successfully returned;
3, if can not hold, then several times data are transferred in a plurality of basic stream packets buffer zones;
When 4, changing new basic stream packets buffer zone at every turn, the head that check basic stream packets buffer zone whether with basic flow data synchronization character coupling, if coupling then continues to shift;
5, if do not match then losing synchronously of basic flow data, basic flow data reproduction process is returned with failure.
The control method of the reception of above-mentioned elementary stream is: each data stream receiver of central processing unit is responsible for control by a process, carries out an initialization procedure before each process begins earlier; This process has reception and two states of non-reception, and its receivable message is for beginning to receive (START_RECEIVE), stopping to receive (STOP_RECEIVE) and withdrawing from three kinds of message such as (EXIT).
Above-mentioned initialization procedure comprises the steps:
1, creates a message queue;
2, initialization control protocol information annular data buffer, associated to the data stream receiver
Register be provided with;
3, create a plurality of basic stream packets buffer zones, and all be initialized as sky;
4, establishment and one of startup operation receive the control process;
5, other registers of initialization data stream receiver.
The control process of data stream receiver comprises the steps:
1, a continuous constant counter of write pointer is set, and its value is changed to 0, the initialize process state is non-accepting state;
2, the message in the process infinite wait message queue;
If in 3 message queues message is arranged, then take out message immediately, carry out step 5;
4, if do not have message in the message queue, then central processing unit then blocks this process, and the real-time multi-task kernel is not reallocated CPU time to this process, up to there being a message to appear in this message queue, returns step 2;
5, if receive STOP_RECEIVE message, be left intact, return step 2;
6, if receive EXIT, process finishes;
7,, and enter step 8 beginning synchronizing process if receive START_RECEIVE message;
8, start basic flow data and receive hardware; Begin to receive data; The constantly variation of monitoring data write pointer register then;
9, if the value of write pointer changes, then count zero clearing, and judge the head that whether comprises PES in the data of up-to-date reception; If comprise, then enter step 12, if do not comprise, then enter step 8;
10, if the value of write pointer does not change, the value of the continuous constant counter of write pointer adds 1;
11, if the value of the continuous constant counter of this write pointer surpasses a threshold value, then synchronizing process failure gives a warning, and the basic flow data that the prompting user wants does not exist, and withdraws from process;
12, successfully return as if synchronizing process, in the some basic flow data buffer zone of basic flow data control information, seek the buffer zone of a sky, its basic flow data length of initialization is that the total length of current basic stream packets, the data word joint number that has received are 0, enters accepting state;
13, read message queue;
14, if no message enters 18;
15, as if EXIT message, process finishes;
16, if STOP_RECEIVE then enters non-accepting state;
17, if START_RECEIVE does not then do any processing, return step 13;
18, read data write pointer register;
19, if this pointer no change, repeating step 13 again after a period of time of then delaying time;
20, if change, then calculate the byte number of received data;
21, calling basic flow data reproduction process is transferred to data in the basic stream packets buffer zone;
22, if basic flow data reproduction process success is then delayed time a period of time, return step 13;
23, if step 8 is then returned in basic flow data reproduction process failure.
Described in the above-mentioned steps threshold value be the continuous constant count value of pointer of a maximum that sets in advance, its span is to make the time of synchronizing process be not more than 5 seconds round values.
The method that technical scheme disclosed in this invention utilizes each data stream receiver to be responsible for controlling by a process has been avoided the phenomenon of PES loss of data; The data stream receiver of each management of process only is responsible for the PES data stream is sent in the annular data buffer, the receiving control program of PES data stream transfers to the data of newly receiving other region of memory, thereby avoided because the characteristics of " but backrush " of the send buffer of data stream receiver, data in the send buffer are covered by new data, cause the shortcoming of PES loss of data.
The present invention is described in further detail below in conjunction with drawings and Examples:
Fig. 1 is sent to PES data packet buffer with the PES data from the data stream receiver for the embodiment of the invention, and to PES data head tracking, the schematic flow sheet that duplicates.
Fig. 2 is the schematic flow sheet of embodiment of the invention PES data stream receiving process initialization procedure.
Fig. 3 is one of the schematic flow sheet of the control process of embodiment of the invention PES data stream receiver.
Fig. 4 be embodiment of the invention PES data stream receiver the control process schematic flow sheet two.
The central processing unit of the received elementary stream that the embodiment of the invention adopts is the STi5500 central processing unit, and its inside has a plurality of data stream receivers, and the STi5500 central processing unit can receive 32 tunnel PES data stream.Usually, when receiving the PES data, the hardware PES data reception module that is positioned at STi5500 inside constantly will belong to PES copying data to a predetermined circulating memory buffer zone of identical traffic bag sign (PID), but, in this operating period, the Sti5500 central processing unit does not send any interruption or other forms of notice, if adopt existing single process to control the method for all data stream receivers, occurs the situation of PES loss of data unavoidably.In addition, because the send buffer of data stream receiver is " but backrush " (recycling), therefore if untimely the PES data are shifted, the data in the send buffer will be covered by new data, thereby can cause the PES loss of data that received.Obtain correct data and just must know the head of PES packet, therefore, monitoring and the head of following the tracks of the PES packet are unusual critical step.
Each above-mentioned PES data stream receiver has a data write pointer register, sensing will write the address of PES data, this data write pointer will circulate in annular data buffer, that is when write pointer arrived the buffer zone end, it wanted " rollback " start address to ring-shaped P ES data buffer.
Utilize the characteristics of above-mentioned STi5500 central processing unit, at first, change the method that single process is controlled all data stream receivers, make each data stream receiver of this central processing unit be responsible for control by a process.
Then, set up a STi5500 central processing unit control protocol information, this control protocol information comprises: control process pointer, message queue pointer, the control information of annular data buffer and a plurality of PES data packet buffer; Wherein, annular data buffer control information comprises the information of this base address, annular data buffer information, this annular data buffer write pointer, this annular data buffer read pointer and this annular data buffer size; The PES data packet buffer comprises that one points to the total length information of PES packet of this PES data packet buffer base address of a region of memory that has distributed, default buffer size information, current reception and the byte number information of current reception.
As shown in Figure 1, for the PES data are sent to the PES data packet buffer from the data stream receiver, and PES data head is followed the tracks of, adopted the PES clone method, it has following steps:
1, whether the PES data packet buffer of judging current reception can hold the data that are transferred;
2, if can hold, then directly copy these data to the PES data packet buffer, the reproduction process of PES data is successfully returned;
3, if can not hold, then several times data are transferred in a plurality of PES data packet buffers;
When 4, changing new PES data packet buffer, check whether the head of PES data packet buffer mates with PES data sync word, if coupling then continues to shift at every turn;
5, return with failure as if the then PES data reproduction process that do not match.
Because each PES data stream receiver of STi5500 central processing unit is responsible for control by a process, therefore, should carry out an initialization procedure earlier before each process begins, and enters the control process then.This control process has two states such as accepting state and non-accepting state, and its receivable message is for beginning to receive (START_RECEIVE), stopping to receive (STOP_RECEIVE) and withdrawing from three kinds of message such as (EXIT).
As shown in Figure 2, in initialization procedure, need carry out following steps:
1, creates a message queue;
The annular data buffer of 2, initialization control protocol information, to PES data stream receiver with it
Relevant register is provided with;
3, create a plurality of PES data packet buffers, and all be initialized as sky;
4, establishment and one of startup operation receive the control process;
5, other registers of initialization PES data stream receiver.
Shown in Fig. 3,4, the control process of PES data stream receiver comprises the steps:
1, a continuous constant counter of write pointer is set, and its value is changed to 0;
2, the message in the infinite wait message queue;
If in 3 message queues message is arranged, then take out this message immediately, carry out step 5;
4, if do not have message in the message queue, then central processing unit then blocks this process, and the real-time multi-task kernel is not reallocated CPU time to this process, up to there being a message to appear in this message queue, returns step 2;
5, if receive STOP_RECEIVE message, be left intact, return step 2;
6, if receive EXIT, process finishes;
7,, and enter step 8 if receive START_RECEIVE message;
8, start PES Data Receiving hardware; Begin to receive the PES data; Constantly monitor the variation of PES data write pointer register then;
9, if the value of write pointer changes, then count zero clearing, and judge the head that whether comprises PES in the data of up-to-date reception; If comprise, then enter step 12, if do not comprise, then enter step 8;
10, if the value of write pointer does not change, the value of the continuous constant counter of write pointer adds 1;
11, if the value of the continuous constant counter of this write pointer surpasses a threshold value, then give a warning, the PES data that the prompting user wants do not exist, and withdraw from process;
12, in some PES data buffer of PES data control information, seek the buffer zone of a sky, its PES data length of initialization is that the total length of current PES packet, the data word joint number that has received are 0, enters accepting state;
13, read message queue;
14, if no message enters step 18;
If 15 EXIT message, process finishes;
If 16 STOP_RECEIVE message enter non-accepting state, return step 2;
If 17 START_RECEIVE message are not done any processing, return step 13;
18, read data write pointer register;
19, if this pointer no change, repeating step 13 again after time-delay a period of time;
20,, calculate the byte number of received data if change;
21, calling the reproduction process of PES data is transferred to data in the PES data packet buffer;
22, if PES data reproduction process success, is returned step 13 at time-delay a period of time;
23, if step 8 is returned in PES data reproduction process failure.
Described in the above-mentioned steps threshold value be the continuous constant count value of pointer of a maximum that sets in advance, its span is to make the time of synchronizing process be not more than 5 seconds round values.

Claims (10)

1, a kind of data receive method based on the central processing unit that can receive elementary stream, its process object is an elementary stream based on digital video-frequency broadcast standard, it is characterized in that: a central processing unit that can receive the multichannel elementary stream receives the multichannel elementary stream by duplicating of a control corresponding protocol information and elementary stream.
2, a kind of data receive method based on the central processing unit that can receive elementary stream as claimed in claim 1 is characterized in that: the described central processing unit that receives the multichannel elementary stream is the STi5500 central processing unit.
3, a kind of data receive method based on the central processing unit that can receive elementary stream as claimed in claim 1, it is characterized in that: described control protocol information comprises: control process pointer, message queue pointer, the control information of annular data buffer and a plurality of elementary stream data packet buffer.
4, a kind of data receive method based on the central processing unit that can receive elementary stream as claimed in claim 3 is characterized in that: described annular data buffer control information comprises the information of this base address, annular data buffer information, this annular data buffer write pointer, this annular data buffer read pointer and this annular data buffer size.
5, a kind of data receive method based on the central processing unit that can receive elementary stream as claimed in claim 3 is characterized in that: this elementary stream data packet buffer comprises that one points to the total length information of master data stream packets of this elementary stream data packet buffer base address of a region of memory that has distributed, default buffer size information, current reception and the byte number information of current reception.
6, a kind of data receive method as claimed in claim 1 based on the central processing unit that can receive elementary stream, it is characterized in that: the method that described basic flow data copies as the extremely basic stream packets buffer zone of a transferring data and carries out the tracking of basic flow data head, it comprises the steps:
Whether a, the basic stream packets buffer zone of judging current reception can hold the data that needs shift;
B, if can hold, then directly copies data is to basic stream packets buffer zone, and basic flow data reproduction process is successfully returned;
C, if can not hold, then several times data are transferred in a plurality of basic stream packets buffer zones;
D, when changing new basic stream packets buffer zone at every turn, the head that check basic stream packets buffer zone whether with the synchronization character coupling of basic flow data, if coupling then continues to shift;
E, if do not match, then basic flow data reproduction process is returned with failure.
7, a kind of data receive method as claimed in claim 1 based on the central processing unit that can receive elementary stream, it is characterized in that: the control method of the reception of described elementary stream is: each data stream receiver of central processing unit is responsible for control by a process, carries out an initialization procedure before this process begins earlier; This process has reception and two states of non-reception, and its receivable message is for beginning to receive (START_RECEIVE), stopping to receive (STOP_RECEIVE) and withdrawing from three kinds of message such as (EXIT).
8, a kind of data receive method based on the central processing unit that can receive elementary stream as claimed in claim 7, it is characterized in that: this initialization procedure comprises the steps:
A, establishment one message queue;
B, initialization control protocol information annular data buffer, associated to the data stream receiver
Register is provided with;
C, a plurality of basic stream packets buffer zones of establishment, and all be initialized as sky;
D, establishment also start a reception of operation control process;
Other registers of e, initialization data stream receiver.
9, a kind of data receive method based on the central processing unit that can receive elementary stream as claimed in claim 7, it is characterized in that: the control process of data stream receiver comprises the steps:
A, a continuous constant counter of write pointer is set, and its value is changed to 0, the initialize process state is non-accepting state;
Message in b, the process infinite wait message queue;
If in the c message queue message is arranged, then take out message immediately, carry out step e;
D, if do not have message in the message queue, then central processing unit then blocks this process, real-time multi-task kernel CPU time of not reallocating is given this process, up to there being a message to appear in this message queue, returns step b;
E, if receive STOP_RECEIVE message, be left intact, return step b;
F, if receive EXIT, process finishes;
G, if receive START_RECEIVE message, and enter step h;
H, the basic flow data of startup receive hardware; Begin to receive data; The constantly variation of monitoring data write pointer register then;
I, if the value of write pointer changes, then count zero clearing, and judge the head that whether comprises elementary stream in the data of up-to-date reception; If comprise, then enter step 1, if do not comprise, then enter step h;
J, if the value of write pointer does not change, the value of the continuous constant counter of write pointer adds 1;
K, if the value of the continuous constant counter of this write pointer surpasses a threshold value, then give a warning, the basic flow data that the prompting user wants does not exist, and withdraws from process;
1, in the some basic flow data buffer zone of basic flow data control information, seek the buffer zone of a sky, its basic flow data length of initialization is that the total length of current basic stream packets, the data word joint number that has received are 0, enters accepting state;
M, read message queue;
N, if no message, enter r;
O, if EXIT message, process finishes;
P, if STOP_RECEIVE then enter non-accepting state;
Q, if START_RECEIVE then do not do any processing, return step m;
R, read data write pointer register;
S, if this pointer no change, repeating step m again after a period of time of then delaying time;
T, if change, then calculate the byte number of received data;
U, call basic flow data reproduction process data are transferred in the basic stream packets buffer zone;
V, successful as if basic flow data reproduction process then delays time a period of time, returns step m;
W, if step h is then returned in basic flow data reproduction process failure.
10, a kind of data receive method as claimed in claim 9 based on the central processing unit that can receive elementary stream, it is characterized in that: described threshold value is the continuous constant count value of the pointer of a maximum that sets in advance, and its span is to make the time of synchronizing process be not more than 5 seconds round values.
CNB011018518A 2001-02-07 2001-02-07 Date receiving method based on CPU able to receive basic data stream Expired - Fee Related CN1172243C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB011018518A CN1172243C (en) 2001-02-07 2001-02-07 Date receiving method based on CPU able to receive basic data stream

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB011018518A CN1172243C (en) 2001-02-07 2001-02-07 Date receiving method based on CPU able to receive basic data stream

Publications (2)

Publication Number Publication Date
CN1368681A true CN1368681A (en) 2002-09-11
CN1172243C CN1172243C (en) 2004-10-20

Family

ID=4652259

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB011018518A Expired - Fee Related CN1172243C (en) 2001-02-07 2001-02-07 Date receiving method based on CPU able to receive basic data stream

Country Status (1)

Country Link
CN (1) CN1172243C (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101924865A (en) * 2010-08-10 2010-12-22 福建新大陆通信科技股份有限公司 Method for quickly obtaining data of set top box
CN103677651A (en) * 2012-09-14 2014-03-26 珠海扬智电子科技有限公司 Digital video converter and read-write method for video series flow
CN112019450A (en) * 2019-05-31 2020-12-01 微软技术许可有限责任公司 Inter-device streaming communication
CN114339378A (en) * 2021-12-23 2022-04-12 展讯通信(上海)有限公司 Audio and video code stream processing method and device and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101924865A (en) * 2010-08-10 2010-12-22 福建新大陆通信科技股份有限公司 Method for quickly obtaining data of set top box
CN103677651A (en) * 2012-09-14 2014-03-26 珠海扬智电子科技有限公司 Digital video converter and read-write method for video series flow
CN112019450A (en) * 2019-05-31 2020-12-01 微软技术许可有限责任公司 Inter-device streaming communication
CN114339378A (en) * 2021-12-23 2022-04-12 展讯通信(上海)有限公司 Audio and video code stream processing method and device and electronic equipment

Also Published As

Publication number Publication date
CN1172243C (en) 2004-10-20

Similar Documents

Publication Publication Date Title
CN1170446C (en) Radio resource allocation method and base station thereby
CN1518242A (en) Mobile communication system, radio terminal, data transmitting method and its program
CN1675865A (en) Method and apparatus for reliably communicating information packets in a wireless communication network
CN1947344A (en) Multidata processing device and method in a wireless terminal
CN1947449A (en) Transmission of signaling information for broadcast and multicast services
CN1913445A (en) Data communication system and method with multi-channel power-down and wake-up
JP4861410B2 (en) Common channel resetting method and apparatus
CN1883165A (en) Method and apparatus for data communications over multiple channels
CN1685745A (en) Methods and apparatus for operating mobile nodes in multiple states
CN1773948A (en) Method for reading multimedia broadcasting/group broadcasting service switch-in information
CN101047776A (en) Mobile broadcast network system and method for implementing synchronous of the network
CN1228982C (en) Channel combination method of VOD system
CN1741609A (en) The equipment, method and the medium that are used for audio video synchronization
CN1172243C (en) Date receiving method based on CPU able to receive basic data stream
CN1571532A (en) Method of point-to-point and point-to-multipoint conversion in multimedia broadcasting and multicast service
CN1143552C (en) Data switching apparatus
CN1917478A (en) Method for processing forwarding message, and process module
CN101034969A (en) Method for indicating the packet data channel used by the terminal to send the data
CN101064923A (en) Method for realizing limitation signaling in evolvement network
CN1113553C (en) Radio apparatus outputting alarm prior to scheduled time
CN1183537C (en) Device and method for image regeneration and able to correctly perform automatic pause displaying
EP1879355B1 (en) Method of transceiving driver software over the air and apparatus using the same
CN1722901A (en) A method of serving radio network subsystem (SRNS) redirection
CN1139272C (en) Radio selective-paging receiver with wide-area function
CN1859109A (en) User number counting method in multimedia broadcast multiple broadcast service

Legal Events

Date Code Title Description
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20041020

Termination date: 20110207