"-I=dummy",
"--vout=dummy",
"--network-caching=5000",
"--sout=#duplicate{dst=display{avcodec-hw=dxva2},dst=rtp{sdp=rtsp://:8554/ch1}}", "--sout-all", "--sout-keep",
"--verbose=2",
"--file-logging", logFile,
};
int vlc_argc = sizeof(vlc_args) / sizeof(vlc_args[0]);
vlcInstance = libvlc_new(vlc_argc, vlc_args);
const char *psz_mrl = "rtsp://169.254.1.168:554/live2.sdp";
media = libvlc_media_new_location(vlcInstance, psz_mrl);
mp = libvlc_media_player_new_from_media(media);
libvlc_media_release(media);
libvlc_media_player_play(mp);
vi ../modules/stream_out/display.c
#define HW_TEXT N_("Hardware decoding")
#define HW_LONGTEXT N_("This allows hardware decoding when available.")
add_string( SOUT_CFG_PREFIX "avcodec-hw", NULL, HW_TEXT,
HW_LONGTEXT, true )
static const char *const ppsz_sout_options[] = {
"audio", "video", "delay", "avcodec-hw", NULL
};
static int Open( vlc_object_t *p_this )
{
config_ChainParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options,
p_stream->p_cfg );
char *pAvcodecHw = var_GetString(p_stream, SOUT_CFG_PREFIX"avcodec-hw");
if (pAvcodecHw) {
var_Create(p_stream, "avcodec-hw", VLC_VAR_STRING);
var_SetString(p_stream, "avcodec-hw", pAvcodecHw);
}
}
沒有留言:
張貼留言