Projektarbeit Line Following Robot bei Prof. Chowanetz im WS22/23
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mmal_parameters_common.h 8.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. /*
  2. Copyright (c) 2012, Broadcom Europe Ltd
  3. All rights reserved.
  4. Redistribution and use in source and binary forms, with or without
  5. modification, are permitted provided that the following conditions are met:
  6. * Redistributions of source code must retain the above copyright
  7. notice, this list of conditions and the following disclaimer.
  8. * Redistributions in binary form must reproduce the above copyright
  9. notice, this list of conditions and the following disclaimer in the
  10. documentation and/or other materials provided with the distribution.
  11. * Neither the name of the copyright holder nor the
  12. names of its contributors may be used to endorse or promote products
  13. derived from this software without specific prior written permission.
  14. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  15. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  16. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  17. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
  18. DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  19. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  20. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  21. ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  22. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  23. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  24. */
  25. #ifndef MMAL_PARAMETERS_COMMON_H
  26. #define MMAL_PARAMETERS_COMMON_H
  27. /** @defgroup MMAL_PARAMETER_IDS Pre-defined MMAL parameter IDs
  28. * @ingroup MmalParameters
  29. * @{
  30. */
  31. /** @name Parameter groups
  32. * Parameters are divided into groups, and then allocated sequentially within
  33. * a group using an enum.
  34. * @{
  35. */
  36. /** Common parameter ID group, used with many types of component. */
  37. #define MMAL_PARAMETER_GROUP_COMMON (0<<16)
  38. /** Camera-specific parameter ID group. */
  39. #define MMAL_PARAMETER_GROUP_CAMERA (1<<16)
  40. /** Video-specific parameter ID group. */
  41. #define MMAL_PARAMETER_GROUP_VIDEO (2<<16)
  42. /** Audio-specific parameter ID group. */
  43. #define MMAL_PARAMETER_GROUP_AUDIO (3<<16)
  44. /** Clock-specific parameter ID group. */
  45. #define MMAL_PARAMETER_GROUP_CLOCK (4<<16)
  46. /** Miracast-specific parameter ID group. */
  47. #define MMAL_PARAMETER_GROUP_MIRACAST (5<<16)
  48. /**@}*/
  49. /** Common MMAL parameter IDs.
  50. */
  51. enum {
  52. MMAL_PARAMETER_UNUSED /**< Never a valid parameter ID */
  53. = MMAL_PARAMETER_GROUP_COMMON,
  54. MMAL_PARAMETER_SUPPORTED_ENCODINGS, /**< Takes a MMAL_PARAMETER_ENCODING_T */
  55. MMAL_PARAMETER_URI, /**< Takes a MMAL_PARAMETER_URI_T */
  56. MMAL_PARAMETER_CHANGE_EVENT_REQUEST, /**< Takes a MMAL_PARAMETER_CHANGE_EVENT_REQUEST_T */
  57. MMAL_PARAMETER_ZERO_COPY, /**< Takes a MMAL_PARAMETER_BOOLEAN_T */
  58. MMAL_PARAMETER_BUFFER_REQUIREMENTS, /**< Takes a MMAL_PARAMETER_BUFFER_REQUIREMENTS_T */
  59. MMAL_PARAMETER_STATISTICS, /**< Takes a MMAL_PARAMETER_STATISTICS_T */
  60. MMAL_PARAMETER_CORE_STATISTICS, /**< Takes a MMAL_PARAMETER_CORE_STATISTICS_T */
  61. MMAL_PARAMETER_MEM_USAGE, /**< Takes a MMAL_PARAMETER_MEM_USAGE_T */
  62. MMAL_PARAMETER_BUFFER_FLAG_FILTER, /**< Takes a MMAL_PARAMETER_UINT32_T */
  63. MMAL_PARAMETER_SEEK, /**< Takes a MMAL_PARAMETER_SEEK_T */
  64. MMAL_PARAMETER_POWERMON_ENABLE, /**< Takes a MMAL_PARAMETER_BOOLEAN_T */
  65. MMAL_PARAMETER_LOGGING, /**< Takes a MMAL_PARAMETER_LOGGING_T */
  66. MMAL_PARAMETER_SYSTEM_TIME, /**< Takes a MMAL_PARAMETER_UINT64_T */
  67. MMAL_PARAMETER_NO_IMAGE_PADDING, /**< Takes a MMAL_PARAMETER_BOOLEAN_T */
  68. MMAL_PARAMETER_LOCKSTEP_ENABLE /**< Takes a MMAL_PARAMETER_BOOLEAN_T */
  69. };
  70. /**@}*/
  71. /** Parameter header type. All parameter structures need to begin with this type.
  72. * The \ref id field must be set to a parameter ID, such as one of those listed on
  73. * the \ref MMAL_PARAMETER_IDS "Pre-defined MMAL parameter IDs" page.
  74. */
  75. typedef struct MMAL_PARAMETER_HEADER_T
  76. {
  77. uint32_t id; /**< Parameter ID. */
  78. uint32_t size; /**< Size in bytes of the parameter (including the header) */
  79. } MMAL_PARAMETER_HEADER_T;
  80. /** Change event request parameter type.
  81. * This is used to control whether a \ref MMAL_EVENT_PARAMETER_CHANGED_T event
  82. * is issued should a given parameter change.
  83. */
  84. typedef struct MMAL_PARAMETER_CHANGE_EVENT_REQUEST_T
  85. {
  86. MMAL_PARAMETER_HEADER_T hdr;
  87. uint32_t change_id; /**< ID of parameter that may change, see \ref MMAL_PARAMETER_IDS */
  88. MMAL_BOOL_T enable; /**< True if the event is enabled, false if disabled */
  89. } MMAL_PARAMETER_CHANGE_EVENT_REQUEST_T;
  90. /** Buffer requirements parameter.
  91. * This is mainly used to increase the requirements of a component. */
  92. typedef struct MMAL_PARAMETER_BUFFER_REQUIREMENTS_T
  93. {
  94. MMAL_PARAMETER_HEADER_T hdr;
  95. uint32_t buffer_num_min; /**< Minimum number of buffers the port requires */
  96. uint32_t buffer_size_min; /**< Minimum size of buffers the port requires */
  97. uint32_t buffer_alignment_min; /**< Minimum alignment requirement for the buffers.
  98. A value of zero means no special alignment requirements. */
  99. uint32_t buffer_num_recommended; /**< Number of buffers the port recommends for optimal performance.
  100. A value of zero means no special recommendation. */
  101. uint32_t buffer_size_recommended; /**< Size of buffers the port recommends for optimal performance.
  102. A value of zero means no special recommendation. */
  103. } MMAL_PARAMETER_BUFFER_REQUIREMENTS_T;
  104. /** Seek request parameter type.
  105. * This is used to issue a seek request to a source component.
  106. */
  107. typedef struct MMAL_PARAMETER_SEEK_T
  108. {
  109. MMAL_PARAMETER_HEADER_T hdr;
  110. int64_t offset; /**< Offset (in microseconds) to seek to */
  111. uint32_t flags; /**< Seeking flags */
  112. #define MMAL_PARAM_SEEK_FLAG_PRECISE 0x1 /**< Choose precise seeking even if slower */
  113. #define MMAL_PARAM_SEEK_FLAG_FORWARD 0x2 /**< Seek to the next keyframe following the specified offset */
  114. } MMAL_PARAMETER_SEEK_T;
  115. /** Port statistics for debugging/test purposes.
  116. * Ports may support query of this parameter to return statistics for debugging or
  117. * test purposes. Not all values may be relevant for a given port.
  118. */
  119. typedef struct MMAL_PARAMETER_STATISTICS_T
  120. {
  121. MMAL_PARAMETER_HEADER_T hdr;
  122. uint32_t buffer_count; /**< Total number of buffers processed */
  123. uint32_t frame_count; /**< Total number of frames processed */
  124. uint32_t frames_skipped; /**< Number of frames without expected PTS based on frame rate */
  125. uint32_t frames_discarded; /**< Number of frames discarded */
  126. uint32_t eos_seen; /**< Set if the end of stream has been reached */
  127. uint32_t maximum_frame_bytes; /**< Maximum frame size in bytes */
  128. int64_t total_bytes; /**< Total number of bytes processed */
  129. uint32_t corrupt_macroblocks; /**< Number of corrupt macroblocks in the stream */
  130. } MMAL_PARAMETER_STATISTICS_T;
  131. typedef enum
  132. {
  133. MMAL_CORE_STATS_RX,
  134. MMAL_CORE_STATS_TX,
  135. MMAL_CORE_STATS_MAX = 0x7fffffff /* Force 32 bit size for this enum */
  136. } MMAL_CORE_STATS_DIR;
  137. /** MMAL core statistics. These are collected by the core itself.
  138. */
  139. typedef struct MMAL_PARAMETER_CORE_STATISTICS_T
  140. {
  141. MMAL_PARAMETER_HEADER_T hdr;
  142. MMAL_CORE_STATS_DIR dir;
  143. MMAL_BOOL_T reset; /**< Reset to zero after reading */
  144. MMAL_CORE_STATISTICS_T stats; /**< The statistics */
  145. } MMAL_PARAMETER_CORE_STATISTICS_T;
  146. /**
  147. * Component memory usage statistics.
  148. */
  149. typedef struct MMAL_PARAMETER_MEM_USAGE_T
  150. {
  151. MMAL_PARAMETER_HEADER_T hdr;
  152. /**< The amount of memory allocated in image pools by the component */
  153. uint32_t pool_mem_alloc_size;
  154. } MMAL_PARAMETER_MEM_USAGE_T;
  155. /**
  156. * Logging control.
  157. */
  158. typedef struct MMAL_PARAMETER_LOGGING_T
  159. {
  160. MMAL_PARAMETER_HEADER_T hdr;
  161. uint32_t set; /**< Logging bits to set */
  162. uint32_t clear; /**< Logging bits to clear */
  163. } MMAL_PARAMETER_LOGGING_T;
  164. #endif /* MMAL_PARAMETERS_COMMON_H */