Unified · Split
| @@ -13,6 +13,9 @@ libavutil: 2011-04-18 · 12 unmodified lines | |||
| 13 | 13 | ||
| 14 | API changes, most recent first: | 14 | API changes, most recent first: |
| 15 | 15 | ||
| 16 | 2012-03-26 - xxxxxxx - lavfi 2.66.100 | ||
| 17 | Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions. | ||
| 18 | |||
| 16 | 2012-03-21 - xxxxxxx - lavu 51.43.100 | 19 | 2012-03-21 - xxxxxxx - lavu 51.43.100 |
| 17 | Add bprint.h for bprint API. | 20 | Add bprint.h for bprint API. |
| 18 | 21 | ||
| @@ -56,6 +56,20 @@ AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame · 55 unmodified lines | |||
| 56 | return picref; | 56 | return picref; |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame, | ||
| 60 | const AVFilterBufferRef *samplesref) | ||
| 61 | { | ||
| 62 | if (!samplesref || !samplesref->audio || !frame) | ||
| 63 | return AVERROR(EINVAL); | ||
| 64 | |||
| 65 | memcpy(frame->data, samplesref->data, sizeof(frame->data)); | ||
| 66 | frame->pkt_pos = samplesref->pos; | ||
| 67 | frame->format = samplesref->format; | ||
| 68 | frame->nb_samples = samplesref->audio->nb_samples; | ||
| 69 | |||
| 70 | return 0; | ||
| 71 | } | ||
| 72 | |||
| 59 | int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame, | 73 | int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame, |
| 60 | const AVFilterBufferRef *picref) | 74 | const AVFilterBufferRef *picref) |
| 61 | { | 75 | { |
| @@ -73,3 +87,12 @@ int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame, · 11 unmodified lines | |||
| 73 | 87 | ||
| 74 | return 0; | 88 | return 0; |
| 75 | } | 89 | } |
| 90 | |||
| 91 | int avfilter_fill_frame_from_buffer_ref(AVFrame *frame, | ||
| 92 | const AVFilterBufferRef *ref) | ||
| 93 | { | ||
| 94 | if (!ref) | ||
| 95 | return AVERROR(EINVAL); | ||
| 96 | return ref->video ? avfilter_fill_frame_from_video_buffer_ref(frame, ref) | ||
| 97 | : avfilter_fill_frame_from_audio_buffer_ref(frame, ref); | ||
| 98 | } | ||
| @@ -46,6 +46,17 @@ int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src); · 45 unmodified lines | |||
| 46 | */ | 46 | */ |
| 47 | AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame, int perms); | 47 | AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame, int perms); |
| 48 | 48 | ||
| 49 | /** | ||
| 50 | * Fill an AVFrame with the information stored in samplesref. | ||
| 51 | * | ||
| 52 | * @param frame an already allocated AVFrame | ||
| 53 | * @param samplesref an audio buffer reference | ||
| 54 | * @return 0 in case of success, a negative AVERROR code in case of | ||
| 55 | * failure | ||
| 56 | */ | ||
| 57 | int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame, | ||
| 58 | const AVFilterBufferRef *samplesref); | ||
| 59 | |||
| 49 | /** | 60 | /** |
| 50 | * Fill an AVFrame with the information stored in picref. | 61 | * Fill an AVFrame with the information stored in picref. |
| 51 | * | 62 | * |
| @@ -57,6 +68,17 @@ AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame · 5 unmodified lines | |||
| 57 | int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame, | 68 | int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame, |
| 58 | const AVFilterBufferRef *picref); | 69 | const AVFilterBufferRef *picref); |
| 59 | 70 | ||
| 71 | /** | ||
| 72 | * Fill an AVFrame with information stored in ref. | ||
| 73 | * | ||
| 74 | * @param frame an already allocated AVFrame | ||
| 75 | * @param ref a video or audio buffer reference | ||
| 76 | * @return 0 in case of success, a negative AVERROR code in case of | ||
| 77 | * failure | ||
| 78 | */ | ||
| 79 | int avfilter_fill_frame_from_buffer_ref(AVFrame *frame, | ||
| 80 | const AVFilterBufferRef *ref); | ||
| 81 | |||
| 60 | /** | 82 | /** |
| 61 | * Add frame data to buffer_src. | 83 | * Add frame data to buffer_src. |
| 62 | * | 84 | * |
| @@ -29,8 +29,8 @@ · 28 unmodified lines | |||
| 29 | #include "libavutil/avutil.h" | 29 | #include "libavutil/avutil.h" |
| 30 | 30 | ||
| 31 | #define LIBAVFILTER_VERSION_MAJOR 2 | 31 | #define LIBAVFILTER_VERSION_MAJOR 2 |
| 32 | #define LIBAVFILTER_VERSION_MINOR 65 | 32 | #define LIBAVFILTER_VERSION_MINOR 66 |
| 33 | #define LIBAVFILTER_VERSION_MICRO 102 | 33 | #define LIBAVFILTER_VERSION_MICRO 100 |
| 34 | 34 | ||
| 35 | #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ | 35 | #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ |
| 36 | LIBAVFILTER_VERSION_MINOR, \ | 36 | LIBAVFILTER_VERSION_MINOR, \ |