Coder Social home page Coder Social logo

itisyang / playerdemo Goto Github PK

View Code? Open in Web Editor NEW
913.0 33.0 259.0 53.8 MB

一个视频播放器,开源版 potplayer ,用于总结播放器开发技术。

License: GNU General Public License v3.0

C++ 99.25% CSS 0.16% QMake 0.05% CMake 0.49% PowerShell 0.05%
player video ffmpeg potplayer sdl2 video-player media-player qt-player

playerdemo's Introduction

itisyang's GitHub stats

playerdemo's People

Contributors

chaohuzhang avatar itisyang avatar x1aomu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

playerdemo's Issues

Mac平台下的测试

我在window下用vs2013能够使用,在用Macbook编译时也能编译通过,但是使用时会报错。我也不太熟悉macOS,经过搜索后,原来macOS要求OpenGL之类的渲染要在主线程中,出错的地方也是VideoCtl中的LoopThread。
2018-12-09 11:19:19.939 playerdemo[28856:316639] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'nextEventMatchingMask should only be called from the Main Thread!'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff2d314ecd __exceptionPreprocess + 256
1 libobjc.A.dylib 0x00007fff593cc720 objc_exception_throw + 48
2 AppKit 0x00007fff2a7adbe0 NSAlwaysMatchRequestedMaskOf1DefaultValueFunction + 0
3 libSDL2-2.0.0.dylib 0x000000010dc6c231 Cocoa_PumpEvents + 211
4 libSDL2-2.0.0.dylib 0x000000010dbe8cfe SDL_PumpEvents_REAL + 23
5 playerdemo 0x000000010daf5419 _ZN8VideoCtl23refresh_loop_wait_eventEP10VideoStateP9SDL_Event + 41
6 playerdemo 0x000000010daf572c _ZN8VideoCtl10LoopThreadEP10VideoState + 76
7 playerdemo 0x000000010daf9366 ZNSt3__114__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEM8VideoCtlFvP10VideoStateEPS7_S9_EEEEEPvSE + 742
8 libsystem_pthread.dylib 0x00007fff5a68e305 _pthread_body + 126
9 libsystem_pthread.dylib 0x00007fff5a69126f _pthread_start + 70
10 libsystem_pthread.dylib 0x00007fff5a68d415 thread_start + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException

macOS编译问题

