Embodiment
The embodiment of the present invention provides control method for playing back and equipment, by send the message that carries Play Control information to terminal, make terminal to carry out Play Control according to described Play Control information, referring to accompanying drawing, be elaborated by specific embodiment.
Server can send message to terminal entering advertisement constantly or withdrawing from advertisement constantly, is entering advertisement constantly, and the Play Control information that described session control message is carried is specially forbids F.F., perhaps for forbidding F.F. and location; Withdrawing from advertisement constantly, described Play Control information is specially the permission F.F., perhaps for allowing F.F. and location, makes terminal carry out Play Control according to described Play Control information.
For example, media server can be directly from media file or from the broadcast strategy server, perhaps other approach obtain strategy and the information of Play Control, thereby can obtain the moment that the Play Control state need to change, and send message in the described moment that needs to change.Such as, before broadcast advertisement, media server is carried out some operation by carry Play Control information indicating terminal content blocking user thereafter in session control message, for example forbids F.F., rewind down and location.And when advertisement finished, media server wished again to remove to the forbidding of these operations, therefore can carry Play Control information and be used to indicate terminal content thereafter and allow the user to carry out F.F., rewind down and positioning action in new session control message.Terminal can be carried out corresponding Play Control after obtaining these Play Control information.Below be elaborated by specific embodiment:
With reference to Fig. 1, be embodiment of the present invention control method for playing back embodiment one flow chart, by expanding existing real-time stream media protocol (RTSP, Real-Time Streaming Protocol) message is transmitted Play Control information, for example, define the announce/set_parameter message that is mail to end side by media server in RTSP, can expand the x-Notice header field to this message, and define the conditional code of some expression Play Control information, for example:
1105: " Fast_forword Disable " forbids F.F.;
1106: " Fast_forword Enable " allows F.F.;
1107: " Rewind Disable " forbids rewind down;
1108: " Rewind Enable " allows rewind down;
1109: " Pause Disable " forbids suspending;
1110: " Pause Enable " allows to suspend;
1111: " Goto Disable " forbids positioning playing;
1112: " Goto Enable " allows positioning playing;
Below be elaborated by concrete steps:
S11, media server obtain the moment that the Play Control state need to change;
For example, media server can obtain the moment that the Play Control state need to change from media file or Play Control strategic server or other approach, and as being about to broadcast advertisement, advertisement closes to an end.
S12, media server send the announce(notice in the moment that the Play Control state need to change) message, carry Play Control information in described announce message;
For example, entering advertisement constantly, media server is by sending announce message, and the content that in message, the carrier state code identifies does not thereafter allow forwarding operation:
S->C:ANNOUNCE?rtsp://foo.com/bar.avi/streamid=0?RTSP/2.0
CSeq:1
Session:12345678
x-Notice:1105?Fast_forword?Disable
Can find out, wherein carry conditional code 1105 in the header field x-Notice of expansion: " Fast_forword Disable " illustrates content blocking forwarding operation thereafter.
After receiving, terminal can return to a response message:
C->S:RTSP/2.0?200?OK
CSeq:1
Session:12345678
The received 200OK response message of terminal represents correctly to receive announce message.
And withdrawing from advertisement constantly, and media server is by sending new announce message, and in message, carrier state code indication content thereafter allows forwarding operation:
S->C:ANNOUNCE?rtsp://foo.com/bar.avi/streamid=0?RTSP/2.0
CSeq:2
Session:12345678
x-Notice:1106?Fast_forword?Enable
Can find out, wherein carry conditional code 1106 in the header field x-Notice of expansion, the permission forwarding operation be described, i.e. thereafter content recovery forwarding operation.
Return to a response message after terminal is received, expression correctly receives:
C->S:RTSP/2.0?200?OK
CSeq:2
Session:12345678
Be understandable that, also can adopt other sign to represent different Play Control information.In addition, enter advertisement constantly, also can forbid simultaneously the fast forwarding and fast rewinding operation.Correspondingly, play the finish time when advertisement, allow to carry out the fast forwarding and fast rewinding operation.If player has the positioning control function, entering advertisement constantly, also can forbid simultaneously positioning action.Also can entering advertisement and constantly forbid user's all operations, for simplicity, also can define corresponding conditional code.
S13, terminal according to Play Control information entrained in message, are carried out corresponding Play Control after receiving announce message.
For example, carry conditional code 1105 in expansion header field x-Notice by received RTSP message: " Fast_forword Disable ", thereafter content blocking forwarding operation is described, described terminal forbids that the user carries out forwarding operation after receiving described RTSP message; If know in the expansion header field x-Notice of RTSP message and carry 1105: " Fast_forword Disable " and conditional code 1111: " Goto Disable ", after described terminal receives described message, forbid that the user carries out F.F. and positioning action.
When carrying out above-mentioned Play Control, Play Control state that can also terminal is current shows, to give user friendly prompting, for example, when forbidding that the user carries out certain operation, with the button ashing of this operational correspondence, and when allowing the user to carry out certain operation, with the button brightening of this operational correspondence.
In the present embodiment, by sending message to terminal, carry Play Control information in message, terminal is carried out Play Control according to described Play Control information, thereby realize carrying out Play Control when breaking for commercialsy, the method for visible this Play Control can not produce any impact to the program of playing, and does not need to revise program source, only need to be by the simple transmission of messages mode Play Control that just can effectively break for commercialsy, cost is lower.Simultaneously, can avoid user's invalidation request, and then can avoid the network and the media server end redundant operation that cause because of user's invalidation request, therefore can save network transmission resource, improve media server processes efficient.
Can also adopt other message to transmit Play Control information, with reference to Fig. 2, be embodiment of the present invention control method for playing back embodiment two flow charts, expand existing conversation initialized protocol (SIP, Session Initiation Protocol) message, carry Play Control information by the INFO in SIP or MESSAGE message, can expand a kind of type of message application/controlinfo this moment, and define some control parameters, and for example, definition: 0: forbid corresponding operating; 1: allow corresponding operating.Below describe by idiographic flow:
S21, media server obtain the moment that the Play Control state need to change;
For example, media server can obtain the moment that the Play Control state need to change from media file or Play Control strategic server or other approach, and as being about to broadcast advertisement constantly, advertisement closes to an end constantly.
S22, media server send INFO or MESSAGE message in the moment that the Play Control state need to change to terminal, carry Play Control information in described INFO or MESSAGE message;
For example, entering advertisement constantly, media server passes to terminal by the IPTV controller with INFO or MESSAGE message, carries Play Control information in described INFO or MESSAGE message, is used for identifying follow-up content blocking fast forwarding and fast rewinding operation:
Terminal is received and is returned to response after message:
SIP/2.0?200?OK
Via:SIP/2.0/TCPagent.example.com;branch=z9hG4bK776sgdkse;received=1.2.3.4
CSeq:1?INFO
Content-Length:0
Can find out, by in INFO "<Fast_forword〉0</Fast_forword " and "<Rewind〉0</Rewind ", the Play Control information of namely setting F.F. and rewind down is respectively 0, represents to forbid F.F. and fast reverse operation.
Terminal receives that returning to 200 OK response messages after message represents correctly to receive INFO or MESSAGE message.
In advertisement finish time, media server passes to terminal by the IPTV controller with INFO or MESSAGE message again, carries Play Control information in described INFO or MESSAGE message, is used for identifying follow-up content recovery fast forwarding and fast rewinding operation;
Terminal is received and is returned to response after message:
SIP/2.0?200?OK
Via:SIP/2.0/TCPagent.example.com;branch=z9hG4bK776sgdkse;received=1.2.3.4
CSeq:2?INFO
Content-Length:0
Can find out, by in INFO "<Fast_forword〉1</Fast_forword " and "<Rewind〉1</Rewind ", the Play Control information of namely setting F.F. and rewind down is respectively 1, represents to allow terminal to carry out F.F. and fast reverse operation.
Be understandable that, also can adopt other sign to represent different Play Control states, perhaps, adopt other forms of Play Control information, illustrate no longer one by one.In addition, entering the advertisement broadcast constantly, also can only forbid forwarding operation.Correspondingly, play the finish time when advertisement, allow to carry out forwarding operation and get final product.If player has the positioning control function, in the moment that enters the advertisement broadcast, also can forbid simultaneously positioning action.Like this, when user's F.F. or navigate to and enter advertisement and play constantly, just forbid that the user carries out F.F. and positioning action, until the finish time is play in advertisement, again send the message that carries Play Control information, allow the user to carry out F.F. and positioning action, namely the user can't skip advertisements play the period.Also can enter moment that advertisement plays at needs forbids user's all operations for simplicity, also can defining corresponding conditional code.
S23, terminal according to Play Control information entrained in message, are carried out corresponding Play Control after receiving INFO or MESSAGE message.
For example, terminal receives INFO, according to carry in INFO "<Fast_forword〉1</Fast_forword " and "<Rewind〉1</Rewind ", thereafter content blocking forwarding operation is described, described terminal forbids that after receiving described MESSAGE message the user carries out F.F. and fast reverse operation.
When carrying out above-mentioned Play Control, Play Control state that can terminal is current shows, to give user friendly prompting.For example, forbidding that the user carries out certain when operation, with the button ashing of this operational correspondence, and when allowing the user to carry out certain to operate, with the button brightening of this operational correspondence.
In addition, in above each embodiment, when breaking for commercialsy Play Control, if permission positioning action, and be in the advertisement broadcast after positioning action during the period, can send session control message to terminal, carry Play Control information in described session control message, be used for forbidding that the user carries out F.F. and positioning action after the expression positioning action.for example, the 10th minute after program begins for entering advertisement constantly, the 15th minute for withdrawing from advertisement constantly, if after the user begins from program the 8th minute begins to carry out positioning action, stopped in the 12nd minute after navigating to program and beginning, server knows that the user position location is in advertisement and plays the period, this moment of the 12nd minute after program begins sends session control message to terminal, described session control message carries Play Control information, Play Control state after the expression program begins after the 12nd minute, for example can be for forbidding F.F. and location, also can forbid all user's operations.Like this, the 12nd minute after program begins forbids that to the 15th minute the user carries out the operations such as F.F., location, can point out the user by the ashing button.
Server can also send message to terminal before program is play, described message carries Play Control information, and terminal can be carried out Play Control according to described Play Control information.
Which partial content is Play Control information can be used to indicate and allow F.F., positioning action; And/or, being used to indicate any partial content and forbidding F.F., positioning action, terminal is carried out corresponding Play Control according to Play Control information when carrying out to corresponding content.
Be appreciated that to be, other forms of Play Control information also can be set.For example, when breaking for commercialsy Play Control, for the interior perhaps period that needs broadcast advertisement, can forbid user's all operations, and for non-ad content or period, can allow the user to carry out various operations.
By before program is play, the Play Control information of described program being issued, can avoid all issuing the Play Control information of carrying out Play Control at every turn when the Play Control state need to change, thereby can further reduce network redundancy, conserve bandwidth resource.Below be elaborated by several specific embodiments:
With reference to Fig. 3, be embodiment of the present invention control method for playing back embodiment three flow charts, realize by expanding existing RTSP message, defined the announce message that is mail to end side by media server in RTSP message, expansion a kind of type of message: application/controllinfo in announce message, represent that the content of carrying in this message is Play Control information, can carry content in Play Control information with text formatting or extended formatting subsequently, idiographic flow is as follows:
S31, before program is play, media server sends announce message to terminal, carries Play Control information in described message;
For example:
C->S:ANNOUNCE?rtsp://server.example.com/fizzle/foo?RTSP/2.0
CSeq:1
Date:23?Jan?1997?15:35:06?GMT
Session:47112344
Content-Type:application/controlinfo
Content-Length:332
(Play Control information, text formatting)
Return to response message after S32, terminal are received, and carry out Play Control according to the Play Control information in announce message.
For example, terminal is returned to 200 OK message, and expression correctly receives:
C->S:RTSP/2.0?200?OK
CSeq:1
Session:47112344
The announce message that end-on is received is resolved and can be obtained Play Control information, and Play Control information particular content can comprise: be used to indicate the information which partial content allows F.F. and positioning action; And/or be used to indicate the information which partial content is forbidden F.F. and positioning action, terminal is carried out Play Control according to the content of Play Control information: if in Play Control information, this part play content or this section reproduction time allow F.F. and positioning action, allow the user to carry out F.F. and positioning action; If in Play Control information, this part play content or this section reproduction time are forbidden F.F. and positioning action, correspondingly, forbid that the user carries out F.F. and positioning action.In order to give the user user's experience better, can point out the user current Play Control state of living in, for example, can ashing/brightening fast forward button.
With reference to Fig. 4, be embodiment of the present invention control method for playing back embodiment four flow charts, be with the difference of a upper embodiment, by the expansion sip message, carry Play Control information in the INFO in SIP or MESSAGE message and realize, for example, can expand a kind of type of message: application/controlinfo, the content that expression is carried is Play Control information, can carry the Play Control information content with text mode subsequently, and idiographic flow is as follows:
S41, before program is play, media server sends INFO or MESSAGE message, carries Play Control information in described message;
INFO?sip:audioexample.com?SIP/2.0
Via:SIP/2.0/TCP?agent.example.com;branch=z9hG4bK776sgdkse
CSeq:1?INFO
Content-Type:application/controlinfo+text
Content-Length:50
(Play Control information, text formatting)
Return to response message after S42, terminal are received, and carry out Play Control according to the Play Control information in INFO or MESSAGE message.
Terminal can be returned to 200 OK message and represent correctly to receive MESSAGE message:
SIP/2.0?200?OK
Via:SIP/2.0/TCPagent.example.com;branch=z9hG4bK776sgdkse;received=1.2.3.4
CSeq:1?INFO
Content-Length:0
The INFO that end-on is received is resolved and can be obtained Play Control information, and the Play Control information content specifically can comprise: which partial content allows the information of F.F. and positioning action; And/or the information where partial content is forbidden F.F. and positioning action, terminal is carried out Play Control according to the content of Play Control information: if in Play Control information, this part play content or this section reproduction time allow F.F. and positioning action, allow the user to carry out F.F. and positioning action; If in Play Control information, this part play content or this section reproduction time are forbidden F.F. and positioning action, correspondingly, forbid that the user carries out F.F. and positioning action.For the interior perhaps period that advertisement is play, can forbid also in described Play Control information that the user carries out all Play Control operations, and play the period in non-advertisement, can allow the user to carry out all Play Control operations.Specific rules can arrange as required.
In order to give the user user's experience better, can point out the user current Play Control state of living in, for example, can ashing/current forwarding operation that whether allows of brightening fast forward button prompting user.
With reference to Fig. 5, be embodiment of the present invention control method for playing back embodiment five flow charts, expand existing Session Description Protocol (SDP, Session Description Protocol), can identify that in SDP, this property content is the Play Control information content, concrete form can be text formatting, and idiographic flow is as follows:
S51, before program is play, media server sends SDP message to terminal, comprises Play Control information in described SDP information;
For example, comprise statement in SDP message:
A=controlinfo ... (subsequent content is the Play Control information content of text mode)
Play Control information specifically can comprise: which partial content allows F.F., fast reverse operation; And/or which partial content is forbidden F.F., fast reverse operation.
S52, terminal are returned to response message to media server, and carry out Play Control according to the Play Control information that comprises in received SDP message.
Terminal is resolved received SDP message, obtain Play Control information, and carry out Play Control according to the content of Play Control information: if in Play Control information, this part play content or this section reproduction time allow F.F., fast reverse operation, allow the user to carry out F.F., fast reverse operation; If in Play Control information, this part play content or this section reproduction time are forbidden F.F. and positioning action, correspondingly, forbid that the user carries out F.F. and positioning action.
In order to give the user user's experience better, can point out the user current Play Control state of living in, for example, can ashing/brightening fast forward button.
Abovely by specific embodiment, control method for playing back is described in detail, below correspondingly introduces the equipment that said method adopts:
With reference to Fig. 6, be embodiment of the present invention media server example structure schematic diagram, this server comprises:
Transmittingelement 61 is used for sending message to terminal, and described message carries Play Control information, makes terminal carry out Play Control according to described Play Control information.
Wherein, described transmittingelement 61 specifically can enter advertisement constantly entering advertisement constantly or withdrawing from advertisement constantly to terminal transmission session control message, and described Play Control information can be for forbidding F.F., perhaps for forbidding F.F. and location;
Withdrawing from advertisement constantly, described Play Control information can be for allowing F.F., perhaps for allowing F.F. and location.
Described transmittingelement 61 specifically can also send message to user terminal before program is play, Play Control information entrained in described message can comprise: be used to indicate the information which partial content allows F.F. and positioning action; And/or, be used to indicate the information which partial content is forbidden F.F. and positioning action.
Described transmitting element specifically also is used in the permission positioning action, and is in advertisement after positioning action during the moment, sends described message to terminal, and described Play Control information is specially forbids F.F. and location.
As seen, because media server is to send message to terminal before program is play, and carry out Play Control by terminal according to Play Control information entrained in described message, therefore the method for this Play Control can not produce any impact to the program of playing, do not need to revise program source, only need to be by the simple transmission of messages mode Play Control that just can effectively break for commercialsy, cost is lower.Simultaneously, can avoid user's invalidation request, and then can avoid the network and the media server end redundant operation that cause because of user's invalidation request, therefore can save network transmission resource, improve media server processes efficient.
With reference to Fig. 7, be embodiment of the present invention terminal example structure schematic diagram, this terminal comprises:
Message sink unit 71 is used for receipt message, and described message carries Play Control information;
Playingcontrol unit 72 is used for the Play Control information entrained according to described message and carries out Play Control.
Wherein, entering advertisement constantly, described Play Control information is specially forbids F.F., perhaps for forbidding F.F. and location;
Withdrawing from advertisement constantly, described Play Control information is specially the permission F.F., perhaps for allowing F.F. and location.
As seen, carry out Play Control by Play Control information entrained in the message that gets, the method of this Play Control can not produce any impact to the program of playing, do not need to revise program source, only need to be by the simple transmission of messages mode Play Control that just can effectively break for commercialsy, cost is lower.Simultaneously, can avoid user's invalidation request, and then can avoid the network and the media server end redundant operation that cause because of user's invalidation request, therefore can save network transmission resource, improve media server processes efficient.
Play Control information can also realize by another way, for example, described Play Control information can comprise: be used to indicate the information which partial content allows F.F. and positioning action, described playingcontrol unit 72 allows the user to carry out F.F. and positioning action when carrying out to corresponding content;
Play Control information can comprise that also being used to indicate which partial content forbids F.F. and positioning action, and described playingcontrol unit 72 forbids that the user carries out F.F. and positioning action when carrying out to corresponding content.
Which partial content is Play Control information also can indicate allow F.F. and positioning action simultaneously, and which partial content is forbidden F.F. and positioning action.
As seen, can get due to terminal the message that carries Play Control information, and carry out Play Control according to described Play Control information, therefore this control method for playing back can not produce any impact to the program of playing, do not need to revise program source, only need to be by the simple transmission of messages mode Play Control that just can effectively break for commercialsy, cost is lower.Simultaneously, can avoid user's invalidation request, and then can avoid the network and the media server end redundant operation that cause because of user's invalidation request, therefore can save network transmission resource, improve media server processes efficient.
One of ordinary skill in the art will appreciate that all or part of step in the whole bag of tricks of above-described embodiment is to come the relevant hardware of instruction complete by program, this program can be stored in a computer-readable recording medium, and storage medium can comprise: ROM, RAM, disk or CD etc.
Above control method for playing back and the equipment that the embodiment of the present invention is provided is described in detail, used specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.