History

Merge commit '462a54e2291e1fa18e1f1254d09739dfbb795617'

* commit '462a54e2291e1fa18e1f1254d09739dfbb795617': lavc: Deprecate avctx.rtp_callback field

Hendrik Leppkes committed 10 years ago

Commit 93fb4a42 parents da7cfef 462a54e4 files · +23 −1Browse files

Unified · Split

4 files
  1. doc/APIchanges +5 −0
  2. libavcodec/avcodec.h +6 −0
  3. libavcodec/mpegvideo_enc.c +8 −0
  4. libavcodec/version.h +4 −1
doc/APIchanges+5−0
@@ -14,6 +14,11 @@ libavutil: 2015-08-28 · 13 unmodified lines
14 14
15 15
16API changes, most recent first:16API changes, most recent first:
172015-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
172015-11-xx - xxxxxxx - lavc 57.16.0 - avcodec.h222015-11-xx - xxxxxxx - lavc 57.16.0 - avcodec.h
18 Add AV_PKT_DATA_FALLBACK_TRACK for making fallback associations between23 Add AV_PKT_DATA_FALLBACK_TRACK for making fallback associations between
19 streams.24 streams.
libavcodec/avcodec.h+6−0
@@ -2607,13 +2607,19 @@ typedef struct AVCodecContext { · 2606 unmodified lines
2607 */2607 */
2608 int64_t timecode_frame_start;2608 int64_t timecode_frame_start;
2609 2609
2610#if FF_API_RTP_CALLBACK
2611 /**
2612 * @deprecated unused
2613 */
2610 /* The RTP callback: This function is called */2614 /* The RTP callback: This function is called */
2611 /* every time the encoder has a packet to send. */2615 /* every time the encoder has a packet to send. */
2612 /* It depends on the encoder if the data starts */2616 /* It depends on the encoder if the data starts */
2613 /* with a Start Code (it should). H.263 does. */2617 /* with a Start Code (it should). H.263 does. */
2614 /* mb_nb contains the number of macroblocks */2618 /* mb_nb contains the number of macroblocks */
2615 /* encoded in the RTP payload. */2619 /* encoded in the RTP payload. */
2620 attribute_deprecated
2616 void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb);2621 void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb);
2622#endif
2617 2623
2618 int rtp_payload_size; /* The size of the RTP payload: the coder will */2624 int rtp_payload_size; /* The size of the RTP payload: the coder will */
2619 /* do its best to deliver a chunk with size */2625 /* do its best to deliver a chunk with size */
libavcodec/mpegvideo_enc.c+8−0
@@ -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
2978FF_DISABLE_DEPRECATION_WARNINGS
2977 if (s->avctx->rtp_callback){2979 if (s->avctx->rtp_callback){
2978 int number_mb = (mb_y - s->resync_mb_y)*s->mb_width + mb_x - s->resync_mb_x;2980 int number_mb = (mb_y - s->resync_mb_y)*s->mb_width + mb_x - s->resync_mb_x;
2979 s->avctx->rtp_callback(s->avctx, s->ptr_lastgob, current_packet_size, number_mb);2981 s->avctx->rtp_callback(s->avctx, s->ptr_lastgob, current_packet_size, number_mb);
2980 }2982 }
2983FF_ENABLE_DEPRECATION_WARNINGS
2984#endif
2981 update_mb_info(s, 1);2985 update_mb_info(s, 1);
2982 2986
2983 switch(s->codec_id){2987 switch(s->codec_id){
@@ -3453,6 +3457,8 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 469 unmodified lines
3453 3457
3454 write_slice_end(s);3458 write_slice_end(s);
3455 3459
3460#if FF_API_RTP_CALLBACK
3461FF_DISABLE_DEPRECATION_WARNINGS
3456 /* Send the last GOB if RTP */3462 /* Send the last GOB if RTP */
3457 if (s->avctx->rtp_callback) {3463 if (s->avctx->rtp_callback) {
3458 int number_mb = (mb_y - s->resync_mb_y)*s->mb_width - s->resync_mb_x;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 emms_c();3467 emms_c();
3462 s->avctx->rtp_callback(s->avctx, s->ptr_lastgob, pdif, number_mb);3468 s->avctx->rtp_callback(s->avctx, s->ptr_lastgob, pdif, number_mb);
3463 }3469 }
3470FF_ENABLE_DEPRECATION_WARNINGS
3471#endif
3464 3472
3465 return 0;3473 return 0;
3466}3474}
libavcodec/version.h+4−1
@@ -30,7 +30,7 @@ · 29 unmodified lines
30 30
31#define LIBAVCODEC_VERSION_MAJOR 5731#define LIBAVCODEC_VERSION_MAJOR 57
32#define LIBAVCODEC_VERSION_MINOR 1632#define LIBAVCODEC_VERSION_MINOR 16
33#define LIBAVCODEC_VERSION_MICRO 10033#define LIBAVCODEC_VERSION_MICRO 101
34 34
35#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \35#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
36 LIBAVCODEC_VERSION_MINOR, \36 LIBAVCODEC_VERSION_MINOR, \
@@ -194,5 +194,8 @@ · 157 unmodified lines
194#ifndef FF_API_AVPACKET_OLD_API194#ifndef FF_API_AVPACKET_OLD_API
195#define FF_API_AVPACKET_OLD_API (LIBAVCODEC_VERSION_MAJOR < 59)195#define FF_API_AVPACKET_OLD_API (LIBAVCODEC_VERSION_MAJOR < 59)
196#endif196#endif
197#ifndef FF_API_RTP_CALLBACK
198#define FF_API_RTP_CALLBACK (LIBAVCODEC_VERSION_MAJOR < 59)
199#endif
197 200
198#endif /* AVCODEC_VERSION_H */201#endif /* AVCODEC_VERSION_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t