Opened 20 years ago
Closed 17 years ago
#843 closed task (fixed)
Implement accelerated Picture-in-Picture support
Reported by: | danielk | Owned by: | skamithi |
---|---|---|---|
Priority: | minor | Milestone: | 0.22 |
Component: | mythtv | Version: | head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
After I get #827 (FF-REW >3x) working again I plan to fix Picture-in-Picture support.
The code for this is currently disabled in tv_play, and may need some reworking to work with the new LiveTV code.
Attachments (8)
Change History (101)
comment:1 by , 20 years ago
comment:2 by , 20 years ago
comment:3 by , 20 years ago
comment:4 by , 20 years ago
comment:5 by , 20 years ago
comment:7 by , 20 years ago
Milestone: | 0.19 → 0.20 |
---|
The remaining problem is simply the lack of hardware accellerated PiP so I'm moving this ticket to 0.20, since HW accllerated PiP doesn't really have to be in 0.19.
But once I fix my remaining 'needed to fix before 0.19' tickets, I'll revisit this.
comment:8 by , 19 years ago
Summary: | Fix Picture-in-Picture support → Implement accelerated Picture-in-Picture support |
---|
comment:9 by , 19 years ago
Milestone: | 0.20 → 0.21 |
---|
by , 19 years ago
Attachment: | pipplayer.3.diff added |
---|
pipplayer.2.diff created using the latest mythtv-vid update.
comment:11 by , 19 years ago
objectives for this ticket..developed by danielk. Includes some quotes from danielk.:
1st/ PIP Code consolidation
There are three "PiP" implementations, the regular PiP, the video window in the LiveTV EPG and the preview video window in the recording browser. This means there is code duplication galore and the preview video code is S-C-A-R-Y.
2nd/ As Is, PiP only supports one PiP window, seeing what is
on multiple tuners at once would be nice. a properly encapsulated PiP player would be assist with this.
3rd/ As Is the PiP window doesn't properly handle things if the
framerate of the PiP video and the main video don't match.
4rd/ Acceleration
- There is a limit to how many XvMC or XVideo ports you can open, you need to be able to fall back to another output method, at minimum to the software scaling and RGB conversion we use now.
- Some XvMC/XVideo drivers don't allow you to shrink the playback window beyond a certain point, so these drivers need to be detected and worked around (or config option).
- Some XvMC/XVideo implementations may advertise more scalers than they really support, so these need to be detected and worked around (or config option).
- If the XvMC/XVideo uses chromakeying, you need a different key color for each video.
- If the XvMC/XVideo don't use chromakeying, you need to open a seperate X window for the PiP window and ensure that it stays on top, in the right place, and doesn't steal focus.
- Deinterlacing.. it would be really nice to be able to de-interlace the PiP window. How this is done depends on the acceleration method, but in many cases this should be easy since you are shrinking the video and can just avoid sampling the even or odd rows.
"
by , 19 years ago
Attachment: | pipplayer.4.diff added |
---|
some bug fixes. still have to fix tv:swappip and tv::toggleactivewindow.. also need to check main xvideo surface if it can support the pip.
by , 19 years ago
Attachment: | pipplayer.5.diff added |
---|
removed my attempt to control pip fps. needs more work. turn on deinterlacing for pip. set override filter list to "linearblend".(not sure if this is the right thing). tv::toggleactivewindow enabled..only works when the main window is live tv.
by , 19 years ago
Attachment: | pipplayer.6.diff added |
---|
more bug fixes. toggleactivewindow and swappip should be fairly stable now. haven't tried all the different key actions to see what happens..added VideoOutput::IsResolutionSupported . ran to check that main XV surface supports the specified resolution. also resolved some issues where pipplayer didn't die cleanly.
by , 19 years ago
Attachment: | pipplayer.7.diff added |
---|
2nd attempt to control fps of pip..cuts fps in 1/2. see code changes in nvp::avsync. works for recorded shows. doesn't work well for live tv pip. problem with livetv.. it doesn't report framesplayed consistently until i ffw/rew or hit pause on the pip. trying to resolve this issue.
by , 19 years ago
Attachment: | pipplayer.diff added |
---|
playbackbox preview set to play 30sec of the show. if using nullvideoout and pip is live tv, increase prebuffer to 20 from 4. this helps the pip fps reduction work for software scaled live tv pip. couple of bug fixes. added some user notifications (pip failure, toggle active window change, toggle denial if main window is a recording)
by , 19 years ago
Attachment: | pipplayer.2.diff added |
---|
force usleep videosync for pips. other videosync methods seem to lock up the pip. fixed aspect issue where there is black bar on the top and bottom if aspect ratio is forced. will do more testing tomorrow on my nvidia box. most dev done on ati PC.
comment:12 by , 19 years ago
when using xvmc videoutput and chromakey osd for the main window..accel pip will generate lots of decoding error. last issue to resolve before i commit.
comment:13 by , 19 years ago
pip on xvmc screen using a fx5200 wants to use Xv..but bestsupportedcodec function was returning the wrong codec type. resolved this.
testing on the nvidia system and wide screen tv revealed the following problems. a) pip for playbackbox is cut short on the left side. aspect ratio issues i believe. b) swappip when xvmc is using the main window doesn't work. swap doesn't happen cleanly. works fine with the software scaled pip. c) pip when using xvmc and chromaosd still resides on top of the osd. not sure if there is something i'm doing wrong or this is the way it should be.
comment:14 by , 19 years ago
comment:16 by , 19 years ago
togglepipview may be really slow cause it tries to use xshm. next commit will have this fix, plus resolve the problem where the chromaosd is below the pip.
by , 19 years ago
Attachment: | pipplayer.8.diff added |
---|
get chromakey osd to go over pip. code untested. also has a couple of bug fixes.
comment:17 by , 19 years ago
comment:18 by , 19 years ago
(In [12205]) Refs #843. update the pip sizing function. thx for mark kendall for the patch. switch activenvp back to the main nvp if the pip nvp is active, and the OSD menu is accessed. new function to determine if a software PIP is allowed. for now, opengl or XV accelerated main surfaces will be supported.
comment:19 by , 19 years ago
comment:20 by , 18 years ago
comment:21 by , 18 years ago
comment:22 by , 18 years ago
add the playercontext class and change necessary code to use it. entire patch created by danielk, it'll make swapping of the pip and main picture easier to manage. just testing it and will commit it in chunks.
comment:23 by , 18 years ago
comment:24 by , 18 years ago
(In [13919]) Refs #843. mythtv-pip: move tv state variable to playercontext. this should hopefully make managing TV state changes for multiple playercontexts easier. live tv should now work again. will continue testing/fixing bugs or Todos for 2-3 weeks before working on stage2 - getting accel pip for Live TV.
comment:25 by , 18 years ago
comment:26 by , 18 years ago
(In [14117]) Refs #843. mythtv-pip update. apply r14012:14115 from mythtv-vid
comment:27 by , 18 years ago
comment:28 by , 18 years ago
comment:29 by , 18 years ago
comment:30 by , 18 years ago
(In [14375]) Refs #843. started work on hw accel PIP. allow live tv PIP startup when watching a pre recorded show. hw accel PIP will resize based on PIP aspect. made attempt to reduce PIP fps and apply onefield filter on PIP. beginning work on restricting when hw accel PIP will be used. can only test XVideo, XVMC and OpenGL. fixed issue where live tv PIP hangs when the show in the PIP changes. also with recorded show PIP it should just exit when the show is done. because of using player contexts some features such has prompting the user before the PIP show quits can be easily done. don't know effects of code on IVTV or mac acceleration.
comment:31 by , 18 years ago
(In [14391]) Refs #843. after testing with xv, xvmc-blit and opengl renderers, tv pip will use nullvideo. except for xvmc-blit. for opengl with softblend renderer and xvmc-blit renderer OSD will be below PIP. best renderer for PIP so far is opengl with opengl2 osd. going to test xvmc-opengl renderer, then will work on adding hw-accel pip to playbackbox code. still got some user notification stuff to work on with the TV PIP.
comment:34 by , 18 years ago
(In [14482]) Refs #843. implement playbackbox PIP using player contexts. currently playbackbox PIP uses software scaling. still checking if opengl or other renderers would be good options as well. fixed some compile issues and osd lockups. still not worked out a PIP solution for xvmc-opengl renderer.
comment:35 by , 18 years ago
comment:36 by , 18 years ago
comment:37 by , 18 years ago
comment:38 by , 18 years ago
(In [14565]) Refs #843. disable attempts to have a pip solution for xvmc-blit and xvmc-opengl at this point. also changed preview video timers in playbackbox to only play the preview video of selected show once and then stop. this should spare the log from filling up by repeatedly showing the preview window if one leaves mythtv in the playbackbox window for several hours. preview will play for 1 minute.
comment:39 by , 18 years ago
(In [14573]) Refs #843 mythtv-pip update: merge r14457:14572 from mythtv-vid.
comment:40 by , 18 years ago
(In [14577]) Refs #843. fix PIP positioning problems with the "start a recording as a pip feature". also resolve some compile problems after last merge from mythtv-vid. will merge current mythtv-pip branch back to mythtv-vid later today. will continue working on picture by picture and xvmc pip support in mythtv-pip.
comment:42 by , 18 years ago
comment:43 by , 18 years ago
comment:44 by , 18 years ago
comment:45 by , 18 years ago
comment:46 by , 18 years ago
comment:47 by , 18 years ago
comment:48 by , 18 years ago
(In [14663]) Refs #843. stage 2 of Picture by picture support. allowing swapping of PBP windows. this maps to SWAPPIP the same action as swapping PIPs. Code difference between the 2 is minimal so decided to keep the action mapped to the same keystroke. Changing active PBP window (TOGGLEACTIVEWINDOW) enables the sound for that PBP window, and disables the sound for the inactive window.
comment:49 by , 18 years ago
comment:50 by , 18 years ago
comment:51 by , 18 years ago
comment:52 by , 18 years ago
comment:53 by , 18 years ago
comment:54 by , 18 years ago
comment:55 by , 18 years ago
(In [14678]) Refs #843. Refs #2287. change method for embedding TV video in guidegrid and playbackbox. Allows opengl/xv/xvmc-blit rendered TV windows to be embedded. xvmc-opengl doesn't work yet cause xvmc-opengl playback is broken. talking to danielk, there are some thread safety issues with embedded video playback to deal with.
comment:56 by , 18 years ago
comment:57 by , 18 years ago
comment:58 by , 18 years ago
(In [14719]) Refs #843 merge r14622:14718 from mythtv-vid to mythtv-pip
comment:59 by , 18 years ago
comment:60 by , 18 years ago
comment:61 by , 18 years ago
comment:63 by , 18 years ago
comment:64 by , 18 years ago
comment:65 by , 18 years ago
(In [15162]) Refs #843. merge r14970:15159 from mythtv-vid to mythtv-pip
comment:66 by , 18 years ago
(In [15459]) Refs #843. merge r15160:15457 from mythtv-vid to mythtv-pip.
comment:67 by , 18 years ago
(In [15469]) Refs #843. add support for changing between PIP and PBP on the fly. refactor TV::ProcessKeyPress() as suggested by danielk in the original playercontext patch. will test latest update for a couple of weeks then merge mythtv-pip back into mythtv-vid.
comment:68 by , 18 years ago
comment:69 by , 18 years ago
comment:70 by , 18 years ago
(In [15536]) Refs #843 Refs #843. merge r15458:15535 from mythtv-vid to mythtv-pip
comment:71 by , 18 years ago
comment:72 by , 18 years ago
(In [15588]) Refs #843 Ref #2287. remove some extra calls to openglcontext->MakeCurrent()
comment:73 by , 18 years ago
comment:74 by , 18 years ago
comment:75 by , 18 years ago
comment:77 by , 18 years ago
comment:78 by , 18 years ago
Milestone: | 0.21 → 0.22 |
---|
comment:79 by , 18 years ago
comment:80 by , 18 years ago
comment:81 by , 18 years ago
comment:82 by , 18 years ago
comment:83 by , 18 years ago
comment:84 by , 18 years ago
comment:85 by , 18 years ago
comment:86 by , 17 years ago
comment:87 by , 17 years ago
comment:88 by , 17 years ago
comment:89 by , 17 years ago
comment:90 by , 17 years ago
comment:91 by , 17 years ago
comment:92 by , 17 years ago
(In [17994]) Refs #843, Refs #2287. mythtv-vid: remove code I put in that was supposed to prevent resizing of opengl rendered picture during tv playback startup. It doesn't work. currently if you start EPG at tv playback you'll see nothing in the resized tv window and when you exit the EPG the picture is not resized again properly. Looking for a different solution that will work.
comment:93 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
updates to PIP have been synced in trunk now.
(In [8364]) References #843. This re-enables PiP.
This does not re-enable TV::SwapPIP(), this function as written was broken before and is still broken. It only works if the two recorders share the swapped channels (same lineup) or a extra recorders are available that support the swapped channels.