在网上找了一个别人的旧版本的播放器~自己更改了一天,终于可运行了,希望分享下同共学习; 不过出了少少问题:希望有经验的一起指导下: 运行环境:qt creator +windows 1、原计划是可支持视频播放的,现在只能加载间频(mp3),一加载视频就卡死 2.、自定义的进度条不起作用,不知为什么百分比槽连接不成功 connect(wmp, SIGNAL(PositionChange(double, double)),this, SLOT(Slot_onPositionChange(double, double))); 3、我用的是QAxWidget控件,这个是不是只支持windows的呢?或者还有没其实更好的? /******************************************************************************************* 项目名:QT播放器 Qt Mediaplayer 工程师:枫儿 完成时间:2009年12月28日 技术支持:嵌入式家园 www.studyarm.cn www.mcupark.com *******************************************************************************************/ #include "playerwindow.h" #include #include #include #include #include #include #include #include PlayerWindow::PlayerWindow() { //setCaption(tr("Media Player")); fileFilters = tr("Video files (*.mpg *.mpeg *.avi *.wmv)\n" //原来字符串换行也可这样用 "Audio files (*.mp3 *.wav)"); updateTimer = 0; setMouseTracking(true); this->wmp = new QAxWidget(this); wmp->setControl("{22D6F312-B0F6-11D0-94AB-0080C74C7E95}"); // wmp->setProperty("ShowControls", QVariant(false, 0)); wmp->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); connect(wmp, SIGNAL(PlayStateChange(int, int)),this, SLOT(Slot_onPlayStateChange(int, int))); connect(wmp, SIGNAL(ReadyStateChange(ReadyStateConstants)),this, SLOT(Slot_onReadyStateChange(ReadyStateConstants))); connect(wmp, SIGNAL(PositionChange(double, double)),this, SLOT(Slot_onPositionChange(double, double))); this->openButton = new QPushButton(tr("&Open")); connect(openButton, SIGNAL(clicked()), this, SLOT(Slot_openFile())); this->playPauseButton = new QPushButton(tr("&Play")); connect(playPauseButton, SIGNAL(clicked()), wmp, SLOT(Play())); this->stopButton = new QPushButton(tr("&Stop")); connect(stopButton, SIGNAL(clicked()), wmp, SLOT(Stop())); this->seekSlider = new QSlider(Qt::Horizontal, this); seekSlider->setEnabled(false); connect(seekSlider, SIGNAL(valueChanged(int)),this, SLOT(Slot_sliderValueChanged(int))); connect(seekSlider, SIGNAL(sliderPressed()),wmp, SLOT(Pause())); QHBoxLayout *buttonLayout = new QHBoxLayout; buttonLayout->addWidget(openButton); buttonLayout->addWidget(playPauseButton); buttonLayout->addWidget(stopButton); QVBoxLayout *mainLayout = new QVBoxLayout(this); mainLayout->addWidget(wmp); mainLayout->addLayout(buttonLayout); mainLayout->addWidget(seekSlider); this->setLayout(mainLayout); }
2022-12-31 23:28:39 1.5MB qt 播放器
1
Android程序设计
2022-11-02 13:03:46 413KB Android 程序设计
android 利用MediaPlayer+SurfaceView播放视频,与我的文章对应http://blog.csdn.net/shenxiaolei507/article/details/41349295,而且其中还有很多高级功能的实现,还包括ViedioView播放视频!!
1
一个用MediaPlayer播放网络视频案例
2022-10-21 08:50:09 245KB 播放网络视频
1
Android实现简单音乐播放器(MediaPlayer),供大家参考,具体内容如下 开发工具:Andorid Studio 1.3 运行环境:Android 4.4 KitKat 工程内容 实现一个简单的音乐播放器,要求功能有: 播放、暂停功能; 进度条显示播放进度功能 拖动进度条改变进度功能; 后台播放功能; 停止功能; 退出功能; 代码实现 导入歌曲到手机SD卡的Music目录中,这里我导入了4首歌曲:仙剑六里面的《誓言成晖》、《剑客不能说》、《镜中人》和《浪花》,也推荐大家听喔(捂脸 然后新建一个类MusicService继承Service,在类中定义一个MyB
2022-06-08 16:24:25 288KB android开发 ed edi
1
OOP媒体播放器 山东大学OOP实验
2022-05-27 23:22:33 64KB Java
1
Mstar 安卓电视平台上系统播放器的架构和播放流程以及关键日志分析和问题定位
2022-05-27 19:11:14 1.06MB android mstar MediaPlayer
1
VLC media player VLC 视频播放器 VLC media player VLC 视频播放器
2022-05-19 09:01:20 41.51MB exe mediaplayer VLC 网络流播放器
1
Android代码-基于IjkPlayer的视频播放器,支持一行代码切换MediaPlayer和ExoPlayer
2022-05-15 14:06:08 15.44MB android 音视频 源码软件
react-native-mediaplayer 用于React Native的简单的全屏媒体播放器。 安装 使用npm与npm install --save react-native-mediaplayer一起npm install --save react-native-mediaplayer 。 需要React Native> = 0.4.0。 使用Xcode打开项目导航器,右键单击并选择Libraries Add Files to [your project's name] 转到node_modules react-native-mediaplayer并添加RNMediaPlayer.h和RNMediaPlayer.m 用法 var React = require ( 'react-native' ) ; var MediaPlayer = require ( 'react
2022-05-13 15:43:23 9KB Objective-C
1