Skip to content

Commit f920fde

Browse files
committed
main: print the compression used by the proto again
Instead of temporarily fix "protocol default" that stood for the compression selected according to the video protocol return back the actual compression (that is now selected by vrxtx).
1 parent 1cb3cb2 commit f920fde

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1382,7 +1382,8 @@ int main(int argc, char *argv[])
13821382
col() << TBOLD("Audio playback : ") << opt.audio.recv_cfg << "\n";
13831383
col() << TBOLD("MTU : ") << opt.common.mtu << " B\n";
13841384
col() << TBOLD("Video compression: ")
1385-
<< IF_NOT_NULL_ELSE(opt.video.compression, "protocol default")
1385+
<< vrxtx_get_compression(opt.video_protocol,
1386+
opt.video.compression)
13861387
<< "\n";
13871388
col() << TBOLD("Audio codec : ")
13881389
<< get_name_to_audio_codec(ac_params.codec) << "\n";

src/video_rxtx.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ using std::shared_ptr;
7272
using std::ostringstream;
7373
using std::string;
7474

75-
static const char *
76-
get_compression(const char *video_protocol, const char *req_compression)
75+
const char *
76+
vrxtx_get_compression(const char *video_protocol, const char *req_compression)
7777
{
7878
if (req_compression != nullptr) {
7979
return req_compression;
@@ -97,7 +97,7 @@ video_rxtx::video_rxtx(const char *protocol_name,
9797
module_register(&m_sender_mod, common->parent);
9898

9999
const char *compression =
100-
get_compression(protocol_name, params->compression);
100+
vrxtx_get_compression(protocol_name, params->compression);
101101
int ret = compress_init(&m_sender_mod, compression, &m_compression);
102102
if(ret != 0) {
103103
module_done(&m_sender_mod);

src/video_rxtx.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,5 +167,8 @@ struct video_rxtx {
167167
std::atomic<codec_t> m_input_codec{};
168168
};
169169

170+
const char *vrxtx_get_compression(const char *video_protocol,
171+
const char *req_compression);
172+
170173
#endif // VIDEO_RXTX_H_
171174

0 commit comments

Comments
 (0)