media-ioc-setup-link.xml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <refentry id="media-ioc-setup-link">
  2. <refmeta>
  3. <refentrytitle>ioctl MEDIA_IOC_SETUP_LINK</refentrytitle>
  4. &manvol;
  5. </refmeta>
  6. <refnamediv>
  7. <refname>MEDIA_IOC_SETUP_LINK</refname>
  8. <refpurpose>Modify the properties of a link</refpurpose>
  9. </refnamediv>
  10. <refsynopsisdiv>
  11. <funcsynopsis>
  12. <funcprototype>
  13. <funcdef>int <function>ioctl</function></funcdef>
  14. <paramdef>int <parameter>fd</parameter></paramdef>
  15. <paramdef>int <parameter>request</parameter></paramdef>
  16. <paramdef>struct media_link_desc *<parameter>argp</parameter></paramdef>
  17. </funcprototype>
  18. </funcsynopsis>
  19. </refsynopsisdiv>
  20. <refsect1>
  21. <title>Arguments</title>
  22. <variablelist>
  23. <varlistentry>
  24. <term><parameter>fd</parameter></term>
  25. <listitem>
  26. <para>File descriptor returned by
  27. <link linkend='media-func-open'><function>open()</function></link>.</para>
  28. </listitem>
  29. </varlistentry>
  30. <varlistentry>
  31. <term><parameter>request</parameter></term>
  32. <listitem>
  33. <para>MEDIA_IOC_ENUM_LINKS</para>
  34. </listitem>
  35. </varlistentry>
  36. <varlistentry>
  37. <term><parameter>argp</parameter></term>
  38. <listitem>
  39. <para></para>
  40. </listitem>
  41. </varlistentry>
  42. </variablelist>
  43. </refsect1>
  44. <refsect1>
  45. <title>Description</title>
  46. <para>To change link properties applications fill a &media-link-desc; with
  47. link identification information (source and sink pad) and the new requested
  48. link flags. They then call the MEDIA_IOC_SETUP_LINK ioctl with a pointer to
  49. that structure.</para>
  50. <para>The only configurable property is the <constant>ENABLED</constant>
  51. link flag to enable/disable a link. Links marked with the
  52. <constant>IMMUTABLE</constant> link flag can not be enabled or disabled.
  53. </para>
  54. <para>Link configuration has no side effect on other links. If an enabled
  55. link at the sink pad prevents the link from being enabled, the driver
  56. returns with an &EBUSY;.</para>
  57. <para>Only links marked with the <constant>DYNAMIC</constant> link flag can
  58. be enabled/disabled while streaming media data. Attempting to enable or
  59. disable a streaming non-dynamic link will return an &EBUSY;.</para>
  60. <para>If the specified link can't be found the driver returns with an
  61. &EINVAL;.</para>
  62. </refsect1>
  63. <refsect1>
  64. &return-value;
  65. <variablelist>
  66. <varlistentry>
  67. <term><errorcode>EBUSY</errorcode></term>
  68. <listitem>
  69. <para>The link properties can't be changed because the link is
  70. currently busy. This can be caused, for instance, by an active media
  71. stream (audio or video) on the link. The ioctl shouldn't be retried if
  72. no other action is performed before to fix the problem.</para>
  73. </listitem>
  74. </varlistentry>
  75. <varlistentry>
  76. <term><errorcode>EINVAL</errorcode></term>
  77. <listitem>
  78. <para>The &media-link-desc; references a non-existing link, or the
  79. link is immutable and an attempt to modify its configuration was made.
  80. </para>
  81. </listitem>
  82. </varlistentry>
  83. </variablelist>
  84. </refsect1>
  85. </refentry>