您好!我用mac电脑编译时出现:-1: error: symbol(s) not found for architecture x86_64,添加extern "C"{ #include "libavdevice/avdevice.h"}之后出现error: Extra characters after test expression.这种错误,我不知道应该如何解决,特此提问

播放控制问题

请问你的播放器支持2倍播放,0.5倍播放,及单帧播放这些控制么?

windows10下debug报错

编译debug环境:VS2017,QT5.9.6,win10 x64
报错:
ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread 26ff4538. Receiver ‘PlayorPauseBtn' was created in thread 0x……"
请教如何解决?

Qt Creator 4.8.2/MinGW32bit下编译失败

你好,我在Qt Creator 4.8.2和MinGW下编译程序,出现了很多错误,集中在datactl.h文件中,错误类型“undefined reference to”,诸如“undefined reference to 'av_malloc'”,想请教一下是什么原因,是否Qt版本不同导致的?

编译出错

在VS下使用最新提交的代码版本编译出现大量错误,基本上都是提示重定义及缺少标识符的错误。编译0.1.0不会报错
比如说:
1>e:\free\potplayer\playerdemo\datactl.h(199): error C2146: 语法错误: 缺少“;”(在标识符“sampq”的前面)
1>e:\free\potplayer\playerdemo\datactl.h(216): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\free\potplayer\playerdemo\datactl.h(216): error C2086: “int PacketQueue”: 重定义

无法启动

我显示程序异常结束 到底怎么处理这种问题 求教

Ubuntu下QT5编译失败

你好,首先十分感谢你的这个demo给我们提供了新人练手学习的机会!
我在Ubuntu QT5的编译环境下编译失败,对应编译失败的文件都是videoctl.cpp,似乎都是语法问题,
微信图片_20200225083949
这是怎么回事呢?谢谢

.pro 文件有语法错误

其中一空白行导致 Qt Creator 解析文件失败:

LIBS += -L$$PWD/lib/sdl/lib \
-L$$PWD/lib/ffmpeg/lib \
-lSDL2 \
-lavcodec \
-lavdevice \
-lavfilter \
-lavformat \
-lavutil \
#-lpostproc \
-lswresample \
-lswscale

18 行这一行留空即代表 LIBS 这一行结束,后面的 19-26 行组成新的一行了。

功能要求。

功能要求。 请通过URL为http和rtsp添加视频流。

Feature request. Please add video streaming by URL for http and rtsp.

新版的FFMPEG有许多api已经废弃了,能提供下项目内某些函数的思路嘛?

int VideoCtl::audio_thread(void *arg)
{
VideoState *is = (VideoState *)arg;
AVFrame *frame = av_frame_alloc();
Frame *af;

int got_frame = 0;
AVRational tb;
int ret = 0;

if (!frame)
    return AVERROR(ENOMEM);

do {
    if ((got_frame = decoder_decode_frame(&is->auddec, frame, NULL)) < 0)
        goto the_end;

    if (got_frame) {
        tb = { 1, frame->sample_rate };

        if (!(af = frame_queue_peek_writable(&is->sampq)))
            goto the_end;

        af->pts = (frame->pts == AV_NOPTS_VALUE) ? NAN : frame->pts * av_q2d(tb);
        af->pos = av_frame_get_pkt_pos(frame);
        af->serial = is->auddec.pkt_serial;
        af->duration = av_q2d({ frame->nb_samples, frame->sample_rate });

        av_frame_move_ref(af->frame, frame);
        frame_queue_push(&is->sampq);

    }
} while (ret >= 0 || ret == AVERROR(EAGAIN) || ret == AVERROR_EOF);

the_end:

av_frame_free(&frame);
return ret;

}
比如说这个函数,新版本里面av_frame_get_pkt_pos已经废弃,Frame这个自定义的结构体是必须要用到pos这个成员吗?

编译错误

error: No rule to make target 'GeneratedFiles//moc_CustomSlider.cpp', needed by 'debug/moc_CustomSlider.o'. Stop.

api

有些api接口过期了

请问一下项目是如何解决窗口移动画面无法刷新的问题

我自己尝试写一个简单的播放器,但是发现在SDL的窗口在移动时画面无法刷新,要直到移动到目标区域即松开鼠标,通过一些测试发现项目的在窗口移动时会不断触发SDL的SDL_WINDOWEVENT_EXPOSED事件,而在我的窗口只会在移动到目标区域然后松开鼠标才会触发一次SDL_WINDOWEVENT_EXPOSED事件。请问一下这是如何实现的。

linux下编译出现错误

在pro里+ QMAKE_CXXFLAGS += -std=c++11
/home/roy/delete/Media-player/playerdemo/playerdemo/videoctl.cpp:2039: error: no matching function for call to ‘VideoCtl::connect(VideoCtl*, void (VideoCtl::*)(), void (VideoCtl::*)())’ connect(this, &VideoCtl::SigStop, &VideoCtl::OnStop); ^

编译通过,运行时 提示“程序异常结束”

你好,安装了Qt编译通过,运行时提示“程序异常结束”。
错误:
Clang Code Model: Error: The clangbackend executable "C:\Qt5.12.0\Tools\QtCreator\bin\clangbackend.exe" could not be started (timeout after 10000ms)

linux版打包

建议对linux版先提供AppImage或者deb包, 毕竟会编译的大佬不多

视频去噪功能

您好,我想问一下这个工具包含视频实时去噪功能吗?我看potplayer中会有3d去噪,瞬态去噪等功能。或者您了解目前视频实时去噪的相关算法吗?可以大概说几个,我向了解一下,非常感谢?

播放器的工作原理

你好,我的需求是做一个简化版的视频播放器,能够做到逐帧的播放控制,因为没有这方面的预备知识,如ffmpeg解码和SDL渲染,看了你提供的代码后无从下手做一些更改,因此想请教一下这其中的大致原理,模块之间如何工作,需要用到哪些API?方便的话,可以提供一些上手资料,先谢谢了

建议开发一个书签管理器

看教程的视频,很多知识点,如果能在每个知识点标注,就可以方便日后的检索.
potplayer的书签很好用,但是有个缺点,就是每条书签输入的字数多的话,是不能完全显示出来.
如果能继承potplayer的书签,并且改进书签的显示功能,就是神器了.
主打知识管理,播放器一定会火.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.