CN106101752A - A kind of time shift time obtaining method and Set Top Box - Google Patents

A kind of time shift time obtaining method and Set Top Box Download PDF

Info

Publication number
CN106101752A
CN106101752A CN201610538439.9A CN201610538439A CN106101752A CN 106101752 A CN106101752 A CN 106101752A CN 201610538439 A CN201610538439 A CN 201610538439A CN 106101752 A CN106101752 A CN 106101752A
Authority
CN
China
Prior art keywords
time
bag
video data
pcr value
current
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
CN201610538439.9A
Other languages
Chinese (zh)
Other versions
CN106101752B (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.)
Hisense Broadband Multimedia Technology Co Ltd
Original Assignee
Hisense Broadband Multimedia 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 Hisense Broadband Multimedia Technology Co Ltd filed Critical Hisense Broadband Multimedia Technology Co Ltd
Priority to CN201610538439.9A priority Critical patent/CN106101752B/en
Publication of CN106101752A publication Critical patent/CN106101752A/en
Application granted granted Critical
Publication of CN106101752B publication Critical patent/CN106101752B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2387Stream processing in response to a playback request from an end-user, e.g. for trick-play
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23106Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion involving caching operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/242Synchronization processes, e.g. processing of PCR [Program Clock References]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4305Synchronising client clock from received content stream, e.g. locking decoder clock with encoder clock, extraction of the PCR packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47217End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for controlling playback functions for recorded or on-demand content, e.g. using progress bars, mode or play-point indicators or bookmarks

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The present invention is that wherein, method includes about a kind of time shift time obtaining method and Set Top Box: receive reference note video data stream and benchmark time shift temporal information that time-shifted service device sends according to time shifting broadcasting request;Receive the current audio and video data streams that described time-shifted service device issues after described reference note video data stream automatically;Determine the time difference of the PCR value extracted in PCR value that described current audio and video data streams extracts and reference note video data stream;According to described time difference and described benchmark time shift temporal information, determine current time shift temporal information.A kind of time shift time obtaining method disclosed by the invention, without frequently to time-shifted service device acquisition request current time shift temporal information, alleviate the load of time-shifted service device, thus improve the phenomenon that time-shifted service device return information postpones, strengthen the real-time of video window interface time refreshing.

Description

