Pass multiple streams to display only if it is proxy

This commit is contained in:
Martin Pulec
2014-09-28 00:21:45 +02:00
parent 20299329cb
commit affdf29028
3 changed files with 24 additions and 5 deletions

View File

@@ -96,7 +96,9 @@ enum display_property {
DISPLAY_PROPERTY_RGB_SHIFT = 1, ///< red,green,blue shift - int[3] (bits)
DISPLAY_PROPERTY_BUF_PITCH = 2, ///< requested framebuffer pitch - int (bytes), may be @ref PITCH_DEFAULT
DISPLAY_PROPERTY_VIDEO_MODE = 3, ///< requested video mode - int (one of @ref display_prop_vid_mode)
DISPLAY_PROPERTY_SUPPORTED_IL_MODES = 4 ///< display supported interlacing modes - enum interlacing_t[]
DISPLAY_PROPERTY_SUPPORTED_IL_MODES = 4, ///< display supported interlacing modes - enum interlacing_t[]
DISPLAY_PROPERTY_SUPPORTS_MULTI_SOURCES = 5, ///< whether display supports receiving data from
///< multiple network sources concurrently
};
#define PITCH_DEFAULT -1 ///< default pitch, i. e. respective linesize

View File

@@ -285,7 +285,14 @@ display_type_t *display_proxy_probe(void)
int display_proxy_get_property(void *state, int property, void *val, size_t *len)
{
struct state_proxy *s = (struct state_proxy *)state;
return display_get_property(s->real_display, property, val, len);
if (property == DISPLAY_PROPERTY_SUPPORTS_MULTI_SOURCES) {
*(int *) val = TRUE;
*len = sizeof(int);
return TRUE;
} else {
return display_get_property(s->real_display, property, val, len);
}
}
int display_proxy_reconfigure(void *state, struct video_desc desc)

View File

@@ -333,9 +333,19 @@ void *ultragrid_rtp_video_rxtx::receiver_loop()
cp->decoder_state = shared_decoder;
#else
// we are assigning our display so we make sure it is removed from other dispaly
#if 0
remove_display_from_decoders();
#endif
int supp_for_mult_sources;
size_t len = sizeof(int);
int ret = display_get_property(m_display_device,
DISPLAY_PROPERTY_SUPPORTS_MULTI_SOURCES, &supp_for_mult_sources, &len);
if (!ret) {
supp_for_mult_sources = FALSE;
}
if (supp_for_mult_sources == FALSE) {
remove_display_from_decoders();
}
cp->decoder_state = new_video_decoder();
cp->decoder_state_deleter = destroy_video_decoder;
#endif // SHARED_DECODER