[vlc-commits] sout: sdi: restrict by program
Francois Cartegnie
git at videolan.org
Tue Oct 2 18:46:06 CEST 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Oct 2 16:12:22 2018 +0200| [4dea4b2dae98c6ef72b0fbf645b182d4c39fa249] | committer: Francois Cartegnie
sout: sdi: restrict by program
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4dea4b2dae98c6ef72b0fbf645b182d4c39fa249
---
modules/stream_out/sdi/SDIOutput.cpp | 9 +++++++++
modules/stream_out/sdi/SDIOutput.hpp | 2 ++
2 files changed, 11 insertions(+)
diff --git a/modules/stream_out/sdi/SDIOutput.cpp b/modules/stream_out/sdi/SDIOutput.cpp
index f3ee7f7d7a..c08ae4de2f 100644
--- a/modules/stream_out/sdi/SDIOutput.cpp
+++ b/modules/stream_out/sdi/SDIOutput.cpp
@@ -51,6 +51,7 @@ SDIOutput::SDIOutput(sout_stream_t *p_stream_)
ancillary.ar = var_InheritInteger(p_stream, CFG_PREFIX "ar");
ancillary.afd_line = var_InheritInteger(p_stream, CFG_PREFIX "afd-line");
ancillary.captions_line = 15;
+ program = -1;
videoStream = NULL;
captionsStream = NULL;
audioMultiplex = new SDIAudioMultiplex( var_InheritInteger(p_stream, CFG_PREFIX "channels") );
@@ -81,6 +82,10 @@ AbstractStream *SDIOutput::Add(const es_format_t *fmt)
{
AbstractStream *s = NULL;
StreamID id(fmt->i_id);
+
+ if(program >= 0 && fmt->i_group != program)
+ return NULL;
+
if(fmt->i_cat == VIDEO_ES && !videoStream)
{
if(ConfigureVideo(&fmt->video) == VLC_SUCCESS)
@@ -125,6 +130,10 @@ AbstractStream *SDIOutput::Add(const es_format_t *fmt)
{
s = captionsStream = dynamic_cast<CaptionsStream *>(createStream(id, fmt, &captionsBuffer));
}
+
+ if(program == -1)
+ program = fmt->i_group;
+
return s;
}
diff --git a/modules/stream_out/sdi/SDIOutput.hpp b/modules/stream_out/sdi/SDIOutput.hpp
index 290f2a315b..b138d5227d 100644
--- a/modules/stream_out/sdi/SDIOutput.hpp
+++ b/modules/stream_out/sdi/SDIOutput.hpp
@@ -54,6 +54,8 @@ namespace sdi_sout
BlockStreamOutputBuffer captionsBuffer;
SDIAudioMultiplex *audioMultiplex;
+ int program;
+
struct
{
es_format_t configuredfmt;
More information about the vlc-commits
mailing list