如何使用libvlc设置要在c ++中侦听的端口?

问题描述 投票:0回答:1

我使用libvlc创建了一个播放视频的媒体播放器实例 - libvlc_media_player_play(mPlayerInstance)

现在,我如何让这个播放器收听特定端口并播放流向该端口的内容?

提前致谢..

visual-c++ media-player vlc libvlc
1个回答
0
投票

作为VLC命令

libvlc_instance_t     *p_inst;
libvlc_media_t        *p_m;
libvlc_media_player_t *p_mp;
//...
p_inst = libvlc_new(0, NULL);
p_m = libvlc_media_new_path(p_inst, "rtp://@:<listenport>/path");    
p_mp = libvlc_media_player_new(p_inst);

libvlc_media_player_set_media(p_m);

当流开始时,vlc实例将开始播放。

© www.soinside.com 2019 - 2024. All rights reserved.