CN103152645A - Continuous courseware playing method based on electronic schoolbag - Google Patents
Continuous courseware playing method based on electronic schoolbag Download PDFInfo
- Publication number
- CN103152645A CN103152645A CN2013100931121A CN201310093112A CN103152645A CN 103152645 A CN103152645 A CN 103152645A CN 2013100931121 A CN2013100931121 A CN 2013100931121A CN 201310093112 A CN201310093112 A CN 201310093112A CN 103152645 A CN103152645 A CN 103152645A
- Authority
- CN
- China
- Prior art keywords
- courseware
- thread
- page
- play
- main thread
- 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.)
- Pending
Links
Images
Landscapes
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention discloses a continuous courseware playing method based on an electronic schoolbag, which is used for solving a problem that a playing page does not respond or flashes due to network problems when an android platform electronic schoolbag plays the online courseware. According to the method, an interface operation for playing the courseware is realized, page user operation and courseware page display are separated, cross-thread data interaction is utilized for controlling, an Activity thread is prohibited from being played in a main thread and a courseware display thread is called; a new picture is updated and drawn in the courseware display thread and then displayed, class implementation video play and buffer are refreshed by the courseware display thread through pages which carry on SurfaceView encapsulation, the courseware is drawn according to the page type of the main thread, the courseware play page of the type is refreshed by the thread to display the buffer data rate, so that an effect of smoothly playing the online courseware on the electronic schoolbag is realized.
Description
Technical field
The present invention relates to the e-schoolbag Android client network courseware study play-back technology of IT application in education sector industry, particularly a kind of free of discontinuities based on e-schoolbag is play the courseware method.
Background technology
Along with China infrastructure is set up constantly and improved, constantly the popularizing of the wireless networks such as Wi-Fi and 3G deeply provides advantage for IT application in education sector.Rely on Digital Campus and resource platform, agree with the magnanimity resource of present education content, utilize the multiple terminals, various forms of education resources, education and guidance are provided, resources-type application is for the head of a family, student and teacher set for this platform.For education resource, video class education resource especially, it has and contains much information, and learns vividly, interesting, active, is very easily accepted by the student, will account for larger specific gravity in fields such as classroom instruction, remote teaching and extracurricular reviews.This has more and more higher requirement to video jukebox software to the processing of data and demonstration and to the processing of network data.For emerging Android platform, video playback is not a problem, but will solve the smooth of broadcast and to the access frequency aspect of network, many places that have much room for improvement can also be arranged.
Courseware is to be drawn at page previous frame one frame by painting canvas, traditional Android page need to be in the main thread of UI frame update, may cause some problems, such as the overlong time of frame update, the function that so main UI thread can drawn blocks.Can't respond the message such as button, touch screen.And review and the network loading aspect, because the page is not with buffering, come display frame so all can ask network data at every turn, cause long and display frame stuck phenomenon of load time, the position that the user has just seen still will wait for but that toward reviewing long period wait network loads and could again watch.
Summary of the invention
Goal of the invention: technical problem to be solved by this invention is for the deficiencies in the prior art, provides a kind of free of discontinuities based on e-schoolbag to play the courseware method.
in order to solve the problems of the technologies described above, the invention discloses a kind of free of discontinuities based on e-schoolbag and play the courseware method, the classes of pages of main thread is operated as the use page user homophony entrance of playing courseware, realize playing the interface operation of courseware, to use page user operation to show with the courseware page separates, use inter-thread data to control alternately, forbid that in main thread the thread that carries of Activity plays and call courseware and show thread, show at courseware and show after in thread, new picture has been drawn in renewal, courseware demonstration thread is realized broadcast and the buffering of video by the page furbishing class of inheriting the SurfaceView encapsulation, carrying out courseware by the classes of pages of main thread draws, and refresh class by thread and play page display buffer data progress at courseware.
In the present invention, main thread is carried out following steps:
Step 1: the user selects the courseware play;
Step 2: main thread initializes interface and parameter;
Step 3: main thread calls courseware and shows thread, and shows the loading wait page;
Step 4: start courseware and show thread, prepare to carry out the Internet video asynchronous play;
Step 5: whether main thread judges current is broadcast state, is to enter step 6, is the no step 9 that enters;
Step 6: main thread obtains the based courseware data, is synchronized to courseware and shows that thread shows;
Step 7: main thread obtains courseware and shows the thread progress, and shows with progress bar;
Step 8: main thread judges by call back function whether Internet video finishes, and is to enter step 9, is the no step 6 of returning.
Step 9: the notice courseware shows that journey stops.
In the present invention, courseware shows the thread execution following steps:
Step 10: create rendered object, the initialization render cache;
Step 11: add call back function, main thread is by the synchronous state of playing thread of readjustment;
Step 12: use a buffer memory to draw the page and be presented at the interface;
Step 13: when the page need to change, use another buffer memory to draw new page, and be substituted into display page;
Step 14: judging whether finish or stop, is to enter step 15, is judged as NO and returns to step 13;
Step 15: ends drawing is destroyed object, releasing resource.
In the present invention, the classes of pages of main thread is to play the homophony entrance of courseware, such mainly realizes the interface operation play, utilize visual control and video demonstration object on the interface to bind, import address or the path of Video Courseware by Intent into, then import object video into by method to set up.Object video is realized the monitoring of the variety of event of video is completed to be needed in playing process to call, and provides and the player size is set calls, and loud ditty is set uses.Play and the broadcast of selection progress by calling to realize suspending, call the release of completing playing resource when broadcast finishes.The building method of object video, the building method of use superclass.The capital is carried out self-defined initial method and is used for initialization interface and parameter.
The present invention is applied to e-schoolbag when the playing network courseware, solves the broadcast interface appearance and dodges the problem that the operation of user in screen situation or interface display process " is blocked ".Traditional courseware is all update displayed UI(User Interface in main thread when playing, user interface) picture, this part is exactly to draw the basic reason that above problem appears in the courseware frame update.
The present invention will use page user operation and the courseware page to show to separate, use inter-thread data to control alternately, and use buffering to prevent the animation flicker, upgrade to show after having drawn new picture in courseware demonstration thread.Can effectively solve when the playing network courseware, review with loading procedure in wait as long for and the break that occurs, owing to using page user operation and the courseware page to show separately, user's operation does not appear yet without situation about responding.
The thread that carries of Activity when preventing that Android from play using courseware in direct service routine is play, and the situation of screen or " blocking " occurs dodging.Each interface is an Activity in the Android system, and the interface switching operation is the instantiation operation between a plurality of different Activity in fact.The start-up mode of Activity has determined the startup operational mode of Activity in the Android system.The present invention realizes playing the courseware function, is not to realize in classes of pages Activity, and it is mutual that the page of main thread shows that class realizes that just the user operates, and carries out data interaction with the demonstration class, reaches the function of control.
Courseware of the present invention shows that thread realizes the functions such as broadcast, buffering of video by the page furbishing class of inheriting the SurfaceView encapsulation, carry out drafting function to courseware by the classes of pages of main thread, and refresh buffering by thread and draw in class data cached progress and be presented at courseware and play the page and show, the monitoring buffering of provide broadcast in the classes of pages of main thread, suspending, advance, retreat is drawn class, by such design, the situation of card appears in the time of can effectively avoiding playing courseware in page demonstration class.SurfaceView can directly obtain view data from hardware interfaces such as internal memory or DMA because the Android SDK provides, and is a very important drawing container, and characteristic is: in can the thread outside main thread on screen drawing.Cause main thread to block when can avoid like this picture task heavy, thereby improved the reaction speed of program.
The present invention cushions the method for drawing class heavy duty SurfaceView, thread example of instantiation, and this operation is placed in building method.Then by inserting certain operations in the life cycle callback method, when buffering drafting class is created, opens thread execution and draw, thread can show object by refreshing courseware, just stops this thread releasing resource when buffering drafting class is moved to end.
Beneficial effect: the present invention adopts free of discontinuities to play the courseware technology, and user's operation is separated with page furbishing, in the time of can avoiding playing the courseware obstruction, causes the user to operate the courseware page.And page furbishing partly uses the caching technology of SurfaceView, realizes that the page has prevented the situation of dodging screen and blocking when showing.The huge data volume of education resource data can't realize direct viewing on mobile phone and panel computer, when needing based courseware to play, and the lifting that smoothness and user experience.The present invention has adopted video to show that class controls and show picture.Present whole platform support MP4 H.264,3GP and WMV video resolve.
Description of drawings
Below in conjunction with the drawings and specific embodiments, the present invention is done further illustrating, above-mentioned and/or otherwise advantage of the present invention will become apparent.
Fig. 1 is main thread process chart of the present invention.
Fig. 2 is video playback thread process flow chart of the present invention.
Embodiment
The invention discloses a kind of free of discontinuities based on e-schoolbag and play the courseware method, when having solved the online courseware of Android platform e-schoolbag broadcast, because network problem causes playing the page without response or the situation of dodging screen.the present invention realizes playing the interface operation of courseware, to use page user operation to show with the courseware page separates, use inter-thread data to control alternately, forbid that in main thread the thread that carries of Activity plays and call courseware and show thread, show at courseware and show after in thread, new picture has been drawn in renewal, courseware demonstration thread is realized broadcast and the buffering of video by the page furbishing class of inheriting the SurfaceView encapsulation, carrying out courseware by the classes of pages of main thread draws, and refresh class by thread and play page display buffer data progress at courseware, reached the effect of the online courseware of smooth playing on e-schoolbag.
The present invention adopts free of discontinuities to play the courseware technology, uses multithreading that user's operation is separated with page furbishing.
Main thread is carried out following steps:
Step 1: the user selects the courseware play.
Step 2: initialization interface and parameter, can realize the demonstration of various layouts under different resolution.
Step 3: the display video Play Control is used the page, and shows the loading wait page.
Step 4: start the video playback thread, prepare to carry out the Internet video asynchronous play.
Whether step 5: judging current is broadcast state, is to enter step 6, is the no step 9 that enters.
Step 6: obtain the based courseware data, be synchronized to the broadcast thread and show.
Step 7: obtain courseware and show the thread progress, and show with progress bar.
Step 8: judging by call back function whether the courseware demonstration has shown complete, is to enter step 9, is the no step 6 of returning.
Step 9: the notice courseware shows that thread stops.
Courseware of the present invention shows the thread execution following steps.
Step 10: create rendered object, the initialization render cache.
Step 11: add call back function, main thread is by the synchronous state of playing thread of readjustment.
Step 12: use a buffer memory to draw the page and be presented at the interface.
Step 13: when the page need to change, use another buffer memory to draw new page, and be substituted into display page.
Step 14: judging whether finish or stop, is to enter step 15, is judged as NO and enters step 13.
Step 15: ends drawing is destroyed object, releasing resource.
The invention provides a kind of free of discontinuities based on e-schoolbag and play the courseware method; method and the approach of this technical scheme of specific implementation are a lot; the above is only the preferred embodiment of the present invention; should be understood that; for those skilled in the art; under the prerequisite that does not break away from the principle of the invention, can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.In the present embodiment not clear and definite each part all available prior art realized.
Claims (3)
1. the free of discontinuities based on e-schoolbag is play the courseware method, the classes of pages of main thread is operated as the use page user homophony entrance of playing courseware, realize playing the interface operation of courseware, it is characterized in that, to use page user operation to show with the courseware page separates, use inter-thread data to control alternately, forbid that in main thread the thread that carries of Activity plays and call courseware and show thread, show at courseware and show after in thread, new picture has been drawn in renewal, courseware demonstration thread is realized broadcast and the buffering of video by the page furbishing class of inheriting the SurfaceView encapsulation, carrying out courseware by the classes of pages of main thread draws, and refresh class by thread and play page display buffer data progress at courseware.
2. a kind of free of discontinuities based on e-schoolbag according to claim 1 is play the courseware method, it is characterized in that, main thread is carried out following steps:
Step 1: the user selects the courseware play;
Step 2: main thread initializes interface and parameter;
Step 3: main thread calls courseware and shows thread, and shows the loading wait page;
Step 4: start courseware and show thread, prepare to carry out the Internet video asynchronous play;
Step 5: whether main thread judges current is broadcast state, is to enter step 6, is the no step 9 that enters;
Step 6: main thread obtains the based courseware data, is synchronized to courseware and shows that thread shows;
Step 7: main thread obtains courseware and shows the thread progress, and shows with progress bar;
Step 8: main thread judges by call back function whether Internet video finishes, and is to enter step 9, is the no step 6 of returning;
Step 9: the notice courseware shows that journey stops.
3. a kind of free of discontinuities based on e-schoolbag according to claim 2 is play the courseware method, it is characterized in that,
Courseware shows the thread execution following steps:
Step 10: create rendered object, the initialization render cache;
Step 11: add call back function, main thread is by the synchronous state of playing thread of readjustment;
Step 12: use a buffer memory to draw the page and be presented at the interface;
Step 13: when the page need to change, use another buffer memory to draw new page, and be substituted into display page;
Step 14: judging whether finish or stop, is to enter step 15, is judged as NO and returns to step 13;
Step 15: ends drawing is destroyed object, releasing resource.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013100931121A CN103152645A (en) | 2013-03-22 | 2013-03-22 | Continuous courseware playing method based on electronic schoolbag |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013100931121A CN103152645A (en) | 2013-03-22 | 2013-03-22 | Continuous courseware playing method based on electronic schoolbag |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103152645A true CN103152645A (en) | 2013-06-12 |
Family
ID=48550473
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2013100931121A Pending CN103152645A (en) | 2013-03-22 | 2013-03-22 | Continuous courseware playing method based on electronic schoolbag |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103152645A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105549820A (en) * | 2015-12-11 | 2016-05-04 | 魅族科技(中国)有限公司 | Graphic user interface display method and terminal |
CN115509671A (en) * | 2022-11-21 | 2022-12-23 | 北京世纪好未来教育科技有限公司 | Interactive courseware playing method, device, equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1933594A (en) * | 2005-09-14 | 2007-03-21 | 王世刚 | Multichannel audio-video frequency data network transmitting and synchronous playing method |
CN102455909A (en) * | 2011-02-25 | 2012-05-16 | 中标软件有限公司 | Method for asynchronously loading power point documents |
CN102624679A (en) * | 2011-01-28 | 2012-08-01 | 陶祖南 | Realization method for multilevel intelligent multifunctional multimedia information interaction system |
-
2013
- 2013-03-22 CN CN2013100931121A patent/CN103152645A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1933594A (en) * | 2005-09-14 | 2007-03-21 | 王世刚 | Multichannel audio-video frequency data network transmitting and synchronous playing method |
CN102624679A (en) * | 2011-01-28 | 2012-08-01 | 陶祖南 | Realization method for multilevel intelligent multifunctional multimedia information interaction system |
CN102455909A (en) * | 2011-02-25 | 2012-05-16 | 中标软件有限公司 | Method for asynchronously loading power point documents |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105549820A (en) * | 2015-12-11 | 2016-05-04 | 魅族科技(中国)有限公司 | Graphic user interface display method and terminal |
CN115509671A (en) * | 2022-11-21 | 2022-12-23 | 北京世纪好未来教育科技有限公司 | Interactive courseware playing method, device, equipment and storage medium |
CN115509671B (en) * | 2022-11-21 | 2023-12-05 | 北京世纪好未来教育科技有限公司 | Interactive courseware playing method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109618177B (en) | Video processing method and device, electronic equipment and computer readable storage medium | |
WO2017113856A1 (en) | Barrage display method and device | |
CN110874959B (en) | Multi-terminal same-screen teaching system and teaching method | |
CN114518817B (en) | Display method, electronic device and storage medium | |
WO2017206748A1 (en) | Video playing control method and apparatus, and video playing system | |
CN103581754A (en) | Data display method and intelligent equipment | |
US10271105B2 (en) | Method for playing video, client, and computer storage medium | |
CN103546816A (en) | User interface processing and video playing method and user interface system | |
US20190378319A1 (en) | Virtual scene display method and apparatus, and storage medium | |
CN111901832B (en) | Wireless screen projection module and screen projection method of all-in-one machine | |
KR20180006433A (en) | Information processing method, terminal and computer storage medium | |
US8837912B2 (en) | Information processing apparatus, information processing method and program | |
WO2023231568A1 (en) | Video editing method and apparatus, computer device, storage medium, and product | |
CN111491190A (en) | Dual-system camera switching control method and display equipment | |
CN110505511A (en) | It is a kind of to play the method, apparatus of video, system in webpage and calculate equipment | |
CN106131643A (en) | A kind of barrage processing method, processing means and electronic equipment thereof | |
CN103152645A (en) | Continuous courseware playing method based on electronic schoolbag | |
CN109831688A (en) | A kind of video suspension playback method and device based on iOS system | |
CN112788378B (en) | Display device and content display method | |
CN114640876B (en) | Multimedia service video display method, device, computer equipment and storage medium | |
CN102419708B (en) | Method and device for operating Java 2 micro edition (J2ME) games | |
CN109445860A (en) | The method for guiding electronic apparatus system booting, electronic equipment, readable storage medium storing program for executing | |
CN112788381B (en) | Display apparatus and display method | |
CN110389692A (en) | A kind of display methods of status bar, device and storage medium | |
CN111897616B (en) | Content display method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20130612 |