* commit '462a54e2291e1fa18e1f1254d09739dfbb795617': lavc: Deprecate avctx.rtp_callback field
Unified · Split
| @@ -14,6 +14,11 @@ libavutil: 2015-08-28 · 13 unmodified lines | ||
| 14 | 14 | |
| 15 | 15 | |
| 16 | 16 | API changes, most recent first: |
| 17 | +2015-11-29 - xxxxxxx - lavc 57.16.101 - avcodec.h | |
| 18 | + Deprecate rtp_callback without replacement, i.e. it won't be possible to | |
| 19 | + get image slices before the full frame is encoded any more. The libavformat | |
| 20 | + rtpenc muxer can still be used for RFC-2190 packetization. | |
| 21 | + | |
| 17 | 22 | 2015-11-xx - xxxxxxx - lavc 57.16.0 - avcodec.h |
| 18 | 23 | Add AV_PKT_DATA_FALLBACK_TRACK for making fallback associations between |
| 19 | 24 | streams. |
| @@ -2607,13 +2607,19 @@ typedef struct AVCodecContext { · 2606 unmodified lines | ||
| 2607 | 2607 | */ |
| 2608 | 2608 | int64_t timecode_frame_start; |
| 2609 | 2609 | |
| 2610 | +#if FF_API_RTP_CALLBACK | |
| 2611 | + /** | |
| 2612 | + * @deprecated unused | |
| 2613 | + */ | |
| 2610 | 2614 | /* The RTP callback: This function is called */ |
| 2611 | 2615 | /* every time the encoder has a packet to send. */ |
| 2612 | 2616 | /* It depends on the encoder if the data starts */ |
| 2613 | 2617 | /* with a Start Code (it should). H.263 does. */ |
| 2614 | 2618 | /* mb_nb contains the number of macroblocks */ |
| 2615 | 2619 | /* encoded in the RTP payload. */ |
| 2620 | + attribute_deprecated | |
| 2616 | 2621 | void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb); |
| 2622 | +#endif | |
| 2617 | 2623 | |
| 2618 | 2624 | int rtp_payload_size; /* The size of the RTP payload: the coder will */ |
| 2619 | 2625 | /* do its best to deliver a chunk with size */ |
| @@ -2974,10 +2974,14 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 2973 unmodified lines | ||
| 2974 | 2974 | } |
| 2975 | 2975 | } |
| 2976 | 2976 | |
| 2977 | +#if FF_API_RTP_CALLBACK | |
| 2978 | +FF_DISABLE_DEPRECATION_WARNINGS | |
| 2977 | 2979 | if (s->avctx->rtp_callback){ |
| 2978 | 2980 | int number_mb = (mb_y - s->resync_mb_y)*s->mb_width + mb_x - s->resync_mb_x; |
| 2979 | 2981 | s->avctx->rtp_callback(s->avctx, s->ptr_lastgob, current_packet_size, number_mb); |
| 2980 | 2982 | } |
| 2983 | +FF_ENABLE_DEPRECATION_WARNINGS | |
| 2984 | +#endif | |
| 2981 | 2985 | update_mb_info(s, 1); |
| 2982 | 2986 | |
| 2983 | 2987 | switch(s->codec_id){ |
| @@ -3453,6 +3457,8 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 469 unmodified lines | ||
| 3453 | 3457 | |
| 3454 | 3458 | write_slice_end(s); |
| 3455 | 3459 | |
| 3460 | +#if FF_API_RTP_CALLBACK | |
| 3461 | +FF_DISABLE_DEPRECATION_WARNINGS | |
| 3456 | 3462 | /* Send the last GOB if RTP */ |
| 3457 | 3463 | if (s->avctx->rtp_callback) { |
| 3458 | 3464 | int number_mb = (mb_y - s->resync_mb_y)*s->mb_width - s->resync_mb_x; |
| @@ -3461,6 +3467,8 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 2 unmodified lines | ||
| 3461 | 3467 | emms_c(); |
| 3462 | 3468 | s->avctx->rtp_callback(s->avctx, s->ptr_lastgob, pdif, number_mb); |
| 3463 | 3469 | } |
| 3470 | +FF_ENABLE_DEPRECATION_WARNINGS | |
| 3471 | +#endif | |
| 3464 | 3472 | |
| 3465 | 3473 | return 0; |
| 3466 | 3474 | } |
| @@ -30,7 +30,7 @@ · 29 unmodified lines | ||
| 30 | 30 | |
| 31 | 31 | #define LIBAVCODEC_VERSION_MAJOR 57 |
| 32 | 32 | #define LIBAVCODEC_VERSION_MINOR 16 |
| 33 | −#define LIBAVCODEC_VERSION_MICRO 100 | |
| 33 | +#define LIBAVCODEC_VERSION_MICRO 101 | |
| 34 | 34 | |
| 35 | 35 | #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |
| 36 | 36 | LIBAVCODEC_VERSION_MINOR, \ |
| @@ -194,5 +194,8 @@ · 157 unmodified lines | ||
| 194 | 194 | #ifndef FF_API_AVPACKET_OLD_API |
| 195 | 195 | #define FF_API_AVPACKET_OLD_API (LIBAVCODEC_VERSION_MAJOR < 59) |
| 196 | 196 | #endif |
| 197 | +#ifndef FF_API_RTP_CALLBACK | |
| 198 | +#define FF_API_RTP_CALLBACK (LIBAVCODEC_VERSION_MAJOR < 59) | |
| 199 | +#endif | |
| 197 | 200 | |
| 198 | 201 | #endif /* AVCODEC_VERSION_H */ |