CN110213308A - A kind of method and device of decoding video data - Google Patents
A kind of method and device of decoding video data Download PDFInfo
- Publication number
- CN110213308A CN110213308A CN201810166306.2A CN201810166306A CN110213308A CN 110213308 A CN110213308 A CN 110213308A CN 201810166306 A CN201810166306 A CN 201810166306A CN 110213308 A CN110213308 A CN 110213308A
- Authority
- CN
- China
- Prior art keywords
- video data
- browser
- spatial cache
- data
- data volume
- 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
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
- H04L67/5682—Policies or rules for updating, deleting or replacing the stored data
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/85—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/433—Content storage operation, e.g. storage operation in response to a pause request, caching operations
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Multimedia (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The application is to belong to the communications field about a kind of method and device of decoding video data.The described method includes: obtaining the first data volume of the spatial cache, the spatial cache is located at the code layer of the browser at the video data input-buffer space that browser sends its received sender;When first data volume is more than preset first threshold value, the browser received video data after current time is abandoned, and or, notice described sender pause sends video data;Reading video data and the video data of the reading is decoded from the spatial cache.Described device includes: to obtain module, discard module and decoder module.The application, which can be avoided, leads to browser crash.
Description
Technical field
This application involves display field, in particular to a kind of method and device of decoding video data.
Background technique
With society be constantly progressive, video monitoring system will be used wider and wider, at the same user can be used it is clear
Device of looking at watches the video of video monitoring system shooting.Current newest browser is 5 (HyperText of HyperText Markup Language
Markup Language5, HTML5) browser, HTML5 browser play as follows video monitoring system shooting view
Frequently.
HTML5 browser receives the video data that video monitoring system is sent, and caches received video data, then from
One-frame video data is read in the video data of caching, the one-frame video data is decoded using decoder, is finally played
The video data decoded.
During realizing the application, discovery aforesaid way at least has following defects that inventor
In the performance deficiency of decoder, the rate of decoder decoding video data is less than HTML5 browser and receives video
The rate of data causes the data volume of the video data of HTML5 browser rs cache increasing in this way, and it is empty to occupy a large amount of memory
Between, eventually lead to browser crash.
Summary of the invention
In order to avoid leading to browser crash, the embodiment of the present application provides the method and dress of a kind of decoding video data
It sets.The technical solution is as follows:
On the one hand, a kind of method of decoding video data of the embodiment of the present application, which comprises
At the video data input-buffer space that browser sends its received sender, the spatial cache is obtained
The first data volume, the spatial cache is located at the code layer of the browser;
When first data volume is more than preset first threshold value, it is received after current time to abandon the browser
Video data, and/or, notice described sender pause sends video data;
Reading video data and the video data of the reading is decoded from the spatial cache.
Optionally, first data volume obtained in the spatial cache, comprising:
When browser is by its received video data input-buffer space, by the data of the spatial cache recorded
Amount increases the data volume of the received video data, obtains the first data volume.
It is optionally, described after reading one-frame video data in the spatial cache, further includes:
The data volume of the spatial cache recorded is reduced to the data volume of the video data of the reading.
It is optionally, described to abandon browser received video data after current time, comprising:
The browser is notified to abandon browser received video data after current time;Alternatively,
In browser buffered video data into the spatial cache described after current time, after current time
Non-key frame video data is obtained in the video data of caching, abandons the non-key frame video data.
It is optionally, described from reading video data in the spatial cache and after decoding the video data of the reading,
Further include:
The second data volume for obtaining the spatial cache is lower than default second threshold and described clear in second data volume
When device of looking at is in discarding video data state, stop abandoning browser received video data after current time;With/
Or, when second data volume is lower than default second threshold and described sender is in pause transmission video data state, institute
Default second threshold is stated less than or equal to the preset first threshold value.
Optionally, the stopping abandons browser received video data after current time, comprising:
The browser is notified to stop abandoning browser received video data after current time.
Optionally, the code layer of the browser is JavaScript layers.
On the other hand, the embodiment of the present application provides a kind of device of decoding video data, and described device includes:
Module is obtained, for obtaining at the video data input-buffer space that browser sends its received sender
The first data volume of the spatial cache is taken, the spatial cache is located at the code layer of the browser;
Discard module, for abandoning the browser current when first data volume is more than preset first threshold value
Received video data after time, and/or, notice described sender pause sends video data;
Decoder module for the reading video data from the spatial cache and decodes the video data of the reading.
Optionally, the acquisition module, is used for:
When browser is by its received video data input-buffer space, by the data of the spatial cache recorded
Amount increases the data volume of the received video data, obtains the first data volume.
Optionally, described device further include:
Reduce module, the number of the video data for the data volume of the spatial cache recorded to be reduced to the reading
According to amount.
Optionally, the discard module includes:
Notification unit, for notifying the browser to abandon browser received video counts after current time
According to;Alternatively,
Discarding unit is used in browser buffered video data into the spatial cache described after current time,
Non-key frame video data is obtained from the video data cached after current time, abandons the non-key frame video data.
Optionally, described device further include:
Stopping modular, for obtaining the second data volume of the spatial cache, in second data volume lower than default the
When two threshold values and the browser are in discarding video data state, stop the discarding browser and received after current time
Video data;And/or it is lower than default second threshold in second data volume and described sender is in pause and sends video
When data mode, the default second threshold is less than or equal to the preset first threshold value.
Optionally, the stopping modular, is used for:
The browser is notified to stop abandoning browser received video data after current time.
Optionally, the code layer of the browser is JavaScript layers.
On the other hand, the embodiment of the present application provides a kind of computer readable storage medium, for storing computer program
Instruction, the computer program instructions can be run with device processed, to perform the following operations:
At the video data input-buffer space that browser sends its received sender, the spatial cache is obtained
The first data volume, the spatial cache is located at the code layer of the browser;
When first data volume is more than preset first threshold value, it is received after current time to abandon the browser
Video data, and/or, notice described sender pause sends video data;
Reading video data and the video data of the reading is decoded from the spatial cache.
Technical solution provided by the embodiments of the present application can include the following benefits:
By the way that spatial cache is arranged in the code layer of browser, so as to obtain the first data of the spatial cache
Amount, when the first data volume is more than preset first threshold value, discarding browser received video data after current time, and from
Simultaneously decoding video data are read in the spatial cache, are reduced the data volume in spatial cache constantly, are avoided result in browser and collapse
It bursts.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
The application can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the application
Example, and together with specification it is used to explain the principle of the application.
Fig. 1-1 is a kind of network architecture schematic diagram provided by the embodiments of the present application;
Fig. 1-2 is another network architecture schematic diagram provided by the embodiments of the present application;
Fig. 2 is a kind of method flow diagram of decoding video data provided by the embodiments of the present application;
Fig. 3 is a kind of apparatus structure schematic diagram of decoding video data provided by the embodiments of the present application;
Fig. 4 is the apparatus structure schematic diagram of another decoding video data provided by the embodiments of the present application;
Fig. 5 is the apparatus structure schematic diagram of another decoding video data provided by the embodiments of the present application.
Through the above attached drawings, it has been shown that the specific embodiment of the application will be hereinafter described in more detail.These attached drawings
It is not intended to limit the range of the application design in any manner with verbal description, but is by referring to specific embodiments
Those skilled in the art illustrate the concept of the application.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects be described in detail in claims, the application.
Referring to Fig. 1-1, the embodiment of the present application provides a kind of network architecture, comprising:
Playback terminal 1 and at least one capture apparatus 2, playback terminal 1 can be with the portion at least one capture apparatus 2
Divide or whole capture apparatus 2 establish communication connection.At least one capture apparatus 2 can form monitoring system.
Browser can be installed in playback terminal 1, can receive at least one capture apparatus 2 by the browser
The video data for its shooting that any one or more capture apparatus 2 is sent, and the video data is played by the browser.
Optionally, referring to Fig. 1-2, which can also include server 3, at least one capture apparatus 2
Each capture apparatus 2 can be established between the server 3 communication connection, and each capture apparatus 2 can be sent to server 3
The video data of shooting.
Playback terminal 1 can be established between server 3 communication connection, and the server can be received by the browser
The video data that the 3 one or more capture apparatus 2 sent are shot, and the video data is played by the browser.
Playback terminal 1 can first decode the video data after receiving video data, then the video of broadcast decoder again
Data, detailed decoding process may refer to the content of following any embodiment.
Optionally, which can be HTML5 browser, and playback terminal 1 can be with computer, mobile phone, laptop
Or tablet computer etc..
Referring to fig. 2, the embodiment of the present application provides a kind of method of decoding video data, which comprises
Step 201: at the video data input-buffer space that browser sends its received sender, it is slow to obtain this
First data volume in space is deposited, which is located at the code layer of browser.
Step 202: when the first data volume is more than preset first threshold value, it is received after current time to abandon browser
Video data, and/or, notify sender suspends to send video data.
Wherein, after notifying sender, it is understood that there may be network delay, cause notify it is clear in a period of time after sender
Device of looking at remains to receive video data and caches the video data into spatial cache.Sender is being notified to suspend transmission view thus
Frequency according to when also abandon browser received video data after current time, it is possible to prevente effectively from after notifying sender
Data volume in a period of time in spatial cache continues growing, and effectively solves to ask because of the delay that comes into force of network delay bring notice
Topic.
Step 203: reading video data and decoding the video data of the reading from the spatial cache.
Wherein, the execution sequence of step 202 and step 203 in no particular order, may be performed simultaneously step 202 and step 203,
Step 202 can also be first carried out and execute step 203 again, step 203 can also be first carried out and execute step 202 again.
In the embodiment of the present application, slow so as to obtain this since spatial cache being arranged in the code layer of browser
The first data volume for depositing space abandons browser and is followed by current time when the first data volume is more than preset first threshold value
The video data of receipts, and simultaneously decoding video data are read from the spatial cache, reduce the data volume in spatial cache constantly,
Avoid result in browser crash.
Referring to Fig. 3, the embodiment of the present application provides a kind of method of decoding video data, comprising:
Step 301: when the video data that its received sender sends is input to spatial cache by browser, obtaining should
First data volume of spatial cache, the spatial cache are located at the code layer of browser.
Before executing this step, a spatial cache is first set in the code layer of browser, which can be
JavaScript layers.
Browser can receive the video data of video monitoring system transmission, video data often be received, by the video counts
According to being cached in the spatial cache.I.e. sender can be monitoring system, and optionally, sender can be the bat in monitoring system
Take the photograph equipment or server etc..
One processing module can be set in a browser in the present embodiment, which can be to the spatial cache
It is monitored in real time, to obtain the first data volume of the spatial cache in real time.
When browser caches received video data into spatial cache, processing module can directly count caching sky
Between the first data volume;Alternatively, when its received video data is buffered in the spatial cache by browser, it should by what is recorded
The data volume of spatial cache increases the data volume of the received video data, obtains the first data volume.
Processing module can the data volume in real-time record buffer memory space indicate that caching is empty for example, the data volume of record is N
Between current data volume be N.
When the video data cached in spatial cache changes, processing module will be updated the value of N.For example, browsing
When device caches its received video data to the spatial cache, N=N+m is set, m is the data volume of received video data;Again
Such as, the reading video data from the spatial cache and be sent into decoder decoding when, be arranged N=N-M, M be reading video counts
According to data volume.
Wherein, it should be understood that if being to the spatial cache before spatial cache buffered video data in browser
Empty, that is, the N=0 recorded indicates the video data that browser is cached to spatial cache for the first time in this step.Assuming that the video
The quantity of data is m, and after browser caches the video data to spatial cache, N=m is arranged, then reads from the spatial cache
The video data is taken, and the video data of reading is sent into decoder, the video data of the reading is decoded by decoding, it is assumed that
The data volume of the video data of the reading is M, when reading video data, while N=N-M=m-M is arranged.
If to the spatial cache before spatial cache buffered video data be not in browser it is empty, that is, the N recorded is not
Equal to 0, then after browser caches the video data to spatial cache, the data volume of the video data of caching is m, and N is arranged
=N+m.After decoder exports decoded one-frame video data, then the reading video data from the spatial cache, and by the reading
The video data taken is sent into the video data that decoder decodes the reading, and the data volume of the video data of the reading is M, and N is arranged
=N-M.
The decoder can also be located in browser.
To decoder be sent into video data when, if browser to the video data that the spatial cache caches be first frame
When video data, i.e., be to the spatial cache before the spatial cache buffered video data it is empty, then from the spatial cache
One section of video data is read, and one section of video data is sent into decoder and is decoded.
If the video data that browser is cached to the spatial cache is not first frame video data, i.e., to the caching
The spatial cache is not empty before spatial cache video data, then whether to judge the last video data for being sent into decoder
Video frame is solved, if solving video frame, is decoded from being read in spatial cache in one section of video data feeding decoder.If not yet
Video frame is solved, then waits and decodes a frame video frame.
When waiting decodes a frame video frame, decoded if the video data for being sent into decoder is not enough to decoder
One frame video frame then needs to read one section of video data from the spatial cache and is sent into decoder, so that decoder decodes one
Frame video frame.
Wherein, it is also necessary to explanation: being greater than or equal to browser in the rate of decoder decoding video data and receive view
When the rate of frequency evidence, the data volume in the spatial cache not will increase.It is less than in the rate of decoder decoding video data clear
When device of looking at receives the rate of video data, the data volume in the spatial cache may be constantly increasing.
In order to avoid the data volume in the spatial cache is continuously increased, a large amount of memory headroom is occupied, system crash is caused,
It can be avoided using following steps.
Step 302: when the first data volume is more than preset first threshold value, it is received after current time to abandon browser
Video data, and/or, notify sender suspends to send video data.
Browser received video data after current time can be abandoned by the following two kinds mode, be respectively as follows:
It can be with for first way are as follows: notice browser abandons browser received video counts after current time
According to.
In the first way, the first notification message can be sent to browser, which, which carries, abandons thing
Part instruction.Browser receives first notification message, the instruction for abandoning event command carried according to first notification message,
It abandons the received video data whenever receiving video data;Alternatively, the discarding carried according to first notification message
The instruction of event command stops receiving video data.
Can be with for the second way are as follows: from browser current time the rear video data cached into spatial cache
Middle acquisition non-key frame video data, abandons the non-key frame video data.
After finding that the first data volume is more than preset first threshold value, browser is also possible to continue to video data, and
The received video data is buffered in the spatial cache after receiving video data.Correspondingly, judge that browser is slow
The video data deposited, if the video data is non-key frame video data, it is non-key to read this from the spatial cache
Frame video data simultaneously abandons the non-key frame video data, if the video data is key frame video data, retains the pass
Key frame video data.
Optionally, in browser buffered video data into the spatial cache, the value of the N of record is increased into the caching
The data volume of video data;When abandoning video data from the spatial cache, the value of the N of record is reduced to the video abandoned
The data volume of data.
Wherein, the video data that video monitoring system is sent includes key frame video data and non-key frame video data,
Each key frame video data corresponds at least one non-key frame video data.Key frame video data is complete frame video
Data, non-key frame video data are incomplete one-frame video datas.Decoder can decode a key frame video data,
It needs to use the corresponding key frame video data of the non-key video data when decoding non-key video data.
In the second way, the complete key frame video data of data is retained in spatial cache, data are endless
Whole non-key frame video data abandons, and can retain video content to greatest extent in this way, while making to delay in the spatial cache
The data volume deposited slowly reduces.
Optionally, when notifying sender to suspend transmission video data, sender can exist video data temporary cache
It is local, wait until browser transmission the video data for being used to indicate retransmission instruction when, then by the video counts of caching
It plays according to browser is sent to, can jump in this way to avoid because of content caused by abandoning video data.
Step 303: reading video data and the video data of the reading is decoded using decoder from the spatial cache.
When the first data volume is more than preset first threshold value or when the first data volume is less than preset first threshold value, only
To be cached with video data in the spatial cache, will from the spatial cache reading video data and using decoder decoding should
Video data.
Optionally, after reading video data in the spatial cache, the value of the N of record can also be reduced to being somebody's turn to do for reading
The data volume of video data.
After decoder decodes one-frame video data, browser can play the one-frame video data.
After step 302 is performed, due to constantly reading video data and being sent into decoder solution from the spatial cache
Code, so the data volume of the video data cached in the spatial cache is constantly reducing.When the data volume of spatial cache is lower than
When default second threshold, following steps 304 can be executed.
Step 304: obtaining the second data volume of the spatial cache, when the second data volume is lower than default second threshold, stop
Only abandon browser after current time received video data and/or notify sender send video data.
Optionally, it is lower than default second threshold in the second data volume and browser is in when abandoning video data state, stops
Only abandon browser received video data after current time;And/or the second data volume be lower than default second threshold and
When sender is in pause transmission video data state, sender is notified to restore to send video data.
Second threshold is less than or equal to first threshold.
In this step, the data cached in the spatial cache can be counted to obtain the second data volume;Or such as
Fruit has recorded the data volume N of the spatial cache, then directly reads the value of N, using the value of N as the second data volume.
Optionally, if abandoning browser received video data after current time using above-mentioned first way,
Then in this step, browser can be notified to stop abandoning browser received video data after current time.
When realizing, second notification message can be sent to browser, which can carry stopping event
Instruction.Browser receives the instruction of the stopping event instruction of second notification message carrying, at it whenever receiving a frame video
When data, the received one-frame video data is cached in the spatial cache.
Optionally, if abandoning browser received video data after current time using the above-mentioned second way,
Then in this step, directly stop abandoning browser received non-key frame video data after current time.
Wherein, the playback terminal that the executing subject of the present embodiment can be referred to above-described embodiment specifically can be broadcasting eventually
The processing module by being arranged in a browser is held to execute each step of the present embodiment.The browser can be HTML5 browsing
Device, HTML5 browser cannot monitor the spatial cache for buffered video data.In order to grasp the caching of the spatial cache in real time
Spatial cache is arranged in the code layer of browser and processing module is arranged in a browser, thus through this process for situation
Module can monitor the caching situation of the spatial cache, control browser to the spatial cache buffered video according to the caching situation
Data.
Optionally, the instruction for being used to indicate the video data of retransmission can be sent to sender, such sender exists
Continue to send video data to browser when receiving the instruction.
In the embodiment of the present application, since spatial cache being arranged in the code layer of browser, so as to by clear
The processing module being arranged of looking in device obtains the first data volume of the spatial cache, is more than preset first threshold value in the first data volume
When, browser received video data after current time is abandoned, and simultaneously decoding video data are read from the spatial cache,
Reduce the data volume in spatial cache constantly, avoids result in browser crash.It is further continued for obtaining the second number of the spatial cache
According to amount, when the second data volume is lower than default second threshold, stop abandoning the received video data of browser.
Following is the application Installation practice, can be used for executing the application embodiment of the method.It is real for the application device
Undisclosed details in example is applied, the application embodiment of the method is please referred to.
Referring to fig. 4, the embodiment of the present application provides a kind of device 400 of decoding video data, and described device 400 includes:
Module 401 is obtained, at the video data input-buffer space that browser sends its received sender,
The first data volume of the spatial cache is obtained, the spatial cache is located at the code layer of the browser;
Discard module 402, for abandoning the browser and working as when first data volume is more than preset first threshold value
Received video data after the preceding time, and/is or, notice described sender pause sends video data;
Decoder module 403 for the reading video data from the spatial cache and decodes the video data of the reading.
Optionally, the acquisition module 401, is used for:
When browser is by its received video data input-buffer space, by the data of the spatial cache recorded
Amount increases the data volume of the received video data, obtains the first data volume.
Optionally, described device 400 further include:
Reduce module, the number of the video data for the data volume of the spatial cache recorded to be reduced to the reading
According to amount.
Optionally, the discard module 402 includes:
Notification unit, for notifying the browser to abandon browser received video counts after current time
According to;Alternatively,
Discarding unit is used in browser buffered video data into the spatial cache described after current time,
Non-key frame video data is obtained from the video data cached after current time, abandons the non-key frame video data.
Optionally, described device 400 further include:
Stopping modular, for obtaining the second data volume of the spatial cache, in second data volume lower than default the
When two threshold values and the browser are in discarding video data state, stop the discarding browser and received after current time
Video data;And/or it is lower than default second threshold in second data volume and described sender is in pause and sends video
When data mode, notice described sender is restored to send video data, and the default second threshold is less than or equal to described default
First threshold.
Optionally, the stopping modular, is used for:
The browser is notified to stop abandoning browser received video data after current time.
Optionally, the code layer of the browser is JavaScript layers.
In the embodiment of the present application, slow so as to obtain this since spatial cache being arranged in the code layer of browser
The first data volume for depositing space abandons browser and is followed by current time when the first data volume is more than preset first threshold value
The video data of receipts, and simultaneously decoding video data are read from the spatial cache, reduce the data volume in spatial cache constantly,
Avoid result in system crash.It is further continued for obtaining the second data volume of the spatial cache, is lower than default second threshold in the second data volume
When value, stop abandoning the received video data of browser.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method
Embodiment in be described in detail, no detailed explanation will be given here.
The structural block diagram of the terminal 500 of an illustrative embodiment of the invention offer is provided referring to Fig. 5, Fig. 5.The terminal
500 can be portable mobile termianl, such as: smart phone, tablet computer, MP3 player (Moving Picture
Experts Group Audio Layer III, dynamic image expert's compression standard audio level 3), MP4 (Moving
Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio level 4) player, pen
Remember this computer or desktop computer.Terminal 500 is also possible to referred to as user equipment, portable terminal, laptop terminal, terminal console
Deng other titles.
In general, terminal 500 includes: processor 501 and memory 502.
Processor 501 may include one or more processing cores, such as 4 core processors, 8 core processors etc..Place
Reason device 501 can use DSP (Digital Signal Processing, Digital Signal Processing), FPGA (Field-
Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, may be programmed
Logic array) at least one of example, in hardware realize.Processor 501 also may include primary processor and coprocessor, master
Processor is the processor for being handled data in the awake state, also referred to as CPU (Central Processing
Unit, central processing unit);Coprocessor is the low power processor for being handled data in the standby state.?
In some embodiments, processor 501 can be integrated with GPU (Graphics Processing Unit, image processor),
GPU is used to be responsible for the rendering and drafting of content to be shown needed for display screen.In some embodiments, processor 501 can also be wrapped
AI (Artificial Intelligence, artificial intelligence) processor is included, the AI processor is for handling related machine learning
Calculating operation.
Memory 502 may include one or more computer readable storage mediums, which can
To be non-transient.Memory 502 may also include high-speed random access memory and nonvolatile memory, such as one
Or multiple disk storage equipments, flash memory device.In some embodiments, the non-transient computer in memory 502 can
Storage medium is read for storing at least one instruction, at least one instruction performed by processor 501 for realizing this Shen
Please in embodiment of the method provide decoding video data method.
In some embodiments, terminal 500 is also optional includes: peripheral device interface 503 and at least one peripheral equipment.
It can be connected by bus or signal wire between processor 501, memory 502 and peripheral device interface 503.Each peripheral equipment
It can be connected by bus, signal wire or circuit board with peripheral device interface 503.Specifically, peripheral equipment includes: radio circuit
504, at least one of touch display screen 505, camera 506, voicefrequency circuit 507, positioning component 508 and power supply 509.
Peripheral device interface 503 can be used for I/O (Input/Output, input/output) is relevant outside at least one
Peripheral equipment is connected to processor 501 and memory 502.In some embodiments, processor 501, memory 502 and peripheral equipment
Interface 503 is integrated on same chip or circuit board;In some other embodiments, processor 501, memory 502 and outer
Any one or two in peripheral equipment interface 503 can realize on individual chip or circuit board, the present embodiment to this not
It is limited.
Radio circuit 504 is for receiving and emitting RF (Radio Frequency, radio frequency) signal, also referred to as electromagnetic signal.It penetrates
Frequency circuit 504 is communicated by electromagnetic signal with communication network and other communication equipments.Radio circuit 504 turns electric signal
It is changed to electromagnetic signal to be sent, alternatively, the electromagnetic signal received is converted to electric signal.Optionally, radio circuit 504 wraps
It includes: antenna system, RF transceiver, one or more amplifiers, tuner, oscillator, digital signal processor, codec chip
Group, user identity module card etc..Radio circuit 504 can be carried out by least one wireless communication protocol with other terminals
Communication.The wireless communication protocol includes but is not limited to: WWW, Metropolitan Area Network (MAN), Intranet, each third generation mobile communication network (2G, 3G,
4G and 5G), WLAN and/or WiFi (Wireless Fidelity, Wireless Fidelity) network.In some embodiments, it penetrates
Frequency circuit 504 can also include NFC (Near Field Communication, wireless near field communication) related circuit, this
Application is not limited this.
Display screen 505 is for showing UI (User Interface, user interface).The UI may include figure, text, figure
Mark, video and its their any combination.When display screen 505 is touch display screen, display screen 505 also there is acquisition to show
The ability of the touch signal on the surface or surface of screen 505.The touch signal can be used as control signal and be input to processor
501 are handled.At this point, display screen 505 can be also used for providing virtual push button and/or dummy keyboard, also referred to as soft button and/or
Soft keyboard.In some embodiments, display screen 505 can be one, and the front panel of terminal 500 is arranged;In other embodiments
In, display screen 505 can be at least two, be separately positioned on the different surfaces of terminal 500 or in foldover design;In still other reality
It applies in example, display screen 505 can be flexible display screen, be arranged on the curved surface of terminal 500 or on fold plane.Even, it shows
Display screen 505 can also be arranged to non-rectangle irregular figure, namely abnormity screen.Display screen 505 can use LCD (Liquid
Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode)
Etc. materials preparation.
CCD camera assembly 506 is for acquiring image or video.Optionally, CCD camera assembly 506 include front camera and
Rear camera.In general, the front panel of terminal is arranged in front camera, the back side of terminal is arranged in rear camera.One
In a little embodiments, rear camera at least two is main camera, depth of field camera, wide-angle camera, focal length camera shooting respectively
Any one in head, to realize that main camera and the fusion of depth of field camera realize background blurring function, main camera and wide-angle
Camera fusion realizes that pan-shot and VR (Virtual Reality, virtual reality) shooting function or other fusions are clapped
Camera shooting function.In some embodiments, CCD camera assembly 506 can also include flash lamp.Flash lamp can be monochromatic warm flash lamp,
It is also possible to double-colored temperature flash lamp.Double-colored temperature flash lamp refers to the combination of warm light flash lamp and cold light flash lamp, can be used for not
With the light compensation under colour temperature.
Voicefrequency circuit 507 may include microphone and loudspeaker.Microphone is used to acquire the sound wave of user and environment, and will
Sound wave, which is converted to electric signal and is input to processor 501, to be handled, or is input to radio circuit 504 to realize voice communication.
For stereo acquisition or the purpose of noise reduction, microphone can be separately positioned on the different parts of terminal 500 to be multiple.Mike
Wind can also be array microphone or omnidirectional's acquisition type microphone.Loudspeaker is then used to that processor 501 or radio circuit will to be come from
504 electric signal is converted to sound wave.Loudspeaker can be traditional wafer speaker, be also possible to piezoelectric ceramic loudspeaker.When
When loudspeaker is piezoelectric ceramic loudspeaker, the audible sound wave of the mankind can be not only converted electrical signals to, it can also be by telecommunications
Number the sound wave that the mankind do not hear is converted to carry out the purposes such as ranging.In some embodiments, voicefrequency circuit 507 can also include
Earphone jack.
Positioning component 508 is used for the current geographic position of positioning terminal 500, to realize navigation or LBS (Location
Based Service, location based service).Positioning component 508 can be the GPS (Global based on the U.S.
Positioning System, global positioning system), China dipper system or Russia Galileo system positioning group
Part.
Power supply 509 is used to be powered for the various components in terminal 500.Power supply 509 can be alternating current, direct current,
Disposable battery or rechargeable battery.When power supply 509 includes rechargeable battery, which can be wired charging electricity
Pond or wireless charging battery.Wired charging battery is the battery to be charged by Wireline, and wireless charging battery is by wireless
The battery of coil charges.The rechargeable battery can be also used for supporting fast charge technology.
In some embodiments, terminal 500 further includes having one or more sensors 510.The one or more sensors
510 include but is not limited to: acceleration transducer 511, gyro sensor 512, pressure sensor 513, fingerprint sensor 514,
Optical sensor 515 and proximity sensor 516.
The acceleration that acceleration transducer 511 can detecte in three reference axis of the coordinate system established with terminal 500 is big
It is small.For example, acceleration transducer 511 can be used for detecting component of the acceleration of gravity in three reference axis.Processor 501 can
With the acceleration of gravity signal acquired according to acceleration transducer 511, touch display screen 505 is controlled with transverse views or longitudinal view
Figure carries out the display of user interface.Acceleration transducer 511 can be also used for the acquisition of game or the exercise data of user.
Gyro sensor 512 can detecte body direction and the rotational angle of terminal 500, and gyro sensor 512 can
To cooperate with acquisition user to act the 3D of terminal 500 with acceleration transducer 511.Processor 501 is according to gyro sensor 512
Following function may be implemented in the data of acquisition: when action induction (for example changing UI according to the tilt operation of user), shooting
Image stabilization, game control and inertial navigation.
The lower layer of side frame and/or touch display screen 505 in terminal 500 can be set in pressure sensor 513.Work as pressure
When the side frame of terminal 500 is arranged in sensor 513, user can detecte to the gripping signal of terminal 500, by processor 501
Right-hand man's identification or prompt operation are carried out according to the gripping signal that pressure sensor 513 acquires.When the setting of pressure sensor 513 exists
When the lower layer of touch display screen 505, the pressure operation of touch display screen 505 is realized to UI circle according to user by processor 501
Operability control on face is controlled.Operability control includes button control, scroll bar control, icon control, menu
At least one of control.
Fingerprint sensor 514 is used to acquire the fingerprint of user, collected according to fingerprint sensor 514 by processor 501
The identity of fingerprint recognition user, alternatively, by fingerprint sensor 514 according to the identity of collected fingerprint recognition user.It is identifying
When the identity of user is trusted identity out, the user is authorized to execute relevant sensitive operation, the sensitive operation packet by processor 501
Include solution lock screen, check encryption information, downloading software, payment and change setting etc..Terminal can be set in fingerprint sensor 514
500 front, the back side or side.When being provided with physical button or manufacturer Logo in terminal 500, fingerprint sensor 514 can be with
It is integrated with physical button or manufacturer Logo.
Optical sensor 515 is for acquiring ambient light intensity.In one embodiment, processor 501 can be according to optics
The ambient light intensity that sensor 515 acquires controls the display brightness of touch display screen 505.Specifically, when ambient light intensity is higher
When, the display brightness of touch display screen 505 is turned up;When ambient light intensity is lower, the display for turning down touch display screen 505 is bright
Degree.In another embodiment, the ambient light intensity that processor 501 can also be acquired according to optical sensor 515, dynamic adjust
The acquisition parameters of CCD camera assembly 506.
Proximity sensor 516, also referred to as range sensor are generally arranged at the front panel of terminal 500.Proximity sensor 516
For acquiring the distance between the front of user Yu terminal 500.In one embodiment, when proximity sensor 516 detects use
When family and the distance between the front of terminal 500 gradually become smaller, touch display screen 505 is controlled from bright screen state by processor 501
It is switched to breath screen state;When proximity sensor 516 detects user and the distance between the front of terminal 500 becomes larger,
Touch display screen 505 is controlled by processor 501 and is switched to bright screen state from breath screen state.
It will be understood by those skilled in the art that the restriction of the not structure paired terminal 500 of structure shown in Fig. 5, can wrap
It includes than illustrating more or fewer components, perhaps combine certain components or is arranged using different components.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the application
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the application, these modifications, purposes or
Person's adaptive change follows the general principle of the application and including the undocumented common knowledge in the art of the application
Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the application are by following
Claim is pointed out.
It should be understood that the application is not limited to the precise structure that has been described above and shown in the drawings, and
And various modifications and changes may be made without departing from the scope thereof.Scope of the present application is only limited by the accompanying claims.
Claims (15)
1. a kind of method of decoding video data, which is characterized in that the described method includes:
At the video data input-buffer space that browser sends its received sender, the of the spatial cache is obtained
One data volume, the spatial cache are located at the code layer of the browser;
When first data volume is more than preset first threshold value, the browser received video after current time is abandoned
Data, and/or, notice described sender pause sends video data;
Reading video data and the video data of the reading is decoded from the spatial cache.
2. the method as described in claim 1, which is characterized in that first data volume obtained in the spatial cache, packet
It includes:
When browser is by its received video data input-buffer space, the data volume of the spatial cache recorded is increased
The data volume for adding the received video data, obtains the first data volume.
3. method according to claim 2, which is characterized in that it is described after reading video data in the spatial cache,
Further include:
The data volume of the spatial cache recorded is reduced to the data volume of the video data of the reading.
4. the method as described in claim 1, which is characterized in that the discarding browser is received after current time
Video data, comprising:
The browser is notified to abandon browser received video data after current time;Alternatively,
In browser buffered video data into the spatial cache described after current time, after the current time
Non-key frame video data is obtained in the video data of caching, abandons the non-key frame video data.
5. the method as described in claim 1, which is characterized in that the reading video data from the spatial cache simultaneously decodes
After the video data of the reading, further includes:
The second data volume for obtaining the spatial cache is lower than default second threshold and the browser in second data volume
In when abandoning video data state, stop abandoning browser received video data after current time;And/or
When second data volume is lower than default second threshold and described sender is in pause transmission video data state, institute is notified
It states sender to restore to send video data, the default second threshold is less than or equal to the preset first threshold value.
6. method as claimed in claim 5, which is characterized in that the stopping abandons the browser and is followed by current time
The video data of receipts, comprising:
The browser is notified to stop abandoning browser received video data after current time.
7. such as method as claimed in any one of claims 1 to 6, which is characterized in that the code layer of the browser is
JavaScript layers.
8. a kind of device of decoding video data, which is characterized in that described device includes:
Module is obtained, for obtaining institute at the video data input-buffer space that browser sends its received sender
The first data volume of spatial cache is stated, the spatial cache is located at the code layer of the browser;
Discard module, for abandoning the browser in current time when first data volume is more than preset first threshold value
Received video data later, and/or, notice described sender pause sends video data;
Decoder module for the reading video data from the spatial cache and decodes the video data of the reading.
9. device as claimed in claim 8, which is characterized in that the acquisition module is used for:
When browser is by its received video data input-buffer space, the data volume of the spatial cache recorded is increased
The data volume for adding the received video data, obtains the first data volume.
10. device as claimed in claim 9, which is characterized in that described device further include:
Reduce module, the data of the video data for the data volume of the spatial cache recorded to be reduced to the reading
Amount.
11. device as claimed in claim 8, which is characterized in that the discard module includes:
Notification unit, for notifying the browser to abandon browser received video data after current time;Or
Person,
Discarding unit, in browser buffered video data into the spatial cache described after current time, from working as
Non-key frame video data is obtained in the video data cached after the preceding time, abandons the non-key frame video data.
12. device as claimed in claim 8, which is characterized in that described device further include:
Stopping modular is lower than default second threshold in second data volume for obtaining the second data volume of the spatial cache
When value and the browser are in discarding video data state, stop abandoning browser received view after current time
Frequency evidence;And/or it is lower than default second threshold in second data volume and described sender is in pause and sends video data
When state, notice described sender is restored to send video data, and the default second threshold is less than or equal to described default first
Threshold value.
13. device as claimed in claim 12, which is characterized in that the stopping modular is used for:
The browser is notified to stop abandoning browser received video data after current time.
14. such as the described in any item devices of claim 8 to 13, which is characterized in that the code layer of the browser is
JavaScript layers.
15. a kind of computer readable storage medium, which is characterized in that for storing computer program instructions, the computer journey
Sequence instruction is executed by processor, and realizes the operation of method as described in any one of claim 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810166306.2A CN110213308A (en) | 2018-02-28 | 2018-02-28 | A kind of method and device of decoding video data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810166306.2A CN110213308A (en) | 2018-02-28 | 2018-02-28 | A kind of method and device of decoding video data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110213308A true CN110213308A (en) | 2019-09-06 |
Family
ID=67778678
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810166306.2A Pending CN110213308A (en) | 2018-02-28 | 2018-02-28 | A kind of method and device of decoding video data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110213308A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110677715A (en) * | 2019-10-11 | 2020-01-10 | 北京达佳互联信息技术有限公司 | Decoding method, decoder, electronic device and storage medium |
CN110855645A (en) * | 2019-11-01 | 2020-02-28 | 腾讯科技(深圳)有限公司 | Streaming media data playing method and device |
CN113395302A (en) * | 2020-03-11 | 2021-09-14 | 杭州中天微***有限公司 | Asynchronous data distributor, related apparatus and method |
CN113672293A (en) * | 2020-04-30 | 2021-11-19 | 华为技术有限公司 | Media data processing method based on cloud mobile phone and terminal equipment |
CN114071224A (en) * | 2020-07-31 | 2022-02-18 | 腾讯科技(深圳)有限公司 | Video data processing method and device, computer equipment and storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2192740A1 (en) * | 2008-11-26 | 2010-06-02 | Thomson Licensing | Method and apparatus for receiving content |
CN101946518A (en) * | 2007-12-28 | 2011-01-12 | 诺基亚公司 | Methods, apparatuses, and computer program products for adaptive synchronized decoding of digital video |
CN104427400A (en) * | 2013-08-22 | 2015-03-18 | 中国电信股份有限公司 | Streaming media transmission method and system, and streaming media server |
CN104702968A (en) * | 2015-02-17 | 2015-06-10 | 华为技术有限公司 | Frame loss method for video frame and video sending device |
CN106331835A (en) * | 2015-06-26 | 2017-01-11 | 成都鼎桥通信技术有限公司 | Method of dynamically adjusting data reception cache and video decoding device |
CN106488265A (en) * | 2016-10-12 | 2017-03-08 | 广州酷狗计算机科技有限公司 | A kind of method and apparatus sending Media Stream |
CN107147923A (en) * | 2017-05-05 | 2017-09-08 | 中广热点云科技有限公司 | A kind of time shift order method |
CN107371061A (en) * | 2017-08-25 | 2017-11-21 | 普联技术有限公司 | A kind of video stream playing method, device and equipment |
CN107465679A (en) * | 2017-08-07 | 2017-12-12 | 郑州仁峰软件开发有限公司 | A kind of streaming media control method |
-
2018
- 2018-02-28 CN CN201810166306.2A patent/CN110213308A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101946518A (en) * | 2007-12-28 | 2011-01-12 | 诺基亚公司 | Methods, apparatuses, and computer program products for adaptive synchronized decoding of digital video |
EP2192740A1 (en) * | 2008-11-26 | 2010-06-02 | Thomson Licensing | Method and apparatus for receiving content |
CN104427400A (en) * | 2013-08-22 | 2015-03-18 | 中国电信股份有限公司 | Streaming media transmission method and system, and streaming media server |
CN104702968A (en) * | 2015-02-17 | 2015-06-10 | 华为技术有限公司 | Frame loss method for video frame and video sending device |
CN106331835A (en) * | 2015-06-26 | 2017-01-11 | 成都鼎桥通信技术有限公司 | Method of dynamically adjusting data reception cache and video decoding device |
CN106488265A (en) * | 2016-10-12 | 2017-03-08 | 广州酷狗计算机科技有限公司 | A kind of method and apparatus sending Media Stream |
CN107147923A (en) * | 2017-05-05 | 2017-09-08 | 中广热点云科技有限公司 | A kind of time shift order method |
CN107465679A (en) * | 2017-08-07 | 2017-12-12 | 郑州仁峰软件开发有限公司 | A kind of streaming media control method |
CN107371061A (en) * | 2017-08-25 | 2017-11-21 | 普联技术有限公司 | A kind of video stream playing method, device and equipment |
Non-Patent Citations (2)
Title |
---|
刘后铭,洪福明: "《计算机通信网 修订版》", 31 December 1988 * |
李浪,谢新华,刘先锋: "《计算机网络 第2版》", 30 September 2017 * |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110677715A (en) * | 2019-10-11 | 2020-01-10 | 北京达佳互联信息技术有限公司 | Decoding method, decoder, electronic device and storage medium |
CN110677715B (en) * | 2019-10-11 | 2022-04-22 | 北京达佳互联信息技术有限公司 | Decoding method, decoder, electronic device and storage medium |
CN110855645A (en) * | 2019-11-01 | 2020-02-28 | 腾讯科技(深圳)有限公司 | Streaming media data playing method and device |
CN110855645B (en) * | 2019-11-01 | 2021-10-22 | 腾讯科技(深圳)有限公司 | Streaming media data playing method and device |
CN113395302A (en) * | 2020-03-11 | 2021-09-14 | 杭州中天微***有限公司 | Asynchronous data distributor, related apparatus and method |
CN113672293A (en) * | 2020-04-30 | 2021-11-19 | 华为技术有限公司 | Media data processing method based on cloud mobile phone and terminal equipment |
CN113672293B (en) * | 2020-04-30 | 2024-04-09 | 华为云计算技术有限公司 | Media data processing method based on cloud mobile phone and terminal equipment |
CN114071224A (en) * | 2020-07-31 | 2022-02-18 | 腾讯科技(深圳)有限公司 | Video data processing method and device, computer equipment and storage medium |
CN114071224B (en) * | 2020-07-31 | 2023-08-25 | 腾讯科技(深圳)有限公司 | Video data processing method, device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110213308A (en) | A kind of method and device of decoding video data | |
CN110022489A (en) | Video broadcasting method, device and storage medium | |
CN110881136A (en) | Video frame rate control method and device, computer equipment and storage medium | |
CN109874312A (en) | The method and apparatus of playing audio-fequency data | |
CN108833963A (en) | Method, computer equipment, readable storage medium storing program for executing and the system of display interface picture | |
CN107888968A (en) | Player method, device and the computer-readable storage medium of live video | |
CN108401124A (en) | The method and apparatus of video record | |
CN108966008A (en) | Live video back method and device | |
CN109788303A (en) | Method for pushing, device, electronic equipment and the storage medium of live video stream | |
CN110187889A (en) | A kind of application starting method, apparatus and storage medium | |
CN112822522B (en) | Video playing method, device, equipment and storage medium | |
CN109660855A (en) | Paster display methods, device, terminal and storage medium | |
CN110278464A (en) | The method and apparatus for showing list | |
CN108848394A (en) | Net cast method, apparatus, terminal and storage medium | |
CN107896337B (en) | Information popularization method and device and storage medium | |
CN109922356A (en) | Video recommendation method, device and computer readable storage medium | |
CN110121084A (en) | The methods, devices and systems of port switching | |
CN110248236A (en) | Video broadcasting method, device, terminal and storage medium | |
CN109120933A (en) | Dynamic adjusts method, apparatus, equipment and the storage medium of code rate | |
CN109068008A (en) | The tinkle of bells setting method, device, terminal and storage medium | |
CN110007981A (en) | Start method, apparatus, electronic equipment and the medium of application program | |
CN110288689A (en) | The method and apparatus that electronic map is rendered | |
CN108845777A (en) | The method and apparatus for playing frame animation | |
CN108848405A (en) | Image processing method and device | |
CN107888975B (en) | Video playing method, device and storage medium |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190906 |