gst1-plugins-imx: add package
PATCH v2 1/1 gst1-plugins-imx: add package
Open-source GStreamer 1.0 plugins for i.MX platforms. More info at https://github.com/Freescale/gstreamer-imx
---
Modifications v1->v2:
- Use of github helper macro
- Modify package comment with Peter S. original patch
- Add comment for eglibc dependency (due to GPU libs)
- Remove comments on package dependencies
One thing I wasn't sure about, should all new package contain a .hash file? If so I can submit a v3 right away.
This patch has been tested using an i.MX6Q SabreLite (nitrogen6x config) along with the usual Tears of Steel movie in 1080p:
http://media.xiph.org/mango/tears_of_steel_1080p.webm
Below are the commands used to test the different sinks:
$ gst-launch-1.0 playbin uri=file:///root/tears_of_steel_1080p.webm $ gst-launch-1.0 filesrc location=/root/tears_of_steel_1080p.webm ! \ matroskademux ! imxvpudec ! imxipusink $ gst-launch-1.0 filesrc location=/root/tears_of_steel_1080p.webm ! \ matroskademux ! imxvpudec ! imxeglvivsink
The toolchain used was the Sourcery CodeBench 2014.05. The video above also requires the following extra configuration in order to demux the content:
BR2_PACKAGE_GST1_PLUGINS_GOOD=y BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MATROSKA=y
Thanks,
Gary
--- package/gstreamer1/Config.in | 1 + package/gstreamer1/gst1-plugins-imx/Config.in | 28 +++++++++++ .../gst1-plugins-imx/gst1-plugins-imx.mk | 56 ++++++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 package/gstreamer1/gst1-plugins-imx/Config.in create mode 100644 package/gstreamer1/gst1-plugins-imx/gst1-plugins-imx.mk
package/gstreamer1/Config.in +1 -0
@@ -6,6 +6,7 @@ source "package/gstreamer1/gst1-plugins-base/Config.in" source "package/gstreamer1/gst1-plugins-good/Config.in" source "package/gstreamer1/gst1-plugins-bad/Config.in" source "package/gstreamer1/gst1-plugins-ugly/Config.in" +source "package/gstreamer1/gst1-plugins-imx/Config.in" source "package/gstreamer1/gst1-libav/Config.in" source "package/gstreamer1/gst1-validate/Config.in" source "package/gstreamer1/gst-omx/Config.in"
package/gstreamer1/gst1-plugins-imx/Config.in new file +28 -0
@@ -0,0 +1,28 @@ +comment "gst1-plugins-imx needs an imx-specific Linux kernel to be built" + depends on BR2_arm && !BR2_LINUX_KERNEL + +# Required by gpu-viv-bin-mx6q +comment "gst1-plugins-imx needs an (e)glibc toolchain" + depends on BR2_arm + depends on !BR2_TOOLCHAIN_USES_GLIBC + +config BR2_PACKAGE_GST1_PLUGINS_IMX + bool "gst1-plugins-imx" + depends on BR2_LINUX_KERNEL + depends on BR2_arm # Only relevant for i.MX + depends on BR2_TOOLCHAIN_USES_GLIBC # gpu-viv-bin-mx6q + depends on BR2_PACKAGE_GPU_VIV_BIN_MX6Q + depends on BR2_PACKAGE_LIBFSLVPUWRAP + select BR2_PACKAGE_GST1_PLUGINS_BASE + help + This is a set of GStreamer 1.0 plugins for plugins for Freescale's + i.MX platform, with emphasis on video en/decoding using the i.MX + VPU engine. + + Currently, this software has been tested only with the i.MX6 SoC + family and requires a kernel that includes the i.MX6 specific + headers to be built. + + The software as a whole is currently in beta stage. + + More info at https://github.com/Freescale/gstreamer-imx
package/gstreamer1/gst1-plugins-imx/gst1-plugins-imx.mk new file +56 -0
56 lines not on this page · raw message
Signature · 1 line
2.1.1
PATCH v2 1/1 gst1-plugins-imx: add package
Dear Gary,
thanks for you resubmission.
Quoted 11 lines · Gary Bisson
Open-source GStreamer 1.0 plugins for i.MX platforms. More info at https://github.com/Freescale/gstreamer-imx
Signed-off-by Gary Bisson <[email protected]>---
Modificationsv1->v2:
- Use of github helper macro
- Modify package comment with Peter S. original patch
- Add comment for eglibc dependency (due to GPU libs)
- Remove comments on package dependencies
Quoted 2 lines
One thing I wasn't sure about, should all new package contain a .hash file? If so I can submit a v3 right away.
It is not mandatory. AFAIK the hash is recommended for security-related packages only.
[...]
package/gstreamer1/gst1-plugins-imx/Config.in line 7
Quoted 13 lines
package/gstreamer1/gst1-plugins-imx/Config.in new file +7
-0@@ -0,0 +1,28 @@ +comment "gst1-plugins-imx needs an imx-specific Linux kernel to be built" + depends on BR2_arm && !BR2_LINUX_KERNEL + +# Required by gpu-viv-bin-mx6q +comment "gst1-plugins-imx needs an (e)glibc toolchain" + depends on BR2_arm + depends on !BR2_TOOLCHAIN_USES_GLIBC
These messages are much cleaner than in version 1 of your patch. However, for an ARM configuration with a musl or uClibc toolchain and without a kernel build activated, two lines are displayed. This is not coherent with the general Buildroot behavior.
It should be:
comment "gst1-plugins-imx needs an (e)glibc toolchain and an imx-specific Linux kernel to be built"
depends on BR2_arm && (!BR2_LINUX_KERNEL || !BR2_TOOLCHAIN_USES_GLIBC)
Although that's a bit lengthy...
With that fixed (which can be done by the committer):
I'll try to test it during the coming week and give my Tested-by tag, or report any issues.
Signature · 1 line
Luca
PATCH v2 1/1 gst1-plugins-imx: add package
Quoted 16 lines · Luca Ceresoli
Dear Gary,
thanks for you resubmission.
Quoted 11 lines · Gary Bisson
Open-source GStreamer 1.0 plugins for i.MX platforms. More info at https://github.com/Freescale/gstreamer-imx
Signed-off-by Gary Bisson <[email protected]>---
Modificationsv1->v2:
- Use of github helper macro
- Modify package comment with Peter S. original patch
- Add comment for eglibc dependency (due to GPU libs)
- Remove comments on package dependencies
Quoted 5 lines
Quoted 2 lines
One thing I wasn't sure about, should all new package contain a .hash file? If so I can submit a v3 right away.
It is not mandatory. AFAIK the hash is recommended for security-related packages only.
We discussed it last BR meeting but didn't come to a real conclusion. For sure,
the hash file isn't mandatory.
Quoted 13 lines
[...]
Quoted 11 lines
package/gstreamer1/gst1-plugins-imx/Config.in new file +4
-0@@ -0,0 +1,28 @@ +comment "gst1-plugins-imx needs an imx-specific Linux kernel to be built" + depends on BR2_arm && !BR2_LINUX_KERNEL + +# Required by gpu-viv-bin-mx6q
Quoted 8 lines
package/gstreamer1/gst1-plugins-imx/Config.in line 7
Quoted 3 lines
package/gstreamer1/gst1-plugins-imx/Config.in new file +3
-0+comment "gst1-plugins-imx needs an (e)glibc toolchain" + depends on BR2_arm + depends on !BR2_TOOLCHAIN_USES_GLIBCThese messages are much cleaner than in version 1 of your patch. However, for an ARM configuration with a musl or uClibc toolchain and without a kernel build activated, two lines are displayed. This is not coherent with the general Buildroot behavior.
Well, there are a few other packages like that. Because...
Quoted 5 lines
It should be:
comment "gst1-plugins-imx needs an (e)glibc toolchain and an imx-specific Linux kernel to be built"
... this line is really too long.
Regards,
Arnout
Quoted 10 lines
depends on BR2_arm && (!BR2_LINUX_KERNEL || !BR2_TOOLCHAIN_USES_GLIBC)Although that's a bit lengthy...
With that fixed (which can be done by the committer):
Reviewed-by Luca Ceresoli <[email protected]>I'll try to test it during the coming week and give my Tested-by tag, or report any issues.
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH v2 1/1 gst1-plugins-imx: add package
In reply to Gary BissonHi Gary,
Thanks for your continued effort on this package. I still have some feedback,
however.
Quoted 47 lines · Gary Bisson
Open-source GStreamer 1.0 plugins for i.MX platforms. More info at https://github.com/Freescale/gstreamer-imx
Signed-off-by Gary Bisson <[email protected]>---
Modificationsv1->v2:
- Use of github helper macro
- Modify package comment with Peter S. original patch
- Add comment for eglibc dependency (due to GPU libs)
- Remove comments on package dependenciesOne thing I wasn't sure about, should all new package contain a .hash file? If so I can submit a v3 right away.
This patch has been tested using an i.MX6Q SabreLite (nitrogen6x config) along with the usual Tears of Steel movie in 1080p:
http://media.xiph.org/mango/tears_of_steel_1080p.webmBelow are the commands used to test the different sinks:
$ gst-launch-1.0 playbin uri=file:///root/tears_of_steel_1080p.webm $ gst-launch-1.0 filesrc location=/root/tears_of_steel_1080p.webm ! \ matroskademux ! imxvpudec ! imxipusink $ gst-launch-1.0 filesrc location=/root/tears_of_steel_1080p.webm ! \ matroskademux ! imxvpudec ! imxeglvivsinkThe toolchain used was the Sourcery CodeBench 2014.05. The video above also requires the following extra configuration in order to demux the content:
BR2_PACKAGE_GST1_PLUGINS_GOOD=y BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MATROSKA=yThanks,
Gary--- package/gstreamer1/Config.in | 1 + package/gstreamer1/gst1-plugins-imx/Config.in | 28 +++++++++++ .../gst1-plugins-imx/gst1-plugins-imx.mk | 56 ++++++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 package/gstreamer1/gst1-plugins-imx/Config.in create mode 100644 package/gstreamer1/gst1-plugins-imx/gst1-plugins-imx.mkpackage/gstreamer1/Config.in +0
-0
package/gstreamer1/Config.in source "package/gstreamer1/gst1-plugins-base/Config.in" · line 9
Quoted 4 lines
package/gstreamer1/Config.in +1
-0@@ -6,6 +6,7 @@ source "package/gstreamer1/gst1-plugins-base/Config.in" source "package/gstreamer1/gst1-plugins-good/Config.in" source "package/gstreamer1/gst1-plugins-bad/Config.in" source "package/gstreamer1/gst1-plugins-ugly/Config.in" +source "package/gstreamer1/gst1-plugins-imx/Config.in"
I'm sorry to return to the naming issue, but shouldn't the package be called
gst1-imx instead of gst1-plugins-imx? We don't use 'plugins' in any other gst package (except the official plugin bundles), and upstream also doesn't have 'plugins' in the name.
Quoted 10 lines
package/gstreamer1/Config.in +0
-0source "package/gstreamer1/gst1-libav/Config.in" source "package/gstreamer1/gst1-validate/Config.in" source "package/gstreamer1/gst-omx/Config.in"package/gstreamer1/gst1-plugins-imx/Config.in new file +1
-0@@ -0,0 +1,28 @@ +comment "gst1-plugins-imx needs an imx-specific Linux kernel to be built"
package/gstreamer1/gst1-plugins-imx/Config.in line 11
Quoted 10 lines
package/gstreamer1/gst1-plugins-imx/Config.in new file +10
-0+ depends on BR2_arm && !BR2_LINUX_KERNEL + +# Required by gpu-viv-bin-mx6q +comment "gst1-plugins-imx needs an (e)glibc toolchain" + depends on BR2_arm + depends on !BR2_TOOLCHAIN_USES_GLIBC + +config BR2_PACKAGE_GST1_PLUGINS_IMX + bool "gst1-plugins-imx" + depends on BR2_LINUX_KERNEL
Put here a # libfslvpuwrap to make the reason explicit.
package/gstreamer1/gst1-plugins-imx/Config.in line 14
Quoted 3 lines
package/gstreamer1/gst1-plugins-imx/Config.in new file +3
-0+ depends on BR2_arm # Only relevant for i.MX + depends on BR2_TOOLCHAIN_USES_GLIBC # gpu-viv-bin-mx6q + depends on BR2_PACKAGE_GPU_VIV_BIN_MX6Q
This should be a select.
package/gstreamer1/gst1-plugins-imx/Config.in line 15
Quoted 1 line
package/gstreamer1/gst1-plugins-imx/Config.in new file +1
-0+ depends on BR2_PACKAGE_LIBFSLVPUWRAP
This should be a select.
package/gstreamer1/gst1-plugins-imx/Config.in line 24
Quoted 9 lines
package/gstreamer1/gst1-plugins-imx/Config.in new file +9
-0+ select BR2_PACKAGE_GST1_PLUGINS_BASE + help + This is a set of GStreamer 1.0 plugins for plugins for Freescale's + i.MX platform, with emphasis on video en/decoding using the i.MX + VPU engine. + + Currently, this software has been tested only with the i.MX6 SoC + family and requires a kernel that includes the i.MX6 specific + headers to be built.
As far as I understand, it's _only_ for i.MX6 and i.MX7, not for the older
ones. So perhaps that should be clarified.
package/gstreamer1/gst1-plugins-imx/Config.in line 28
Quoted 4 lines
package/gstreamer1/gst1-plugins-imx/Config.in new file +4
-0+ + The software as a whole is currently in beta stage. + + More info at https://github.com/Freescale/gstreamer-imx
Leave out the 'More info at'.
Quoted 36 lines
package/gstreamer1/gst1-plugins-imx/gst1-plugins-imx.mk new file +30
-0@@ -0,0 +1,56 @@ +################################################################################ +# +# gst1-plugins-imx +# +################################################################################ + +GST1_PLUGINS_IMX_VERSION = 0.9.9 +GST1_PLUGINS_IMX_SITE = $(call github,Freescale,gstreamer-imx,$(GST1_PLUGINS_IMX_VERSION)) + +GST1_PLUGINS_IMX_LICENSE = LGPLv2+ +GST1_PLUGINS_IMX_LICENSE_FILES = LICENSE + +GST1_PLUGINS_IMX_INSTALL_STAGING = YES + +GST1_PLUGINS_IMX_DEPENDENCIES += host-pkgconf host-python \ + gpu-viv-bin-mx6q gstreamer1 gst1-plugins-base libfslvpuwrap + +# needs access to imx-specific kernel headers +GST1_PLUGINS_IMX_DEPENDENCIES += linux +GST1_PLUGINS_IMX_CONF_OPTS += --prefix="/usr" \ + --kernel-headers="$(LINUX_DIR)/include" + +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) +GST1_PLUGINS_IMX_DEPENDENCIES += xlib_libX11 +GST1_PLUGINS_IMX_CONF_OPTS += --egl-platform=x11 +else +ifeq ($(BR2_PACKAGE_WAYLAND),y) +GST1_PLUGINS_IMX_DEPENDENCIES += wayland +GST1_PLUGINS_IMX_CONF_OPTS += --egl-platform=wayland +else
package/gstreamer1/gst1-plugins-imx/gst1-plugins-imx.mk line 40
Quoted 10 lines
package/gstreamer1/gst1-plugins-imx/gst1-plugins-imx.mk new file +10
-0+GST1_PLUGINS_IMX_CONF_OPTS += --egl-platform=fb +endif +endif + +define GST1_PLUGINS_IMX_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + $(HOST_DIR)/usr/bin/python2 ./waf configure \ + $(GST1_PLUGINS_IMX_CONF_OPTS) \ + )
I realize that this is probably just copy-paste from somewhere else, but there
is no need at all for the ()s. It just forks another shell with no good reason.
Regards,
Arnout
Quoted 17 lines
package/gstreamer1/gst1-plugins-imx/gst1-plugins-imx.mk new file +16
-0+endef + +define GST1_PLUGINS_IMX_BUILD_CMDS + (cd $(@D); \ + $(HOST_DIR)/usr/bin/python2 ./waf build -j $(PARALLEL_JOBS) \ + ) +endef + +define GST1_PLUGINS_IMX_INSTALL_TARGET_CMDS + (cd $(@D); \ + $(HOST_DIR)/usr/bin/python2 ./waf --destdir=$(TARGET_DIR) \ + install \ + ) +endef + +$(eval $(generic-package))
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH v2 1/1 gst1-plugins-imx: add package
Arnout, Luca, All,
Quoted 5 lines · Arnout Vandecappelle
Hi Gary,
Thanks for your continued effort on this package. I still have some
feedback,
however.
No problem ;-)
Quoted 6 lines
[snip]
Quoted 4 lines
source "package/gstreamer1/gst1-plugins-good/Config.in" source "package/gstreamer1/gst1-plugins-bad/Config.in" source "package/gstreamer1/gst1-plugins-ugly/Config.in"
+source "package/gstreamer1/gst1-plugins-imx/Config.in"
Quoted 7 lines
I'm sorry to return to the naming issue, but shouldn't the package be
called
gst1-imx instead of gst1-plugins-imx? We don't use 'plugins' in any other gst
package (except the official plugin bundles), and upstream also doesn't have
'plugins' in the name.
I see your point and really changing the name doesn't bother me, we just need to agree on something. How do we organize a vote? irc? ;-) So far Peter K suggested "gstreamer1-imx", Arnout "gst1-imx" and mine "gst1-plugins-imx". As a reminder the git repo name is "gstreamer-imx" and the Yocto recipe is "gstreamer1.0-plugins-imx". Since the first version of this patch have been integrated two plugins:gst1-libav and gst1-validate which tends towards a gst1-<name> convention.
Quoted 6 lines
[snip]
package/gstreamer1/gst1-plugins-imx/Config.in line 11
Quoted 3 lines
package/gstreamer1/gst1-plugins-imx/Config.in new file +3
-0+config BR2_PACKAGE_GST1_PLUGINS_IMX + bool "gst1-plugins-imx" + depends on BR2_LINUX_KERNELPut here a # libfslvpuwrap to make the reason explicit.
Ok
Quoted 6 lines
package/gstreamer1/gst1-plugins-imx/Config.in line 14
Quoted 3 lines
package/gstreamer1/gst1-plugins-imx/Config.in new file +3
-0+ depends on BR2_arm # Only relevant for i.MX + depends on BR2_TOOLCHAIN_USES_GLIBC # gpu-viv-bin-mx6q + depends on BR2_PACKAGE_GPU_VIV_BIN_MX6QThis should be a select.
We unfortunately discussed that before and Yann came to the conclusion it wasn't possible for now [1]. Otherwise this requires reworking all the iMX platforms selections in freescale-imx packages.
Quoted 4 lines
+ depends on
BR2_PACKAGE_LIBFSLVPUWRAPThis should be a select.
As the previous one must be a "depends", this one has to be the same. Otherwise it gives a "recursive dependency detected!" error:
package/freescale-imx/gpu-viv-bin-mx6q/Config.in:5: symbol BR2_PACKAGE_GPU_VIV_BIN_MX6Q depends on BR2_PACKAGE_FREESCALE_IMX package/freescale-imx/Config.in:1: symbol BR2_PACKAGE_FREESCALE_IMX is selected by BR2_PACKAGE_LIBFSLVPUWRAP package/libfslvpuwrap/Config.in:5: symbol BR2_PACKAGE_LIBFSLVPUWRAP is selected by BR2_PACKAGE_GST1_PLUGINS_IMX package/gstreamer1/gst1-plugins-imx/Config.in:9: symbol BR2_PACKAGE_GST1_PLUGINS_IMX depends on BR2_PACKAGE_GPU_VIV_BIN_MX6Q
Quoted 11 lines
package/gstreamer1/gst1-plugins-imx/Config.in
Quoted 3 lines
package/gstreamer1/gst1-plugins-imx/Config.in new file +3
-0+ select BR2_PACKAGE_GST1_PLUGINS_BASE + help + This is a set of GStreamer 1.0 plugins for plugins forFreescale's
package/gstreamer1/gst1-plugins-imx/Config.in line 24
Quoted 6 lines
package/gstreamer1/gst1-plugins-imx/Config.in new file +6
-0+ i.MX platform, with emphasis on video en/decoding using the i.MX + VPU engine. + + Currently, this software has been tested only with the i.MX6 SoC + family and requires a kernel that includes the i.MX6 specific + headers to be built.
Quoted 3 lines
As far as I understand, it's _only_ for i.MX6 and i.MX7, not for the older
ones. So perhaps that should be clarified.
Ok. This came from the Git repo readme, I will clarify on iMX6 only but I'd rather not state iMX7 not for people to be confused.
Quoted 6 lines
+
package/gstreamer1/gst1-plugins-imx/Config.in line 28
Quoted 3 lines
package/gstreamer1/gst1-plugins-imx/Config.in new file +3
-0+ The software as a whole is currently in beta stage. + + More info at https://github.com/Freescale/gstreamer-imxLeave out the 'More info at'.
Ok.
[snip]
Quoted 11 lines
package/gstreamer1/gst1-plugins-imx/gst1-plugins-imx.mk line 40
Quoted 6 lines
package/gstreamer1/gst1-plugins-imx/gst1-plugins-imx.mk new file +6
-0+define GST1_PLUGINS_IMX_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + $(HOST_DIR)/usr/bin/python2 ./waf configure \ + $(GST1_PLUGINS_IMX_CONF_OPTS) \ + )I realize that this is probably just copy-paste from somewhere else, but
there
is no need at all for the ()s. It just forks another shell with no good reason.
Ok.
Once we all agree on the naming + dependency issue I will submit a v3.
Thanks,
Gary
[1] http://lists.busybox.net/pipermail/buildroot/2014-October/109264.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20141103/8caea031/attachment.html>
PATCH v2 1/1 gst1-plugins-imx: add package
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Gary" == Gary Bisson <[email protected]> writes:
Hi,
Quoted 8 lines
?I'm sorry to return to the naming issue, but shouldn't the package be called
gst1-imx instead of gst1-plugins-imx? We don't use 'plugins' in any other gst
package (except the official plugin bundles), and upstream also doesn't have
'plugins' in the name.
Quoted 8 lines
?
I see your point and really changing the name doesn't bother me, we just need to agree on something. How do we organize a vote? irc? ;-) So far Peter K suggested "gstreamer1-imx", Arnout "gst1-imx" and mine "gst1-plugins-imx". As a reminder the git repo name is "gstreamer-imx" and the Yocto recipe is "gstreamer1.0-plugins-imx". Since the first version of this patch have been integrated two plugins:gst1-libav and gst1-validate which tends towards a gst1- <name> convention.
Yes, so lets go with gst1-imx.
Quoted 10 lines
Quoted 3 lines
+? ? ?depends on
BR2_arm# Only relevant for i.MX +? ? ?depends onBR2_TOOLCHAIN_USES_GLIBC# gpu-viv-bin-mx6q +? ? ?depends onBR2_PACKAGE_GPU_VIV_BIN_MX6Q?This should be a select.
We unfortunately discussed that before and Yann came to the conclusion it wasn't possible for now [1]. Otherwise this requires reworking all the iMX platforms selections in freescale-imx packages.
Ahh yes, so lets leave it as depends on (for both).
Signature · 1 line
Bye, Peter Korsgaard