* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
"value should be set in millisecond units." )
#define KASENNA_TEXT N_( "Kasenna RTSP dialect")
-#define KASENNA_LONGTEXT N_( "Kasenna servers use an old and unstandard " \
- "dialect of RTSP. When you set this parameter, VLC will try this dialect "\
- "for communication. In this mode you cannot connect to normal RTSP servers." )
+#define KASENNA_LONGTEXT N_( "Kasenna servers use an old and nonstandard " \
+ "dialect of RTSP. With this parameter VLC will try this dialect, but "\
+ "then it cannot connect to normal RTSP servers." )
#define USER_TEXT N_("RTSP user name")
-#define USER_LONGTEXT N_("Allows you to modify the user name that will " \
- "be used for authenticating the connection.")
+#define USER_LONGTEXT N_("Sets the username for the connection, " \
+ "if no username or password are set in the url.")
#define PASS_TEXT N_("RTSP password")
-#define PASS_LONGTEXT N_("Allows you to modify the password that will be " \
- "used for the connection.")
+#define PASS_LONGTEXT N_("Sets the password for the connection, " \
+ "if no username or password are set in the url.")
vlc_module_begin ()
set_description( N_("RTP/RTSP/SDP demuxer (using Live555)" ) )
KASENNA_LONGTEXT, true )
add_string( "rtsp-user", NULL, NULL, USER_TEXT,
USER_LONGTEXT, true )
- add_string( "rtsp-pwd", NULL, NULL, PASS_TEXT,
- PASS_LONGTEXT, true )
+ add_password( "rtsp-pwd", NULL, NULL, PASS_TEXT,
+ PASS_LONGTEXT, true )
vlc_module_end ()
bool b_muxed;
bool b_quicktime;
bool b_asf;
+ bool b_discard_trunc;
stream_t *p_out_muxed; /* for muxed stream */
uint8_t *p_buffer;
_("Please enter a valid login name and a password.") );
if( psz_user != NULL && psz_pwd != NULL )
{
- msg_Dbg( p_demux, "retrying with user=%s, pwd=%s",
- psz_user, psz_pwd );
+ msg_Dbg( p_demux, "retrying with user=%s", psz_user );
goto describe;
}
}
tk->b_quicktime = false;
tk->b_asf = false;
tk->b_muxed = false;
+ tk->b_discard_trunc = false;
tk->p_out_muxed = NULL;
tk->waiting = 0;
tk->b_rtcp_sync = false;
p_sys->p_out_asf = stream_DemuxNew( p_demux, "asf",
p_demux->out );;
}
+ else if( !strcmp( sub->codecName(), "DV" ) )
+ {
+ tk->b_muxed = true;
+ tk->b_discard_trunc = true;
+ tk->p_out_muxed = stream_DemuxNew( p_demux, "rawdv",
+ p_demux->out );
+ }
}
if( !tk->b_quicktime && !tk->b_muxed && !tk->b_asf )
return VLC_EGENERIC;
/* According to RFC 2326 p56 chapter 12.35 a RTSP server that
- * supports Scale should:
+ * supports Scale:
*
- * "The server should try to approximate the viewing rate, but may
- * restrict the range of scale values that it supports. The response
- * MUST contain the actual scale value chosen by the server."
+ * "[...] should try to approximate the viewing rate, but
+ * may restrict the range of scale values that it supports.
+ * The response MUST contain the actual scale value chosen
+ * by the server."
*
* Scale = 1 indicates normal play
* Scale > 1 indicates fast forward
/* grow buffer if it looks like buffer is too small, but don't eat
* up all the memory on strange streams */
- if( i_truncated_bytes > 0 && tk->i_buffer < 2000000 )
+ if( i_truncated_bytes > 0 )
{
- void *p_tmp;
- msg_Dbg( p_demux, "lost %d bytes", i_truncated_bytes );
- msg_Dbg( p_demux, "increasing buffer size to %d", tk->i_buffer * 2 );
- tk->i_buffer *= 2;
- p_tmp = realloc( tk->p_buffer, tk->i_buffer );
- if( p_tmp == NULL )
+ if( tk->i_buffer < 2000000 )
{
- msg_Warn( p_demux, "realloc failed" );
+ void *p_tmp;
+ msg_Dbg( p_demux, "lost %d bytes", i_truncated_bytes );
+ msg_Dbg( p_demux, "increasing buffer size to %d", tk->i_buffer * 2 );
+ p_tmp = realloc( tk->p_buffer, tk->i_buffer * 2 );
+ if( p_tmp == NULL )
+ {
+ msg_Warn( p_demux, "realloc failed" );
+ }
+ else
+ {
+ tk->p_buffer = (uint8_t*)p_tmp;
+ tk->i_buffer *= 2;
+ }
}
- else
+
+ if( tk->b_discard_trunc )
{
- tk->p_buffer = (uint8_t*)p_tmp;
+ p_sys->event = 0xff;
+ tk->waiting = 0;
+ return;
}
}
- if( i_size > tk->i_buffer )
- {
- msg_Warn( p_demux, "buffer overflow" );
- }
- /* FIXME could i_size be > buffer size ? */
+
+ assert( i_size <= tk->i_buffer );
+
if( tk->fmt.i_codec == VLC_CODEC_AMR_NB ||
tk->fmt.i_codec == VLC_CODEC_AMR_WB )
{