-/*****************************************************************************
- * Module descriptor
- *****************************************************************************/
-vlc_module_begin();
- set_description( _("Raw DTS demuxer") );
- set_capability( "demux", 155 );
- set_callbacks( Open, Close );
- add_shortcut( "dts" );
-vlc_module_end();
-
-/*****************************************************************************
- * CheckSync: Check if buffer starts with a DTS sync code
- *****************************************************************************/
-static int CheckSync( uint8_t *p_peek )
-{
- /* 14 bits, little endian version of the bitstream */
- if( p_peek[0] == 0xff && p_peek[1] == 0x1f &&
- p_peek[2] == 0x00 && p_peek[3] == 0xe8 &&
- (p_peek[4] & 0xf0) == 0xf0 && p_peek[5] == 0x07 )
- {
- return VLC_SUCCESS;
- }
- /* 14 bits, big endian version of the bitstream */
- else if( p_peek[0] == 0x1f && p_peek[1] == 0xff &&
- p_peek[2] == 0xe8 && p_peek[3] == 0x00 &&
- p_peek[4] == 0x07 && (p_peek[5] & 0xf0) == 0xf0)
- {
- return VLC_SUCCESS;
- }
- /* 16 bits, big endian version of the bitstream */
- else if( p_peek[0] == 0x7f && p_peek[1] == 0xfe &&
- p_peek[2] == 0x80 && p_peek[3] == 0x01 )
- {
- return VLC_SUCCESS;
- }
- /* 16 bits, little endian version of the bitstream */
- else if( p_peek[0] == 0xfe && p_peek[1] == 0x7f &&
- p_peek[2] == 0x01 && p_peek[3] == 0x80 )
- {
- return VLC_SUCCESS;
- }