Summary of the invention
The technical problem to be solved in the present invention provides and a kind ofly can automatically lock certain advertisement video of front end in when start.
For solving the problems of the technologies described above, the invention provides a kind of opening video playing method of set-top box, comprise the steps:
Set-top box interface entered start advertisement menu when one, the user started shooting;
Two, the programme information of playing before set-top box recording shutdown last time;
Three, address of service and the transport address of the advertisement video that provides according to operator of set-top box obtain the programme information of the advertisement video of this less important broadcast; When set-top box has the programme information of described advertisement video, execution in step four; Execution in step seven when set-top box has the programme information of described advertisement video;
Four, according to the frequency frequency locking state in the programme information of described advertisement video, if frequency locking successful execution step 5; Execution in step seven when frequency locking is unsuccessful;
Five, set-top box is play corresponding advertising programme according to the programme information of described advertisement video;
Six, the timer timing of set-top box arrives the time backed off after random advertising programme of setting and plays;
Seven, according to the programme information of step 2 record, play the program of playing before the shutdown last time.
The set-top box timer begins timing in the described step 6, and whether the time of judging surpasses the first setup times, and after surpassing the first setup times, set-top box shows the prompting of " withdrawing from by any key " at display, and the key value available flag is set to " 1 ";
And in the time of the timer timing, set-top box begins to detect key value, if the key value available flag is " 1 ", and when detecting effective key assignments, withdraws from advertising programme and plays, and carry out described step 7, plays the program of playing before shutdown last time.
Described the first setup times was 5 seconds.
Whether the time of also judging simultaneously in described step 6 surpasses the second setup times, described the second setup times, withdraws from advertising programme and plays when the timer timing surpasses the second setup times greater than described the first setup times, and execution in step seven, play the program of playing before the shutdown last time.
Described the second setup times was 20 seconds.
Programme information in the described step 2 comprises frequency, video data stream address, audio data stream address, the program clock reference data stream address of this program.
Described broadcast video programs information comprises frequency, video data stream address, audio data stream address, the program clock reference data stream address of this program.
The opening video playing method of set-top box of the present invention, but the fixing program of TS ID and SERVICE ID of one of automatic locking after the start, this function according to some regional operator at certain fixing frequency, fixing Video PID, Audio PID plays the broadcast video programs that continues, take full advantage of the resource of front end, for the user provides amount of information abundant advertising message, also played popularizing action for the advertising business of operator.
Embodiment
As shown in Figure 1, the opening video playing method of a kind of set-top box of the present invention comprises following seven steps:
Set-top box interface entered start advertisement menu when one, the user started shooting;
Two, the programme information of playing before shutdown set-top box recording last time comprises frequency, video data stream address (video PID), audio data stream address (Audio PID), the program clock reference data stream address (PCR PID) of this program;
Three, transport stream address (TS ID) and address of service (the SERVICE ID) of the advertisement video that provides according to operator of set-top box, obtain the programme information of the advertisement video of this less important broadcast, comprise frequency, video data stream address (video PID), audio data stream address (Audio PID), the program clock reference data stream address (PCR PID) of this program; When set-top box did not have advertising programme information, execution in step seven was play the program of playing before the shutdown last time; When set-top box has the advertisement video of described programme information, continue execution in step four;
Four, according to the frequency frequency locking state in the programme information of described advertisement video, execution in step seven when the set-top box frequency locking is unsuccessful is play the program of playing before shutdown last time; If frequency locking successful execution step 5;
Five, set-top box is play corresponding advertising programme according to the video data stream address in the programme information of described advertisement video (video PID), audio data stream address (Audio PID), program clock reference data stream address (PCR PID);
Six, the timer timing of set-top box, and control:
Whether the time of judging surpasses 5 seconds (the first setup times), and after surpassing for 5 seconds, set-top box shows the prompting of " withdrawing from by any key " at display, and the button available flag is set to " 1 "; And in the time of the timer timing, set-top box begins to detect key value, if the key value available flag is " 1 ", and when detecting effective key assignments, set-top box withdraws from advertising programme and plays, and carries out described step 7, plays the program of seeing before the shutdown last time.
Whether the time of also judging simultaneously in this step surpasses 20 seconds (the second setup times), and when the timer timing surpassed for 20 second, set-top box withdrawed from advertising programme and plays, and execution in step seven, plays the program of playing before shutdown last time.
Seven, according to the programme information of step 2 record, play the program of playing before shutdown last time.
Pass through said method, but the present invention is the fixing TS ID(transport stream address of one of automatic locking after start) and Service ID(address of service) program, if search this program or can't lock in the absence of its place frequency, play-over the last platform of playing of user before the shutdown; If locked the frequency at advertisement place, then watch for forcing front 5 seconds, the user withdraws from by any key after 5 seconds excessively; Such as user's button not, automatically withdraw from advertising programme after spending 20 seconds, then play the platform of playing before shutdown last time.
Embodiment
Hardware using set-top box STx5105, method of the present invention realizes by c programming language.
Set-top box interface entered start advertisement menu when the user started shooting, and adopted as issuing orders:
The programme information of playing before set-top box recording shutdown last time, adopt as issuing orders:
SW_PROG_INFO_t*prog_p=NULL;
prog_p=NewProg_GetInfoOfCurrProg();
wOriFreq=prog_p->freq;
wOriVidPid=prog_p->sVidPid;
wOriAudPid=prog_p->sAudPid[0];
wOriPcrPid=prog_p->sPcrPid;
Set-top box is obtained the programme information of the advertisement video of this less important broadcast, adopts as issuing orders:
When set-top box does not have advertising programme information, the program of playing before broadcast shutdown last time, adopt as issuing orders:
When set-top box has the advertisement video of described programme information, the frequency locking success, the broadcast advertisement video, adopt as issuing orders:
The program of playing before broadcast shutdown last time when the set-top box frequency locking is unsuccessful, adopt as issuing orders:
The timer timing of set-top box is also controlled and is adopted as issuing orders:
Detecting button adopts as issuing orders: