Add a parameter to specify the GPU device in gst-launch-1.0
Today, as the gstreamer supports more and more HW acceleration, and there are more and more HW devices existing on the same platform, it is very likely that we want to let some element or even the whole pipeline run on the a specified different device. For example, the pipeline:
gst-launch-1.0 filesrc location=xxx ! h264parse ! vaapih264dec ! vaapipostproc ! glimagesink
It always select the first GPU device to run on Linux platform.
We now use global environment variable to control the VA elements and let it choose the other GPU devices to run. And we may also add a device property for them. But gstreamer is a well modularized project, each element just recognizes its own environment variable and property, and we need to set all of them correctly if we want to choose another GPU device, which is not convenient and easy to make mistake.
So can we add, for example, a "--device" option into the gst-launch-1.0, and provide a standard device getting manner for all elements which needs it(maybe just need to get the device string)?
I notice that the NV's deepstream also has a "gpu-id" option for each element, https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_gst-nvjpegdec.html So I think this may be a common requirement.