Background technology
CMMB is the abbreviation of English China Mobile Multimedia Broadcasting (China Mobile multimedia broadcasting).It is the system of first cover of domestic independent research towards mobile phone, PDA, MP3, MP4, digital camera, the multiple portable terminal of notebook computer, utilize the S-band satellite-signal to realize that " world " one covers, whole nation roaming, support 25 cover TV programme and 30 cover broadcast programs, on October 24th, 2006, SARFT(The State Administration of Radio and Television) has formally issued China Mobile multimedia broadcasting (being commonly called as mobile TV) industry standard, determines to adopt the Mobile Multimedia Broadcasting industry standard of China's independent research.
China Mobile multimedia broadcasting system (being called for short CMMB) industry standard, stipulated in the broadcasting service frequency range, frame structure, chnnel coding and the modulation of mobile multimedia broadcast system broadcast channel transmission signals, this standard is applicable to that 30MHz is to the interior broadcasting service frequency of 3000MHz frequency range, via satellite and/or the broadcast system of multi-media signals such as terrestrial wireless emission TV, broadcasting, data message, can realize whole nation roaming, transmission technology adopts the STiMi technology.
The terminal equipment of existing C MMB system can not be guaranteed the synchronous playing of Voice ﹠ Video, and can not carry out functions such as playback, F.F. and rewind down to content of multimedia.
The utility model content
Technical problem to be solved in the utility model provides the terminal equipment of a kind of CMMB system, with the synchronous playing of the Voice ﹠ Video of the terminal equipment of guaranteeing the CMMB system.
The further technical problem to be solved of the utility model provides the terminal equipment of a kind of CMMB system, and the content of multimedia that receives with the terminal equipment to the CMMB system carries out playback, F.F. and rewind down etc.
For solving the problems of the technologies described above, the utility model provides the terminal equipment of a kind of CMMB system, comprising: CPU, CMMB signal receiver, the video stack memory that links to each other with audio data stream output end with the video data stream output of CMMB signal receiver respectively and audio frequency stacked memory, the Video Decoder that links to each other with the output of video stack memory and audio frequency stacked memory respectively and audio decoder, the LCD and power amplifier and the loudspeaker that link to each other with the output of Video Decoder and audio decoder respectively; CPU links to each other with the control input end of Video Decoder and audio decoder; CPU links to each other with the control input end of CMMB signal receiver.
In the technique scheme, also comprise the RAM that links to each other with described CPU, RAM links to each other with audio data stream output end with the video data stream output of CMMB signal receiver.
The utlity model has positive effect: when the terminal equipment of (1) CMMB of the present utility model system is worked, CPU adds synchronized timestamp respectively by the CMMB receiver in described video data stream and audio data stream, then described video data stream and audio data stream are sent into video stack memory and audio frequency stacked memory respectively; Video stack memory and audio frequency stacked memory are sent described video data stream and audio data stream into Video Decoder and audio decoder respectively by the mode of first in first out, simultaneously carry out synchronous decoding according to described synchronized timestamp control of video decoder and audio decoder by CPU, export the video and the audio frequency of synchronised respectively by LCD and power amplifier and loudspeaker at last, thereby guaranteed the synchronous playing of Voice ﹠ Video of the terminal equipment of CMMB system.(2) during the work of the terminal equipment of CMMB of the present utility model system, CPU generates an audio/video file with video data stream and the audio data stream that is received, and is stored among the RAM; When receive during playback command, CPU control CMMB receiver quits work, so that the CMMB receiver stops to send into data flow to video stack memory and audio frequency stacked memory; Then, from RAM, open corresponding audio/video file according to described playback command, read its data and decomposite audio data stream and video data stream, and it is sent into video stack memory and audio frequency stacked memory respectively, and stacked memory is sent described video data stream and audio data stream into Video Decoder and audio decoder respectively by the mode of first in first out by this; Simultaneously carry out synchronous decoding according to described synchronized timestamp control of video decoder and audio decoder, export the video and the audio frequency of synchronised respectively by LCD and power amplifier and loudspeaker at last, thereby realized playback function by CPU.(3) in the utility model, when described CPU receive when F.F. or reverse commands, CPU searches the current I frame in a plurality of frame of video of current broadcast, and obtain its locating information, after finding this locating information, directly read chronologically current I frame rear or the place ahead or second or the 4th or the 8th I frame video data of frame that promptly jumps, thus realize or the F.F. or the rewind down function of 2 times of speed or 4 times of speed or 8 times of speed; Simultaneously, CPU obtains and the corresponding audio frame of described jump frame according to described synchronized timestamp, control of video decoder and audio decoder carry out synchronous decoding, export the video and the audio frequency of synchronised respectively by LCD and power amplifier and loudspeaker at last, thereby finish F.F. or rewind down function.。
Embodiment
(embodiment 1)
See Fig. 1, the terminal equipment of the CMMB system of present embodiment comprises: CPU8, CMMB signal receiver 1, the video stack memory 2 that links to each other with audio data stream output end with the video data stream output of CMMB signal receiver 1 respectively and audio frequency stacked memory 3, the Video Decoder 4 that links to each other with the output of video stack memory 2 and audio frequency stacked memory 3 respectively and audio decoder 5, the LCD6 and power amplifier and the loudspeaker 7 that link to each other with the output of Video Decoder 4 and audio decoder 5 respectively; CPU8 links to each other with the control input end of Video Decoder 4 with audio decoder 5; CPU8 links to each other with the control input end of CMMB signal receiver 1.
The method of work of the terminal equipment of described CMMB system comprises the steps:
A, 1 pair of CMMB receiver receive the CMMB signal carry out demodulation, and draw video data stream and audio data stream;
B, CPU8 add synchronized timestamp respectively by CMMB receiver 1 in described video data stream and audio data stream, then described video data stream and audio data stream are sent into video stack memory 2 and audio frequency stacked memory 3 respectively;
C, video stack memory 2 and audio frequency stacked memory 3 are sent described video data stream and audio data stream into Video Decoder 4 and audio decoder 5 respectively by the mode of first in first out, simultaneously carry out synchronous decoding according to described synchronized timestamp control of video decoder 4 and audio decoder 5, export the video and the audio frequency of synchronised at last by LCD6 and power amplifier and loudspeaker 7 respectively by CPU8.
(embodiment 2)
On the basis of the foregoing description, the terminal equipment of the CMMB system of present embodiment also comprises the RAM9 that links to each other with CPU8, and RAM9 links to each other with audio data stream output end with the video data stream output of CMMB signal receiver 1.LCD6 is that liquid crystal display screen is a touch-screen, also is connected with supervisory keyboard on the CPU8.
The method of work of the terminal equipment of the CMMB system of present embodiment comprises the steps:
A, 1 pair of CMMB receiver receive the CMMB signal carry out demodulation, and draw video data stream and audio data stream;
B, CPU8 add synchronized timestamp and locating information by CMMB receiver 1 in described video data stream and audio data stream, then described video data stream and audio data stream are sent into video stack memory 2 and audio frequency stacked memory 3 respectively;
C, video stack memory 2 and audio frequency stacked memory 3 are sent described video data stream and audio data stream into Video Decoder 4 and audio decoder 5 respectively by the mode of first in first out; CPU8 carries out synchronous decoding according to described synchronized timestamp control of video decoder 4 and audio decoder 5, exports the video and the audio frequency of synchronised at last respectively by LCD6 and power amplifier and loudspeaker 7; Simultaneously, CPU8 also receives external control order (this external control order is from described LCD6 or supervisory keyboard) in real time, when this external control order was memory command, CPU8 control RAM9 received described video data stream and the audio data stream from the video data stream output of CMMB signal receiver 1 and audio data stream output end; When receiving that stopping storage making, CPU8 generates an audio/video file with described video data stream that receives and audio data stream, and is stored among the RAM9; When CPU8 receive during playback command, CPU8 control CMMB receiver 1 quits work, and from RAM9, open corresponding audio/video file according to described playback command, read its data and decomposite audio data stream and video data stream, then video data stream and audio data stream are sent into video stack memory 2 and audio frequency stacked memory 3 respectively, and by the mode of first in first out described video data stream and audio data stream are sent into Video Decoder 4 and audio decoder 5 respectively by video stack memory 2 and audio frequency stacked memory 3; Simultaneously carry out synchronous decoding according to described synchronized timestamp control of video decoder 4 and audio decoder 5, export the video and the audio frequency of synchronised at last by LCD6 and power amplifier and loudspeaker 7 respectively by CPU8.
Described audio data stream is an audio frame, and video data stream is a frame of video; Be organized in 1994 according to MPEG and release the MPEG-2 compression standard, frame of video comprises: I frame, P frame and B frame; Wherein, the I frame is basic reference frame, and has a plurality of P frames and B frame (the concrete number of P frame and B frame is indefinite, is determined by concrete video information content) between two I frames; The relative position relation of each the I frame in the video data stream and the relative position relation of each audio frame in the described audio data stream are determined by described locating information.
In described step c, when described CPU8 receive when F.F. or reverse commands, CPU8 searches the current I frame in a plurality of frame of video of current broadcast, and obtain its locating information, after finding this locating information, directly read chronologically current I frame rear or the place ahead or second or the 4th or the 8th I frame video data of frame that promptly jumps, thus realize or the F.F. or the rewind down function of 2 times of speed or 4 times of speed or 8 times of speed; Simultaneously, CPU8 obtains and the corresponding audio frame of described jump frame according to described synchronized timestamp, control of video decoder 4 and audio decoder 5 carry out synchronous decoding, export the video and the audio frequency of synchronised respectively by LCD6 and power amplifier and loudspeaker 7 at last, thereby finish F.F. or rewind down function.
See Fig. 2, the method for described Video Decoder 4 real-time videos decoding comprises: initialization video decode parameter, and the storage allocation buffering area, the core buffer that initialization distributes, and be set to the job buffer of Video Decoder, start the video decode thread.The display position of initialization video on LCD at first in video decode thread the inside enters the decode procedure step then: judge 1, whether the buffering area the inside has the data flow of not decoding, if not then wait for the arrival of video data stream; 2, the video data stream that not decoding is set is in the original position of screen buffer the inside and decode video data stream size; 3, never take out Frame in the video data stream of decoding, begin Frame is decoded; 4, return the data stream size of decoded result and current decoding consumption after decoding is finished; 5, take out the synchronized timestamp of the frame of video that the front decoding finishes, preserve temporarily; 6, then upgrade screen buffer, the decoded video of mark and the not video of decoding again; 7, judge whether current video buffering area remaining space is full, if it is full, then decoded video stream data flow is shifted out from the formation the inside, with also not the video data stream of decoding push away forward, the new video data stream that arrives joins not decoded data stream back; 8, whether the audio video synchronization timestamp corresponding audio that detects decoding just decodes, if not decoding then, wait for the corresponding audio decoding, if decode, then the YUV signal that decoding is come out converts rgb signal to and send LCD to show; 9, jump to described step 1.
See Fig. 3, described audio decoder 5 real-time audios decoding: initialization audio decoder parameter, the storage allocation buffering area, the internal memory that distributes is carried out initialization, and be set to the job buffer of audio decoder, start audio decoder thread step: 1), detect the audio buffer the inside whether the not voice data of decoding is arranged, if not then wait for, if having then original position and the data length of waiting for decoded data is set; 2), from buffering area, take out audio data stream to be decoded, carry out audio decoder; 3) return the data stream size of decoded result and current decoding consumption after, decoding is finished; 4), take out the synchronized timestamp of the audio frequency that the front decoding finishes, preserve temporarily; 5), upgrade audio buffer, mark has been decoded and the audio data stream of decoding not again; 6), judge whether current audio buffer is full, if full, then the data flow of having decoded shifted out, and that does not decode pushes away to the front, and the new data that arrive join the back; 7), the good data of decoding are delivered to loudspeaker and play out sound; 8), jump to described step 1).
During the terminal equipment of the concrete CMMB system that uses the foregoing description, can adopt this terminal equipment to form all-in-one among mobile phone, game machine, GPS navigation instrument, MP4, Digital Video, the portable DVD etc., wherein said CPU8 is the main control chip of mobile phone, game machine, GPS navigation instrument, MP4, Digital Video, portable DVD etc.