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
1414
1515
1616 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+
1722 2015-11-xx - xxxxxxx - lavc 57.16.0 - avcodec.h
1823 Add AV_PKT_DATA_FALLBACK_TRACK for making fallback associations between
1924 streams.
libavcodec/avcodec.h+6−0
@@ -2607,13 +2607,19 @@ typedef struct AVCodecContext { · 2606 unmodified lines
26072607 */
26082608 int64_t timecode_frame_start;
26092609
2610+#if FF_API_RTP_CALLBACK
2611+ /**
2612+ * @deprecated unused
2613+ */
26102614 /* The RTP callback: This function is called */
26112615 /* every time the encoder has a packet to send. */
26122616 /* It depends on the encoder if the data starts */
26132617 /* with a Start Code (it should). H.263 does. */
26142618 /* mb_nb contains the number of macroblocks */
26152619 /* encoded in the RTP payload. */
2620+ attribute_deprecated
26162621 void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb);
2622+#endif
26172623
26182624 int rtp_payload_size; /* The size of the RTP payload: the coder will */
26192625 /* 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
29742974 }
29752975 }
29762976
2977+#if FF_API_RTP_CALLBACK
2978+FF_DISABLE_DEPRECATION_WARNINGS
29772979 if (s->avctx->rtp_callback){
29782980 int number_mb = (mb_y - s->resync_mb_y)*s->mb_width + mb_x - s->resync_mb_x;
29792981 s->avctx->rtp_callback(s->avctx, s->ptr_lastgob, current_packet_size, number_mb);
29802982 }
2983+FF_ENABLE_DEPRECATION_WARNINGS
2984+#endif
29812985 update_mb_info(s, 1);
29822986
29832987 switch(s->codec_id){
@@ -3453,6 +3457,8 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 469 unmodified lines
34533457
34543458 write_slice_end(s);
34553459
3460+#if FF_API_RTP_CALLBACK
3461+FF_DISABLE_DEPRECATION_WARNINGS
34563462 /* Send the last GOB if RTP */
34573463 if (s->avctx->rtp_callback) {
34583464 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
34613467 emms_c();
34623468 s->avctx->rtp_callback(s->avctx, s->ptr_lastgob, pdif, number_mb);
34633469 }
3470+FF_ENABLE_DEPRECATION_WARNINGS
3471+#endif
34643472
34653473 return 0;
34663474 }
libavcodec/version.h+4−1
@@ -30,7 +30,7 @@ · 29 unmodified lines
3030
3131 #define LIBAVCODEC_VERSION_MAJOR 57
3232 #define LIBAVCODEC_VERSION_MINOR 16
33−#define LIBAVCODEC_VERSION_MICRO 100
33+#define LIBAVCODEC_VERSION_MICRO 101
3434
3535 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
3636 LIBAVCODEC_VERSION_MINOR, \
@@ -194,5 +194,8 @@ · 157 unmodified lines
194194 #ifndef FF_API_AVPACKET_OLD_API
195195 #define FF_API_AVPACKET_OLD_API (LIBAVCODEC_VERSION_MAJOR < 59)
196196 #endif
197+#ifndef FF_API_RTP_CALLBACK
198+#define FF_API_RTP_CALLBACK (LIBAVCODEC_VERSION_MAJOR < 59)
199+#endif
197200
198201 #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