File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,9 +99,6 @@ extern unsigned int cuda_devices[];
9999extern unsigned int cuda_devices_count;
100100extern bool cuda_devices_explicit; // /< --cuda-device/-D specified expilcitly
101101
102- #define MODE_SENDER (1U <<0U )
103- #define MODE_RECEIVER (1U <<1U )
104-
105102typedef void (*mainloop_t )(void *);
106103// / mainloop to be run if display mainloop isn't run
107104extern mainloop_t mainloop;
Original file line number Diff line number Diff line change @@ -1245,10 +1245,12 @@ static int adjust_params(struct ug_options *opt) {
12451245 }
12461246
12471247 if (strcmp (" none" , opt->requested_display ) != 0 ) {
1248- opt->video .rxtx_mode |= MODE_RECEIVER;
1248+ opt->video .rxtx_mode =
1249+ (enum rxtx_mode)(opt->video .rxtx_mode | MODE_RECEIVER);
12491250 }
12501251 if (strcmp (" none" , vidcap_params_get_driver (opt->vidcap_params_head )) != 0 ) {
1251- opt->video .rxtx_mode |= MODE_SENDER;
1252+ opt->video .rxtx_mode =
1253+ (enum rxtx_mode)(opt->video .rxtx_mode | MODE_SENDER);
12521254 }
12531255
12541256 adjust_ports (opt, audio_rxtx_mode);
Original file line number Diff line number Diff line change @@ -363,6 +363,13 @@ enum video_mode {
363363 VIDEO_3X1, // /< 3x1 video
364364};
365365
366+ // / bit sum SENDER+RECEIVER for duplex operation
367+ enum rxtx_mode {
368+ RXTX_MODE_NONE = 0 ,
369+ MODE_SENDER = 1 << 0 ,
370+ MODE_RECEIVER = 1 << 1 ,
371+ };
372+
366373enum tx_media_type {
367374 TX_MEDIA_AUDIO,
368375 TX_MEDIA_VIDEO
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ struct video_frame;
6060
6161struct vrxtx_params {
6262 const char *compression; // nullptr selects proto dfl
63- unsigned int rxtx_mode;
63+ enum rxtx_mode rxtx_mode;
6464 struct display *display_device; // only iHDTV, UG RTP
6565 struct vidcap *capture_device; // iHDTV only
6666 const char *receiver;
@@ -79,7 +79,7 @@ struct vrxtx_params {
7979#define VRXTX_INIT \
8080 { \
8181 .compression = nullptr , \
82- .rxtx_mode = 0 , \
82+ .rxtx_mode = RXTX_MODE_NONE , \
8383 .display_device = nullptr , \
8484 .capture_device = nullptr , \
8585 .receiver = nullptr , \
You can’t perform that action at this time.
0 commit comments