MT#61822 fix with_transcoding=no warnings

Change-Id: Ic1996eceda52befe869c7de5851453a256be0f70
pull/1897/head
Richard Fuchs 1 year ago
parent 8286cc93b9
commit 4755594f90

@ -35,12 +35,14 @@ typedef enum {
MPC_CACHED = 1, MPC_CACHED = 1,
} mp_cached_code; } mp_cached_code;
#ifdef WITH_TRANSCODING
static 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);
static 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);
static 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);
static 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);
static 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);
static 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);
#endif
#ifdef WITH_TRANSCODING #ifdef WITH_TRANSCODING
static struct timerthread media_player_thread; static struct timerthread media_player_thread;
@ -1373,7 +1375,6 @@ static void __media_player_set_opts(struct media_player *mp, media_player_opts_t
if (mp->opts.block_egress) if (mp->opts.block_egress)
MEDIA_SET(mp->media, BLOCK_EGRESS); MEDIA_SET(mp->media, BLOCK_EGRESS);
} }
#endif
// call->master_lock held in W // call->master_lock held in W
@ -1381,7 +1382,6 @@ static mp_cached_code __media_player_add_file(struct media_player *mp,
media_player_opts_t opts, media_player_opts_t opts,
const rtp_payload_type *dst_pt) const rtp_payload_type *dst_pt)
{ {
#ifdef WITH_TRANSCODING
mp->cache_index.type = MP_FILE; mp->cache_index.type = MP_FILE;
mp->cache_index.file = call_str_cpy(&opts.file); mp->cache_index.file = call_str_cpy(&opts.file);
@ -1407,14 +1407,10 @@ static mp_cached_code __media_player_add_file(struct media_player *mp,
} }
return MPC_OK; return MPC_OK;
#else
return MPC_ERR;
#endif
} }
// call->master_lock held in W // call->master_lock held in W
static 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); const rtp_payload_type *dst_pt = media_player_play_init(mp);
if (!dst_pt) if (!dst_pt)
return false; return false;
@ -1426,10 +1422,8 @@ static bool media_player_play_file(struct media_player *mp, media_player_opts_t
return false; return false;
return media_player_play_start(mp, dst_pt, opts.codec_set); return media_player_play_start(mp, dst_pt, opts.codec_set);
#else
return false;
#endif
} }
#endif
bool media_player_add(struct media_player *mp, media_player_opts_t opts) { bool media_player_add(struct media_player *mp, media_player_opts_t opts) {
#ifdef WITH_TRANSCODING #ifdef WITH_TRANSCODING
@ -1446,11 +1440,13 @@ bool media_player_add(struct media_player *mp, media_player_opts_t opts) {
#endif #endif
} }
#ifdef WITH_TRANSCODING
// call->master_lock held in W // call->master_lock held in W
static 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); int ret = __media_player_add_file(mp, opts, NULL);
return ret == 0; return ret == 0;
} }
#endif
bool call_ml_wants_moh(struct call_monologue *ml, enum ng_opmode opmode) bool call_ml_wants_moh(struct call_monologue *ml, enum ng_opmode opmode)
{ {

Loading…
Cancel
Save