Summary of the invention
In view of this, main purpose of the present invention is to provide a kind of apparatus and method of controlling frame per second in multi-channel video communication, and the frame per second on each road in the multi-channel video communication is controlled respectively.
The objective of the invention is to be achieved through the following technical solutions:
A kind of device of in multi-channel video communication, controlling frame per second, comprise video acquisition unit, multichannel frame per second allocation units, a N video transmitting element and N network condition judging unit, described N video transmitting element, a N network condition judging unit are distinguished corresponding N road video communication, and described N network condition judging unit is corresponding one by one with described N video transmitting element, and wherein N is a positive integer;
Video acquisition unit is gathered the video data of video communication terminal, and this video data is sent to N video transmitting element;
The network condition that multichannel frame per second allocation units are sent according to N network condition judging unit is each the definite respectively frame per second in N the video transmitting element, and sends frame per second indication to each video transmitting element respectively;
In N network condition judging unit each judged the network condition of one road video communication respectively, determines the network condition of this road video communication according to judged result;
N video transmitting element sends the video data that video acquisition unit is gathered according to separately frame per second under the indication of multichannel frame per second allocation units.
Described device further comprises the video dubbing unit, and the video data that video acquisition unit is gathered duplicates N part, is sent to N video transmitting element respectively.
Described device is positioned on the video communication terminal.
A kind of method of controlling frame per second in multi-channel video communication is carried out in the process of N road video communication in the video communication terminal, carries out following steps:
Gather the video data of video communication terminal;
Network condition to N road video communication judges, is that N road video communication is determined frame per second respectively according to the network condition of N road video communication, and sends the video data of being gathered according to determined frame per second respectively in the video communication of N road, and wherein N is a positive integer; Described is that N road video communication determines that respectively the method for frame per second is: the frame per second gating matrix that sets in advance a S * S, wherein S is for gathering the frame per second of video data, the frame per second controlling value of a frame per second grade of each line display of frame per second gating matrix, the frame per second controlling value of each grade comprises S and sends the sign position, and whether expression sends the 1st to S the video data frame that receives in the one-period respectively; Be that N road video communication determines the frame per second grade respectively, and be that N road video communication is determined the frame per second controlling value respectively according to the frame per second grade.
The video data of described collection video communication terminal comprises: the video data of gathering the video communication terminal with fixing frame per second.
Described network condition to N road video communication is judged and is comprised: by video data packet loss, time-delay and the shake of N road video communication are added up, according to statistics the network condition of N road video communication is judged.
Described network condition according to N road video communication is that N road video communication determines that respectively frame per second comprises: right
In each road video communication of judgment result displays quite good network status, for it determines higher frame per second; For each relatively poor road video communication of judgment result displays network condition, for it determines lower frame per second.
Describedly in the video communication of N road, send video data according to determined frame per second respectively and comprise:
In one-period, receive the 1st video data frame, whenever receive a video data frame, search the corresponding value that sends the sign position in the frame per second controlling value,, then send this video data frame if the value of this transmission sign position is 1; If the value of this transmission sign position is 0, then abandon this video data frame, the rest may be inferred, until sending or abandon S video data frame.
As can be seen from the above technical solutions, for multi-channel video communication, can determine frame per second to each road in the multi-channel video communication respectively, each road basis frame per second separately respectively sends video data.Utilize unified frame per second to send video data with each road of prior art and compare, the present invention has realized the multichannel frame per second is controlled respectively.
In addition, the present invention determines the frame per second of this road video communication according to the residing network condition of each road video communication, thereby, when video communication is crossed over heterogeneous networks, when perhaps having the multiple network situation, can use different frame per second according to concrete network condition, the transmission of control of video data, thus guarantee to obtain higher bandwidth availability ratio.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
Core concept of the present invention is: when the video communication terminal is carried out multi-channel video communication, gather video data, determine frame per second respectively for each road video communication, each road video communication sends video data according to determined frame per second then.
Based on above thought, the invention provides the apparatus and method of control frame per second in multi-channel video communication, this device is positioned on the video communication terminal, and each road video data of control of video communicating terminal sends the frame per second that adopts separately.Describe the present invention below by two specific embodiments.
Embodiment one:
Fig. 1 is the structure drawing of device of controlling frame per second in multi-channel video communication of the embodiment of the invention one.As shown in Figure 1, in embodiment one, this device comprises video acquisition unit, video data copied cells, multichannel frame per second allocation units and a plurality of video transmitting element.Wherein, corresponding one road video communication of each video transmitting element promptly is responsible for the transmission of one road video data.
Wherein, video acquisition unit is gathered video data with fixing frame per second, for example gathers the video data of the camera that the video communication terminal connected with the frame per second of per second 15 frames, then the video data that collects is sent to the video data copied cells; The video data copied cells sends to each video output unit respectively according to the number of video transmitting element after the replicating video data; Multichannel frame per second allocation units are that every road video communication is determined frame per second, and send the frame per second Indication message respectively to a plurality of video transmitting elements; The frame per second that the video data that described a plurality of video transmitting element is sent the video data copied cells is indicated according to multichannel frame per second allocation units sends.In Fig. 1, video data represents that with heavy line the frame per second Indication message is represented with fine line.
Fig. 2 is the method flow diagram of controlling frame per second in multi-channel video communication of the embodiment of the invention one.This method is based on device shown in Figure 1.As can be seen from Figure 2, present embodiment specifically comprises following steps:
Step 201: video acquisition unit is gathered video data, and video data is sent to the video data copied cells.
Video acquisition unit is gathered video data with fixing frame per second usually, for example with the video data of the frame per second acquisition camera of per second 15 frames.
Step 202: the video data copied cells is according to the quantity replicating video data of video transmitting element, and video data is sent to each video transmitting element respectively.
For example, the number of video transmitting element is N, and the video data copied cells duplicates N part with video data, and every part of video data is sent to each video transmitting element of N respectively.
Step 203: multichannel frame per second allocation units are that every road video communication is determined frame per second, and send the frame per second Indication message respectively to each video transmitting element.
Preferably, multichannel frame per second allocation units set in advance the frame per second gating matrix, if fixing acquisition frame rate is per second 15 frames, the frame per second gating matrix then comprises the frame per second control of 15 grades, be each grade frame number that in per second, should send and send which frame that an example of frame per second gating matrix is as follows:
static?const?int?RateController[15][15]=
{
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{0,0,0,0,0,0,0,1,0,0,0,0,0,0,1},
{0,0,0,0,1,0,0,0,0,1,0,0,0,0,1},
{0,0,0,1,0,0,0,1,0,0,1,0,0,0,1},
{0,0,1,0,0,1,0,0,1,0,0,1,0,0,1},
{0,0,1,0,1,0,0,1,0,1,0,1,0,0,1},
{0,0,1,0,1,0,1,0,1,0,1,0,1,0,1},
{0,1,0,1,0,1,0,1,0,1,0,1,0,1,1},
{1,0,1,0,1,1,0,1,0,1,1,0,1,0,1},
{1,0,1,i,1,i,0,1,0,1,1,0,1,0,1},
{1,0,1,1,1,1,0,1,0,1,1,1,1,0,1},
{1,0,1,1,1,1,1,1,0,1,1,1,1,0,1},
{1,0,1,1,1,1,1,1,0,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,0,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
};
From the example of above frame per second gating matrix as can be seen, each row in the above-mentioned frame per second gating matrix is represented the frame per second controlling value of a grade, and the 1st row is represented 1 grade of frame per second controlling value, and the 2nd row is represented 2 grades of frame per second controlling values, the rest may be inferred, and the 15th row is represented 15 grades of frame per second controlling values.Each frame per second controlling value specifically comprises 15 and sends sign.Preferably, each frame per second controlling value is 15 a binary numeral, and it comprises 15 and sends the sign position, if M value that sends the sign position is 0, expression abandons the M frame in 15 frames, is not sent out; If M value that sends the sign position is 1, represent that the M frame in 15 frames will be sent out away.
Multichannel frame per second allocation units are determined the frame per second controlling grade for each video transmitting element, then determined frame per second controlling value are carried in the frame per second Indication message, send the frame per second Indication message respectively to the video transmitting element.
Step 204: each video transmitting element sends video data according to the frame per second Indication message that receives according to the frame per second controlling value in the frame per second Indication message.
For example, the frame per second grade of determining for certain video transmitting element when multichannel frame per second allocation units is 9, and then the frame per second controlling value in the frame per second Indication message that receives of this video transmitting element is:
{1,0,1,0,1,1,0,1,0,1,1,0,1,0,1}
This video transmitting element sends video data according to this frame per second controlling value.Be specially: in one second, receive the 1st frame video data, check that the 1st of frame per second controlling value sends the sign position, the 1st sends the sign position is 1, then the 1st frame video data is sent; Receive the 2nd frame video data, check that the 2nd of frame per second controlling value sends the sign position, the 2nd sends the sign position is 0, then abandons the 2nd frame video data; The rest may be inferred, until receiving the 15th frame video data, checks that the transmission of frame per second controlling value identifies 15, and the 15th sends the sign position is 1, then with the 15th frame video data.Like this, just finish the inquiry of 15 frames a second, begin inquiry from the 1st transmission sign position of frame per second controlling value again in next second then.This shows that if the frame per second controlling grade is 9, then 15 frame data of sending from video data unit for each second only send 9 frames wherein, abandon 6 frames.
The setting of the described frame per second gating matrix of present embodiment is the principle according to fluency, that is to say, the time interval between the frame of video that sends is equal substantially, allows the people feel that the transition of video is level and smooth, so being provided with in the matrix wishes to reach following effect:
For 1 grade of frame per second control, 1 second transmission 1 frame video data; For 2 grades of frame per second controls, about 1/2 second transmission 1 frame video data; For 3 grades of frame per second controls, about 1/3 second transmission 1 frame video data; The rest may be inferred.
Should be appreciated that above-mentioned frame per second gating matrix is set according to fixing 15 frame data of gathering of per second, if the frame per second of video acquisition is 30 frames, then this matrix should be one 30 * 30 a two-dimensional matrix.This shows that if per second is gathered S frame video data, then the frame per second gating matrix is the two-dimensional matrix of S * S.
Should be appreciated that there is not the relation of strict time order and function between step 201 and the step 203, step 203 can be carried out prior to step 201.
Embodiment two:
In the present embodiment, the frame per second of each road video communication is by the decision of the network condition of each road video communication.For each road video communication of quite good network status, make it have higher frame per second; For the relatively poor video communication of network condition, make it have lower frame per second.
Fig. 3 is the structure drawing of device of controlling frame per second in multi-channel video communication of the embodiment of the invention two.As shown in Figure 3, in embodiment two, this device comprises video acquisition unit, video data copied cells, a plurality of network condition judging unit, multichannel frame per second allocation units and a plurality of video transmitting element.Wherein, corresponding one road video communication of each video transmitting element is responsible for the transmission of one road video data; Corresponding one road video communication of each network condition judging unit is responsible for the network condition of one road video communication is judged.
The difference of present embodiment and embodiment one is, a plurality of network condition judging units have been increased, judge the network condition of current each road video communication, produce the frame per second grade of each road video communication according to the network condition of each road video communication of being judged, and send frame per second grade message respectively to multichannel frame per second allocation units; The frame per second grade message that multichannel frame per second allocation units are sent according to a plurality of network condition judging units sends the frame per second Indication message respectively to a plurality of video transmitting elements of described video transmitting element.In Fig. 3, video Data Transmission represents that with heavy line frame per second grade message and frame per second Indication message are represented with fine line.
Fig. 4 is the method flow diagram of controlling frame per second in multi-channel video communication of the embodiment of the invention two.This method is based on device shown in Figure 3.As can be seen from Figure 4, present embodiment specifically comprises following steps:
Step 401: video acquisition unit is gathered video data, and video data is sent to the video data copied cells.
The step 401 of present embodiment is basic identical with the step 201 of embodiment one, does not repeat them here.
Step 402: the video data copied cells is according to the number replicating video data of video transmitting element, and video data is sent to each video transmitting element respectively.
The step 402 of present embodiment is basic identical with the step 202 of embodiment one, does not repeat them here.
Step 403: a plurality of network condition judging units are judged the network condition of every road video communication respectively, determine the frame per second grade of each road video communication respectively and are sent to multichannel frame per second allocation units according to network condition.
Described judgement network condition, can pass through packet loss to the video data of each road video communication, jitter conditions and time-delay situation are added up, and obtain the judged result of each road network network situation according to statistics, then judged result are sent to multichannel frame per second allocation units.
Preferably, network condition can be divided into a plurality of grades, judged result is sent to multichannel frame per second allocation units with the form of network condition grade.
Step 404: multichannel frame per second allocation units are that every road video communication is determined frame per second, and send the frame per second Indication message respectively to the video transmitting element.
In the present embodiment, multichannel frame per second allocation units are determined corresponding frame per second grade according to the network condition grade of every road video communication.The network condition grade is corresponding with the frame per second grade, for example, and the corresponding frame per second grade of one or more continuous network condition grades.
Then, described basic identical according to the frame per second grade to the step 203 of the process of video transmitting element output frame rate controlling value and embodiment one, do not repeat them here.
Step 405: each video transmitting element sends video data according to the frame per second Indication message that receives according to the frame per second controlling value in the frame per second Indication message.
The step 405 of present embodiment is basic identical with the step 204 of embodiment one, does not repeat them here.
The advantage of present embodiment is to utilize the network condition of each road video communication to determine the frame per second of each road video communication, each road video communication good for network condition adopts higher frame per second, each road video communication for the network condition difference adopts low frame per second, thereby effectively optimize internetwork video communication, and guarantee to obtain maximum bandwidth availability ratio.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.