Summary of the invention
The technical problem that the present invention will solve provides a kind of control method of easy, effective I PTV video playback.
The invention provides the method that a kind of Control Network television video is play, comprising: create controlling object according to the expansion script, controlling object is associated with the player of set-top box; Controlling object is according to the operational order that receives and/or the player of internal event controller top box.
An embodiment of the method for playing according to Control Network television video of the present invention, the above-mentioned step of creating controlling object according to the expansion script comprises: be included in expansion script in the electronic program guide web pages by browser resolves, create the controlling object that comprises control logic according to the expansion script.The above-mentioned step that controlling object is associated with the player of set-top box comprises: browser will be distributed to the control logic that controlling object comprises from the operational order of remote controller and/or internal event and carry out judgment processing; The function of invoke extensions script in the control logic of controlling object, the function of expansion script is corresponding with the application programming interfaces that the bottom media play function provides.
Further, aforesaid operations instruction comprise upper and lower, left and right, determine, stop from remote controller, in the broadcast, time-out, F.F., rewind down instruction one or more.Above-mentioned internal event comprises URL mistake, network connection error, media formats mistake, media decodes mistake, is fast-forward to right margin, is fast-forward to left margin or broadcast state change incident.
The method that Control Network television video provided by the invention is play, create controlling object by the expansion script, come player in the controller top box by controlling object, thereby can different control logics be set by the expansion script, easy, control the IPTV video playback effectively.
Another technical problem that the present invention will solve provides a kind of network television system, can be by the function of server ACTIVE CONTROL set-top box video playback.
The present invention also provides a kind of network television system, comprising: streaming media server is used for storage and Streaming Media is provided; Epg server is used to store and issue and comprises the electronic program guide web pages of expanding script; Set-top box is used for obtaining electronic program guide web pages from epg server, creates controlling object by the expansion script in the page, and controlling object is related with the player of set-top box; Obtain Streaming Media and broadcast from streaming media server; Reception is from user's operational order and/or internal event, by controlling object according to the broadcast of the player of operational order and/or internal event controller top box to Streaming Media.
Network television system provided by the invention, issue by epg server and to comprise the electronic program guide web pages of expanding script, set-top box is created controlling object according to the expansion script, player to set-top box is controlled, and has realized the function of server ACTIVE CONTROL set-top box video playback.
The present invention also provides a kind of set-top box that is applied to said method and system, comprising: player is used for playing stream media; Browser is used for resolving the expansion script that the page comprises, creates transmit control module; Reception is distributed to transmit control module from the internal event of player with from the operational order of remote controller; Transmit control module is used to receive internal event and/or the operational order that browser is distributed, and internal event and/or operational order is judged, according to the operation and the broadcast of judged result controls playing device.
Embodiment
With reference to the accompanying drawings the present invention is described more fully, exemplary embodiment of the present invention wherein is described.
Fig. 1 is the schematic diagram of IPTV of the present invention system.As shown in Figure 1, the IPTV system generally includes set-top box 10, EPG (electronic program guides) server 11 and streaming media server 12.Wherein, streaming media server 12 is used for storage and Streaming Media is provided, and can provide streaming media service in the IPTV network.EPG server 11 is used for storage and EPG is provided the page, comprises the expansion script in this EPG page, is fit to TV demonstration and remote controller operation.EPG server 11 can provide EPG service in the IPTV network.Set-top box 10 possesses IPTV basic service ability, for example inserts the IPTV network, and the IPTV Streaming Media obtains and ability to play, receives the remote controller operation, has browser, can show the EPG page, and supports expansion script etc.Set-top box 10 is used for obtaining the EPG page from EPG server 11, creates controlling object by the expansion script in the page, and controlling object is related with the player of set-top box; Obtain Streaming Media and broadcast from streaming media server 12; Reception is from user's operational order (for example, the user sends by remote controller), by controlling object according to the broadcast of the player of operational order controller top box to Streaming Media.
Though it is pointed out that EPG server and streaming media server are separated portions in Fig. 1, in other embodiments of the invention, EPG server and streaming media server also can be positioned on the same server.Be used for TV or the display (not shown in figure 1) that display stream medium plays or link to each other with set-top box by interface separably, perhaps integrate with set-top box.Remote controller is not limited to communicate by letter with set-top box by infrared mode, also can adopt other communication modes such as wireless, bluetooth.Player in the set-top box can be realized with combining of software by hardware, software or hardware.
Fig. 2 is the flow chart of an embodiment of the method for control of the present invention IPTV video playback.
As shown in Figure 2,, create controlling object, controlling object is associated with the player of set-top box according to the expansion script in step 202.The expansion script can be included in the EPG page, also can be by independent page downloading expansion script.Usually comprise the browser of supporting the expansion script in the set-top box,, create controlling object by the expansion script in the browser resolves page.Controlling object will be distributed to corresponding handling procedure with the related set-top box that comes down to of set-top box player with operational order and the internal event that player is correlated with by system message mechanism, and the corresponding function of API that provides with the bottom media play function is provided by this controlling object handling procedure.The expansion script can realize by multiple programming language, Javascript for example, Perl etc.
Instep 204, controlling object is according to the operational order that receives and/or the player of internal event controller top box.The control logic of controlling object is judged the back by calling corresponding expansion script function executable operations to the operational order or the internal event that receive, and these expansion script function are corresponding with the API that the bottom media play function provides, thus the controls playing device.
In an embodiment of the method for control of the present invention IPTV video playback, the expansion script provides the support of media object (Media) and media play object (MediaPlayer).Media object is pure data object, comprises URL, medium ID, coded format, code check etc., does not comprise function.The media play object provides various handling functions, for example creates object (NewMediaPlayer), is provided with and plays object (SetMedia), play (Play), F.F. (FastForward), rewind down (Rewind), suspend (Pause), stop (Stop), the window's position setting (SetWindowPos), show (Show), hide (Hide) etc.And the bottom media play function provides various API, as is used for the API of media play management: media player state initialization (InitMediaPlayer), player withdraw from (ReleaseMediaPlayer); The AIP that is used for the playback process management: be provided with and play URL (SetMediaURL), media formats (SetMediaFormat) is set, starts and play (Play), F.F. (FastForward, parameter is a speed), rewind down (Rewind, parameter is a speed), suspend (Pause), stop (Stop), navigate to the time (Seek) etc.; Be used to play the API of demonstration and outgoing management: broadcast window size (SetWindowSize), display position (SetWindowPos), volume adjusting (SetVolume) etc. are set.There are corresponding relation in the API of expansion script and the API that the bottom media play function provides.On the bottom layer realization of the API that expands script, can call the API that corresponding bottom media play function provides, thereby realize the operation of player and the control of broadcast.
Fig. 3 is the flow chart of another embodiment of the method for control of the present invention IPTV video playback.
As shown in Figure 3, instep 302, behind the set-top-box opening, enter the EPG server, accessing video is play the page, and the page has comprised the expansion script of control of video broadcast logic, creates the controlling object of video playback by the request of expansion script.
Instep 304, the request of video playback controlling object is associated with the video player example (Instance) of set-top box, set up with the video player example between corresponding the contact.
Instep 306, the video content address is sent in the control of EPG expansion script, and requires to begin to play by controlling object.
Instep 308, the set-top box video player enters broadcast state, and according to the difference of broadcasting speed, state such as can be divided into normal, F.F., rewind down, suspend, stop.
Instep 310, if set-top box receives user's remote controller operational order, then operational order is sent into the control logic of expansion script, carry out corresponding operating.
Instep 312, if functional entitys such as set-top box video player and system, network communication detect F.F. to the end, rewind down to the end, play to the end, incident such as network error, then event is sent into the control logic of expansion script, carry out corresponding operating.
Instep 314, the operation of control logic process user or the internal event of expansion script, and judge whether to withdraw from broadcast, as not needing to withdraw from broadcast, then carry out transferring to broadcast state after the respective handling, enterstep 308.
Instep 316, need withdraw from broadcast after the control logic processing as the expansion script, the then video playback controlling object of deletion expansion script, and end video playback.
The method and system that Control Network television video provided by the invention is play, create controlling object by the expansion script, come player in the controller top box by controlling object, thereby can different control logics be set by the expansion script, easy, control the IPTV video playback effectively.The expansion script can be included in the electronic program guide web pages, issue from the server end unification, be convenient to by the control of server end realization the set-top box video playback, thereby improve in the present legacy network television video broadcast, the single Play Control mode of the control request that can only the passive response set-top box local player of server is initiated, the function of server ACTIVE CONTROL set-top box video playback is proposed, improve the flexibility of the video playback capability of IPTV business, reduced the difficulty of video playback Business Processing.For example, by in the control logic of expansion script, setting processing, can filter F.F., fast reverse operation instruction that the user sends advertisement by remote controller to the expectation of F.F., rewind down.
Fig. 4 is the structure chart of an embodiment of set-top box of the present invention.As shown in Figure 4, set-top box comprisesbrowser 40,transmit control module 41 and player 42.Wherein,player 42 is used for playingstream media.Browser 40 is used for resolving the expansion script that the page comprises, transmitcontrol module 41; Reception is from the internal event ofplayer 42 and/or from the operational order of remote controller and be distributed to transmit control module.Transmit control module 41 is used to receive the internal event and/or the operational order ofbrowser 40 distributions, internal event and/or operational order is judged, according to judged result controls playing device.Transmit control module 41 can be provided by the application programming interfaces that call the bottom media play function and provide by the operation and the broadcast of described player.
Player is in initialization or playing process during trigger event, the event notice API (as SetEvent) of meeting calling system bottom, and import the parameter of incident into, system calls the call back function of top-level travel device then, inserts corresponding message in the message queue of browser.When browser handles arrives this message, then generate a event notice, message is distributed to transmit control module handles based on the expansion form of scripts.When set-top box received the button operation of remote controller, the processing procedure of processing procedure and above-mentioned internal event was similar.Incidents such as the internal event of player can comprise URL mistake, network connection error, media formats mistake, media decodes mistake, is fast-forward to right margin, is fast-forward to left margin, broadcast state change.The operational order of remote controller is sent by the form of keyboard by the user, mainly comprises: upper and lower, left and right, determine, stop, playing/time-out, instruction such as F.F., rewind down.
Description of the invention provides for example with for the purpose of describing, and is not exhaustively or limit the invention to disclosed form.Many modifications and variations are obvious for the ordinary skill in the art.Selecting and describing embodiment is for better explanation principle of the present invention and practical application, thereby and makes those of ordinary skill in the art can understand the various embodiment that have various modifications that the present invention's design is suitable for special-purpose.