Skip to content

Conversation

@jbeich
Copy link
Contributor

@jbeich jbeich commented Jan 9, 2021

Closes #292. I've added version check.

--- before
+++ after
@@ -1,24 +1,26 @@
 $ mpv --no-config --msg-level=vd=v --hwdec=vaapi --gpu-context=drm /path/to/foo.mkv
  (+) Video --vid=1 (*) (h264 1920x1080 23.976fps)
  (+) Audio --aid=1 --alang=jpn (*) (aac 2ch 48000Hz)
  (+) Subs  --sid=1 --slang=eng (*) 'English subs' (ass)
 [vd] Container reported FPS: 23.976024
 [vd] Codec list:
 [vd]     h264 - H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
 [vd]     h264_v4l2m2m (h264) - V4L2 mem2mem H.264 decoder wrapper
 [vd] Opening decoder h264
 [vd] Looking at hwdec h264-vaapi...
-[vd] Could not create device.
-[vd] No hardware decoding available for this codec.
-[vd] Using software decoding.
-[vd] Detected 8 logical cores.
-[vd] Requesting 9 threads for decoding.
+[vd] Trying hardware decoding via h264-vaapi.
+[vd] Pixel formats supported by decoder: vaapi_vld yuv420p
+[vd] Codec profile: High (0x64)
+[vd] Requesting pixfmt 'vaapi_vld' from decoder.
 [vd] Selected codec: h264 (H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10)
-[vd] Using software decoding.
-[vd] Decoder format: 1920x1080 yuv420p auto/auto/auto/auto/auto CL=mpeg2/4/h264
+[vd] Pixel formats supported by decoder: vaapi_vld yuv420p
+[vd] Codec profile: High (0x64)
+[vd] Requesting pixfmt 'vaapi_vld' from decoder.
+Using hardware decoding (vaapi).
+[vd] Decoder format: 1920x1080 vaapi[nv12] auto/auto/auto/auto/auto CL=mpeg2/4/h264
 [vd] Using container aspect ratio.
 AO: [oss] 48000Hz stereo 2ch s32
-VO: [gpu] 1920x1080 yuv420p
+VO: [gpu] 1920x1080 vaapi[nv12]
 AV: 00:00:00 / 00:23:52 (0%) A-V: -0.000
 
 Exiting... (Quit)

jbeich added 2 commits January 9, 2021 15:53
drmGetDeviceNameFromFd only returns primary nodes, so the fallback
will always fail.
0x80 bit is specific to Linux. Other systems may not use st_rdev.

/* Check by device name */
name = drmGetDeviceNameFromFd(fd);
name = drmGetDeviceNameFromFd2(fd);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jbeich : ping

@evelikov
Copy link
Contributor

evelikov commented Jul 7, 2022

Fwiw I've removed the function all together, in favour of drmGetNodeTypeFromFd() with #614

@dvrogozh
Copy link
Contributor

This part was reworked with recently merged #614. Please, take a look and reopen/submit new PR if needed.

@dvrogozh dvrogozh closed this Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants