CN107277412B - Video recording method and device, graphics processor and electronic equipment - Google Patents

Video recording method and device, graphics processor and electronic equipment Download PDF

Info

Publication number
CN107277412B
CN107277412B CN201710606284.2A CN201710606284A CN107277412B CN 107277412 B CN107277412 B CN 107277412B CN 201710606284 A CN201710606284 A CN 201710606284A CN 107277412 B CN107277412 B CN 107277412B
Authority
CN
China
Prior art keywords
thread
video
video record
image data
picture
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
Application number
CN201710606284.2A
Other languages
Chinese (zh)
Other versions
CN107277412A (en
Inventor
梁宇轩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710606284.2A priority Critical patent/CN107277412B/en
Publication of CN107277412A publication Critical patent/CN107277412A/en
Application granted granted Critical
Publication of CN107277412B publication Critical patent/CN107277412B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The invention discloses a kind of video recording method and device, graphics processor and electronic equipment, this method includes:In response to the video record instruction detected, obtain the multiple velocity modes for including in video record instruction, according to multiple velocity modes of acquisition, respectively each velocity mode distributes corresponding video record thread, real-time image acquisition data, it shows that thread is rendered and shown to the image data using the rendering created, and video record is carried out according to corresponding velocity mode and the image data using video record thread.Compared with the existing technology, the present invention is separated display is rendered with video record, it is realized by different threads, so that video record process and rendering display process are independent mutually, and by distributing corresponding video record thread for multiple and different velocity modes, enabling obtain the video of multiple and different velocity modes in primary record.

Description

Video recording method and device, graphics processor and electronic equipment
Technical field
The present invention relates to field of communication technology more particularly to a kind of video recording method and device, graphics processor and electricity Sub- equipment.
Background technology
With the development of the communication technology and electronic equipment, various electronic equipments such as mobile phone, smart mobile phone, tablet computer are Through becoming a part indispensable in people's work and life.And as mobile terminal becomes increasingly popular, pass through electronic equipment It is greatly convenient that the function of recorded video is brought to user.
Currently, carrying out video record using electronic equipment, the video recorded is normal speed, is if desired obtained The video for accelerating broadcasting or slow play then needs to carry out post-processing to the video of normal speed, for example, passing through video editing Software handles the video of the normal speed, obtains the video for accelerating broadcasting or slow play.Therefore, the prior art exists Following defect:It can not be by once recording to obtain the video of friction speed.
Invention content
The main purpose of the present invention is to provide a kind of video recording method and device, graphics processor and electronic equipment, Aim to solve the problem that in the prior art can not be by once recording to obtain the video of friction speed the technical issues of.
To achieve the above object, first aspect present invention provides a kind of video recording method, the method includes:
In response to the video record instruction detected, the multiple velocity modes for including in the video record instruction are obtained;
According to multiple velocity modes, respectively each velocity mode distributes corresponding video record thread;
Real-time image acquisition data show that thread is rendered and shown to described image data using the rendering created Show, and video record is carried out according to corresponding velocity mode and described image data using multiple video record threads.
To achieve the above object, second aspect of the present invention provides a kind of video recording device, which includes:
Pattern acquiring module is obtained and is wrapped in the video record instruction for being instructed in response to the video record detected The multiple velocity modes contained;
Distribution module, for according to multiple velocity modes, respectively each velocity mode to distribute corresponding regard Frequency records thread;
Data acquisition module is used for real-time image acquisition data;
Processing module, for showing that thread is rendered and shown to described image data using the rendering that has created, and Video record is carried out according to corresponding velocity mode and described image data using multiple video record threads.
To achieve the above object, third aspect present invention provides a kind of graphics processor, and described image processor is for adjusting With and run second aspect offer video recording device.
To achieve the above object, third aspect present invention provides a kind of electronic equipment, and the electronic equipment includes above-mentioned the The graphics processor that three aspects provide.
A kind of video recording method and device of present invention offer, graphics processor and electronic equipment, wherein method include:It rings The video record instruction that Ying Yu is detected, obtains the multiple velocity modes for including in video record instruction, according to the more of acquisition A velocity mode, respectively each velocity mode distribute corresponding video record thread, real-time image acquisition data, using having created The rendering built shows that thread is rendered and shown to the image data, and using video record thread according to corresponding speed mould Formula and the image data carry out video record.Compared with the existing technology, the present invention is separated display is rendered with video record, by Different thread is realized so that video record process and to render display process independent mutually, and by for multiple and different speed moulds Formula distributes corresponding video record thread, enabling obtains the video of multiple and different velocity modes in primary record.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those skilled in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.
Fig. 1 is the structural schematic diagram of electronic equipment in the embodiment of the present invention;
Fig. 2 is a flow diagram of video recording method in the embodiment of the present invention;
Fig. 3 is another flow diagram of video recording method in the embodiment of the present invention;
Fig. 4 is another flow diagram of video recording method in the embodiment of the present invention;
Fig. 5 is another flow diagram of video recording method in the embodiment of the present invention;
Fig. 6 is a schematic diagram of video recording device in the embodiment of the present invention;
Fig. 7 is another schematic diagram of video recording device in the embodiment of the present invention;
Fig. 8 is another schematic diagram of video recording device in the embodiment of the present invention;
Display interface shows the schematic diagram of velocity mode when Fig. 9 is video record in the embodiment of the present invention.
Specific implementation mode
In order to make the invention's purpose, features and advantages of the invention more obvious and easy to understand, below in conjunction with the present invention Attached drawing in embodiment, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described reality It is only a part of the embodiment of the present invention to apply example, and not all embodiments.Based on the embodiments of the present invention, people in the art The every other embodiment that member is obtained without making creative work, shall fall within the protection scope of the present invention.
Can not be by once recording to obtain the video of friction speed due to existing in the prior art the technical issues of.
In order to solve the above-mentioned technical problem, the present invention proposes that a kind of video recording method, this method will render display and regard Frequency is recorded and is separated, and is realized by different thread so that video record process and to render display process independent mutually, and by for Multiple and different velocity modes distribute corresponding video record thread, enabling obtain multiple and different speed moulds in primary record The video of formula.
In embodiments of the present invention, above-mentioned video recording method is realized by video recording device, the video record Device is actually program module, is called by graphics processor (Graphics Processing Unit, GPU) and is executed.
Further, above-mentioned GPU belongs to electronic equipment, referring to Fig. 1, for the knot of electronic equipment in the embodiment of the present invention Structure schematic diagram, the electronic equipment include the processor connected by system bus, GPU, non-volatile memory medium, interior storage Device, network interface, display screen and input unit.Wherein, the non-volatile memory medium of electronic equipment is stored with operating system, and Above-mentioned video recording device, the video recording device is for realizing a kind of video recording method, wherein GPU can be called and be held Row is stored in the video recording device in non-volatile memory medium, to realize video record.The processor is for providing calculating And control ability, support the operation of entire electronic equipment.Built-in storage in electronic equipment is in non-volatile memory medium The operation of video recording device provides environment, can be stored with computer-readable instruction in the built-in storage, the computer-readable finger When order is executed by processor, it may make processor triggering GPU to execute a kind of video recording method, that is, call and run video record Device.Network interface is used to carry out network communication with other equipment.The display screen of electronic equipment can be liquid crystal display or Electric ink display screen etc., input unit can be the touch layers covered on display screen, can also be to be set on electronic equipment casing Button, trace ball or the touch-control version set can also be external keyboard, Trackpad or mouse etc..The electronic equipment can be hand Machine, personal computer, tablet computer or server etc..It will be understood by those skilled in the art that structure shown in Fig. 1, only It is the block diagram with the relevant part-structure of application scheme, does not constitute and other electronic equipments are applied to application scheme Restriction, specific electronic equipment may include than more or fewer components as shown in the figure, either combine certain components or It is arranged with different components.
Wherein, electronic equipment can be, but not limited to include:Camera, video recorder, smart mobile phone, notebook, tablet computer and Dress smart machine etc..
In embodiments of the present invention, it is called by being based on GPU and runs video recording device, enabling play GPU Performance in the electronic device renders display and video record to realize.
The technical solution that will be described in detail below based on the structure of electronic equipment shown in FIG. 1 in the embodiment of the present invention.
Referring to Fig. 2, for the flow diagram of video recording method in the embodiment of the present invention, the video recording method packet It includes:
Step 201 is instructed in response to the video record detected, obtains the multiple speed for including in the video record instruction Degree pattern;
Step 202, multiple velocity modes according to acquisition, respectively each velocity mode distribute corresponding video record Thread processed;
In embodiments of the present invention, speed when velocity mode refers to video playing, the velocity mode can be normal modes Formula can also be 2 times of patterns, 3 times of patterns, 4 times of patterns etc. quickening pattern, can also be half pattern, one third Pattern, a quarter pattern etc. slow speed mode, wherein the broadcasting speed of video is 30FPS under normal mode, i.e., broadcasting per second 30 video frame, quickening pattern and slow speed mode are then the typically speed of normal mode for normal mode, example Such as, speed=normal speed * speeds, the speed can be 2 times, 3 times, 4 times etc., and the multiple be integer when, then be based on should The broadcasting speed for the video that multiple obtains is very fast, and the interior video frame played relative to normal mode is more at the same time, belongs to Quickening pattern, for example, the number for the video frame that 2 times of patterns play in 1 second is 60.When multiple is the multiple less than 1, being based on should The broadcasting speed for the video that multiple obtains is slower, and the interior video frame played relative to normal mode is few at the same time, for example, The number for the video frame that half pattern plays in 1 second is 15.
Technical solution in embodiment for a better understanding of the present invention describes the setting of velocity mode by taking smart mobile phone as an example Process, specifically:User is when needing recorded video, the side of the camera icon on display screen by clicking smart mobile phone Formula, so as to smart mobile phone start camera application programs, and user can also click on camera shooting interface on setting button into Enter the selection interface of velocity mode, will be shown on the selection interface above-mentioned comprising normal mode, a variety of quickening patterns and a variety of Velocity mode including slow speed mode, user can be selected this recorded video by way of click, need the video recorded Velocity mode, for example, user selects normal mode, 2 times of patterns and half pattern.It can complete through the above way more The setting of a velocity mode, in addition, when user can also pre-set each recorded video by way of default setting Velocity mode.
In embodiments of the present invention, user can start the recording of video in such a way that button is recorded in click, to generate Video record instructs, and video recording device will respond video record instruction, obtains multiple speed in video record instruction Pattern.Multiple velocity mode can be that user's single is arranged, and can also be the velocity mode of default setting.And it is getting After multiple velocity modes, by according to multiple velocity modes of acquisition, respectively each velocity mode distributes corresponding video record Thread processed.
Wherein, each velocity mode corresponds to a video record thread, the video record thread be for according to Its corresponding velocity mode carries out video record.If for example, the corresponding video record thread A of 2 times of patterns, the video record The video that thread A is recorded is the video of 2 times of patterns.
Wherein, the video record thread of distribution can be existing in video record thread queue, can also be new establishment , specifically, when distributing video record thread, preferentially existing video record thread in video record thread queue is distributed To velocity mode, if the quantity of the video record thread in the video record thread queue is inadequate, new video record is created Thread, and the video record thread newly created is distributed into velocity mode, so that each velocity mode has with it one by one Corresponding video record thread.
Step 203, real-time image acquisition data show that thread carries out wash with watercolours to described image data using the rendering created Dye and display, and video record is carried out according to corresponding velocity mode and described image data using multiple video record threads System.
In embodiments of the present invention, camera is sent to video record by real-time image acquisition data, and by the image data Device processed, the video recording device show thread to the picture number after getting image data, using the rendering created Video record is carried out according to corresponding velocity mode and image data according to being rendered and shown, and using multiple video record threads System.Wherein, recording is obtained one and the matched video of its velocity mode by each video record thread.
In embodiments of the present invention, video recording device is according to multiple velocity modes of acquisition, respectively each speed mould Formula distributes corresponding video record thread, and real-time image acquisition data show thread to the picture number using the rendering created Video record is carried out according to corresponding velocity mode and the image data according to being rendered and shown, and using video record thread System.Compared with the existing technology, the present invention is separated display is rendered with video record, is realized by different threads so that video Recording process and rendering display process are independent mutually, and by distributing corresponding video record line for multiple and different velocity modes Journey, enabling obtain the video of multiple and different velocity modes in primary record.
Referring to Fig. 3, for another flow diagram of video recording method in the embodiment of the present invention, the video recording method Including:
Step 301 is instructed in response to the video record detected, obtains the multiple speed for including in the video record instruction Degree pattern;
Step 302, multiple velocity modes according to acquisition, respectively each velocity mode distribute corresponding video record Thread processed;
Step 303, real-time image acquisition data are called and are run the rendering display thread created, utilize the rendering Display thread carries out texture rendering to described image data and shows;And it is called by the way of poll and runs the video record Thread processed, obtains and caches from described image data according to corresponding velocity mode using the video record thread called and regard Frequency frame, to carry out video record.
In embodiments of the present invention, step 301 is retouched with step 201 in embodiment illustrated in fig. 2 and step 202 respectively with 302 The content stated is similar, is not repeated herein.
In embodiments of the present invention, after starting recording, video recording device will be first the distribution pair of each velocity mode The video record thread answered, and real-time image acquisition data call and run the rendering display thread created and use poll Mode call and run video record thread so that can cross using the rendering show thread to image data carry out texture rendering And show, and the video record thread called can be utilized to obtain and cache from image data according to corresponding velocity mode Video frame, to realize video record.
Wherein, which shows that thread can be existing thread, can also be the thread newly created, specifically, video Record device will confirm that whether existing rendering shows thread, if so, then showing that the wash with watercolours created can be called after starting recording Dye shows thread, if not having, new establishment, which renders, shows thread, shows thread as the wash with watercolours created the rendering of the new establishment Dye shows that thread is called.
In embodiments of the present invention, rendering display will realize from video record on different threads, be independent from each other Process renders and shows thread by carrying out texture rendering to image data, and includes on display circle by the image data after rendering On face so that user can watch the video of the normal speed of recording during recorded video.
Wherein, video recording device will also call and run allocated multiple video record threads, and using poll Video record thread is called and run to mode, and using the video record thread called according to corresponding velocity mode from image Acquisition and buffered video frame in data, to complete video record.If for example, have 3 video record threads, respectively thread 1, Corresponding velocity mode is normal mode, and thread 2, corresponding velocity mode is 2 times of patterns, thread 3, corresponding speed mould Formula is half pattern, then video recording device will all be called and transported for the image data obtained in real time each time respectively Row 3 threads, for recording 1 second video every time, video recording device calls and active thread 1, is pressed by the thread 1 30 frame video frame are obtained from image data according to normal mode, the video frame which is played as 1s, caching is extremely Under preset first path, simultaneously active thread 2 is then called, 60 are obtained from image data according to 2 times of patterns by the thread 2 Frame video frame, the video frame which is played as 1s are cached to the second preset path, and continue to call simultaneously Active thread 3 obtains 15 frame video frame according to half pattern by thread 3 from image data, by the 15 frame video frame It as the video frame that 1s is played, caches to preset third path, if not completing video record, return continues to call and transport Line journey 1, wherein the calling sequence of thread is thread 1- thread 2- threads 3, and returns to thread 1, by this polling mode, Realize the recording of the video of three kinds of different velocity modes.
It is understood that in embodiments of the present invention, after terminating video record, video recording device will not go the same way Video frame processing under diameter is video, and display reminding information, the prompt message are used to prompt whether to preserve the video of recording, if User clicks save button, then under preserving the video recorded to pre-set path or under the path of user's selection.Wherein, due to Each video record thread can access an independent video, therefore, by distributing one for each velocity mode The mode of video record thread, enabling obtain the video of friction speed pattern.
In embodiments of the present invention, video recording device is according to multiple velocity modes of acquisition, respectively each speed mould Formula distributes corresponding video record thread, and real-time image acquisition data, calls and runs the rendering display display created, profit Show that thread carries out texture rendering to image data and shows with the rendering, meanwhile, it is called and is run by the way of poll and regard Frequency records thread, obtains and caches from image data according to corresponding velocity mode using the video record thread called and regards Frequency frame, to carry out video record.By the way that video record is separated processing with display is rendered, enabling complete independently video record Process, and by distributing a video record thread for each video mode, and call using polling mode and run video Record thread so that each video thread can be obtained according to its corresponding velocity mode and buffered video frame, completes phase The recording of the video for the velocity mode answered so that the video that multiple and different velocity modes are obtained in primary record is possibly realized.
Referring to Fig. 4, for another flow diagram of video recording method in the embodiment of the present invention, the video recording method Including:
If step 401 detects landscaping effect setting operation, landscaping effect parameter is obtained;
Step 402 is instructed in response to the video record detected, obtains the multiple speed for including in the video record instruction Degree pattern;
Step 403, multiple velocity modes according to acquisition, respectively each velocity mode distribute corresponding video record Thread processed;
Step 404, real-time image acquisition data are called and are run the beautification thread created, pass through the beautification thread Landscaping treatment, the image data after being beautified are carried out to the image data got in real time using the landscaping effect parameter;
Step 405 shows that thread is rendered and shown to described image data using the rendering created, and utilizes more A video record thread carries out video record according to corresponding velocity mode and described image data.
In embodiments of the present invention, before starting recorded video, landscaping effect when recorded video can be arranged in user, and Video recording device will obtain landscaping effect parameter, wherein the landscaping effect is joined after detecting landscaping effect setting operation Number is pre-set.
After starting recorded video, video recording device is according to multiple velocity modes of acquisition, respectively each speed mould Formula distributes corresponding video record thread, and real-time image acquisition data are called and run the beautification thread created, pass through the U.S. Change thread and landscaping treatment, the picture number after being beautified are carried out to the image data got in real time using landscaping effect parameter According to.Image data after the beautification, which will give to render simultaneously, shows thread and multiple video record threads, utilizes the rendering created Display thread is rendered and is shown to the image data after beautification so that can be shown with landscaping effect on display interface Picture, and using video record thread according to corresponding velocity mode and beautification after image data carry out video record, make Video record can not only be realized by obtaining, additionally it is possible to obtain the video with landscaping effect.
In embodiments of the present invention, the beautification for the picture that operation setting is recorded and shown can be arranged in user by landscaping effect Effect, and after starting recording, landscaping treatment is carried out to the image data obtained in real time using landscaping effect parameter, and will be beautiful Image data after change shows thread and video record thread to rendering so that renders after showing that thread can utilize the beautification After image data is rendered and is shown, the picture with landscaping effect is obtained, and video record thread can also utilize beautification Image data carry out video record, obtain the video with landscaping effect, provided abundanter usage experience to the user.
Referring to Fig. 5, for the flow diagram of video recording method in the embodiment of the present invention, the video recording method packet It includes:
If step 501 detects that picture rotary setting operates, picture rotation parameter is obtained;
Step 502 is instructed in response to the video record detected, obtains the multiple speed for including in the video record instruction Degree pattern;
Step 503, multiple velocity modes according to acquisition, respectively each velocity mode distribute corresponding video record Thread processed;
Step 504, real-time image acquisition data are called and are run the picture rotation thread created, pass through the picture It rotates thread and picture rotation processing is carried out to described image data using the picture rotation parameter, obtain the postrotational figure of picture As data;
Step 505 shows that thread is rendered and shown to described image data using the rendering created, and utilizes more A video record thread carries out video record according to corresponding velocity mode and described image data.
In embodiments of the present invention, before starting recorded video, picture rotation when recorded video can be arranged in user, For example, handstand picture is rotated to be from normal pictures, be rotated by 90 ° from normal pictures etc., to meet the special video record of user Demand.
Wherein, if video recording device detects that picture rotary setting operates, picture rotation parameter is obtained, and starting After recording, according to multiple velocity modes of acquisition, respectively each velocity mode distributes corresponding video record thread, in real time Image data is obtained, the picture rotation thread created is called and run, thread is rotated using picture rotation ginseng by the picture It is several that picture rotation processing is carried out to image data, the postrotational image data of picture is obtained, and show using the rendering created Thread is rendered and is shown to the image data after rotation processing, using multiple video record threads according to corresponding speed mould Image data after formula and rotation processing carries out video record.
In embodiments of the present invention, user can complete setting for picture rotation parameter by executing the operation of picture rotary setting It sets so that render and show that thread can show the postrotational image of picture, and multiple video record threads are recorded To friction speed pattern and the postrotational video of picture, meet the recording demand of user.
It is understood that user before recorded video, can successively execute landscaping effect setting operation and picture rotation Turn setting operation so that after starting recording, video recording device can utilize landscaping effect parameter and picture rotation parameter The image data got in real time is handled, is obtained with landscaping effect and the postrotational image data of picture so that wash with watercolours Dye shows that thread is rendered using the image data, and shows there is landscaping effect and the postrotational picture of picture so that more A video record thread can obtain friction speed pattern, have landscaping effect and the postrotational video of picture.
Referring to Fig. 6, for the schematic diagram of video recording device in the embodiment of the present invention, which includes:
Pattern acquiring module 601 is obtained for being instructed in response to the video record detected in the video record instruction Including multiple velocity modes;
Distribution module 602, for multiple velocity modes according to acquisition, respectively each velocity mode distribution corresponds to Video record thread;
Data acquisition module 603 is used for real-time image acquisition data;
Processing module 604, for showing that thread is rendered and shown to described image data using the rendering created, And video record is carried out according to corresponding velocity mode and described image data using multiple video record threads.
In embodiments of the present invention, speed when velocity mode refers to video playing, the velocity mode can in the normal mode, It can also be 2 times of patterns, 3 times of patterns, 4 times of patterns etc. quickening pattern, can also be half pattern, one third mould Formula, a quarter pattern etc. slow speed mode, wherein the broadcasting speed of video is 30FPS under normal mode, i.e., per second to play 30 A video frame, quickening pattern and slow speed mode are then the typically speed of normal mode for normal mode, example Such as, speed=normal speed * speeds, the speed can be 2 times, 3 times, 4 times etc., and the multiple be integer when, then be based on should The broadcasting speed for the video that multiple obtains is very fast, and the interior video frame played relative to normal mode is more at the same time, belongs to Quickening pattern, for example, the number for the video frame that 2 times of patterns play in 1 second is 60.When multiple is the multiple less than 1, being based on should The broadcasting speed for the video that multiple obtains is slower, and the interior video frame played relative to normal mode is few at the same time, for example, The number for the video frame that half pattern plays in 1 second is 15.
Wherein, each velocity mode corresponds to a video record thread, the video record thread be for according to Its corresponding velocity mode carries out video record.If for example, the corresponding video record thread A of 2 times of patterns, the video record The video that thread A is recorded is the video of 2 times of patterns.
In embodiments of the present invention, video recording device is according to multiple velocity modes of acquisition, respectively each speed mould Formula distributes corresponding video record thread, and real-time image acquisition data show thread to the picture number using the rendering created Video record is carried out according to corresponding velocity mode and the image data according to being rendered and shown, and using video record thread System.Compared with the existing technology, the present invention is separated display is rendered with video record, is realized by different threads so that video Recording process and rendering display process are independent mutually, and by distributing corresponding video record line for multiple and different velocity modes Journey, enabling obtain the video of multiple and different velocity modes in primary record.
Further, in the embodiment shown in fig. 6, processing module 604 is specifically used for:
It calls and runs the rendering created and show thread, show that thread carries out described image data using the rendering Texture is rendered and is shown;And the video record thread is called and run by the way of poll, it is recorded using the video called Thread processed is obtained from described image data according to corresponding velocity mode and buffered video frame, to carry out video record.
In embodiments of the present invention, video recording device is according to multiple velocity modes of acquisition, respectively each speed mould Formula distributes corresponding video record thread, and real-time image acquisition data, calls and runs the rendering display display created, profit Show that thread carries out texture rendering to image data and shows with the rendering, meanwhile, it is called and is run by the way of poll and regard Frequency records thread, obtains and caches from image data according to corresponding velocity mode using the video record thread called and regards Frequency frame, to carry out video record.By the way that video record is separated processing with display is rendered, enabling complete independently video record Process, and by distributing a video record thread for each video mode, and call using polling mode and run video Record thread so that each video thread can be obtained according to its corresponding velocity mode and buffered video frame, completes phase The recording of the video for the velocity mode answered so that the video that multiple and different velocity modes are obtained in primary record is possibly realized.
Referring to Fig. 7, for the schematic diagram of video recording device in the embodiment of the present invention, which includes:Such as Pattern acquiring module 601, distribution module 602, data acquisition module 603 in embodiment illustrated in fig. 6 and processing module 604, and It is similar to the content described in embodiment illustrated in fig. 6, it is not repeated herein.
In embodiments of the present invention, which further includes:
If first acquisition module 701 obtains landscaping effect parameter for detecting landscaping effect setting operation;
Landscaping treatment module 702, for after the data acquisition module, calling and running the beautification line created Journey carries out landscaping treatment to the image data got in real time using the landscaping effect parameter by the beautification thread, obtains Image data after to beautification.
In embodiments of the present invention, the beautification for the picture that operation setting is recorded and shown can be arranged in user by landscaping effect Effect, and after starting recording, landscaping treatment is carried out to the image data obtained in real time using landscaping effect parameter, and will be beautiful Image data after change shows thread and video record thread to rendering so that renders after showing that thread can utilize the beautification After image data is rendered and is shown, the picture with landscaping effect is obtained, and video record thread can also utilize beautification Image data carry out video record, obtain the video with landscaping effect, provided abundanter usage experience to the user.
Referring to Fig. 8, in the embodiment of the present invention of position video recording device schematic diagram, which includes:Such as Pattern acquiring module 601, distribution module 602, data acquisition module 603 in illustrated embodiment shown in Fig. 6 and processing module 604, and it is similar to the content described in embodiment illustrated in fig. 6, it is not repeated herein.
In embodiments of the present invention, which further includes:
If second acquisition module 801 obtains picture rotation parameter for detecting that picture rotary setting operates;
Rotation processing module 802, for after the data acquisition module, calling and running the picture created rotation Thread rotates thread by the picture and carries out picture rotation processing to described image data using the picture rotation parameter, Obtain the postrotational image data of picture.
In embodiments of the present invention, user can complete setting for picture rotation parameter by executing the operation of picture rotary setting It sets so that render and show that thread can show the postrotational image of picture, and multiple video record threads are recorded To friction speed pattern and the postrotational video of picture, meet the recording demand of user.
It is understood that in embodiments of the present invention, Fig. 7 and Fig. 8 can also be combined into another video record dress It sets, to realize under the premise of primary recording obtains the video of friction speed pattern so that obtained video has landscaping effect And picture rotates.
It should be noted that in embodiments of the present invention, the speed for the video currently recorded is recognized for the ease of producer Degree pattern can show the different velocity modes of multiple videos to be recorded on display interface, please join in recording process Read Fig. 9, display interface shows the schematic diagram of velocity mode when Fig. 9 is video record in the embodiment of the present invention, wherein Fig. 9 be with For being recorded using mobile terminal, wherein velocity mode 1, velocity mode 2 and velocity mode 3 are currently being recorded Three patterns of video, are shown in the edge of display interface under normal conditions, are watched producer to avoid when recording Picture impact, in addition, further include pause button 901, stop button 902, and button 903 of taking pictures on display interface, In, producer can suspend current recording by clicking the pause button 901, in addition, producer can be stopped by clicking this Only button 902 terminates video record process, it is to be understood that after terminating to record, which will become and start Record button.During recording, if producer expects individual picture, button 903 of taking pictures can be clicked, to record It takes pictures while processed, the video not only recorded while the picture taken pictures.
In several embodiments provided herein, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the module, only Only a kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple module or components can be tied Another system is closed or is desirably integrated into, or some features can be ignored or not executed.Another point, it is shown or discussed Mutual coupling, direct-coupling or communication connection can be the INDIRECT COUPLING or logical by some interfaces, device or module Letter connection can be electrical, machinery or other forms.
The module illustrated as separating component may or may not be physically separated, aobvious as module The component shown may or may not be physical module, you can be located at a place, or may be distributed over multiple On network module.Some or all of module therein can be selected according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each function module in each embodiment of the present invention can be integrated in a processing module, it can also That modules physically exist alone, can also two or more modules be integrated in a module.Above-mentioned integrated mould The form that hardware had both may be used in block is realized, can also be realized in the form of software function module.
If the integrated module is realized in the form of software function module and sells or use as independent product When, it can be stored in a computer read/write memory medium.Based on this understanding, technical scheme of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the present invention Portion or part steps.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey The medium of sequence code.
It should be noted that for each method embodiment above-mentioned, describe, therefore it is all expressed as a series of for simplicity Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the described action sequence because According to the present invention, certain steps may be used other sequences or be carried out at the same time.Secondly, those skilled in the art should also know It knows, embodiment described in this description belongs to preferred embodiment, and involved action and module might not all be this hairs Necessary to bright.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, it may refer to the associated description of other embodiments.
It is to be retouched to a kind of video recording method and device provided by the present invention, image processor and electronic equipment above It states, for those skilled in the art, the thought of embodiment, can in specific embodiments and applications according to the present invention There is change place, to sum up, the content of the present specification should not be construed as limiting the invention.

Claims (10)

1. a kind of video recording method, which is characterized in that the method includes:
In response to the video record instruction detected, the multiple velocity modes for including in the video record instruction are obtained;
According to multiple velocity modes, respectively each velocity mode distributes corresponding video record thread;
Real-time image acquisition data show that thread is rendered and shown to described image data using the rendering created, and Video record is carried out according to corresponding velocity mode and described image data using multiple video record threads.
2. according to the method described in claim 1, it is characterized in that, described show thread to the figure using the rendering created As data are rendered and are shown, and using multiple video record threads according to corresponding velocity mode and described image number It is specifically included according to the step of carrying out video record:
It calls and runs the rendering created and show thread, show that thread carries out texture to described image data using the rendering It renders and shows;And the video record thread is called and run by the way of poll, utilize the video record line called Journey is obtained from described image data according to corresponding velocity mode and buffered video frame, to carry out video record.
3. method according to claim 1 or 2, which is characterized in that the method further includes:
If detecting landscaping effect setting operation, landscaping effect parameter is obtained;
Then after the step of real-time image acquisition data and described show thread to described image using the rendering that has created Before the step of data are rendered and shown, further include:
The beautification thread created is called and runs, by the beautification thread using the landscaping effect parameter to obtaining in real time The image data arrived carries out landscaping treatment, the image data after being beautified.
4. method according to claim 1 or 2, which is characterized in that the method further includes:
If detecting, picture rotary setting operates, and obtains picture rotation parameter;
Then after the step of real-time image acquisition data and described show thread to described image using the rendering that has created Before the step of data are rendered and shown, further include:
The picture rotation thread created is called and run, thread is rotated by the picture and utilizes the picture rotation parameter pair Described image data carry out picture rotation processing, obtain the postrotational image data of picture.
5. a kind of video recording device, which is characterized in that described device includes:
Pattern acquiring module obtains in the video record instruction for being instructed in response to the video record that detects and includes Multiple velocity modes;
Distribution module, for according to multiple velocity modes, respectively each velocity mode to distribute corresponding video record Thread processed;
Data acquisition module is used for real-time image acquisition data;
Processing module for showing that thread is rendered and shown to described image data using the rendering that has created, and utilizes Multiple video record threads carry out video record according to corresponding velocity mode and described image data.
6. device according to claim 5, which is characterized in that the processing module is specifically used for:
It calls and runs the rendering created and show thread, show that thread carries out texture to described image data using the rendering It renders and shows;And the video record thread is called and run by the way of poll, utilize the video record line called Journey is obtained from described image data according to corresponding velocity mode and buffered video frame, to carry out video record.
7. device according to claim 5 or 6, which is characterized in that described device further includes:
If first acquisition module obtains landscaping effect parameter for detecting landscaping effect setting operation;
Landscaping treatment module, for after the data acquisition module, calling and running the beautification thread created, pass through institute It states beautification thread and landscaping treatment is carried out to the image data got in real time using the landscaping effect parameter, after being beautified Image data.
8. device according to claim 5 or 6, which is characterized in that described device further includes:
If second acquisition module obtains picture rotation parameter for detecting that picture rotary setting operates;
Rotation processing module is led to for after the data acquisition module, calling and running the picture created rotation thread It crosses the picture rotation thread and picture rotation processing is carried out to described image data using the picture rotation parameter, obtain picture Postrotational image data.
9. a kind of graphics processor, which is characterized in that the graphics processor is for calling and running such as claim 5 to 8 times One video recording device of meaning.
10. a kind of electronic equipment, which is characterized in that the electronic equipment includes graphics processor as claimed in claim 9.
CN201710606284.2A 2017-07-24 2017-07-24 Video recording method and device, graphics processor and electronic equipment Active CN107277412B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710606284.2A CN107277412B (en) 2017-07-24 2017-07-24 Video recording method and device, graphics processor and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710606284.2A CN107277412B (en) 2017-07-24 2017-07-24 Video recording method and device, graphics processor and electronic equipment

Publications (2)

Publication Number Publication Date
CN107277412A CN107277412A (en) 2017-10-20
CN107277412B true CN107277412B (en) 2018-09-07

Family

ID=60078457

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710606284.2A Active CN107277412B (en) 2017-07-24 2017-07-24 Video recording method and device, graphics processor and electronic equipment

Country Status (1)

Country Link
CN (1) CN107277412B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111381954B (en) * 2018-12-27 2024-05-03 深圳市优必选科技有限公司 Audio data recording method, system and terminal equipment
CN110351600A (en) * 2019-01-21 2019-10-18 福州友宝电子科技有限公司 A kind of method and device playing video
CN110059225B (en) * 2019-03-11 2022-02-15 北京奇艺世纪科技有限公司 Video classification method and device, terminal equipment and storage medium
GB2584831B (en) * 2019-06-05 2023-02-08 Reeltime Apps Ltd Video image recording and playback
CN113225510B (en) * 2021-04-30 2023-04-18 深圳创维-Rgb电子有限公司 Television program recording method, device, equipment and storage medium
CN113596320B (en) * 2021-06-16 2022-07-01 荣耀终端有限公司 Video shooting variable speed recording method, device and storage medium
CN114247143A (en) * 2021-12-21 2022-03-29 北京蔚领时代科技有限公司 Digital human interaction method, device, equipment and storage medium based on cloud server

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1770296A (en) * 2004-10-13 2006-05-10 松下电器产业株式会社 Content recording apparatus, method for controlling same
CN102780869A (en) * 2012-06-27 2012-11-14 宇龙计算机通信科技(深圳)有限公司 Video recording device and method
WO2013028823A1 (en) * 2011-08-23 2013-02-28 Echostar Technologies L.L.C. System and method for memory jumping within stored instances of content
CN104618656A (en) * 2015-02-15 2015-05-13 联想(北京)有限公司 Information processing method and electronic equipment

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009182803A (en) * 2008-01-31 2009-08-13 Toshiba Corp Information playback device and playback speed control method
CN101600092A (en) * 2009-06-12 2009-12-09 中兴通讯股份有限公司 The generation of network video and player method and system
CN101600107B (en) * 2009-07-08 2012-01-25 杭州华三通信技术有限公司 Method for adjusting play speed of videotape as well as system and device
JP2015029211A (en) * 2013-07-30 2015-02-12 キヤノン株式会社 Imaging device
CN104539837A (en) * 2014-11-28 2015-04-22 广东欧珀移动通信有限公司 Method and device for recording variable speed playback video
CN104967803B (en) * 2015-07-01 2018-01-19 广东欧珀移动通信有限公司 A kind of video recording method and device
CN106657814B (en) * 2017-01-17 2018-12-04 维沃移动通信有限公司 A kind of video recording method and mobile terminal
CN106792034A (en) * 2017-02-10 2017-05-31 深圳创维-Rgb电子有限公司 Live method and mobile terminal is carried out based on mobile terminal
CN106973250A (en) * 2017-02-24 2017-07-21 广州乐庚信息科技有限公司 The method and device that a kind of video file is automatically generated

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1770296A (en) * 2004-10-13 2006-05-10 松下电器产业株式会社 Content recording apparatus, method for controlling same
WO2013028823A1 (en) * 2011-08-23 2013-02-28 Echostar Technologies L.L.C. System and method for memory jumping within stored instances of content
CN102780869A (en) * 2012-06-27 2012-11-14 宇龙计算机通信科技(深圳)有限公司 Video recording device and method
CN104618656A (en) * 2015-02-15 2015-05-13 联想(北京)有限公司 Information processing method and electronic equipment

Also Published As

Publication number Publication date
CN107277412A (en) 2017-10-20

Similar Documents

Publication Publication Date Title
CN107277412B (en) Video recording method and device, graphics processor and electronic equipment
CN107728905B (en) Bullet screen display method and device and storage medium
CN106331877A (en) Bullet screen playing method and device
CN106303669B (en) A kind of video clipping method and device
CN108650555A (en) The displaying of video clip, the generation method of interactive information, player and server
CN109445941B (en) Method, device, terminal and storage medium for configuring processor performance
CN106792197A (en) The changing method and system of a kind of video playback area layout
CN110019866A (en) Dynamic picture playback method, device and storage medium
WO2018085982A1 (en) Video recording method and apparatus, and photographing device
CN107040808A (en) Treating method and apparatus for barrage picture in video playback
CN107087137A (en) The method and apparatus and terminal device of video are presented
CN110134237A (en) Interface control method and relevant device
CN110505528A (en) The matched method, apparatus of game, equipment and readable storage medium storing program for executing in live streaming
CN112169318A (en) Application program starting and archiving method, device, equipment and storage medium
CN104636152A (en) Floating-layer-based application program calling method and device
CN112169319B (en) Application program starting method, device, equipment and storage medium
CN110267088A (en) Control method, device, electronic equipment and the storage medium of video playing
CN109462777A (en) Video temperature update method, device, terminal and storage medium
CN111866403B (en) Video graphic content processing method, device, equipment and medium
CN109582187A (en) Document sending method, device, computer equipment and storage medium
CN106791920A (en) A kind of video data handling procedure and its equipment
CN116889733A (en) Game resource loading method and device, electronic equipment and storage medium
CN113134234B (en) Information display method, device, terminal and storage medium
CN105472468B (en) Thumb up the back method and server of video
CN109542322B (en) Information processing method and device, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant