CN102572421B - Rapid double-line decoding switching method based on song preview application - Google Patents
Rapid double-line decoding switching method based on song preview application Download PDFInfo
- Publication number
- CN102572421B CN102572421B CN201010619682.6A CN201010619682A CN102572421B CN 102572421 B CN102572421 B CN 102572421B CN 201010619682 A CN201010619682 A CN 201010619682A CN 102572421 B CN102572421 B CN 102572421B
- Authority
- CN
- China
- Prior art keywords
- video
- decoder
- preview
- data
- decoding
- 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.)
- Active
Links
Images
Abstract
The invention discloses a rapid double-line decoding switching method based on a song preview application. The method comprises the following steps of: initializing a first decoder and a second decoder, wherein the first decoder is in charge of decoding a main video, and the second decoder is in charge of decoding a previewed video; playing the audio data obtained after the main video is decoded in a main window and displaying the audio data on the present picture; waiting for a preview switching signal; and after the preview switching signal is received, starting the second decoder, starting an H.264 decoded data processing line, and directly injecting data acquired from an FTP (File Transfer Protocol) network into the second decoder to realize the decoding of a second-line previewed video; playing audio data obtained after the previewed video is normally decoded in a preview window; switching a preview window picture into the present display picture; waiting for the other preview switching signal; and after the preview switching signal is received, switching a main window picture into the present display picture, stopping the transmission of the FTP network, a data injection line and the second video decoder and clearing up cached data.
Description
Technical field
The present invention relates to electronic applications, relate in particular to a kind of two-way decoding fast switch over method based on song preview application.
Background technology
In the existing application of digital entertainment VOD system, user cannot select the song that will click in song of the same name, only has when playback of songs and just can know.In amusement VOD system, add song preview application, can allow user in the situation that not affecting current song and playing, at station of ordering songs by the selected song video of preview, when requesting song with regard to the required song of selecting properly.Amusement VOD system adopts single channel decoding must stop current song and just can watch preview at present, this just requires two decoded videos of amusement VOD system support output, but also brought problem: in the time of two-way decoded video, output need to expend larger resource simultaneously, and handoff delay is large, in progress song video council, impact.
Chinese invention patent application number is: " 201010000186.2 ", name be called: a kind of IPTV system is disclosed in the patent application document of " implementation method of multi-program preview of IPTV electronic program list and system ", be a kind of multi-program preview of IPTV electronic program list be implementation method and system.The method is encoded into a plurality of previewing program video flowings by Video coding server by all program video Real Time Compression, number of videos in each previewing program video flowing and image size are suitable with the transparent grid in previewing program video flowing window, IPTV terminal access EPG server obtains and on television set, shows EPG preview page, plays previewing program video flowing corresponding to this EPG preview page simultaneously.This invention can, in a limited number of situations of IPTV terminal hardware decoding channels, realize same screen live preview and the selection of a plurality of programs.But how this patent document open solves two-way program video if not being, do not export simultaneously and cause handoff delay large, and the technical problem that in progress song video council is impacted.
Summary of the invention
The technical problem that the present invention mainly solves is to provide a kind of two-way decoding fast switch over method based on song preview application, for digital entertainment system user provides quick, smooth song video preview, and two-way decoder switches fast, reduces server load and raising takes over seamlessly effect.
For solving the problems of the technologies described above, the technical scheme that the present invention adopts is: a kind of two-way decoding fast switch over method based on song preview application is provided, comprises the following steps:
Initialization the first decoder and the second decoder when a. system starts, the first decoder is responsible for main video decode, the second decoder is responsible for preview video decoding, audio, video data after main video normal decoder is play in main viewfinder, main viewfinder picture is current display frame, wait for preview switching signal, receive that preview switching signal performs step b;
B. the operating state that keeps the first decoder, open the second decoder, start H.264 decoded data processing threads, the data that get from FTP network are directly injected in the second decoder, realize the decoding of the second tunnel preview video, the audio, video data after preview video normal decoder carries out audio frequency and video broadcasting in preview form, and switching preview viewing window pictures is current display frame, wait for preview switching signal, receive that preview switching signal performs step c;
C. switching main viewfinder picture is current display frame, stops FTP Internet Transmission, stops data and injects thread, stops the second Video Decoder, removes data cached.
Wherein, before step a, also comprise that transmission of video background server provides the step of FTP transmission service.
Wherein, before transmission of video background server provides the step of FTP transmission service, also be included in built-in decoding chip in amusement song-order machine top box and support two-way decoding function, realize at TV end and user's station of ordering songs and decode simultaneously and export the step of MPEG video and H264 video.
Wherein, in step a, also comprise the numbering in Qu Ku according to the current selected song of user, and ftp server address and the port of default, the step of the URL address that structure the second decoder is play.
Wherein, in step b, when enabling the second decoder, also comprise and create Network Data Capture service thread, by FTP, obtain the step of H264 video source data.
Wherein, in step b, the action of switching form is to rely on the event mechanism of informing of decoder to complete.
Wherein, the event mechanism of informing of described decoder is: when the second decoder gets the first frame video image event, show that the second decoder has started the decoding of video data, now the form of Switch Video shows, the second decoder continues to obtain data decoding afterwards.
Wherein, in step c, stop data and inject the step of thread, also comprise whether data are injected to thread stops judging, if data are injected thread, stop, carrying out and stop the second Video Decoder and remove data cached action, if data are injected thread, do not stop, after compulsory withdrawal thread, carry out and stop the second Video Decoder and remove data cached action again.
The invention has the beneficial effects as follows: the single channel decoding that is different from prior art must stop current song and just can watch the defect of preview, the present invention adopts two-way decoding, You Yi road decoder is processed separately preview video, at station of ordering songs and TV end, can play two-path video simultaneously; Select FTP Internet Transmission mode to download preview video data, reduce the interference that main video-song is play; When preview and main video switch mutually, enable immediately decoder piecemeal injecting data, reach the object of decoding fast, and utilize the optimization of switching form displaying time to switch effect.
Accompanying drawing explanation
Fig. 1 is the flow chart of steps that the present invention is based on the two-way decoding fast switch over method embodiment of song preview application;
Fig. 2 is the software flow pattern that the present invention is based on the two-way decoding fast switch over method embodiment of song preview application.
Embodiment
By describing technology contents of the present invention, structural feature in detail, being realized object and effect, below in conjunction with execution mode and coordinate accompanying drawing to be explained in detail.
During common dual video decoder, only, when selecting to carry out preview, just enable preview and play service, with saving resource expense.But in order to meet user for the requirement of rapid preview, system must support two-way video can be naturally, switch fast, and guarantee that Internet Transmission and the video playback of this two-way decoding can not influence each other.
Refer to Fig. 1, the two-way decoding fast switch over method based on song preview application of the present invention, comprises the following steps:
Initialization the first decoder and the second decoder when a. system starts, the first decoder is responsible for main video decode, the second decoder is responsible for preview video decoding, audio, video data after main video normal decoder is play in main viewfinder, main viewfinder picture is current display frame, wait for preview switching signal, receive that preview switching signal performs step b;
B. the operating state that keeps the first decoder, open the second decoder, start H.264 decoded data processing threads, the data that get from FTP network are directly injected in the second decoder, realize the decoding of the second tunnel preview video, the audio, video data after preview video normal decoder carries out audio frequency and video broadcasting in preview form, and switching preview viewing window pictures is current display frame, wait for preview switching signal, receive that preview switching signal performs step c;
C. switching main viewfinder picture is current display frame, stops FTP Internet Transmission, stops data and injects thread, stops the second Video Decoder, removes data cached.
The single channel decoding that is different from prior art must stop current song and just can watch the defect of preview, and the present invention adopts two-way decoding, and You Yi road decoder is processed separately preview video, at station of ordering songs and TV end, can play two-path video simultaneously; Select FTP Internet Transmission mode to download preview video data, reduce the interference that main video-song is play; When preview and main video switch mutually, enable immediately decoder piecemeal injecting data, reach the object of decoding fast, and utilize the optimization of switching form displaying time to switch effect.
In one embodiment, before step a, the two-way decoding fast switch over method based on song preview application also comprises that transmission of video background server provides the step of FTP transmission service.
In one embodiment, before transmission of video background server provides the step of FTP transmission service, two-way decoding fast switch over method based on song preview application is also included in built-in decoding chip in amusement song-order machine top box and supports two-way decoding function, realizes at TV end and user's station of ordering songs and decodes simultaneously and export the step of MPEG video and H264 video.
In one embodiment, in step a, two-way decoding fast switch over method based on song preview application also comprises the numbering in Qu Ku according to the current selected song of user, and ftp server address and the port of default, the step of the URL address that structure the second decoder is play.
In one embodiment, in step b, when enabling the second decoder, the two-way decoding fast switch over method based on song preview application also comprises establishment Network Data Capture service thread, obtains the step of H264 video source data by FTP.
In one embodiment, in step b, the action of switching form is to rely on the event mechanism of informing of decoder to complete.
In one embodiment, the event mechanism of informing of described decoder is: when the second decoder gets the first frame video image event, show that the second decoder has started the decoding of video data, now the form of Switch Video shows, the second decoder continues to obtain data decoding afterwards.
In one embodiment, in step c, stop data and inject the step of thread, also comprise whether data are injected to thread stops judging, if data are injected thread, stop, carrying out and stop the second Video Decoder and remove data cached action, if data are injected thread, do not stop, after compulsory withdrawal thread, carry out and stop the second Video Decoder and remove data cached action again.
The present invention is directed to the slow problem of amusement VOD system product preview video switch speed, propose the two-way decoding fast switch over method based on song preview application.Practical application proof the method can be accelerated the mutual switch speed between main video and preview video, and the speed of service of assurance system is unaffected, and provides the more experience of high-quality by effect of optimization for user.
Two-way decoding fast switch over method of the present invention, in specific embodiment, comprises the switching of two aspects:
While the first, entering preview, main video switches to preview video.
In amusement VOD system, generally all in main video-song broadcast state, only after selecting certain song preview, be just switched to preview video.Message by clicking song preview and producing, can analyze selected song number.FTP by system connects setting, comprises the information such as server ip, port, user name, just can obtain the URL of song, by URL, from FTP website, downloads H.264 preview song source data.
The decoder of initialization two-way when system starts, but only have first via decoder to carry out song video decode.When request enters preview page, keep first via decoder states, and open the specified decoder of preview, start H.264 decoded data processing threads, for the data that get on network are directly injected into decoder, realize the decoding of the second road video.
For considering that decoder is from starting video data decoding, to really there being video to broadcast middle not video, can show.Therefore, before getting video the first frame data, be to close video display window, until get first PTS of audio frequency by event, determine and had the frame of video that can show, then be switched to preview interface, open video and show.
While the second, exiting preview, preview video is to main video switch.
Equally, while exiting preview due to preview video stop there will be blank screen, for making user obtain better visual experience, adopt and first switch form to main video, then stop preview.
Discharge current preview video and play shared resource, first stop FTP and download, thereby make data acquisition unsuccessfully exit H264InjThread thread.If now thread fails to exit in time, before stopping decoding, force to peel off to cancel this thread.Finally, stop current video decoder, and identify preview and stop tag mark.
Refer to Fig. 2, the method that two-way decoding is switched fast comprises subordinate's step:
Step 1: built-in decoding chip is supported two-way decoding function in amusement song-order machine top box, realizes at TV end and user's station of ordering songs and decodes simultaneously and export MPEG video and H264 video;
Step 2: transmission of video background server is enabled FTP Server, provides FTP transmission service.After order programme electrifying startup amusement program-requesting software, click the preview function of the song requesting song page;
Step 3: receive after user's input, according to the numbering of selecting the current selected song of user in Qu Ku, and ftp server address and the port of default, the URL address that structure is play;
Step 4: enable the second tunnel decoding, create Network Data Capture service thread, obtain H264 video source data by FTP, H264, originally as TS stream file, does not need can be injected in decoder through conversion, and decoding efficiency is provided;
Step 5: inform mechanism according to decoder event, when getting the first frame video image event, show that current decoder has started the decoding of video data, now the form of Switch Video shows, continues to obtain data decoding afterwards;
Step 6: user clicks the exit function of preview page, keeps TV end to show that song video is constant, and on user's station of ordering songs, in progress video is switched to song video by preview video;
Step 7: stop preview Internet Transmission, stop obtaining of network data, make it exit preview data and obtain thread, stop video decode, close decoder;
The invention has the advantages that: for the processor products of supporting two-way decoding, the present invention decode MPEG and video source H.264 simultaneously, the two-way decoding realizing in song preview is switched fast, for user provides smooth song preview, serves.
The foregoing is only embodiments of the invention; not thereby limit the scope of the claims of the present invention; every equivalent structure or conversion of equivalent flow process that utilizes specification of the present invention and accompanying drawing content to do; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.
Claims (6)
1. the two-way decoding fast switch over method based on song preview application, is characterized in that, comprises the following steps:
Initialization the first decoder and the second decoder when a. system starts, the first decoder is responsible for main video decode, the second decoder is responsible for preview video decoding, audio, video data after main video normal decoder is play in main viewfinder, main viewfinder picture is current display frame, wait for preview switching signal, receive that preview switching signal performs step b;
B. the operating state that keeps the first decoder, open the second decoder, start H.264 decoded data processing threads, the data that get from FTP network are directly injected in the second decoder, realize the decoding of the second tunnel preview video, the audio, video data after preview video normal decoder carries out audio frequency and video broadcasting in preview form, and switching preview viewing window pictures is current display frame, wait for preview switching signal, receive that preview switching signal performs step c;
C. switching main viewfinder picture is current display frame, stops FTP Internet Transmission, stops data and injects thread, stops the second Video Decoder, removes data cached;
Before step a, also comprise that transmission of video background server provides the step of FTP transmission service;
Before transmission of video background server provides the step of FTP transmission service, be also included in built-in decoding chip in amusement song-order machine top box and support two-way decoding function, realize at TV end and user's station of ordering songs and decode simultaneously and export the step of MPEG video and H264 video.
2. the two-way decoding fast switch over method based on song preview application according to claim 1, it is characterized in that: in step a, also comprise the numbering in Qu Ku according to the current selected song of user, and ftp server address and the port of default, the step of the URL address that structure the second decoder is play.
3. the two-way decoding fast switch over method based on song preview application according to claim 1, it is characterized in that: in step b, when enabling the second decoder, also comprise and create Network Data Capture service thread, by FTP, obtain the step of H264 video source data.
4. the two-way decoding fast switch over method based on song preview application according to claim 1, is characterized in that: in step b, the action of switching form is to rely on the event mechanism of informing of decoder to complete.
5. the two-way decoding fast switch over method based on song preview application according to claim 4, it is characterized in that: the event mechanism of informing of described decoder is: when the second decoder gets the first frame video image event, show that the second decoder has started the decoding of video data, now the form of Switch Video shows, the second decoder continues to obtain data decoding afterwards.
6. the two-way decoding fast switch over method based on song preview application according to claim 1, it is characterized in that: in step c, stop data and inject the step of thread, also comprise whether data are injected to thread stops judging, if data are injected thread, stop, carrying out and stop the second Video Decoder and remove data cached action, if data are injected thread, do not stop, after compulsory withdrawal thread, carry out and stop the second Video Decoder and remove data cached action again.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010619682.6A CN102572421B (en) | 2010-12-31 | 2010-12-31 | Rapid double-line decoding switching method based on song preview application |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010619682.6A CN102572421B (en) | 2010-12-31 | 2010-12-31 | Rapid double-line decoding switching method based on song preview application |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102572421A CN102572421A (en) | 2012-07-11 |
CN102572421B true CN102572421B (en) | 2014-03-26 |
Family
ID=46416732
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201010619682.6A Active CN102572421B (en) | 2010-12-31 | 2010-12-31 | Rapid double-line decoding switching method based on song preview application |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102572421B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107484014A (en) * | 2017-07-25 | 2017-12-15 | 深圳Tcl数字技术有限公司 | Information source fast switch over method, television equipment and storage medium |
CN109218763A (en) * | 2018-11-12 | 2019-01-15 | 青岛海信传媒网络技术有限公司 | A kind of method and smart television of streaming media video switching |
CN111669541A (en) * | 2019-03-08 | 2020-09-15 | 西安诺瓦电子科技有限公司 | Pre-monitoring picture display method and display system |
CN112966130B (en) * | 2021-03-18 | 2022-07-15 | 北京三快在线科技有限公司 | Multimedia resource display method, device, terminal and storage medium |
CN115225955A (en) * | 2021-04-16 | 2022-10-21 | 海信视像科技股份有限公司 | Display device, video switching method, video switching device and storage medium |
CN113453064B (en) * | 2021-06-18 | 2023-02-24 | Vidaa(荷兰)国际控股有限公司 | Resource playing method and display equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101267516A (en) * | 2007-03-14 | 2008-09-17 | 索尼德国有限责任公司 | Method for displaying video pictures |
CN101321254A (en) * | 2007-06-08 | 2008-12-10 | 三星电子株式会社 | Multichannel display method and system for digital broadcast-allowed terminal |
CN101483766A (en) * | 2008-12-31 | 2009-07-15 | 宇龙计算机通信科技(深圳)有限公司 | Previewing method, apparatus and mobile terminal for mobile television |
CN101764974A (en) * | 2010-01-08 | 2010-06-30 | 烽火通信科技股份有限公司 | Method and system for implementing multi-program preview of IPTV electronic program list |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070016611A1 (en) * | 2005-07-13 | 2007-01-18 | Ulead Systems, Inc. | Preview method for seeking media content |
-
2010
- 2010-12-31 CN CN201010619682.6A patent/CN102572421B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101267516A (en) * | 2007-03-14 | 2008-09-17 | 索尼德国有限责任公司 | Method for displaying video pictures |
CN101321254A (en) * | 2007-06-08 | 2008-12-10 | 三星电子株式会社 | Multichannel display method and system for digital broadcast-allowed terminal |
CN101483766A (en) * | 2008-12-31 | 2009-07-15 | 宇龙计算机通信科技(深圳)有限公司 | Previewing method, apparatus and mobile terminal for mobile television |
CN101764974A (en) * | 2010-01-08 | 2010-06-30 | 烽火通信科技股份有限公司 | Method and system for implementing multi-program preview of IPTV electronic program list |
Also Published As
Publication number | Publication date |
---|---|
CN102572421A (en) | 2012-07-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101917391B (en) | Method for playing network video and system for playing network video | |
CN102572421B (en) | Rapid double-line decoding switching method based on song preview application | |
CN101803359B (en) | Systems and methods of differentiated requests for network access | |
CN100515056C (en) | Method, system apparatus and set top box for displaying mutli-channel information in identical picture | |
US9473549B2 (en) | Method of playing internet video and related electronic device | |
CN105721921A (en) | Self-adaptive selection method for multi-window video decoder | |
CN102917270A (en) | Multi-video dynamic-previewing method, device and system | |
CN108989904A (en) | The method and apparatus for playing broadcasted content | |
CN106612463A (en) | Barrage processing methods and system, and terminal | |
US9167294B2 (en) | Apparatus for switching television channels and method thereof | |
CN103945258B (en) | A kind of channel switching method and radiovisor | |
CN105657501B (en) | A kind of digital TV direct system and method | |
KR20080108819A (en) | Method for channel switching, method and apparatus for performing the method | |
WO2020098504A1 (en) | Video switching control method and display device | |
CN103067747A (en) | Interactive digital TV display mode | |
EP3152910B1 (en) | Minimizing input lag in a remote gui tv application | |
CN114073098B (en) | Streaming media synchronization method and display device | |
CN103200458A (en) | Television program message display method and user equipment | |
WO2007073655A1 (en) | Method and system for tv program real time recording and intelligent demanding | |
CN101345883B (en) | Method for fast displaying multimedia broadcasting channel image | |
CN105828162A (en) | Video display method and device | |
EP2228985A1 (en) | Combined television data stream, method for displaying television channel and method for generating combined television data stream | |
CN101998165B (en) | Method and system for switching channels in IPTV system | |
CN103686336A (en) | Video playing control method and device | |
KR100847531B1 (en) | Method of switching digital tv application and computer-readable medium having thereon program performing function embodying the same |
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 |