Browse Source

MT#61630 media_player*: make functions static

Make most of implementations static to file
because used only locally:
- `media_player_play_file()`
- `media_player_play_blob()`
- `media_player_play_db()`
- `media_player_add_file()`
- `media_player_add_blob()`
- `media_player_add_db()`

Change-Id: I0db13e1f851e6c59d29ffb5adf5cb8d01bfd5bcc
pull/1897/head
Donat Zenichev 12 months ago
parent
commit
0406b7c15f
2 changed files with 13 additions and 12 deletions
  1. +13
    -6
      daemon/media_player.c
  2. +0
    -6
      include/media_player.h

+ 13
- 6
daemon/media_player.c View File

@ -33,6 +33,13 @@ typedef enum {
MPC_CACHED = 1,
} mp_cached_code;
static bool media_player_play_file(struct media_player *mp, media_player_opts_t opts);
static bool media_player_play_blob(struct media_player *mp, media_player_opts_t opts);
static bool media_player_play_db(struct media_player *mp, media_player_opts_t opts);
static bool media_player_add_file(struct media_player *mp, media_player_opts_t opts);
static bool media_player_add_blob(struct media_player *mp, media_player_opts_t opts);
static bool media_player_add_db(struct media_player *mp, media_player_opts_t opts);
#ifdef WITH_TRANSCODING
static struct timerthread media_player_thread;
static __thread MYSQL *mysql_conn;
@ -1142,7 +1149,7 @@ static mp_cached_code __media_player_add_file(struct media_player *mp,
}
// call->master_lock held in W
bool media_player_play_file(struct media_player *mp, media_player_opts_t opts) {
static bool media_player_play_file(struct media_player *mp, media_player_opts_t opts) {
#ifdef WITH_TRANSCODING
const rtp_payload_type *dst_pt = media_player_play_init(mp);
if (!dst_pt)
@ -1176,7 +1183,7 @@ bool media_player_add(struct media_player *mp, media_player_opts_t opts) {
}
// call->master_lock held in W
bool media_player_add_file(struct media_player *mp, media_player_opts_t opts) {
static bool media_player_add_file(struct media_player *mp, media_player_opts_t opts) {
int ret = __media_player_add_file(mp, opts, NULL);
return ret == 0;
}
@ -1327,7 +1334,7 @@ err:
// call->master_lock held in W
bool media_player_play_blob(struct media_player *mp, media_player_opts_t opts) {
static bool media_player_play_blob(struct media_player *mp, media_player_opts_t opts) {
const rtp_payload_type *dst_pt = media_player_play_init(mp);
if (!dst_pt)
return false;
@ -1343,7 +1350,7 @@ bool media_player_play_blob(struct media_player *mp, media_player_opts_t opts) {
}
// call->master_lock held in W
bool media_player_add_blob(struct media_player *mp, media_player_opts_t opts) {
static bool media_player_add_blob(struct media_player *mp, media_player_opts_t opts) {
opts.db_id = -1;
int ret = __media_player_add_blob_id(mp, opts, NULL);
return ret == 0;
@ -1437,7 +1444,7 @@ err:
}
// call->master_lock held in W
bool media_player_play_db(struct media_player *mp, media_player_opts_t opts) {
static bool media_player_play_db(struct media_player *mp, media_player_opts_t opts) {
const rtp_payload_type *dst_pt = media_player_play_init(mp);
if (!dst_pt)
return false;
@ -1452,7 +1459,7 @@ bool media_player_play_db(struct media_player *mp, media_player_opts_t opts) {
}
// call->master_lock held in W
bool media_player_add_db(struct media_player *mp, media_player_opts_t opts) {
static bool media_player_add_db(struct media_player *mp, media_player_opts_t opts) {
int ret = __media_player_add_db(mp, opts, NULL);
return ret == 0;
}


+ 0
- 6
include/media_player.h View File

@ -118,12 +118,6 @@ struct send_timer {
#define MPO(...) (media_player_opts_t){__VA_ARGS__}
void media_player_new(struct media_player **, struct call_monologue *);
bool media_player_play_file(struct media_player *, media_player_opts_t);
bool media_player_play_blob(struct media_player *, media_player_opts_t);
bool media_player_play_db(struct media_player *, media_player_opts_t);
bool media_player_add_file(struct media_player *, media_player_opts_t);
bool media_player_add_blob(struct media_player *, media_player_opts_t);
bool media_player_add_db(struct media_player *, media_player_opts_t);
bool media_player_add(struct media_player *mp, media_player_opts_t opts);
bool media_player_start(struct media_player *);
long long media_player_stop(struct media_player *);


Loading…
Cancel
Save