/*****************************************************************************
* ty.c - TiVo ty stream video demuxer for VLC
*****************************************************************************
/*****************************************************************************
* ty.c - TiVo ty stream video demuxer for VLC
*****************************************************************************
* Copyright (C) 2005 by Neal Symms (tivo@freakinzoo.com) - February 2005
* based on code by Christopher Wingert for tivo-mplayer
* tivo(at)wingert.org, February 2003
* Copyright (C) 2005 by Neal Symms (tivo@freakinzoo.com) - February 2005
* based on code by Christopher Wingert for tivo-mplayer
* tivo(at)wingert.org, February 2003
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
set_description(_("TY Stream audio/video demux"));
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_DEMUX );
set_description(_("TY Stream audio/video demux"));
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_DEMUX );
/* FIXME: there seems to be a segfault when using PVR access
* and TY demux has a bigger priority than PS
* Something must be wrong.
/* FIXME: there seems to be a segfault when using PVR access
* and TY demux has a bigger priority than PS
* Something must be wrong.
p_sys->i_pes_buf_cnt = 4;
if( rec_len > 4 )
msg_Err( p_demux, "PES header not found in record of %d bytes!",
p_sys->i_pes_buf_cnt = 4;
if( rec_len > 4 )
msg_Err( p_demux, "PES header not found in record of %d bytes!",
demux_sys_t *p_sys = p_demux->p_sys;
/*msg_Dbg(p_demux, "ty demux processing" );*/
demux_sys_t *p_sys = p_demux->p_sys;
/*msg_Dbg(p_demux, "ty demux processing" );*/
* if we're at the end of this chunk, start a new one
*/
/* parse the next chunk's record headers */
* if we're at the end of this chunk, start a new one
*/
/* parse the next chunk's record headers */
/* seek within the chunk to get roughly to where we want */
p_sys->i_cur_rec = (int)
((double) ((seek_pos % CHUNK_SIZE) / (double) (CHUNK_SIZE)) * p_sys->i_num_recs);
/* seek within the chunk to get roughly to where we want */
p_sys->i_cur_rec = (int)
((double) ((seek_pos % CHUNK_SIZE) / (double) (CHUNK_SIZE)) * p_sys->i_num_recs);
msg_Dbg(p_demux, " (chunk %d, record %d)",
p_sys->i_chunk_count - 1, p_sys->i_cur_rec);
msg_Dbg(p_demux, " (chunk %d, record %d)",
p_sys->i_chunk_count - 1, p_sys->i_cur_rec);