CN202121720U - Device for correcting moving picture experts group (MPEG)-2 transmission flow program clock reference (PCR) software - Google Patents

Device for correcting moving picture experts group (MPEG)-2 transmission flow program clock reference (PCR) software Download PDF

Info

Publication number
CN202121720U
CN202121720U CN2011201933953U CN201120193395U CN202121720U CN 202121720 U CN202121720 U CN 202121720U CN 2011201933953 U CN2011201933953 U CN 2011201933953U CN 201120193395 U CN201120193395 U CN 201120193395U CN 202121720 U CN202121720 U CN 202121720U
Authority
CN
China
Prior art keywords
pcr
adjusting device
software
clock
mpeg
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.)
Expired - Fee Related
Application number
CN2011201933953U
Other languages
Chinese (zh)
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.)
Institute of Electronic and Information Engineering of Dongguan UESTC
Original Assignee
Institute of Electronic and Information Engineering of Dongguan UESTC
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 Institute of Electronic and Information Engineering of Dongguan UESTC filed Critical Institute of Electronic and Information Engineering of Dongguan UESTC
Priority to CN2011201933953U priority Critical patent/CN202121720U/en
Application granted granted Critical
Publication of CN202121720U publication Critical patent/CN202121720U/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Television Signal Processing For Recording (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The utility model relates to the technical field of communication and a broadcasting system, in particular to a device for correcting moving picture experts group (MPEG)-2 transmission flow program clock reference (PCR) software, which comprises an extraction device, an entering time recording device, a first adjusting device, a leaving time recording device and a second adjusting device, wherein the extraction device, the entering time recording device, the first adjusting device, the leaving time recording device and the second adjusting device are sequentially connected with each other. The extraction device is used for extracting count values of a 27 MHz clock, the entering time recording device is used for recording system clock count values when a test set (TS) bag containing PCR fields enters a multiplexer, the first adjusting device is used for adjusting data for the first time according to the count values recorded by the entering time recording device, the leaving time recording device is used for recording the system clock count values when the TS bag containing the PCR fields leaves the multiplexer, and the second adjusting device is used for adjusting the PCR for the second time by using the count values recorded by the leaving time recording device. Real-time count values of the 27M clock is generated in a method of using a software correcting device, the PCR is adjusted in the software multiplexer, vibration in a multiplexer process is remarkably reduced after correcting the PCR, and system obtaining is simplified.

Description

A kind of device that mpeg 2 transport stream PCR software is proofreaied and correct
Affiliated technical field
The utility model patent belongs to communication and broadcast system technical field, especially generates 27MHz local system clock for software under the PC platform and realizes a kind of device that mpeg 2 transport stream PCR software is proofreaied and correct.
Background technology
At present, hardware modes such as the multiplexing general employing FPGA of digital television broadcasting field mpeg 2 transport stream are realized, compare hardware multiplexing, and the software repeated usage system has that cost is low, the construction cycle short and characteristics such as high flexibility.Adopt the PC software mode to obtain 27MHz DTV local clock and then carry out (Program Clock Reference to MPEG-2 code stream PCR through the PC system clock; Program clock reference) correction; Make that handling the transmission code stream of exporting through the PC software repeated usage carries stable clock information, therefore under the PC environment, generating the 27MHz local clock is a key component in the MPTS software repeated usage system.
In Moving Picture Experts Group-2; PCR is a 48bit field, and wherein significance bit has 42bit, and the PCR field is made up of two parts: a part is program_clock_reference_base; 33bit is that 1/300 (90KHZ) with 27MHZ system reference clock is unit; Another part is program_clock_reference_extension, is to be 9 bit fields of unit with system reference clock (27MHZ).
The PCR field that with 27MHz is the sampling point of system clock plays important effect in mpeg 2 transport stream.Decoder end need be come the correcting local clock according to the PCR value, and the time value with the encoder-side clock synchronization is provided, and realizes decoding end audio-visual synchronization decodes and plays.
The utility model content
The PCR shake exerts an influence in the mpeg 2 transport stream software repeated usage process in order to overcome; The utility model provide a kind of on the PC platform software produce the 27M clock, and then utilize this clock can carry out the device that mpeg 2 transport stream PCR software is proofreaied and correct of software adjustment PCR.The 27MHz clock that this device utilization generates carries out the PCR adjustment of MPTS as the elapsed time clock of PCR.
The utility model solves the technical scheme that its technical problem adopted:
A kind of device that mpeg 2 transport stream PCR software is proofreaied and correct; Include the extraction element that is used to extract 27MHz clock count value, be used to write down comprise entering that PCR field TS bag gets into multiplexer system clock clocking value constantly constantly tape deck, utilize the clocking value that gets into recording device records constantly to data carry out adjustment for the first time first adjusting device, be used to write down the departure time tape deck that comprises PCR field TS bag and leave multiplexer system clock clocking value constantly, the clocking value that utilizes the departure time recording device records carries out second adjusting device of adjustment for the second time to PCR, extraction element, gets into constantly that tape deck, first adjusting device, departure time tape deck and second adjusting device interconnect successively.
Be connected with the reception buffer unit between said first adjusting device and the departure time tape deck.
Be connected with the transmission buffer unit between the said departure time tape deck and second adjusting device.
Under the PC platform, utilize the inner chronograph mechanism of PC platform to obtain the system timing value, then clocking value is converted into as the corresponding count value of 27M frequency clock, in order to carry out the correction of PCR.The utility model obtains the internal system clocking value and is divided into two kinds of situation: for intel monokaryon CPU platform; Inner one the 64 bit register TSC (Time Stamps Counter) of CPU capable of using draws the system timing value; TSC each cpu cycle its value add one; The value of in program, utilizing the RDSTC instruction to read this register, this accuracy of timekeeping can reach the precision of the dominant frequency level of CPU; For the multi-core CPU platform; Owing to can not guarantee on the mainboard that each nuclear TSC synchronously and the changeability of cpu frequency; Make the RDSTC instruction weaken greatly as the function of accurate timing; Therefore the accurate timing mechanism of utilizing operating system to provide under the multinuclear situation realizes the timing of nanosecond, and the clock_gettime () function under linux system in the use POSIX storehouse can obtain the accurate timing of nanosecond as parameter with CLOCK_MONOTONIC.After the count value that obtains corresponding to the 27M clock, adopt based on the PCR bearing calibration of time delay in the multiplexer and carry out the PCR correction.This method is the time-delay of PCR packet in multiplexer to be reflected to offset the PCR shake that produces in the multiplex process on the PCR field.Through twice adjustment, remove the time jitter of Network Transmission and local multiplexing generation.The PC platform generates the 27MHz clock down and realizes the step of mpeg 2 transport stream PCR software method of correcting is comprised:
S1. under the PC platform, be directed against the different situations of monokaryon and multinuclear, extract 27MHz clock count value through extraction element.
S2. get into that moment of multiplexer at the TS bag that comprises the PCR field, through getting into the clocking value T1 of system clock under the moment recording device records.
S3. first adjusting device utilizes T1 that data are carried out the adjustment first time.
S4. leave that moment of multiplexer at the TS bag that comprises the PCR field, through the count value T2 of system clock under the departure time recording device records.
S5. second adjusting device utilizes T2 that data are carried out the adjustment second time.
The beneficial effect of the utility model is, utilizes the mode of software means for correcting to produce the count value of 27M clock in real time, in the software repeated usage device, PCR adjusted, and after PCR proofreaied and correct, the shake that produces in the multiplex process obviously reduced, and has simplified the realization of system.
Description of drawings
Fig. 1 is the structure principle chart of the utility model.
Fig. 2 is the FB(flow block) of the utility model adjustment PCR.
Embodiment
Below in conjunction with accompanying drawing the utility model is further described; See Fig. 1, shown in 2; The utility model includes the extraction element 1 that is used to extract 27MHz clock count value, be used to write down comprise entering that PCR field TS bag gets into multiplexer system clock clocking value constantly constantly tape deck 2, utilize the clocking value that gets into tape deck 2 records constantly to data carry out adjustment for the first time first adjusting device 3, receive buffer unit 4, be used to write down the departure time tape deck 5 that comprises PCR field TS bag and leave multiplexer system clock clocking value constantly, send buffer unit 6, utilize the clocking value of departure time tape deck 5 records that PCR is carried out second adjusting device 7 of adjustment for the second time, extraction element 1, get into constantly tape deck 2, first adjusting device 3, receive buffer unit 4, departure time tape deck 5, send buffer unit 6 and second adjusting device 7 interconnects successively.
Utilize the utility model that the step of mpeg 2 transport stream PCR software method of correcting is comprised:
S1. system start-up initialization, record current time value is as t0 fiducial time of 27M system.Step 1 comprises step by step following:
S11. if system is a monokaryon CPU platform, then utilize the RDSTC instruction to read the count value of the STC register of CPU, the formula below adopting then converts the count value of 27M clock into.
cnt_27M_clk=(cnt_CPU_clk×27000000/CPU_freq)%2 42
Cnt_27M_clk representes to change the count value of back 27M clock in the formula; Cnt_CPU_clk has been the periodicity of CPU since powering on that the RDSTC instruction is read; CPU_freq is the dominant frequency of system CPU, under linux system, can from/proc/cpuinfo, obtain through system call.
S12. if system is the multi-core CPU platform, under the linux system, adopt clock_gettime () function to obtain the accurate timing T0 of nanosecond with CLOCK_MONOTONIC as parameter, the formula below adopting then converts the corresponding count value of 27M clock into.
cnt_27M_clk=(T0×27/1000)%2 42
Cnt_27M_clk representes to change the count value of back 27M clock in the formula; The nanosecond clocking value that T0 utilizes system call to obtain, unit are ns.
When S2. multiplexer receives the TS packet, judge whether this packet comprises the PCR field,, then note the count value t1 of current 27M system clock, and extract the value PCR_old of the PCR field of 42bit if comprise the PCR field; If no PCR field just jumps to S5.
S3. PCR_old is carried out the PCR adjustment first time: PCR_new=PCR_old-(t1-t0), PCR_new is the represented PCR value of PCR field of 42bit after the adjustment in the formula, t1-t0 represent the TS packet with t0 moment of entering multiplexer during for fiducial time;
S4. adjusted PCR_new value is write in the PCR field of this packet.
S5. this packet is put into and received buffering area.
S5. receiving TS data in the buffering area thread that is re-used takes out and carries out multiplexing process and put into and send buffering area.
When S6. multiplexer sends from sending buffering area taking-up data; Judge at first whether this TS packet comprises the PCR field; If comprise the PCR field, then note the count value t2 of current 27M system clock, and extract the represented PCR value PCR_old of 42bit of PCR field; If do not comprise the PCR field, then jump to S9.
S7. PCR_old is carried out the PCR adjustment second time: PCR_new=PCR_old+ (t2-t0)-T Const, PCR_new is the represented PCR value of 42bitPCR field after the adjustment in the formula, t2-t0 representes that the TS packet is the moment of leaving multiplexer fiducial time with t0, T ConstBe a constant, be used for representing the average delay of TS packet in multiplexer.Get the time delay of first packet that comprises the PCR field in multiplexer generally speaking as T Const
S8. the value with adjusted PCR_new writes in the PCR field of this packet.
S9. this packet is sent;

Claims (3)

1. device that mpeg 2 transport stream PCR software is proofreaied and correct; It is characterized in that: it includes the extraction element that is used to extract 27MHz clock count value, be used to write down comprise entering that PCR field TS bag gets into multiplexer system clock clocking value constantly constantly tape deck, utilize the clocking value that gets into recording device records constantly to data carry out adjustment for the first time first adjusting device, be used to write down the departure time tape deck that comprises PCR field TS bag and leave multiplexer system clock clocking value constantly, the clocking value that utilizes the departure time recording device records carries out second adjusting device of adjustment for the second time to PCR, extraction element, gets into constantly that tape deck, first adjusting device, departure time tape deck and second adjusting device interconnect successively.
2. a kind of device that mpeg 2 transport stream PCR software is proofreaied and correct according to claim 1 is characterized in that: be connected with the reception buffer unit between said first adjusting device and the departure time tape deck.
3. a kind of device that mpeg 2 transport stream PCR software is proofreaied and correct according to claim 1 is characterized in that: be connected with the transmission buffer unit between the said departure time tape deck and second adjusting device.
CN2011201933953U 2011-06-07 2011-06-07 Device for correcting moving picture experts group (MPEG)-2 transmission flow program clock reference (PCR) software Expired - Fee Related CN202121720U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011201933953U CN202121720U (en) 2011-06-07 2011-06-07 Device for correcting moving picture experts group (MPEG)-2 transmission flow program clock reference (PCR) software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011201933953U CN202121720U (en) 2011-06-07 2011-06-07 Device for correcting moving picture experts group (MPEG)-2 transmission flow program clock reference (PCR) software

Publications (1)

Publication Number Publication Date
CN202121720U true CN202121720U (en) 2012-01-18

Family

ID=45462756

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011201933953U Expired - Fee Related CN202121720U (en) 2011-06-07 2011-06-07 Device for correcting moving picture experts group (MPEG)-2 transmission flow program clock reference (PCR) software

Country Status (1)

Country Link
CN (1) CN202121720U (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103391453A (en) * 2013-07-16 2013-11-13 四川省迪特尔电子有限公司 PCR (Program Clock Reference) correction processing system and method of network set-top box

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103391453A (en) * 2013-07-16 2013-11-13 四川省迪特尔电子有限公司 PCR (Program Clock Reference) correction processing system and method of network set-top box

Similar Documents

Publication Publication Date Title
US20190082400A1 (en) Methods and apparatus for synchronization of media playback within a wireless network
KR101704619B1 (en) Determining available media data for network streaming
CN102057687B (en) Synchronization of media stream components
CN102098571B (en) Method and system for dynamically pushing data
CN103309397B (en) Based on the synchronous sampling method of the data acquisition equipment of USB
CN101202613B (en) Terminal for clock synchronization
CN101484939A (en) Clock drift compensation techniques for audio decoding
US8842793B2 (en) Communication circuit and method of adjusting sampling clock signal
US9250646B2 (en) Clock recovery using remote arrival timestamps
KR101598563B1 (en) Time labelling associated with an equipment synchronisation sysyem connected to a network
CN100473171C (en) Clock synchronizing method in broadcast network
CN202121720U (en) Device for correcting moving picture experts group (MPEG)-2 transmission flow program clock reference (PCR) software
CN114257700B (en) PCR correction method and system based on synchronization in time stamp mode platform
CN113382300B (en) Audio and video playing method and device
JPWO2015115171A1 (en) Transmitting apparatus, transmitting method, receiving apparatus, and receiving method
CN101505215B (en) Method and apparatus for time clock synchronization
CN100544448C (en) A kind of clock system of mobile multimedia network
CN100548053C (en) A kind of system clock recovery device
CN103975600A (en) Method and device for signaling a transmission time and/or a system clock pulse
CN105187688A (en) Method and system for carrying out synchronization on real-time video and audio collected by mobile phone
Le Provost et al. A readout system-on-chip for a cubic kilometer submarine neutrino telescope
US20120025884A1 (en) Method and Apparatus for Conveying and Reproducing Multiple Independent Timebases Using a Shared Reference Clock, Clock Snapshots and a Packet Network
TW201433152A (en) Mechanism for dynamic timestamp-less clock generation for transmitting media streams over shared channels
CN103873881B (en) A kind of radio and television broadcast standby system
CN101540756A (en) Method, system and device for random play and data transmission based on progressive streaming transport

Legal Events

Date Code Title Description
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120118

Termination date: 20150607

EXPY Termination of patent right or utility model