vlc | branch: master | Kazuki Yamaguchi <[email protected]> | Tue Feb 16 00:33:27 2016 +0900| [f01b42782afd6af3a51e86520838fd7535109879] | committer: Yuudai Yamashigi
aribcam: ARIB STD-B25 compliant TS packet is always 188 bytes length ARIB STD-B25 [1] says associated information must be transmitted in compliance with the Ministry of Internal Affairs and Communications Notification No. 223, 2014 [2], which says the TS packet size is 188 bytes. [1] http://www.arib.or.jp/english/html/overview/doc/2-STD-B25v6_5.pdf (p.315, Japanese) [2] http://www.soumu.go.jp/main_content/000353390.pdf (p.14, Japanese) Signed-off-by: Yuudai Yamashigi <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f01b42782afd6af3a51e86520838fd7535109879 --- modules/stream_filter/aribcam.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/modules/stream_filter/aribcam.c b/modules/stream_filter/aribcam.c index 20fc7be..b5ff755 100644 --- a/modules/stream_filter/aribcam.c +++ b/modules/stream_filter/aribcam.c @@ -94,8 +94,6 @@ struct stream_sys_t size_t i_size; block_t *p_list; } remain; - - bool b_unitsizeset; }; static const char * GetErrorMessage( const int i_error, @@ -239,19 +237,6 @@ static int DecoderRead( stream_t *p_stream, uint8_t *p_dst, int i_toread ) static ssize_t Read( stream_t *p_stream, void *p_buf, size_t i_toread ) { stream_sys_t *p_sys = p_stream->p_sys; - - /* We force unit size from 1st TS packet as the lib wants to auto detect - size but requires larger amount of data for that purpose */ - if ( !p_sys->b_unitsizeset ) - { - if ( i_toread >= 188 && i_toread <= 320 ) - p_sys->b_unitsizeset = ! p_sys->p_b25->set_unit_size( p_sys->p_b25, i_toread ); - if ( !p_sys->b_unitsizeset ) - msg_Warn( p_stream, "Unit size not set." ); - else - msg_Dbg( p_stream, "Set unit size to %u", i_toread ); - } - int i_read = DecoderRead( p_stream, p_buf, i_toread ); if ( i_read < 0 ) return -1; @@ -302,6 +287,10 @@ static int Open( vlc_object_t *p_object ) if ( p_sys->p_b25->set_emm_proc( p_sys->p_b25, 0 ) < 0 ) msg_Warn( p_stream, "cannot set B25 emm_proc" ); + /* ARIB STD-B25 scrambled TS's packet size is always 188 bytes */ + if ( p_sys->p_b25->set_unit_size( p_sys->p_b25, 188 ) < 0) + msg_Warn( p_stream, "cannot set B25 TS packet size" ); + p_sys->p_bcas = create_b_cas_card(); if ( p_sys->p_bcas ) { _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
