Possible since 61974537610d82bd35b6e3ac91ccd270c6bdc711.
Unified · Split
| @@ -135,7 +135,16 @@ static const RTPDynamicProtocolHandler *const rtp_dynamic_protocol_handler_list[ · 134 unmodified lines | |||
| 135 | NULL, | 135 | NULL, |
| 136 | }; | 136 | }; |
| 137 | 137 | ||
| 138 | const RTPDynamicProtocolHandler *ff_rtp_handler_iterate(void **opaque) | 138 | /** |
| 139 | * Iterate over all registered rtp dynamic protocol handlers. | ||
| 140 | * | ||
| 141 | * @param opaque a pointer where libavformat will store the iteration state. | ||
| 142 | * Must point to NULL to start the iteration. | ||
| 143 | * | ||
| 144 | * @return the next registered rtp dynamic protocol handler | ||
| 145 | * or NULL when the iteration is finished | ||
| 146 | */ | ||
| 147 | static const RTPDynamicProtocolHandler *rtp_handler_iterate(void **opaque) | ||
| 139 | { | 148 | { |
| 140 | uintptr_t i = (uintptr_t)*opaque; | 149 | uintptr_t i = (uintptr_t)*opaque; |
| 141 | const RTPDynamicProtocolHandler *r = rtp_dynamic_protocol_handler_list[i]; | 150 | const RTPDynamicProtocolHandler *r = rtp_dynamic_protocol_handler_list[i]; |
| @@ -151,7 +160,7 @@ const RTPDynamicProtocolHandler *ff_rtp_handler_find_by_name(const char *name, · 9 unmodified lines | |||
| 151 | { | 160 | { |
| 152 | void *i = 0; | 161 | void *i = 0; |
| 153 | const RTPDynamicProtocolHandler *handler; | 162 | const RTPDynamicProtocolHandler *handler; |
| 154 | while (handler = ff_rtp_handler_iterate(&i)) { | 163 | while (handler = rtp_handler_iterate(&i)) { |
| 155 | if (handler->enc_name && | 164 | if (handler->enc_name && |
| 156 | !av_strcasecmp(name, handler->enc_name) && | 165 | !av_strcasecmp(name, handler->enc_name) && |
| 157 | codec_type == handler->codec_type) | 166 | codec_type == handler->codec_type) |
| @@ -165,7 +174,7 @@ const RTPDynamicProtocolHandler *ff_rtp_handler_find_by_id(int id, · 7 unmodified lines | |||
| 165 | { | 174 | { |
| 166 | void *i = 0; | 175 | void *i = 0; |
| 167 | const RTPDynamicProtocolHandler *handler; | 176 | const RTPDynamicProtocolHandler *handler; |
| 168 | while (handler = ff_rtp_handler_iterate(&i)) { | 177 | while (handler = rtp_handler_iterate(&i)) { |
| 169 | if (handler->static_payload_id && handler->static_payload_id == id && | 178 | if (handler->static_payload_id && handler->static_payload_id == id && |
| 170 | codec_type == handler->codec_type) | 179 | codec_type == handler->codec_type) |
| 171 | return handler; | 180 | return handler; |
| @@ -190,16 +190,6 @@ struct RTPDemuxContext { · 189 unmodified lines | |||
| 190 | PayloadContext *dynamic_protocol_context; | 190 | PayloadContext *dynamic_protocol_context; |
| 191 | }; | 191 | }; |
| 192 | 192 | ||
| 193 | /** | ||
| 194 | * Iterate over all registered rtp dynamic protocol handlers. | ||
| 195 | * | ||
| 196 | * @param opaque a pointer where libavformat will store the iteration state. Must | ||
| 197 | * point to NULL to start the iteration. | ||
| 198 | * | ||
| 199 | * @return the next registered rtp dynamic protocol handler or NULL when the iteration is | ||
| 200 | * finished | ||
| 201 | */ | ||
| 202 | const RTPDynamicProtocolHandler *ff_rtp_handler_iterate(void **opaque); | ||
| 203 | /** | 193 | /** |
| 204 | * Find a registered rtp dynamic protocol handler with the specified name. | 194 | * Find a registered rtp dynamic protocol handler with the specified name. |
| 205 | * | 195 | * |