Skip to content

Commit 4ab08a4

Browse files
committed
video_rxtx: fn renames
more descriptive fn names + document vrxtx_get_compression
1 parent a16a239 commit 4ab08a4

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

src/main.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ static bool parse_protocol(int ch, char *optarg, struct ug_options *opt) {
669669
col() << SBOLD("\t-x A:proto") " - use specified audio protocol\n";
670670
col() << SBOLD("\t-x V:proto") " - use specified audio protocol\n";
671671
col() << "\nAudio protocol can be one of: " << TBOLD(AUDIO_PROTOCOLS) " (not all must be available)\n";
672-
vrxtx_list(strcmp(optarg, "fullhelp") == 0);
672+
vrxtx_list_protocols(strcmp(optarg, "fullhelp") == 0);
673673
return false;
674674
}
675675
if (set_audio) {
@@ -1390,7 +1390,8 @@ int main(int argc, char *argv[])
13901390
<< "\n";
13911391
col() << TBOLD("Audio codec : ")
13921392
<< get_name_to_audio_codec(ac_params.codec) << "\n";
1393-
col() << TBOLD("Network protocol : ") << vrxtx_get_long_name(opt.video_protocol) << "\n";
1393+
col() << TBOLD("Network protocol : ")
1394+
<< vrxtx_get_proto_long_name(opt.video_protocol) << "\n";
13941395
col() << TBOLD("Audio FEC : ") << opt.audio.fec_cfg << "\n";
13951396
col() << TBOLD("Video FEC : ") << opt.video.fec << "\n";
13961397
col() << "\n";

src/video_rxtx.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ struct video_rxtx {
119119
std::atomic<codec_t> m_input_codec{};
120120
};
121121

122+
/**
123+
* @returns req_compression if specified (!= 0); protocol default compression
124+
* otherwise
125+
*/
122126
const char *
123127
vrxtx_get_compression(const char *video_protocol, const char *req_compression)
124128
{
@@ -387,13 +391,14 @@ int vrxtx_init(const char *proto_name, const struct vrxtx_params *params,
387391
}
388392

389393
void
390-
vrxtx_list(bool full)
394+
vrxtx_list_protocols(bool full)
391395
{
392396
video_rxtx::list(full);
393397
}
394398

395399
const char *
396-
vrxtx_get_long_name(const char *short_name)
400+
vrxtx_get_proto_long_name(const char *short_name)
401+
397402
{
398403
return video_rxtx::get_long_name(short_name);
399404
}

src/video_rxtx.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ struct video_rxtx;
114114
int vrxtx_init(const char *proto_name, const struct vrxtx_params *params,
115115
const struct common_opts *opts, struct video_rxtx **state);
116116
void vrxtx_destroy(struct video_rxtx *state);
117-
void vrxtx_list(bool full);
118-
const char *vrxtx_get_long_name(const char *short_name);
117+
void vrxtx_list_protocols(bool full);
118+
const char *vrxtx_get_proto_long_name(const char *short_name);
119119
const char *vrxtx_get_compression(const char *video_protocol,
120120
const char *req_compression);
121121
void vrxtx_join(struct video_rxtx *state);

0 commit comments

Comments
 (0)