Commit f01b4278 authored by Kazuki Yamaguchi's avatar Kazuki Yamaguchi Committed by 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: default avatarYuudai Yamashigi <yyamashigi@videolan.org>
parent b90daeac
......@@ -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 )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment