Summary of the invention
In view of this, the invention provides a kind of coding/decoding method, decoder and system, to realize utilizing the decoding on-wall of a spot of decoder realization to a plurality of control points based on audio/video monitor and control system.
For this reason, the embodiment of the invention adopts following technical scheme:
A kind of coding/decoding method based on audio/video monitor and control system, be used to adopt a decoding channels that the data flow of at least two monitor channels is carried out the poll decoding, may further comprise the steps: determine the pairing current monitoring channel of described decoding channels, and current monitoring channel is decoded; After the decoding of finishing current monitoring channel,, next monitor channel is decoded according to the decoding order of preset monitoring passage.
When arbitrary situation below the appearance, determine to finish the decoding of current monitoring channel: the decoding preview time of the current monitoring channel that presets arrives; The interruption that is connected of described decoding channels and current monitoring channel; Network connects unusual.
The source of the data flow of described monitor channel is DVR, DVS, IPS or streaming media server.
A kind of decoder based on audio/video monitor and control system, described decoder comprises one or more decoding channels, described decoding channels is used for the data flow of at least two monitor channels is carried out the poll decoding, described decoder also comprises: preset unit is used to preset the decoding order of decoding channels to each monitor channel; Determining unit is used for determining whether described decoding channels is finished the decode procedure of current monitoring channel; Switch unit is used for according to the decoding order that presets, described decoding channels being switched to next monitor channel decoding when described determining unit determines that the decoding of current monitoring channel has been finished.
Described determining unit determines to finish the decoding of current monitoring channel when one of following situation: the decoding preview time of the current monitoring channel that presets arrives; The interruption that is connected of described decoding channels and current monitoring channel; Network connects unusual.
Described decoder also comprises the timer that poll switches, and is used for the decoding preview time is carried out timing.
A kind of audio/video monitor and control system, comprise encoder, the corresponding one or more monitor channels of described encoder, described decoder comprises one or more decoding channels, each decoding channels is used for the data flow of at least two monitor channels is carried out the poll decoding, described decoder also comprises: preset unit is used to preset the decoding order of decoding channels to each monitor channel; Determining unit is used for determining whether described decoding channels is finished the decode procedure of current monitoring channel; Switch unit is used for according to the decoding order that presets, described decoding channels being switched to next monitor channel decoding when described determining unit determines that the decoding of current monitoring channel has been finished.
Described determining unit determines to finish the decoding of current monitoring channel when one of following situation: the decoding preview time of the current monitoring channel that presets arrives; The interruption that is connected of described decoder and current monitoring channel; Network connects unusual.
Described decoder also comprises the timer that poll switches, and is used for the decoding preview time is carried out timing.
Described encoder is DVR, DVS, IPS or streaming media server.
The invention has the advantages that decoding channels a plurality of monitor channels of can poll decoding.Suppose that a network audio-video multi-channel decoder has 8 decoding channels, calculate according to 64 monitor channels of every road decoding channels maximum configured,decoder 8*64=512 road monitor channel of can decoding in contrast to man-to-man mode, has had more the decoding of 512-8=504 road monitor channel.This shows that the present invention has improved the monitor channel number of the decoding of decoder greatly, well improved the cost performance of decoder, and can satisfy in most of supervisory control system demand for decoding on-wall.
Embodiment
For audio/video decoder, if only adopting man-to-man mode decodes to the control point of front end, can cause the demand of decoder in a supervisory control system to increase greatly, and because the price comparison costliness of decoder, in a supervisory control system, the cost of decoding on-wall is just bigger so.For this reason, the invention provides a kind of coding/decoding method of realizing the poll decoding, can utilize limited decoder that the multi-path monitoring passage is decoded.
Referring to Fig. 2, be poll coding/decoding method flow chart of the present invention, comprising:
S201: determine the pairing current monitoring channel of described decoding channels, and current monitoring channel is decoded;
S202: after the decoding of finishing current monitoring channel,, next monitor channel is decoded according to the decoding order of preset monitoring passage.
Wherein, when following any situation, can think the decoding of having finished current monitoring channel:
The decoding preview time of the current monitoring channel that (1) presets arrives;
(2) interruption that is connected of decoding channels and current monitoring channel;
(3) network connects unusual.
Thus, the present invention can effectively utilize a small amount of decoder to realize the decoding of a plurality of control points is monitored, and has improved the cost performance of network audio-video decoder, has reduced the expense of decoding on-wall in the supervisory control system simultaneously.
Introduce a specific embodiment of the present invention below.
Referring to Fig. 3, be embodiment of the invention poll decoding schematic diagram.
Circular frame the inside is the set of encoding device among Fig. 3, it has represented the source part of coded data, DVR (Digital Video Recorder is specifically arranged, digital hard disc video recorder), DVS (Digital VideoSever, digital video code), IPC (IP Camera, web camera), streaming media server etc.The coding pass on these encoding devices abstract be one by one monitor channel, for decoder, these are exactly its object that need decode.
On decoder, take out the decoding channels of fair amount according to its decoding capability, in order to realize many-to-one decoding process, can adopt such strategy: the monitor channel of configuration multichannel on a decoding channels, and set the preview time of each monitor channel, like this, when a monitor channel carries out live preview and when the preview time arrives, just stop the decoding of this monitor channel, switch to the preview of decoding of next monitor channel, and arrive preview at next monitor channel and carry out identical action during the time, by that analogy, circulation decoding preview.Like this, on a decoding channels, just can realize decoding preview to the multi-path monitoring passage.
Referring to Fig. 4,, comprising for the embodiment of the invention realizes the flow chart that poll is decoded:
S401: judge whether to get stream; If enter S402; If not, wait continues after 1 second to detect.
S402: the initial work that is configured parameter.
S403: upgrade circulation decoding link information, be mainly and find the current monitor channel node that needs decoding.
S404: the decoding of carrying out the current monitoring channel node connects; If successful connection enters S405; If failure then returns to S401;
S405: the decoding preview time according to configuration is provided with the decoding timer.
S406: decoding channels is set begins decoding.
S407: judge whether to arrive the decoding preview time; If enter S411; If not, enter S408;
S408: judge whether to close decoding and connect; If enter S411; If not, enter S409;
S409: judge whether network connects normal; If enter S410; If not, enter S411;
S410: proceed the decoding action, get back to S407 then.
S411: disconnect current network and connect, decoding channels is set stops decoding, return to S401 then.
Except said method, the present invention also provides a kind of decoder based on audio/video monitor and control system, and this decoder comprises one or more decoding channels 501, and described decoding channels is used for the data flow of at least two monitor channels is carried out the poll decoding, referring to Fig. 5, decoder also comprises:
Preset unit 502 is used to preset the decoding order of decoding channels 501 to each monitor channel;
Determining unit 503 is used for determining whether the decode procedure of 501 pairs of current monitoring channel of decoding channels is finished;
Switch unit 504 is used for when determining unit 503 determines that the decoding of current monitoring channel has been finished, and the decoding order according to preset unit 502 presets switches to next monitor channel with decoding channels 501 and decodes.
Wherein, determining unit 503 determines that when one of following situation decoding channels 501 finishes the decoding of current monitoring channel: the interruption that is connected of the decoding preview time arrival of the current monitoring channel that presets, decoding channels and current monitoring channel, perhaps, network connects unusual.
Preferably, described decoder also comprises the timer that poll switches, and is used for the decoding preview time is carried out timing.
In addition, the present invention also provides a kind of audio/video monitor and control system, this system comprises encoder, the corresponding one or more monitor channels of encoder, encoder comprises DVR, DVS, IPS and streaming media server etc., especially, decoder in this system comprises one or more decoding channels, each decoding channels is used for the data flow of at least two monitor channels is carried out the poll decoding, and referring to Fig. 5, decoder also comprises:
Preset unit 502 is used to preset the decoding order of decoding channels 501 to each monitor channel;
Determining unit 503 is used for determining whether the decode procedure of 501 pairs of current monitoring channel of decoding channels is finished;
Switch unit 504 is used for when determining unit 503 determines that the decoding of current monitoring channel has been finished, and the decoding order according to preset unit 502 presets switches to next monitor channel with decoding channels 501 and decodes.
Wherein, determining unit 503 determines that when one of following situation decoding channels 501 finishes the decoding of current monitoring channel: the interruption that is connected of the decoding preview time arrival of the current monitoring channel that presets, decoding channels and current monitoring channel, perhaps, network connects unusual.
Preferably, described decoder also comprises the timer that poll switches, and is used for the decoding preview time is carried out timing.
As seen, the present invention proposes a kind of one-to-many decoding scheme, promptly utilize a decoding channels to realize the poll decoding according to the time interval monitor channel of each configuration of poll successively.
The invention has the advantages that decoding channels a plurality of monitor channels of can poll decoding.Suppose that a network audio-video multi-channel decoder has 8 decoding channels, calculate according to 64 monitor channels of every road decoding channels maximum configured,decoder 8*64=512 road monitor channel of can decoding in contrast to man-to-man mode, has had more the decoding of 512-8=504 road monitor channel.This shows that the present invention has improved the monitor channel number of the decoding of decoder greatly, well improved the cost performance of decoder, and can satisfy in most of supervisory control system demand for decoding on-wall.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.