A kind of time shift time obtaining method and Set Top Box
Technical field
The present invention relates to time shift program technical field, particularly relate to a kind of time shift time obtaining method and Set Top Box.
Background technology
Along with TV tech is fast-developing, intelligent television progresses into the visual field of people, at present, the TV industry of intelligent television Business is divided into live television service and time shifted TV business, and live television service has synchronousness, misses certain time point Program just cannot review, and time shifted TV business is not limited by synchronousness, it is possible to achieve suspend, fast forward and fast reverse is grasped Make.Such as, user is watching live telecast, now presses Pause key and makes picture suspend, makes TV programme be cut by programme televised live Changing to time shift program, when user recovers to play again, TV programme can then continue to play in breakpoint last time.
In prior art, during viewing time shift program, typically require the lower section display program at video window interface Time shift temporal information, wherein, time shift temporal information includes time shift time range and current time shifting broadcasting time, wherein, time Shift time scope includes left margin time and right margin time.Such as, when suspending just after live live telecast, TV programme It is switched to time shift program by programme televised live, now, the video window interface of intelligent television will reveal whether time shift time range The left margin time and the right margin time, wherein, the right margin time refers to the live time of current television program, video window simultaneously Mouth interface also will reveal whether the current time shifting broadcasting time.Under normal circumstances, Set Top Box sends RTSP (Real Time Streaming Protocol, real-time streaming transport) protocol instructions to time-shifted service device, thus obtain that time-shifted service device issues time Shift time scope and current time shifting broadcasting time also show the video window interface at intelligent television.Such as, when suspending live joint Mesh when again recovering, or, when falling back on certain time point soon during programme televised live, time-shifted service device is according to RTSP agreement Instructing and time shift temporal information sent to Set Top Box, time shift temporal information is sent to intelligent television by Set Top Box according to described instruction And show at video window interface, frame of video corresponding for time shift temporal information is sequentially displayed in video window interface simultaneously.For Accurate display time shift temporal information on video window interface, Set Top Box obtains time shift temporal information by RTSP protocol instructions Time, Set Top Box constantly by sending RTSP protocol instructions acquisition request time shift temporal information to time-shifted service device, thus can refresh The time shift time range shown on video window interface and current time shifting broadcasting time.
But, if Set Top Box travel frequently over RTSP protocol instructions to time-shifted service device request update time shift time range and The current time shifting broadcasting time, causing the load down of time-shifted service device, time-shifted service device load down causes again time shift to take simultaneously Business device information returns and postpones, thus the real-time that the video window interface time affecting intelligent television refreshes.Certainly, if time shift Server frequently receives the request of current time shifting broadcasting time that multiple Set Top Box sends, and can further result in the negative of time-shifted service device Load increases the weight of, and then affects the real-time of video window interface time refreshing.
Summary of the invention
For overcoming problem present in correlation technique, the invention provides a kind of time shift time obtaining method and Set Top Box, To solve in prior art when TV programme enter time shift program, when time-shifted service device travels frequently over the acquisition of RTSP protocol instructions Shift time information, the load down of server, meanwhile, when server load increases the weight of, cause again server info to return time delay, from And the problem affecting the real-time that the video window interface time refreshes.
First aspect according to embodiments of the present invention, it is provided that a kind of time shift time obtaining method, including:
Shift time when receiving reference note video data stream and the benchmark that time-shifted service device sends according to time shifting broadcasting request Information;
Receive the current audio, video data that described time-shifted service device issues after described reference note video data stream automatically Stream;
Determine the PCR extracted in PCR value that described current audio and video data streams extracts and reference note video data stream The time difference of value;
According to described time difference and described benchmark time shift temporal information, determine current time shift temporal information.
Second aspect according to embodiments of the present invention, it is provided that a kind of Set Top Box, including:
Processor;
For storing the memorizer of processor executable;
Wherein, described processor is configured to the method described in claim 1.
The technical scheme that embodiments of the invention provide can include following beneficial effect: the embodiment of the present invention provide time Shift time acquisition methods includes: receive reference note video data stream and base that time-shifted service device sends according to time shifting broadcasting request Punctual shift time information;Receive the current sound that described time-shifted service device issues after described reference note video data stream automatically to regard Frequency data stream;Determine the PCR extracted in PCR value that described current audio and video data streams extracts and reference note video data stream The time difference of value;According to described time difference and described benchmark time shift temporal information, determine current time shift temporal information.
Seen from the above description, time shift time obtaining method disclosed by the invention is worked as without frequently obtaining to time-shifted service device Front time shift temporal information, when entering time-shift playing state, sends time shifting broadcasting request to time-shifted service device, and time shifting broadcasting is asked Simultaneously include obtain audio and video data streams request and benchmark time shift temporal information ask, then receive reference note video data stream and Audio and video data streams afterwards, extracts PCR value and as benchmark PCR value, from current audio frequency and video from reference note video data stream Extracting PCR value in data stream, calculate the time difference between PCR value and the benchmark PCR value extracted, described time difference is Time difference between reference note video data stream and current audio and video data streams, due to benchmark time shift temporal information and reference note Video data stream is corresponding, so, the benchmark current time shifting broadcasting time in benchmark time shift temporal information adds described time difference Being the current time shifting broadcasting time, same, benchmark left margin time and benchmark right margin time can also be according to the described times Mathematic interpolation.
When without obtaining current time shift temporal information to time-shifted service device frequent requests, nature can alleviate time-shifted service device Load, thus reduce time-shifted service device return information postpone phenomenon, and then strengthen the video window interface time refresh reality Shi Xing.
It should be appreciated that it is only exemplary and explanatory, not that above general description and details hereinafter describe The present invention can be limited.
Accompanying drawing explanation
Accompanying drawing herein is merged in description and constitutes the part of this specification, it is shown that meet the enforcement of the present invention Example, and for explaining the principle of the present invention together with description.
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing In having technology to describe, the required accompanying drawing used is briefly described, it should be apparent that, for those of ordinary skill in the art Speech, on the premise of not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
The schematic flow sheet of a kind of time shift time obtaining method that Fig. 1 provides for the embodiment of the present invention;
A kind of application scenarios structural representation that Fig. 2 provides for the embodiment of the present invention;
The step S300 schematic flow sheet that Fig. 3 provides for the embodiment of the present invention;
The step S400 schematic flow sheet that Fig. 4 provides for the embodiment of the present invention;
The step S402 schematic flow sheet that Fig. 5 provides for the embodiment of the present invention;
The another kind of time shift time obtaining method schematic flow sheet that Fig. 6 provides for the embodiment of the present invention;
The step S500 schematic flow sheet that Fig. 7 provides for the embodiment of the present invention;
The step S502 schematic flow sheet that Fig. 8 provides for the embodiment of the present invention;
Another time shift time obtaining method schematic flow sheet that Fig. 9 provides for the embodiment of the present invention;
Another time shift time obtaining method schematic flow sheet that Figure 10 provides for the embodiment of the present invention;
A kind of Set Top Box block diagram that Figure 11 provides for the embodiment of the present invention;
In figure, symbol represents:
1-time-shifted service device, 2-intelligent television, 3-video window interface, 4-Set Top Box, 401-processor, 402-stores Device, 403-power supply module, 404-multimedia groupware, 405-input/output interface, 406-communications component.
Detailed description of the invention
Here will illustrate exemplary embodiment in detail, its example represents in the accompanying drawings.Explained below relates to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the present invention.On the contrary, they are only with the most appended The example of the apparatus and method that some aspects that described in detail in claims, the present invention are consistent.
The audio and video data streams being sent to set top box side by time-shifted service device end is after encoded device carries out compression coding Data stream, be sent to the audio and video data streams of set top box side after decoder is decoded, extract audio and video data streams In audio/video frames, and play out successively.Having a system clock in audio/video coder, system clock is a 27MHz Clock, the sampling of signal, process all based on this clock, this clock is used for producing the correct display of instruction audio frequency and video Timestamp with decoding.Wherein, PCR is by the counter status sampling triggering system clock pulse, is placed on TS bag Transmitting in adaptation field of head.PCR accounts for 6Bytes altogether, and wherein 6bits reserves, 42bits significance bit.The PCR of 42bits is divided into two The PCR_Ext of PCR_Base and 9bits of part: 33bits.PCR_Base be by 27MHz pulse through 300 frequency dividing after 90kHz Pulse-triggered enumerator, then be sampled counter status obtaining.PCR_Ext is by the direct flip-flop number of 27MHz pulse Device, then be sampled counter status obtaining.
Owing to PCR value is the sampling to the counter status that system clock pulse triggers, so PCR value represents its place TS The encoder-side system time that audio, video data in bag is corresponding, so, in time shift program, when can be calculated by PCR value Move the relative time that program is play, thus realize the renewal of time shift temporal information in time shift program.Specific as follows:
Fig. 1 is the flow chart according to a kind of time shift time obtaining method shown in an exemplary embodiment.
Fig. 2 is the application scenarios schematic diagram of this method.
Step S100, receives reference note video data stream and benchmark that time-shifted service device sends according to time shifting broadcasting request Time shift temporal information.
Understand in conjunction with Fig. 2, when intelligent television 2 receives the time shifting broadcasting request from remote control under live state, intelligence Time shifting broadcasting request can be sent to Set Top Box 4 by TV 2, Set Top Box 4 time shifting broadcasting request is sent to time-shifted service device 1, The request of described time shifting broadcasting includes suspending or fast rewinding request.Such as, when intelligent television 2 is just in certain TV programme live, now by Can press Pause key in being busy with other things, the program that intelligent television 2 is play is switched to time shift program by programme televised live, waits to finish Play button can be pressed after thing play from local continuation the just now suspended;Or, for live joint during viewing is live Mesh is thought again to watch, and now, can realize reviewing by falling back on certain time point soon.During viewing time shift program, need The video window interface 3 of intelligent television 2 shows that time shift temporal information, time shift temporal information include current time shifting broadcasting time, a left side Boundary time and right margin time.
Being seamless switching between programme televised live and time shift program, the broadcasting of beholder imperceptible rear player is cut Change, such as, when pressing Pause key during watching programme televised live, now picture suspends, when recovering to play after a while Time, the local continuation that TV programme can then be suspended is play.It is understood that programme televised live is real-time, also cannot suspend, So programme televised live to be realized and the seamless switching of time shift program, it is necessary to record broadcasting of a period of time at time-shifted service device end Putting program to be cached at server end, when being switched to time shift program by programme televised live, Set Top Box directly obtains from time shift address Take audio, video data, and send to intelligent television.
The data of time-shifted service device end caching, with buffer time as unit of account, generally cache the sound of hour Video stream data, the data of caching are the audio, video datas of previous hour of current live time, so, server end caching Audio, video data is dynamically change, and changes along with the change of live time.
When benchmark time shift temporal information includes benchmark current time shifting broadcasting time, benchmark left margin time and benchmark right margin Between.The benchmark current time shifting broadcasting time refers to the time point play in current time shift program, benchmark left margin time and base The quasi-right margin time is the time shift time range in video window interface display.Generally, the benchmark left margin time is to work as The previous hour corresponding time point of front live time, the benchmark right margin time is the current live time, if current time shift When reproduction time and right margin time consistency, actual program is switched to programme televised live by time shift program.
When time shift server receives time shifting broadcasting request, time-shifted service device sends reference note according to time shifting broadcasting request Video flowing and benchmark time shift temporal information, so, time shifting broadcasting request includes obtaining audio and video data streams and obtaining base simultaneously The request instruction of punctual shift time information, obtains audio and video data streams request equal with acquisition benchmark time shift temporal information request instruction Sent by RTSP agreement.Wherein, benchmark time shift temporal information is corresponding with reference note video flowing, and includes that the current time shift of benchmark is broadcast Put time, benchmark left margin time and benchmark right margin time.When time shift server receives time shifting broadcasting request, time shift takes Business device sends audio and video data streams by breakpoint or rewind point to Set Top Box, wherein, in audio and video data streams first The individual audio and video data streams with PCR value is reference note video data stream, and benchmark time shift temporal information is and reference note video counts According to the time shift temporal information that stream is corresponding.
Step S200, receives the current audio, video data that time-shifted service device issues after reference note video data stream automatically Stream.
When time-shifted service device receives time shifting broadcasting request, time-shifted service device can send ensuing sound from trend Set Top Box Video data stream, meanwhile, Set Top Box also can constantly receive the audio and video data streams that time-shifted service device sends.It is to say, work as When time-shifted service device receives time shifting broadcasting request, the audio and video data streams play of caching is sent to machine by time-shifted service device In top box, during sending, first being gone out by reference note video stream, the sound after retransmiting reference note video flowing subsequently regards Frequency stream, and Set Top Box also can receive and parse through audio frequency and video number according to the order of the audio and video data streams that time-shifted service device sends successively According to stream.
After receiving current audio and video data streams, extract PCR value from the current audio and video data streams, and according to extracting PCR value carries out the calculating of time difference.Step S300, determines that the PCR value that current audio and video data streams extracts regards with reference note The time difference of the PCR value extracted in frequency data stream.
When receiving reference note video data stream, from reference note video data stream, extract PCR value.I.e. regard from reference note Frequency data stream obtains TCP bag, and from TCP bag, extracts TS bag successively, it is judged that whether current TS bag includes PCR value, when When including PCR value, extraction PCR value is as benchmark PCR value, if not including PCR value in current TS bag, obtains next TS Bag continues to determine whether to include PCR value, until extracting benchmark PCR value.
According to the PCR extracted in the PCR value extracted from current audio and video data streams and reference note video data stream Value calculates time difference, owing to PCR value is the sampling of the timing to 27MHz system clock, therefore, from current audio and video data streams The PCR value extracted current audio and video data streams the most corresponding with the time difference of benchmark PCR value and reference note video data stream Time difference, so, by calculating the time difference of PCR value and the benchmark PCR value extracted from current audio and video data streams Just can the real-time update current time shifting broadcasting time.
The method calculating time difference with benchmark PCR value according to the PCR value extracted from current audio and video data streams, ginseng See Fig. 3, a kind of step S300 schematic flow sheet provided for the embodiment of the present invention.
Step S301, is converted into time value by PCR value and benchmark PCR value respectively.
From the foregoing, it can be understood that PCR is by the counter status sampling triggering system clock pulse, it is placed on TS packet header In adaptation field transmit.PCR accounts for 6Bytes altogether, and wherein 6bits reserves, 42bits significance bit.The PCR of 42bits is divided into two Point: the PCR_Ext of PCR_Base and 9bits of 33bits.PCR_Base be by 27MHz pulse through 300 frequency dividing after 90kHz arteries and veins Rush flip-flop number, then be sampled counter status obtaining.PCR_Ext is by the direct flip-flop number of 27MHz pulse, It is sampled counter status again obtaining.Formula is as follows:
PCR_Time=PCR_Base × 300+PCR_Ext;
P C R _ B a s e = ( s y e t e m _ c l o c k _ f r e q u e n c e ) × T 300 ;
PCR_Ext=(system_clock_frequence) × T;
The effect of PCR_Base is when switching program, it is provided that the initial value to decoder PCR enumerator, it is ensured that Set Top Box End audio-visual synchronization, the effect of PCR_Ext is the system clock of the phase-locked loop circuit revised decoding device by decoder end.This In the method that bright embodiment provides, calculate the current PCR value and the benchmark PCR value that extract from current audio and video data streams time Between difference time, extract the PCR_Base in PCR value field.
Such as: System Clock time 07:12:45.56 is by the 27MHz pulse calculating of field value after 300 frequency dividings.
Time 07:12:45.56 is converted into the calculating of second:
(7 × 60+12) × 60+45.56=3285.56;
3285.56 × 27000000 300 = 295700400 ;
As shown from the above formula, by PCR value divided by 90000, PCR value can be converted into time value, described time value Unit is the second.
According to above-mentioned computing formula, the PCR value extracted from current audio and video data streams and benchmark PCR value are removed respectively It is converted into corresponding time value after 90000.
Step S302, makees difference by the time value that time value corresponding for PCR value is corresponding with benchmark PCR value, obtains time difference Value.
By the current PCR value that extracts in current audio and video data streams divided by the time value after 90000, deduct benchmark PCR value Divided by the time value after 90000, obtain time difference, described time difference be extract from current audio and video data streams work as The time difference of the TS bag TS bag corresponding with benchmark PCR value that front PCR value is corresponding.
Such as, the PCR_Base=295700400 of benchmark PCR value, then the time value that benchmark PCR value is corresponding is 3285.56s;
The PCR_Base=296410500 of the PCR value extracted from current audio and video data streams, by PCR_Base divided by After 90000, the time value obtaining the PCR value that extracts corresponding is 3293.45s.
Time value corresponding for the PCR value extracted in current audio and video data streams is deducted the time that benchmark PCR value is corresponding Value, it may be assumed that 3293.45-3285.56=7.89s, so the TS bag that the PCR value that extracts from current audio and video data streams is corresponding The time difference of TS bag corresponding with benchmark PCR value is 7.89s.
If it is corresponding that the time value that the current PCR value extracted in current audio and video data streams is corresponding deducts benchmark PCR value Time value for, time negative, illustrating that current time shift program is in fast reverse play state.
After obtaining time difference, in step S400, according to time difference and benchmark time shift temporal information, determine current Time shift temporal information.
After calculating the time difference between the PCR value extracted in benchmark PCR value and current audio and video data streams, by base The punctual reproduction time that moves is the current time shifting broadcasting time plus described time difference, because of on the basis of PCR value broadcast with benchmark time shift The time that puts is corresponding, so the current time shifting broadcasting time calculated according to time difference extracts in current audio and video data streams PCR value corresponding.
Same, the benchmark left margin time obtains the current left margin time plus time difference, and the benchmark right margin time adds Upper described time difference obtains the current right margin time.Principle is identical with the calculating of current time shifting broadcasting time, the most superfluous at this State.
Detailed description of the invention, sees Fig. 4, the step S400 schematic flow sheet provided for the embodiment of the present invention.
Step S401, when adding benchmark time shifting broadcasting time, benchmark left margin time and benchmark right margin time respectively Between difference, obtain current time shifting broadcasting time to be determined, left margin time to be determined and right margin time to be determined.
By benchmark time shifting broadcasting time, benchmark left margin time and benchmark right margin time plus time difference, in theory Current time shifting broadcasting time, left margin time and right margin time can be obtained, but, if time shift program is in F.F. or fast When moving back state, the time difference of fast forward and fast reverse, more than the time schedule under current live state, therefore can cause current time shift Reproduction time, current left margin time and current live time to be considered when updating current right margin time.So, first will Benchmark time shifting broadcasting time, benchmark left margin time and benchmark right margin time are defined as treating plus the value after described time difference Determine current time shifting broadcasting time, left margin time to be determined and right margin time to be determined.
Step S402, during according to current time shifting broadcasting time to be determined, left margin time to be determined and right margin to be determined Between, determine current time shift temporal information, wherein, current time shift temporal information includes current time shifting broadcasting time, current left margin Time and current right margin time.
After determining current time shifting broadcasting time to be determined, left margin time to be determined and right margin time to be determined, logical Cross following step and determine current time shifting broadcasting time, current left margin time and current right margin time, see Fig. 5, for this The step S402 schematic flow sheet that bright embodiment provides, specific as follows:
Step S4021, receives the present system time to set-top-box system acquisition request.
Set Top Box is after each plug-in, automatically real by NTP (Newwork Time Protocol, NTP) Clock time in existing Set Top Box is synchronization with the local network time, and the local network time is system time.When Set Top Box After time and system time synchronization, directly can obtain present system time to the clock request of Set Top Box, due to currently The live time is present system time, it is therefore not necessary to the time-shifted service device acquisition request current live time.
Step S4022, it is judged that whether the right margin time to be determined is equal to or more than present system time.
Due under time-shift playing state, when speed F.F., the time difference of current time shifting broadcasting time each F.F. is relatively Greatly, therefore, the current right margin time carries out F.F. as well as time difference described in the time, and the speed ratio current live of F.F. Time speed is big, if the current right margin time is fast-forward to overlap with the current live time, the current right margin time is the most not Can be updated further according to the right margin time to be determined.
Step S4023, when the right margin time to be determined equals to or more than the current system live time, determines current the right Boundary's time is the current system live time.
When the right margin time to be determined equals to or more than the current live time, according to the described right margin time to be determined more During current right margin time of new video window interface, the current right margin time alreadys more than the audio frequency and video of time-shifted service device caching The right margin time of data, so, when the right margin time to be determined equals to or more than the current live time, when determining right margin Between be the current live time.
Step S4024, it is judged that whether the current time shifting broadcasting time to be determined is equal to or more than present system time.
Boundary's time is equal under current live time state on the right, when speed F.F., the current time shifting broadcasting time along with Speed F.F. can exceed the right margin time, accordingly, it would be desirable to judge that whether the current time shifting broadcasting time to be determined is equal to or more than the right side Boundary time.
Step S4025, when the current time shifting broadcasting time to be determined equals to or more than present system time, when determining current Shifting reproduction time is present system time.
If the time shifting broadcasting time to be determined equal to or more than the current right margin time, illustrate if actual program by Time-shift playing state is switched to live state, is now defined as the current live time i.e. the current time shifting broadcasting time to be determined Can.
Step S4026, it is judged that whether the left margin time to be determined caches audio, video data less than or equal to time-shifted service device The left margin time.
The length of the audio, video data time of time-shifted service device end caching determines according to the internal memory of time-shifted service device, typically In the case of audio, video data when caching the least.In the method that the present embodiment provides, during the time shift of video window interface display Between scope be one hour, but time-shifted service device caching more than one hour of audio, video data time, such as, by time shift take In business device, the audio, video data set of time of caching is two hours, now, presets in the left margin time that video clip shows For previous hour of current live time.
The left margin time of time-shifted service device caching audio, video data is by the time of time-shifted service device caching audio, video data And present system time has relation, it is two hours when the audio, video data time of time shift server buffer, the most current system The system time is Beijing time 9::00, then, the left margin time of time-shifted service device caching audio, video data is present system time Draw back two hours, i.e. the left margin time of time shift server buffer audio, video data is Beijing time 7:00.
Under time-shift playing state, when speed rewind, the meeting speed rewind of left margin time, fall back on soon when the left margin time When time-shifted service device caches the left margin time of audio, video data, when the current left margin time cannot update than minimum left margin Between less.
Step S4027, when the left margin time to be determined is less than or equal to the left side of time-shifted service device caching audio, video data During boundary time, determine the left margin time that the current left margin time is time-shifted service device caching audio, video data.
When the left margin time to be determined caches the left margin time of audio, video data less than or equal to time-shifted service device, this Time the left margin time to be determined beyond the time range that the audio, video data of caching in time-shifted service device is corresponding, so, will treat Determine that the left margin time is defined as the left margin time of time-shifted service device caching audio, video data.
Such as, the left margin time of time-shifted service device caching audio, video data is Beijing time 7:00, when benchmark left margin When time is Beijing time 6:58:50 plus the time value after time deviation, illustrate that the current left margin time after updating cannot Update to Beijing time 6:58:50, so, the current left margin time of video window interface display can be updated to north by Set Top Box Capital time 7:00.
From the foregoing, under time-shift playing state, the audio, video data cached is sent to machine top by time-shifted service device In box, the time period of the audio, video data cached in time-shifted service device is generally one hour, it is also possible to be two or more Hour, the data cached time period is determined by the internal memory of time-shifted service device.When the data time section of time shift server buffer is two The when of individual hour, wherein, the right margin time of time-shifted service device relief area is the current live time, along with live carrying out, Time-shifted service device then can cache on the basis of the audio, video data of caching, is similar to buffer circle, so time-shifted service The left margin time of the audio, video data of device relief area and right margin time are also as live and change, but at video window On mouthful interface display time shift scope be one hour, therefore, in time shift program playing process, along with speed F.F. or fast Move back, need in real time by with left margin time of the audio, video data of caching in time-shifted service device and right margin time carry out right Ratio, determines current time shifting broadcasting time, current left margin time and current right margin time.
See Fig. 6, the another kind of time shift time obtaining method schematic flow sheet provided for the embodiment of the present invention.
As shown in FIG., before step S300, also include step S500, from current audio and video data streams, extract PCR Value.After receiving current audio and video data streams, from current audio and video data streams, extract PCR value, according to the PCR value extracted Time difference is calculated with the PCR value extracted in reference note video data stream.Certainly, constantly sending out along with audio and video data streams Send, from audio and video data streams, extract PCR value successively.
From current audio and video data streams, extract the idiographic flow of PCR value, see Fig. 7, provide for the embodiment of the present invention Step S500 schematic flow sheet, specific as follows:
Audio, video data is in the encoded post package of encoder-side in TS bag, and PCR value is to sample system clock After be inserted into the TS bag binary field from adaptation field.
TS bag be the packet header by 4 bytes and 184 bytes from adaptation field and count off according to constituting, PCR value be inserted in from In adaptation field, including PCR labelling and PCR value from adaptation field, wherein, PCR labelling identifies in TS bag whether comprise PCR Value, when PCR is labeled as 1, represents in TS bag and there is PCR value, when PCR is labeled as 0, represents in TS bag and there is not PCR value, this Time just need not from TS bag extract PCR value.PCR value is the Optional Field in TS bag, say, that be not in each TS bag All comprise PCR value.
PCR value is made up of the binary field of 42bits, wherein, PCR_Base be by 27MHz pulse through 300 divide after 90kHz pulse-triggered enumerator, then be sampled counter status obtaining.PCR_Ext is directly to be touched by 27MHz pulse Send out enumerator, then be sampled counter status obtaining.
Step S501, obtains the TCP bag in current audio and video data streams, and TCP bag comprises multiple TS bag.
Time shifting broadcasting request is sent in time-shifted service by RTSP agreement, and RTSP agreement is application layer protocol, so TS bag is that Transmission Control Protocol based on application layer is transmitted, so, TS wraps in and can be encapsulated as TCP bag when application layer is transmitted, one TCP bag includes multiple TS bag, and in the method that the present embodiment provides, a TCP bag includes 7 TS bags.The transmission frequency of TCP bag Rate and interval are controlled by time-shifted service device, to ensure the fluency of audio and video playing.Therefore, need first to obtain before extracting PCR value Take the TCP bag in audio and video data streams.
Step S502, extracts PCR value from all TS bags of TCP bag.
TCP bag in the method that the embodiment of the present invention provides includes 7 TS bags, when obtaining from audio and video data streams After TCP bag, from TCP bag, decode 7 TS bags, from 7 TS bags, then extract PCR value.When extracting PCR value, permissible Extract the PCR value in all TS bags, it is also possible to only extract the PCR value in one of them TS bag.In order to improve PCR value in TS bag Analyzing efficiency, a PCR value can be extracted in a TCP bag.Owing to PCR value is the sampling to system clock, institute With, general each regular hour just can be extracted a PCR value and be inserted in TS bag, certainly, between adjacent two PCR value time Between according to coding rule depending on.Therefore, all of TS bag may all there is PCR value in a TCP bag, it is also possible to a PCR value Do not have yet.
The method extracting PCR value from TCP bag, referring specifically to Fig. 8, the step S502 flow process provided for the embodiment of the present invention Schematic diagram.
Step S5021, obtains the TS bag in TCP bag successively.
After getting the TCP bag in current audio and video data streams, according in TCP bag TS bag ordering order or inverted order Obtain TS bag successively, and resolve TS bag successively.Such as, TS is extracted the most successively according to putting in order of TS bag in TCP bag Bag, when extracting first TS bag, resolves first TS bag.
Step S5022, it is judged that whether include PCR value in TS bag.
It has been noted that include PCR labelling in adaptation field at TS bag in above-mentioned literary composition, it is used for representing in TS bag whether wrap Containing PCR value.So, when this step judges whether include PCR value in TS bag, by resolving the PCR labelling in TS bag, sentence Disconnected PCR marks whether to be 1, when PCR is labeled as 1, includes PCR value in described TS bag, now, extracts in described TS bag PCR value.
Step S5023, when including PCR value in TS bag, determines and extracts PCR value from arbitrary TS bag of TCP bag.
In order to improve the analyzing efficiency of TS bag, improve the calculating speed of current time shift information, from TCP bag in this method simultaneously In extract a PCR value.Preferably, when resolving the TS bag in TCP bag, when extracting PCR value for the first time, the most true It is scheduled in arbitrary TS bag of TCP bag and extracts PCR value, and determine that the PCR value extracted is current PCR value.Extract for the first time PCR value be in resolving TS bag successively, for the first time PCR value of appearance in TS bag.
Step S5024, when not including PCR value in TS bag, it is judged that whether TS bag is last TS in TCP bag Bag.
If current TS bag does not include PCR value, it is judged that whether current TS bag is last TS in TCP bag Bag.During TS bag in obtaining TCP bag successively, often obtain a TS bag will judge whether be surrounded by PCR in the TS bag extracted Value, if there being PCR value, then the PCR value in follow-up TS bag is not involved in the calculating of time difference, if in the TS bag extracted not Include PCR value, then judge whether the TS bag extracted is last bag in TCP bag.
Step S5025, when TS bag is not for last the TS bag in TCP bag, the next TS bag of acquisition TS bag, and from The next TS bag of TS bag extracts PCR value, until extracting PCR value.
When the TS bag extracted is not last bag in TCP bag, then, suitable according to the arrangement of TS bag in TCP bag Sequence obtains next TS bag, and performs above-mentioned steps, judges whether to include PCR value, if comprised from the TS bag extracted There is PCR value, extract in PCR value, and the TS bag extracted after this TS bag without determining whether PCR value again.By above-mentioned Step obtains TS bag successively, until extracting PCR value.
Step S5026, when TS bag is for last the TS bag in TCP bag, determines from all TS bags of TCP bag the most not Extract PCR value.
If during the TS bag extracted during last TS bag of TCP bag, determining and all not carrying from all TS bags of TCP bag Get PCR value.It is to say, when 7 the TS bags resolved successively in TCP bag, all do not extract PCR value from 7 TS bags.
From the foregoing, the step that Fig. 8 provides is that circulation obtains TS bag and extracts the process of PCR value in TCP bag, carrying During taking PCR value, each TS bag may all there is PCR value, it is also possible to only have in second and the 5th TS bag and have PCR Value, but when this method calculates current time shift temporal information, from TCP bag, only extract a PCR value calculate, if its His TS bag also has PCR value, then the PCR value in other TS bags is not involved in the calculating of time difference.
The mode extracting PCR value provided in the embodiment of the present invention is that the PCR value extracted for the first time from TCP bag is carried out Calculate, but the manner is not intended as the restriction of scope, extracts the mode of PCR value from TCP bag, can be by The last value extracted from TCP bag carries out the modes such as calculating.
Step S503, when extracting PCR value from arbitrary TS bag of TCP bag, determines and carries from all TS bags of TCP bag Take out PCR value.
In step shown in Fig. 8, it is described in detail for extracting PCR value from TCP bag, in step S3023, has worked as institute State time TS bag includes PCR value, determine and extract PCR value from arbitrary TS bag of described TCP bag, when determining from TCP bag When arbitrary TS bag extracts PCR value, determine and extract PCR value from all TS bags of described TCP bag.
It is to say, when extracting PCR value from TCP bag, extract the TS bag in TCP bag successively and extract from TS bag PCR value, when extracting PCR value from any one TS bag, and determines and extracts PCR value from TCP bag, now, at TCP bag Middle subsequent extracted to PCR value be no longer participate in the calculating of time difference.
Step S504, when all not extracting PCR value from all TS bags of TCP bag, receives current audio and video data streams Next audio and video data streams, and from the next audio and video data streams of current audio and video data streams extract PCR value, until Extract PCR value.
In above-mentioned steps S5026, when last TS bag during TS bag is described TCP bag, determine the institute from TCP bag Have in TS bag and all do not extract PCR value.Extract the TS bag in TCP bag successively, and analyze whether by PCR value in TS bag, when TCP bag In when there is not PCR value in all of TS bag, determine to be from TCP bag and extract PCR value, then obtain next sound and regard TCP bag in frequency data stream, continues to extract successively TS bag, and extracts PCR value from TS bag.
From the above-mentioned description to Fig. 7 and Fig. 8, Fig. 7 and Fig. 8 specifically describes extraction PCR from audio and video data streams The process of value, the process extracting PCR value from audio and video data streams is as follows:
When receiving current audio and video data streams, from audio and video data streams, obtain TCP bag, owing to TCP bag comprising There is multiple TS bag, and PCR value is present in TS bag, so needing to extract PCR value, the side that the embodiment of the present invention provides from TS bag In method, TCP bag includes 7 TS bags.Obtain the TS bag in TCP bag successively, and by judging the PCR labelling in TS bag, sentence Whether disconnected TS bag includes PCR value, when PCR is labeled as 1, illustrates current TS bag includes PCR value, extract current TS PCR value in bag, and participate in the calculating of time shift difference, still need when the TS after current TS bag wraps in playing audio-video to continue Parsing audio, video data therein, simply the PCR value in the TS bag after current TS bag is no longer participate in the calculating of time shift difference.
If the PCR in current TS bag is labeled as 0, illustrate current TS bag does not include PCR value, then, obtain next Lower TS bag, and continue to resolve in next TS bag whether include PCR value, the rest may be inferred, until extracting the PCR participating in calculating Value.After often having analyzed a TCP bag, just obtain next audio and video data streams, and extract from next audio and video data streams PCR value.
Seen from the above description, when extracting the calculating that PCR value participates in time difference from TCP bag, only need to be from TCP bag Extract a PCR value, time like this without resolving TS bag every time, from TS bag, all extract PCR value, decrease extraction Number of times, the most less number of times calculated.Further, due between two the most adjacent TS bags interval time the most micro-at millisecond Second level, so, calculate time difference when only extracting a PCR value from TCP bag, and do not extract the PCR value participation in other bags Calculating, the time deviation causing the renewal of current time shift temporal information is also millisecond even microsecond pole, therefore, the time caused Error is negligible.
When carrying out speed fast forward and fast reverse under time-shift playing state, due to the processing accuracy of server end PCR value, just When often playing, itself there is discordance in PCR coding, if the most still with the benchmark extracted from reference note video data stream The calculating of time difference is carried out on the basis of PCR value, if, calculate the error that time difference exists 0.1ms each time, then along with The repeatedly calculating of time difference, and when being updated according to described time difference, bigger time deviation will be caused.For understanding Certainly the problems referred to above, the embodiment of the present invention also introduces alignment mechanism, specifically comprises the following steps that
See Fig. 9, another the time shift time obtaining method schematic flow sheet provided for the embodiment of the present invention.
Step S601, it may be judged whether receive time-shifted service device and ask to send out according to the speed fast forward and fast reverse playback of Set Top Box The audio frequency and video number stream sent, the transfer rate of audio and video data streams is corresponding with the request of described speed fast forward and fast reverse playback.
When speed fast forward and fast reverse, PCR value easily occurs inconsistent, therefore, is receiving speed F.F. or fast operating Time, starting correction mechanism, the correction mechanism that the embodiment of the present invention provides is to carry out a synchronous calibration with time-shifted service device.When connecing When receiving the audio and video data streams that time-shifted service device sends according to the request of speed fast forward and fast reverse playback, time-shifted service device is according to again Speed fast forward and fast reverse request sends audio and video data streams to Set Top Box, and such as, speed rewind or fast reverse play request are fast for twice Entering playing request, now, time-shifted service device sends audio and video data streams with twice transfer rate to Set Top Box.
Step S602, moves the sound that server asks according to the speed fast forward and fast reverse playback of Set Top Box to send when received During video counts stream, whether real-time judge audio and video data streams transfer rate is recovered to default regular transmission rate.
During speed transmission audio and video data streams, whether real-time judge audio video transmission speed is recovered to normal transmission Speed.The transfer rate of current audio and video data streams is obtained by RTSP agreement, and the transfer rate of acquisition is normal with default Transfer rate contrasts.Aforesaid way be applicable to time-shifted service device connect often receive a speed rewind or F.F. request, become Carry out a speed fast forward and fast reverse operation, corresponding to user when using remote controller to carry out speed F.F. or fast operating, often By a speed fast forward and fast reverse button, just carry out a speed fast forward and fast reverse action;Another kind of situation is, when user presses During speed fast forward and fast reverse button, when pressing play button, time shift program just can normal play.For above-mentioned the second situation, sentence The disconnected normal play that whether receives is asked, and when receiving normal play request, then calibrates.
Step S603, when audio and video data streams transfer rate is recovered to when presetting regular transmission rate, again when described Move server and send time shifting broadcasting request.
For the first situation of speed fast forward and fast reverse, when audio and video data streams transfer rate is recovered to presetting normal biography During defeated speed, again send time shifting broadcasting request to time-shifted service device, thus again accept reference note video data stream and benchmark Time shift temporal information, carries out the calculating of time deviation on the basis of the benchmark PCR value again extracted.
For the second situation of speed fast forward and fast reverse, when receiving normal play request, again to time-shifted service Device sends time shifting broadcasting and asks, and ensuing process is described above.
Another kind of alignment mechanism is in the case of normal play, such as, in the time that time shift program is play with normal speed Time longer, it is also possible to there is time offset issue, now can also carry out synchronous calibration with server.
Idiographic flow sees Figure 10, another the time shift time obtaining method provided for the embodiment of the present invention.
Step S604, it is judged that time difference is the poorest equal to Preset Time.
The computational methods of time difference are mentioned above, the playing process of time shift program update according to time difference current Time shift temporal information, time difference refers to the time difference between current audio and video data streams and reference note video data stream, also That is current difference between time shifting broadcasting time and benchmark current time shifting broadcasting time.The increase of difference over time, time Move program current time shift time also constantly update.
Arranging Preset Time in set-top-box system poor, Preset Time difference can be 15 minutes, 20 minutes or 30 minutes etc., The time value of Preset Time difference is not as the restriction of scope.
Step S605, when time difference is equal to Preset Time difference, sends time shifting broadcasting request to time-shifted service device again.
Such as, Preset Time difference is 20 minutes, when time difference was equal to 20 minutes, resends to time-shifted service device Time shifting broadcasting is asked, and again extracts benchmark PCR value, and reacquires the benchmark time shifting broadcasting time.
Certainly, there is time difference in actual applications and be not up to 20 minutes integer values, when therefore, it can arrange default Between difference scope, if in the range of time difference is positioned at Preset Time difference, again to time-shifted service device send time shifting broadcasting request.
From the foregoing, the time shift time obtaining method that the embodiment of the present invention provides, updating current time shift temporal information Time, it is not necessary to frequently obtain current time shift temporal information to time-shifted service device, only need to send time shifting broadcasting request to time-shifted service device , time shifting broadcasting request send or, receive reference note video data stream and corresponding with reference note video data stream simultaneously Benchmark time shift temporal information.By the benchmark PCR value extracted from reference note video data stream, and from subsequently received sound The PCR value extracted in video data stream carries out mathematic interpolation, obtains current audio and video data streams and reference note video data stream Time difference, thus the benchmark current time shifting broadcasting time be the current time shifting broadcasting time plus described time difference.Same, Current left margin time and current right margin time are updated also dependent on time difference.By in audio and video data streams Time difference between PCR value and benchmark PCR value determines current time shift temporal information, it is not necessary to travel frequently over RTSP protocol instructions to The request of time-shifted service device updates time shift time range and current time shifting broadcasting time, thus alleviates the load of time-shifted service device, time Move the load reduction of server, just decrease time-shifted service device information and return the phenomenon postponed, and then strengthen video window interface The real-time that time refreshes.
The embodiment of the invention also discloses a kind of Set Top Box, affiliated Set Top Box includes processor and can for storing processor Perform the memorizer of instruction.
Processor for control receive time-shifted service device send reference note video data stream, benchmark time shift temporal information with And current audio and video data streams, after receiving reference note video data stream, control to extract the PCR in reference note video data stream Value, and be stored in memorizer as benchmark PCR value, the benchmark time shift temporal information received storage is made in memory simultaneously On the basis of.
Processor continues to control to extract PCR value from current audio and video data streams, and by the PCR value extracted and benchmark PCR value carries out mathematic interpolation, calculates time difference, and during calculating, processor is first by the PCR value extracted and benchmark PCR value is converted into time value, then does mathematic interpolation.The benchmark current time shifting broadcasting time in benchmark time shift temporal information is added Upper described time difference obtains the current time shifting broadcasting time.Meanwhile, benchmark left margin time and benchmark right margin time are plus institute State time difference and obtain left margin time and right margin time.
The concrete mode performing operation about Set Top Box has been described in detail in the embodiment of method, This will be not set forth in detail explanation.
Figure 11 is the block diagram according to a kind of Set Top Box shown in exemplary embodiment.
The terminal that the Set Top Box that the embodiment of the present invention provides controls is intelligent television, when Set Top Box is according to disclosed by the invention When method calculates current time shift temporal information, current time shift temporal information is sent to time showing flow process by Set Top Box, and The video display interface of intelligent television is updated to current time shift temporal information.
Processor 401 control the video of terminal realize, video rewind or F.F., program switching and time shifting state switching etc. Operation, is processing including the disparate modules completing aforesaid operations, to facilitate the interaction between Set Top Box and intelligent television.
Memorizer 402 is configured to store various types of data to support the operation in terminal.The example of these data Including any application program for operating on intelligent television or the instruction of method, computational methods etc..Memorizer 402 can be by Any kind of volatibility or non-volatile memory device or combinations thereof realize, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), able to programme Read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, disk or CD.
The various assemblies that power supply module 403 is Set Top Box provide electric power, and power supply module 403 can include power management system System, one or more power supplys, and other with for Set Top Box generation, manage and distribute the assembly that electric power is associated.
Multimedia groupware 404 is included between Set Top Box and user the output interface screen provided.In certain embodiments, Screen can include display screen or touch panel.If screen includes that touch panel, screen can be implemented as touch screen, to receive Input signal from user.Touch panel includes that one or more touch sensor touches with sensing, slides and touch panel On gesture.Described touch sensor can not only sense touch or the border of sliding action, but also detects and described touch Or slide relevant persistent period and pressure.Set Top Box can also be provided with button, and user can be saved by button The functions such as mesh switching, speed fast forward and fast reverse, Volume Up or reduction.
Input/output interface 405 provides interface for processing between assembly and peripheral interface module, communications component 406 is joined It is set to be easy to the communication of wired or wireless mode between Set Top Box and time-shifted service device.Set Top Box can access based on communication standard Wireless network, such as WiFi, 2G or 3G, or combinations thereof.In one exemplary embodiment, communications component 406 is via extensively Broadcast channel and receive the broadcast singal from external broadcasting management system or broadcast related information.In one exemplary embodiment, Described communications component 406 also includes near-field communication (NFC) module, to promote junction service.Such as, can be based on penetrating in NFC module Frequency identifies (RFID) technology, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology, bluetooth (BT) technology and other skills Art realizes.
In the exemplary embodiment, Set Top Box can be by one or more application specific integrated circuits (ASIC), numeral letter Number processor (DSP), digital signal processing appts (DSPD), PLD (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components realize, be used for performing said method.
Those skilled in the art are considering description and are putting into practice here after disclosure of the invention, will readily occur to its of the present invention Its embodiment.The application is intended to any modification, purposes or the adaptations of the present invention, these modification, purposes or Person's adaptations is followed the general principle of the present invention and includes the undocumented common knowledge in the art of the present invention Or conventional techniques means.Description and embodiments is considered only as exemplary, and true scope and spirit of the invention are by following Claim is pointed out.
It should be appreciated that the invention is not limited in precision architecture described above and illustrated in the accompanying drawings, and And various modifications and changes can carried out without departing from the scope.The scope of the present invention is only limited by appended claim.

Claims (10)

1. a time shift time obtaining method, is applied to Set Top Box, it is characterised in that including:
Receive reference note video data stream and benchmark time shift temporal information that time-shifted service device sends according to time shifting broadcasting request;
Receive the current audio and video data streams that described time-shifted service device issues after described reference note video data stream automatically;
Determine the PCR value that extracts in PCR value that described current audio and video data streams extracts and reference note video data stream Time difference;
According to described time difference and described benchmark time shift temporal information, determine current time shift temporal information.
Time shift time obtaining method the most according to claim 1, it is characterised in that described determine described current audio frequency and video number The time difference of the PCR value extracted in the PCR value extracted according to stream and reference note video data stream, including:
Respectively described PCR value and benchmark PCR value are converted into time value;
The time value of the time value of described PCR value Yu described benchmark PCR value is made difference, obtains described time difference.
Time shift time obtaining method the most according to claim 1, it is characterised in that wrap in described benchmark time shift temporal information Containing benchmark time shifting broadcasting time, benchmark left margin time and benchmark right margin time;
Described according to described time difference and described benchmark time shift temporal information, determine current time shift temporal information, including:
Respectively by described benchmark time shifting broadcasting time, benchmark left margin time and benchmark right margin time plus described time difference Value, obtains current time shifting broadcasting time to be determined, left margin time to be determined and right margin time to be determined;
According to described current time shifting broadcasting time to be determined, left margin time to be determined and right margin time to be determined, determine institute State current time shift temporal information, wherein, when described current time shift temporal information includes current time shifting broadcasting time, current left margin Between and the current right margin time.
Time shift time obtaining method the most according to claim 3, it is characterised in that described according to described to be determined current time Move reproduction time, left margin time to be determined and right margin time to be determined, determine described current time shift temporal information, including:
Receive the present system time to set-top-box system acquisition request;
Judge that whether the described right margin time to be determined is equal to or more than described present system time;
When the described right margin time to be determined equals to or more than described present system time, determine the described current right margin time For described present system time;
Judge that whether the described current time shifting broadcasting time to be determined is equal to or more than described present system time;
When the described current time shifting broadcasting time to be determined equals to or more than described present system time, determine described current time shift Reproduction time is present system time;
When judging the left margin whether described left margin time to be determined is less than or equal to time-shifted service device caching audio, video data Between;
When the described left margin time to be determined caches the left margin time of audio, video data less than or equal to time-shifted service device, really The fixed described current left margin time is the left margin time of time-shifted service device caching audio, video data.
Time shift time obtaining method the most according to claim 1, it is characterised in that described method also includes, works as from described Front audio and video data streams is extracted PCR value;
Described extraction PCR value from described current audio and video data streams, specifically includes:
Obtaining the TCP bag in described current audio and video data streams, described TCP bag comprises multiple TS bag;
PCR value is extracted from all TS bags of described TCP bag;
When extracting PCR value from arbitrary TS bag of described TCP bag, determine and extract from all TS bags of described TCP bag PCR value;
When all not extracting PCR value from all TS bags of described TCP bag, receive next of described current audio and video data streams Individual audio and video data streams, and from the next audio and video data streams of described current audio and video data streams, extract PCR value, until carrying Take out PCR value.
Time shift time obtaining method the most according to claim 5, it is characterised in that described all TS from described TCP bag Bag extracts PCR value, including:
Obtain the TS bag in described TCP bag successively;
Judge whether described TS bag includes PCR value;
When described TS bag includes PCR value, determine and extract PCR value from arbitrary TS bag of described TCP bag;
When described TS bag does not includes PCR value, it is judged that whether described TS bag is last the TS bag in described TCP bag;
When last TS bag during described TS bag is not described TCP bag, obtain the next TS bag of described TS bag, and from institute State extraction PCR value in the next TS bag of TS bag, until extracting PCR value;
When last TS bag during described TS bag is described TCP bag, determine and all do not carry from all TS bags of described TCP bag Take out PCR value.
Time shift time obtaining method the most according to claim 6, it is characterised in that described obtain successively in described TCP bag TS bag, including:
TS bag is obtained according to the ordering order of TS bag in described TCP bag;Or, according to TS bag in described current TCP bag Ordering inverted order obtains TS bag.
Time shift time obtaining method the most according to claim 1, it is characterised in that described method also includes:
Judge whether to receive the audio frequency and video number that time-shifted service device asks to send according to the speed fast forward and fast reverse playback of Set Top Box Stream, the transfer rate of described audio and video data streams is corresponding with the request of described speed fast forward and fast reverse playback;
When moving the audio frequency and video number stream that server asks transmission according to the speed fast forward and fast reverse playback of Set Top Box when received, real Time judge whether described audio and video data streams transfer rate is recovered to default regular transmission rate;
When described audio and video data streams transfer rate is recovered to when presetting regular transmission rate, again send out to described time-shifted service device Time shifting broadcasting is sent to ask.
Time shift time obtaining method the most according to claim 1, it is characterised in that described method also includes:
Judge that described time difference is the poorest equal to Preset Time;
When described time difference is equal to Preset Time difference, again send time shifting broadcasting request to described time-shifted service device.
10. a Set Top Box, it is characterised in that including:
Processor;
For storing the memorizer of processor executable;
Wherein, described processor is configured to the method according to any one of claim 1 to 9.
CN201610538439.9A 2016-07-08 2016-07-08 A kind of time shift time obtaining method and set-top box Active CN106101752B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610538439.9A CN106101752B (en) 2016-07-08 2016-07-08 A kind of time shift time obtaining method and set-top box

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610538439.9A CN106101752B (en) 2016-07-08 2016-07-08 A kind of time shift time obtaining method and set-top box

Publications (2)

Publication Number Publication Date
CN106101752A true CN106101752A (en) 2016-11-09
CN106101752B CN106101752B (en) 2019-01-01

Family

ID=57213142

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610538439.9A Active CN106101752B (en) 2016-07-08 2016-07-08 A kind of time shift time obtaining method and set-top box

Country Status (1)

Country Link
CN (1) CN106101752B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107948668A (en) * 2017-12-08 2018-04-20 广州酷狗计算机科技有限公司 Method for recording, device and the computer-readable storage medium of live video
CN110209685A (en) * 2019-06-12 2019-09-06 北京九章云极科技有限公司 A kind of Real-time Data Processing Method and system
CN112261445A (en) * 2020-10-21 2021-01-22 深圳市创维软件有限公司 Streaming media playing method, device, equipment and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1801929A (en) * 2005-12-08 2006-07-12 复旦大学 Method for network interaction television system realizing time-shift function
CN101202900A (en) * 2007-03-12 2008-06-18 深圳市同洲电子股份有限公司 Method for switching living broadcast and playback of digital television and video server
JP2008258665A (en) * 2007-03-30 2008-10-23 Toshiba Corp Stream reproducing device
CN101635847A (en) * 2009-09-02 2010-01-27 中兴通讯股份有限公司 Transmission method, video display device and terminal of streaming media
US20110280546A1 (en) * 2009-01-16 2011-11-17 Junichi Gokurakuji Time-shifted viewing system, time-shifted viewing method, and time-shifted viewing apparatus and program
CN102355605A (en) * 2011-11-11 2012-02-15 烽火通信科技股份有限公司 Live time-shift processing method of IPTV (Internet Protocol Television) set-top box

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1801929A (en) * 2005-12-08 2006-07-12 复旦大学 Method for network interaction television system realizing time-shift function
CN101202900A (en) * 2007-03-12 2008-06-18 深圳市同洲电子股份有限公司 Method for switching living broadcast and playback of digital television and video server
JP2008258665A (en) * 2007-03-30 2008-10-23 Toshiba Corp Stream reproducing device
US20110280546A1 (en) * 2009-01-16 2011-11-17 Junichi Gokurakuji Time-shifted viewing system, time-shifted viewing method, and time-shifted viewing apparatus and program
CN101635847A (en) * 2009-09-02 2010-01-27 中兴通讯股份有限公司 Transmission method, video display device and terminal of streaming media
CN102355605A (en) * 2011-11-11 2012-02-15 烽火通信科技股份有限公司 Live time-shift processing method of IPTV (Internet Protocol Television) set-top box

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107948668A (en) * 2017-12-08 2018-04-20 广州酷狗计算机科技有限公司 Method for recording, device and the computer-readable storage medium of live video
CN107948668B (en) * 2017-12-08 2020-06-30 广州酷狗计算机科技有限公司 Live video recording method and device and computer storage medium
CN110209685A (en) * 2019-06-12 2019-09-06 北京九章云极科技有限公司 A kind of Real-time Data Processing Method and system
CN110209685B (en) * 2019-06-12 2020-04-21 北京九章云极科技有限公司 Real-time data processing method and system
CN112261445A (en) * 2020-10-21 2021-01-22 深圳市创维软件有限公司 Streaming media playing method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN106101752B (en) 2019-01-01

Similar Documents

Publication Publication Date Title
US20210409461A1 (en) Whiteboard and video synchronization method, apparatus, computing device and storage medium
US20220400318A1 (en) Trick playback of video data
US20160255308A1 (en) Technique for video conferencing
EP3203754A1 (en) Method and system for realizing streaming media data seamlessly connecting in intelligent home
AU2017254981A1 (en) Reduced latency server-mediated audio-video communication
CN109714622B (en) Video data processing method and device and electronic equipment
CN111418215B (en) Media client, method, non-transitory data storage device
CN103327267B (en) A kind of video broadcasting method, device and television set
CN110581973B (en) Data playback method and device, terminal equipment and storage medium
CN104080006B (en) A kind of video process apparatus and method
TW201246198A (en) Sequencing content
CN104202614B (en) A kind of method of Network Environment adjustment video image quality and device
CN116506667A (en) Method and system for synchronizing audio content and video content on multiple media devices
CN103686199A (en) IPTV multi-window program preview method, system and terminal
US20160249109A1 (en) System and method for the detection of advertisements in television and other video programming
CN106101752A (en) A kind of time shift time obtaining method and Set Top Box
US20060072596A1 (en) Method for minimizing buffer delay effects in streaming digital content
CN109005438A (en) Video broadcasting method and device
CN114827679A (en) Display device and sound picture synchronization method
US11553019B2 (en) Method, apparatus, electronic device and storage medium for acquiring programs in live streaming room
US9924209B2 (en) System and method for controlling reproduction using terminal
WO2017058437A1 (en) Synchronization of media rendering in heterogeneous networking environments
JP2015149759A (en) Trick playback of video data
WO2016133586A1 (en) Use of program-schedule text and teleprompter output to facilitate selection of a portion of a media-program recording
EE et al. Published

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant