/*****************************************************************************
* mjpeg.c : demuxes mjpeg webcam http streams
*****************************************************************************
- * Copyright (C) 2004 VideoLAN (Centrale Réseaux) and its contributors
- * $Id: mjpeg.c 7196 2004-03-29 21:29:31Z fenrir $
+ * Copyright (C) 2004 the VideoLAN team
+ * $Id$
*
* Authors: Henry Jen (slowhog) <henryjen@ztune.net>
* Derk-Jan Hartman (thedj)
*
* 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.
*****************************************************************************/
/*****************************************************************************
static void Close( vlc_object_t * );
#define FPS_TEXT N_("Frames per Second")
-#define FPS_LONGTEXT N_("Allows you to set the desired frame rate when " \
- "playing from files, use 0 for live.")
+#define FPS_LONGTEXT N_("This is the desired frame rate when " \
+ "playing MJPEG from a file. Use 0 (this is the default value) for a " \
+ "live stream (from a camera).")
vlc_module_begin();
set_shortname( "MJPEG");
- set_description( _("JPEG camera demuxer") );
+ set_description( _("M-JPEG camera demuxer") );
set_capability( "demux2", 5 );
set_callbacks( Open, Close );
set_category( CAT_INPUT );
msg_Err( p_demux, "out of memory" );
return NULL;
}
- strncpy ( p_line, p_buf, i );
+ strncpy ( p_line, (char*)p_buf, i );
p_line[i] = '\0';
// msg_Dbg( p_demux, "i = %d, pos = %d, %s", i, *p_pos, p_line );
return p_line;
*p_header_size = -2;
return VLC_FALSE;
}
- if( strncmp( p_sys->p_peek, "--", 2 ) )
+ if( strncmp( (char *)p_sys->p_peek, "--", 2 ) )
{
*p_header_size = 0;
return VLC_FALSE;
}
else
{
- msg_Dbg( p_demux, "Discard MIME header: %s", psz_line );
+ msg_Dbg( p_demux, "discard MIME header: %s", psz_line );
}
free( psz_line );
psz_line = GetLine( p_demux, &i_pos );
i++;
if( i >= p_sys->i_data_peeked )
{
- msg_Dbg( p_demux, "Did not find JPEG EOI in %d bytes",
+ msg_Dbg( p_demux, "did not find JPEG EOI in %d bytes",
p_sys->i_data_peeked );
if( !Peek( p_demux, VLC_FALSE ) )
{
- msg_Warn( p_demux, "No more data is available at the moment" );
+ msg_Warn( p_demux, "no more data is available at the moment" );
return 0;
}
}
if( !Peek( p_demux, VLC_FALSE ) )
{
- msg_Warn( p_demux, "No more data is available at the "
+ msg_Warn( p_demux, "no more data is available at the "
"moment" );
return 0;
}
}
}
- if( !strncmp( p_sys->psz_separator, p_sys->p_peek + i + 2,
+ if( !strncmp( p_sys->psz_separator, (char *)(p_sys->p_peek + i + 2),
strlen( p_sys->psz_separator ) ) )
{
b_done = VLC_TRUE;
if( !b_match )
{
- msg_Err( p_demux, "Discard non-JPEG part" );
+ msg_Err( p_demux, "discard non-JPEG part" );
stream_Read( p_demux->s, NULL, i );
return 0;
}