]> git.sesse.net Git - vlc/blobdiff - modules/demux/ty.c
Moves volume icon update in the timer
[vlc] / modules / demux / ty.c
index b2f797b9467783d1ecb21b2cf0fc0aaac26b80ed..1b76192a48d6534aa499d5a434af495515bd1b38 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * ty.c - TiVo ty stream video demuxer for VLC
  *****************************************************************************
- * Copyright (C) 2005 VideoLAN
+ * Copyright (C) 2005 the VideoLAN team
  * 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
@@ -20,7 +20,7 @@
  *
  * 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.
  *
  * CODE CHANGES:
  * v1.0.0 - 24-Feb-2005 - Initial release - Series 1 support ONLY!
@@ -32,9 +32,8 @@
  * Preamble
  *****************************************************************************/
 
-#include <stdlib.h>
 #include <vlc/vlc.h>
-#include <vlc/input.h>
+#include <vlc_demux.h>
 #include "vlc_codec.h"
 
 #define SERIES1_PES_LENGTH  (11)
@@ -66,11 +65,11 @@ static int Control(demux_t *, int, va_list);
  * Module descriptor
  *****************************************************************************/
 vlc_module_begin();
-    set_shortname( _("TY") );
+    set_shortname( "TY" );
     set_description(_("TY Stream audio/video demux"));
     set_category( CAT_INPUT );
     set_subcategory( SUBCAT_INPUT_DEMUX );
-    set_capability("demux2", 8);
+    set_capability("demux2", 6);
     /* FIXME: there seems to be a segfault when using PVR access
      * and TY demux has a bigger priority than PS
      * Something must be wrong.
@@ -308,7 +307,7 @@ static int check_sync_pes( demux_t *p_demux, block_t *p_block,
         if( offset < 0 )
         {
             /* no header found, fake some 00's (this works, believe me) */
-            memset( p_sys->pes_buffer, 4, 0 );
+            memset( p_sys->pes_buffer, 0, 4 );
             p_sys->i_pes_buf_cnt = 4;
             if( rec_len > 4 )
                 msg_Err( p_demux, "PES header not found in record of %d bytes!",
@@ -371,7 +370,7 @@ int TyDemux(demux_t *p_demux)
     demux_sys_t      *p_sys = p_demux->p_sys;
 
     /*msg_Dbg(p_demux, "ty demux processing" );*/
-   
+
     /* did we hit EOF earlier? */
     if (p_sys->eof) return 0;
 
@@ -386,7 +385,7 @@ int TyDemux(demux_t *p_demux)
     * - set PTS for data packets
     * - pass the data on to the proper codec via es_out_Send()
 
-    * if this is the first time or  
+    * if this is the first time or
     * if we're at the end of this chunk, start a new one
     */
     /* parse the next chunk's record headers */
@@ -784,7 +783,7 @@ static int ty_stream_seek(demux_t *p_demux, double seek_pct)
     /* 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, "Seeked to file pos " I64Fd, seek_pos);
+    msg_Dbg(p_demux, "seeked to file pos " I64Fd, seek_pos);
     msg_Dbg(p_demux, " (chunk %d, record %d)",
              p_sys->i_chunk_count - 1, p_sys->i_cur_rec);