Commit graph

634 commits

Author SHA1 Message Date
Barry
60507d6cc6 Add stream layer
The decoder initially read from the socket, decoded the video and sent
the decoded frames to the screen:

              +---------+      +----------+
  socket ---> | decoder | ---> |  screen  |
              +---------+      +----------+

The design was simple, but the decoder had several responsabilities.

Then we added the recording feature, so we added a recorder, which
reused the packets received from the socket managed by the decoder:

                                    +----------+
                               ---> |  screen  |
              +---------+     /     +----------+
  socket ---> | decoder | ----
              +---------+     \     +----------+
                               ---> | recorder |
                                    +----------+

This lack of separation of concerns now have concrete implications: we
could not (properly) disable the decoder/display to only record the
video.

Therefore, split the decoder to extract the stream:

                                    +----------+      +----------+
                               ---> | decoder  | ---> |  screen  |
              +---------+     /     +----------+      +----------+
  socket ---> | stream  | ----
              +---------+     \     +----------+
                               ---> | recorder |
                                    +----------+

This will allow to record the stream without decoding the video.
2019-06-18 14:40:25 +08:00
Barry
3a9b7bd640 fix:recording with old decoding/encoding API
The deprecated avcodec_decode_video2() should always the whole packet,
so there is no need to loop (cf doc/examples/demuxing_decoding.c in
FFmpeg).

This hack changed the packet size and data pointer. This broke recording
which used the same packet.
2019-06-15 18:33:08 +08:00
Barry
07ad3d1395 update:VideoBuffer stop重命名为interrupt 2019-06-15 18:29:19 +08:00
Barry
c343052e6c update:frame类重命名为videobuffer类 2019-06-15 18:25:32 +08:00
Barry
7f2509cbed update:移除解码器中没用的mutex 2019-06-15 18:09:28 +08:00
Barry
0da3fca247 add:下拉通知栏 2019-06-15 18:07:16 +08:00
Barry
33867d2668 add:视频窗口始终在前 2019-06-15 07:56:06 +08:00
Barry
03d594ee52 update:固定尺寸 2019-06-15 07:34:36 +08:00
Barry
c1c8f56265 add:compat.h 2019-06-15 07:24:07 +08:00
Barry
f02bae1e70 add:录像支持mkv 2019-06-15 06:45:12 +08:00
Barry
e4b3fb76d9 fix:decoder内存泄漏 2019-06-12 09:14:44 +08:00
Barry
97f7935904 add:Rescale packet timestamp to container time base
Some containers force their own time base. For example, matroska
overwrite time_base to (AVRational) {1, 1000}.

Therefore, rescale our packet timestamps to the output stream time base.
2019-06-12 09:07:31 +08:00
Barry
48aa5e5390 update:Write header file with correct extradata 2019-06-12 08:56:19 +08:00
Barry
9c82d34500 add:转发ffmpeg log 2019-06-12 08:08:26 +08:00
Barry
752dec58a8 fix:decoderBuffer内存泄漏 2019-06-12 07:49:35 +08:00
Barry
9ae287e5df fix:incorrect comment 2019-06-12 07:07:10 +08:00
Barry
27f9215f54 add:增加bug备注 2019-05-07 23:38:10 +08:00
Barry
cb9e303d07 Merge branch 'master' of https://gitee.com/Barryda/QtScrcpy 2019-04-14 14:04:53 +08:00
Barry
24012ef2af update:add default port 2019-04-14 14:04:33 +08:00
rankun
d12e1e7bf4 fix:mac编译不过 2019-03-21 14:35:06 +08:00
Barry
72350665dc Merge branch 'master' of https://gitee.com/Barryda/QtScrcpy 2019-02-25 22:35:30 +08:00
Barry
79b91d59f8 forward时防止早连接 2019-02-25 22:35:08 +08:00
rankun
bdae96379f update:mousetap重构 2019-02-18 13:27:54 +08:00
rankun
c34b0d9c16 update:qtquick可选 2019-02-18 12:46:38 +08:00
rankun
4e9b7c3aa1 update:mac限制鼠标移动 2019-02-10 20:22:29 +08:00
rankun
be616458a2 update:mac不去掉标题栏 2019-02-04 18:43:16 +08:00
rankun
1c36bf1895 update:全屏后设置焦点,防止工具栏抢焦点 2019-02-04 18:05:40 +08:00
rankun
c2b0c269b3 Merge branch 'master' of gitee.com:Barryda/QtScrcpy 2019-02-04 13:57:51 +08:00
rankun
e7f8663ce2 update:全屏模式不显示工具窗口 2019-02-04 13:57:34 +08:00
Barry
3d74d869a7 update:美化工具窗口 2019-01-27 20:02:17 +08:00
rankun
093335d3e7 update:mac异形窗口+全屏解决 2019-01-27 19:32:02 +08:00
Unknown
f0e8701515 update:更新ffmpeg编译参数详解 2019-01-27 18:10:19 +08:00
Unknown
2011517c37 linux下重新编译ffmpeg来支持封装h264到mp4文件 2019-01-27 18:05:55 +08:00
Unknown
a3ae0b2bbd fix:避免子线程更新ui 2019-01-27 16:38:47 +08:00
Unknown
0d840c4ed5 setFixedSize影响linux全屏,
fremlesswindow不影响linux全屏
2019-01-27 16:20:09 +08:00
Barry
cbb4f553f9 update:视频窗口固定大小 2019-01-27 15:57:37 +08:00
rankun
79fd6db1ed fix:mac下运行依赖ffmpeg dylib 2019-01-27 15:51:44 +08:00
rankun
4b862cf43a fix:mac上无边框窗口全屏有问题,暂时屏蔽 2019-01-27 15:43:06 +08:00
rankun
097dcb0b8a fix: 修复mac编译不过 2019-01-27 15:02:45 +08:00
Barry
050d6af87d update:更新TODO 2019-01-27 14:50:09 +08:00
Barry
45ba8c1f66 fix:不录像时传递sendframemeta false 给server 2019-01-27 14:41:29 +08:00
Barry
f50c561f02 update:限制横屏手机最大宽度 2019-01-27 14:28:11 +08:00
Barry
f763755e7d update:完成mp4录制 2019-01-27 14:01:03 +08:00
Barry
661857a63a update:录制mp4完善,更新语言 2019-01-27 13:46:04 +08:00
Barry
79d5a0ca77 update:mp4录制功能完善 2019-01-27 13:37:49 +08:00
Barry
ea9deb3b9f mp4录制(未完成) 2019-01-27 02:23:57 +08:00
Barry
f6b5ec61d7 update:全屏状态禁止电脑锁屏(qt未提供跨平台方案,目前仅windows,可参考sdl找到跨平台方案) 2019-01-27 00:03:40 +08:00
Barry
d3421afc72 update:更新翻译 2019-01-26 23:47:08 +08:00
Barry
131340dc02 update:文件拖拽与apk安装 2019-01-26 23:40:51 +08:00
Barry
7ec3f5d7c6 fix:opengl未执行初始化的情况下执行清理会触发assert 2019-01-26 22:10:55 +08:00