A kind of realization multimedia object storage and back method[technical field]
The present invention relates to a kind of multimedia technology, particularly a kind of realization multimedia object storage and back method.
[background technology]
Along with the development of Computer Multimedia Technology, electronic whiteboard with popularize; The traditional blackboard of electronic whiteboard replacement progressively in modern teaching, the conference process; The multimedia effect of utilizing computer technology to produce is significantly improved the effect of Teaching Quality, meeting; And, can deepen understanding and memory to the content of teaching, meeting to these multimedia storage and playback.And present multimedia storage and playback technology only limit to the method that screen is grabbed screen, and the data that screen is grabbed the storage of screen method are generally picture format, and it is very big to take up room, and the CPU occupation rate is very high.
[summary of the invention]
The technical matters that the present invention will solve is to provide storage of a kind of realization multimedia object and back method, makes to take up room lessly, and the CPU occupation rate is lower.
The present invention is achieved in that a kind of realization multimedia object storage and back method, and it comprises the steps:
Step 10, establishment project engineering in the project engineering, are created the painting canvas window;
Step 20, set up needed multimedia object class:
The Object Creation class: during the recording multimedia Object Creation, a copy of preservation;
Object moves class: the pixel-shift amount the when multimedia object that record is chosen carries out move operation;
Object convergent-divergent class: the pixel-shift amount the when multimedia object that record is chosen carries out zoom operations;
Object rotation class: the pixel-shift amount the when multimedia object that record is chosen is rotated operation;
Object deletion class: the sequence number at storage list of the multimedia object of record deletion;
Step 30, carry out multimedia object when storage,, carry out corresponding multimedia object class data structure storage respectively according to time sequencing to the concrete operations of multimedia object;
Step 40, in the time of need carrying out playback; Create the playback thread,, read the data of having stored one by one according to last sequencing of time; Carry out data structure analysis then and belong to which multimedia object class, on the painting canvas window, utilize the 2D draw library of operating system to draw multimedia object.
Said playback thread comprises the operation thread that playback begins, playback tentative, playback stops.
The present invention has following advantage: through setting up the time sequencing of needed multimedia object class according to Object Operations; Carry out the data structure storage of respective classes respectively; Logical again establishment thread utilizes the 2D draw library of operating system to draw according to the respective classes of running time and data structure by frame; Make to take up room lessly, the CPU occupation rate is lower.
[description of drawings]
The present invention is further illustrated to combine embodiment with reference to the accompanying drawings.
Fig. 1 is the inventive method FB(flow block).
[embodiment]
The present invention is achieved in that a kind of realization multimedia object storage and back method, and it comprises the steps:
Step 10, establishment project engineering in the project engineering, are created the painting canvas window; Present embodiment is to adopt Delphi 7 to develop, but the invention is not restricted to this, also can use other Software Development Platform.
Step 20, set up needed multimedia object class:
Object Creation class: be used for when the recording multimedia Object Creation copy of preservation;
Object moves class: the pixel-shift amount when being used to write down the multimedia object of choosing and carrying out move operation;
Object convergent-divergent class: the pixel-shift amount when being used to write down the multimedia object of choosing and carrying out zoom operations;
Object rotation class: be used to write down the multimedia object of choosing and be rotated the pixel-shift amount when operating;
Object deletion class: the sequence number that is used for the multimedia object of record deletion at storage list;
Step 30, multimedia object being operated and stored simultaneously, when carrying out the multimedia object storage, is according to the time sequencing to the concrete operations of multimedia object, carries out the data structure storage of corresponding multimedia object class respectively; The operation of multimedia object can be that Object Creation, object move, object convergent-divergent, object rotation, object deletion any or appoint severally, the related data structure storage is all carried out in each step operation.
Step 40, in the time of need carrying out playback; Create the playback thread; According to last sequencing of time; This sequencing is in the step 30 time sequencing to the concrete operations of multimedia object; Read the data of having stored one by one; Carry out data structure analysis then and belong to which multimedia object class, and on the painting canvas window, utilize the 2D draw library of operating system to draw multimedia object according to the multimedia object class of analyzing gained.
Said playback thread comprises the operation thread that playback begins, playback tentative, playback stops.As: after playback begins, when needing on painting canvas, to annotate and comment on operation, just carry out the tentative work of thread; Then can carry out playback termination work if will finish playback.
The preservation that related operational order comprises multimedia object in the above-mentioned steps with read, the control of multithreading, the mapping operation on painting canvas.
The present invention has following advantage: through setting up the time sequencing of needed multimedia object class according to Object Operations; Carry out the data structure storage of respective classes respectively; Logical again establishment thread utilizes the 2D draw library of operating system to draw according to the respective classes of running time and data structure by frame; Make to take up room lessly, the CPU occupation rate is lower.
Though more than described the specific embodiment of the present invention; But the technician who is familiar with the present technique field is to be understood that; We described concrete embodiment is illustrative; Rather than be used for qualification to scope of the present invention; Those of ordinary skill in the art are in the modification and the variation of the equivalence of doing according to spirit of the present invention, all should be encompassed in the scope that claim of the present invention protects.