mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
fix BWController misspelling
This commit is contained in:
parent
0d0b74f5a8
commit
edbfca5474
|
@ -14,8 +14,8 @@ libtoxav_la_SOURCES = ../toxav/rtp.h \
|
|||
../toxav/audio.c \
|
||||
../toxav/video.h \
|
||||
../toxav/video.c \
|
||||
../toxav/bwcontroler.h \
|
||||
../toxav/bwcontroler.c \
|
||||
../toxav/bwcontroller.h \
|
||||
../toxav/bwcontroller.c \
|
||||
../toxav/toxav.h \
|
||||
../toxav/toxav.c \
|
||||
../toxav/toxav_old.c
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/** bwcontroler.c
|
||||
/** bwcontroller.c
|
||||
*
|
||||
* Copyright (C) 2013-2015 Tox project All Rights Reserved.
|
||||
*
|
||||
|
@ -24,7 +24,7 @@
|
|||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <assert.h>
|
||||
#include "bwcontroler.h"
|
||||
#include "bwcontroller.h"
|
||||
#include "../toxcore/logger.h"
|
||||
#include "../toxcore/util.h"
|
||||
|
||||
|
@ -37,8 +37,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
struct BWControler_s {
|
||||
void (*mcb) (BWControler *, uint32_t, float, void *);
|
||||
struct BWController_s {
|
||||
void (*mcb) (BWController *, uint32_t, float, void *);
|
||||
void *mcb_data;
|
||||
|
||||
Messenger *m;
|
||||
|
@ -60,13 +60,13 @@ struct BWControler_s {
|
|||
};
|
||||
|
||||
int bwc_handle_data(Messenger *m, uint32_t friendnumber, const uint8_t *data, uint16_t length, void *object);
|
||||
void send_update(BWControler *bwc);
|
||||
void send_update(BWController *bwc);
|
||||
|
||||
BWControler *bwc_new(Messenger *m, uint32_t friendnumber,
|
||||
void (*mcb) (BWControler *, uint32_t, float, void *),
|
||||
BWController *bwc_new(Messenger *m, uint32_t friendnumber,
|
||||
void (*mcb) (BWController *, uint32_t, float, void *),
|
||||
void *udata)
|
||||
{
|
||||
BWControler *retu = calloc(sizeof(struct BWControler_s), 1);
|
||||
BWController *retu = calloc(sizeof(struct BWController_s), 1);
|
||||
|
||||
retu->mcb = mcb;
|
||||
retu->mcb_data = udata;
|
||||
|
@ -85,7 +85,7 @@ BWControler *bwc_new(Messenger *m, uint32_t friendnumber,
|
|||
|
||||
return retu;
|
||||
}
|
||||
void bwc_kill(BWControler *bwc)
|
||||
void bwc_kill(BWController *bwc)
|
||||
{
|
||||
if (!bwc)
|
||||
return;
|
||||
|
@ -95,7 +95,7 @@ void bwc_kill(BWControler *bwc)
|
|||
rb_kill(bwc->rcvpkt.rb);
|
||||
free(bwc);
|
||||
}
|
||||
void bwc_feed_avg(BWControler *bwc, uint32_t bytes)
|
||||
void bwc_feed_avg(BWController *bwc, uint32_t bytes)
|
||||
{
|
||||
uint32_t *p;
|
||||
|
||||
|
@ -104,7 +104,7 @@ void bwc_feed_avg(BWControler *bwc, uint32_t bytes)
|
|||
|
||||
*p = bytes;
|
||||
}
|
||||
void bwc_add_lost(BWControler *bwc, uint32_t bytes)
|
||||
void bwc_add_lost(BWController *bwc, uint32_t bytes)
|
||||
{
|
||||
if (!bwc)
|
||||
return;
|
||||
|
@ -129,7 +129,7 @@ void bwc_add_lost(BWControler *bwc, uint32_t bytes)
|
|||
bwc->cycle.lost += bytes;
|
||||
send_update(bwc);
|
||||
}
|
||||
void bwc_add_recv(BWControler *bwc, uint32_t bytes)
|
||||
void bwc_add_recv(BWController *bwc, uint32_t bytes)
|
||||
{
|
||||
if (!bwc || !bytes)
|
||||
return;
|
||||
|
@ -144,7 +144,7 @@ struct BWCMessage {
|
|||
uint32_t recv;
|
||||
};
|
||||
|
||||
void send_update(BWControler *bwc)
|
||||
void send_update(BWController *bwc)
|
||||
{
|
||||
if (current_time_monotonic() - bwc->cycle.lfu > BWC_REFRESH_INTERVAL_MS) {
|
||||
|
||||
|
@ -171,7 +171,7 @@ void send_update(BWControler *bwc)
|
|||
bwc->cycle.lsu = current_time_monotonic();
|
||||
}
|
||||
}
|
||||
int on_update (BWControler *bwc, struct BWCMessage *msg)
|
||||
int on_update (BWController *bwc, struct BWCMessage *msg)
|
||||
{
|
||||
LOGGER_DEBUG ("%p Got update from peer", bwc);
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/** bwcontroler.h
|
||||
/** bwcontroller.h
|
||||
*
|
||||
* Copyright (C) 2013-2015 Tox project All Rights Reserved.
|
||||
*
|
||||
|
@ -23,15 +23,15 @@
|
|||
#define BWCONROLER_H
|
||||
#include "../toxcore/Messenger.h"
|
||||
|
||||
typedef struct BWControler_s BWControler;
|
||||
typedef struct BWController_s BWController;
|
||||
|
||||
BWControler *bwc_new(Messenger *m, uint32_t friendnumber,
|
||||
void (*mcb) (BWControler *, uint32_t, float, void *),
|
||||
BWController *bwc_new(Messenger *m, uint32_t friendnumber,
|
||||
void (*mcb) (BWController *, uint32_t, float, void *),
|
||||
void *udata);
|
||||
void bwc_kill(BWControler *bwc);
|
||||
void bwc_kill(BWController *bwc);
|
||||
|
||||
void bwc_feed_avg(BWControler *bwc, uint32_t bytes);
|
||||
void bwc_add_lost(BWControler *bwc, uint32_t bytes);
|
||||
void bwc_add_recv(BWControler *bwc, uint32_t bytes);
|
||||
void bwc_feed_avg(BWController *bwc, uint32_t bytes);
|
||||
void bwc_add_lost(BWController *bwc, uint32_t bytes);
|
||||
void bwc_add_recv(BWController *bwc, uint32_t bytes);
|
||||
|
||||
#endif /* BWCONROLER_H */
|
|
@ -24,7 +24,7 @@
|
|||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include "rtp.h"
|
||||
#include "bwcontroler.h"
|
||||
#include "bwcontroller.h"
|
||||
#include "../toxcore/logger.h"
|
||||
#include "../toxcore/util.h"
|
||||
#include "../toxcore/Messenger.h"
|
||||
|
@ -37,7 +37,7 @@ int handle_rtp_packet (Messenger *m, uint32_t friendnumber, const uint8_t *data,
|
|||
|
||||
|
||||
RTPSession *rtp_new (int payload_type, Messenger *m, uint32_t friendnumber,
|
||||
BWControler *bwc, void *cs,
|
||||
BWController *bwc, void *cs,
|
||||
int (*mcb) (void *, struct RTPMessage *))
|
||||
{
|
||||
assert(mcb);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#ifndef RTP_H
|
||||
#define RTP_H
|
||||
|
||||
#include "bwcontroler.h"
|
||||
#include "bwcontroller.h"
|
||||
#include "../toxcore/Messenger.h"
|
||||
#include "stdbool.h"
|
||||
|
||||
|
@ -92,14 +92,14 @@ typedef struct {
|
|||
Messenger *m;
|
||||
uint32_t friend_number;
|
||||
|
||||
BWControler *bwc;
|
||||
BWController *bwc;
|
||||
void *cs;
|
||||
int (*mcb) (void *, struct RTPMessage *msg);
|
||||
} RTPSession;
|
||||
|
||||
|
||||
RTPSession *rtp_new (int payload_type, Messenger *m, uint32_t friend_num,
|
||||
BWControler *bwc, void *cs,
|
||||
BWController *bwc, void *cs,
|
||||
int (*mcb) (void *, struct RTPMessage *));
|
||||
void rtp_kill (RTPSession *session);
|
||||
int rtp_allow_receiving (RTPSession *session);
|
||||
|
|
|
@ -45,7 +45,7 @@ typedef struct ToxAVCall_s {
|
|||
pthread_mutex_t mutex_video[1];
|
||||
PAIR(RTPSession *, VCSession *) video;
|
||||
|
||||
BWControler *bwc;
|
||||
BWController *bwc;
|
||||
|
||||
bool active;
|
||||
MSICall *msi_call;
|
||||
|
@ -87,7 +87,7 @@ struct ToxAV {
|
|||
uint32_t interval; /** Calculated interval */
|
||||
};
|
||||
|
||||
void callback_bwc (BWControler *bwc, uint32_t friend_number, float loss, void *user_data);
|
||||
void callback_bwc (BWController *bwc, uint32_t friend_number, float loss, void *user_data);
|
||||
|
||||
int callback_invite(void *toxav_inst, MSICall *call);
|
||||
int callback_start(void *toxav_inst, MSICall *call);
|
||||
|
@ -857,7 +857,7 @@ void toxav_callback_video_receive_frame(ToxAV *av, toxav_video_receive_frame_cb
|
|||
* :: Internal
|
||||
*
|
||||
******************************************************************************/
|
||||
void callback_bwc(BWControler *bwc, uint32_t friend_number, float loss, void *user_data)
|
||||
void callback_bwc(BWController *bwc, uint32_t friend_number, float loss, void *user_data)
|
||||
{
|
||||
/* Callback which is called when the internal measure mechanism reported packet loss.
|
||||
* We report suggested lowered bitrate to an app. If app is sending both audio and video,
|
||||
|
|
Loading…
Reference in New Issue
Block a user