Commit c4e88217 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '7ecc2d40'

* commit '7ecc2d40':
  Move AVFrame from lavc to lavu.

Conflicts:
	libavcodec/avcodec.h
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents fee484ed 7ecc2d40
This diff is collapsed.
...@@ -213,6 +213,4 @@ int ff_codec_close_recursive(AVCodecContext *avctx); ...@@ -213,6 +213,4 @@ int ff_codec_close_recursive(AVCodecContext *avctx);
*/ */
int avpriv_bprint_to_extradata(AVCodecContext *avctx, struct AVBPrint *buf); int avpriv_bprint_to_extradata(AVCodecContext *avctx, struct AVBPrint *buf);
AVDictionary **ff_frame_get_metadatap(AVFrame *frame);
#endif /* AVCODEC_INTERNAL_H */ #endif /* AVCODEC_INTERNAL_H */
...@@ -289,7 +289,7 @@ static int add_doubles_metadata(int count, ...@@ -289,7 +289,7 @@ static int add_doubles_metadata(int count,
av_freep(&dp); av_freep(&dp);
if (!ap) if (!ap)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
av_dict_set(ff_frame_get_metadatap(&s->picture), name, ap, AV_DICT_DONT_STRDUP_VAL); av_dict_set(avpriv_frame_get_metadatap(&s->picture), name, ap, AV_DICT_DONT_STRDUP_VAL);
return 0; return 0;
} }
...@@ -315,7 +315,7 @@ static int add_shorts_metadata(int count, const char *name, ...@@ -315,7 +315,7 @@ static int add_shorts_metadata(int count, const char *name,
av_freep(&sp); av_freep(&sp);
if (!ap) if (!ap)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
av_dict_set(ff_frame_get_metadatap(&s->picture), name, ap, AV_DICT_DONT_STRDUP_VAL); av_dict_set(avpriv_frame_get_metadatap(&s->picture), name, ap, AV_DICT_DONT_STRDUP_VAL);
return 0; return 0;
} }
...@@ -334,7 +334,7 @@ static int add_string_metadata(int count, const char *name, ...@@ -334,7 +334,7 @@ static int add_string_metadata(int count, const char *name,
bytestream2_get_bufferu(&s->gb, value, count); bytestream2_get_bufferu(&s->gb, value, count);
value[count] = 0; value[count] = 0;
av_dict_set(ff_frame_get_metadatap(&s->picture), name, value, AV_DICT_DONT_STRDUP_VAL); av_dict_set(avpriv_frame_get_metadatap(&s->picture), name, value, AV_DICT_DONT_STRDUP_VAL);
return 0; return 0;
} }
...@@ -1111,7 +1111,7 @@ static int decode_frame(AVCodecContext *avctx, ...@@ -1111,7 +1111,7 @@ static int decode_frame(AVCodecContext *avctx,
av_log(avctx, AV_LOG_WARNING, "Type of GeoTIFF key %d is wrong\n", s->geotags[i].key); av_log(avctx, AV_LOG_WARNING, "Type of GeoTIFF key %d is wrong\n", s->geotags[i].key);
continue; continue;
} }
ret = av_dict_set(ff_frame_get_metadatap(&s->picture), keyname, s->geotags[i].val, 0); ret = av_dict_set(avpriv_frame_get_metadatap(&s->picture), keyname, s->geotags[i].val, 0);
if (ret<0) { if (ret<0) {
av_log(avctx, AV_LOG_ERROR, "Writing metadata with key '%s' failed\n", keyname); av_log(avctx, AV_LOG_ERROR, "Writing metadata with key '%s' failed\n", keyname);
return ret; return ret;
......
...@@ -757,18 +757,6 @@ void avcodec_free_frame(AVFrame **frame) ...@@ -757,18 +757,6 @@ void avcodec_free_frame(AVFrame **frame)
type av_##name##_get_##field(const str *s) { return s->field; } \ type av_##name##_get_##field(const str *s) { return s->field; } \
void av_##name##_set_##field(str *s, type v) { s->field = v; } void av_##name##_set_##field(str *s, type v) { s->field = v; }
MAKE_ACCESSORS(AVFrame, frame, int64_t, best_effort_timestamp)
MAKE_ACCESSORS(AVFrame, frame, int64_t, pkt_duration)
MAKE_ACCESSORS(AVFrame, frame, int64_t, pkt_pos)
MAKE_ACCESSORS(AVFrame, frame, int64_t, channel_layout)
MAKE_ACCESSORS(AVFrame, frame, int, channels)
MAKE_ACCESSORS(AVFrame, frame, int, sample_rate)
MAKE_ACCESSORS(AVFrame, frame, AVDictionary *, metadata)
MAKE_ACCESSORS(AVFrame, frame, int, decode_error_flags)
MAKE_ACCESSORS(AVFrame, frame, int, pkt_size)
AVDictionary **ff_frame_get_metadatap(AVFrame *frame) {return &frame->metadata;};
MAKE_ACCESSORS(AVCodecContext, codec, AVRational, pkt_timebase) MAKE_ACCESSORS(AVCodecContext, codec, AVRational, pkt_timebase)
MAKE_ACCESSORS(AVCodecContext, codec, const AVCodecDescriptor *, codec_descriptor) MAKE_ACCESSORS(AVCodecContext, codec, const AVCodecDescriptor *, codec_descriptor)
...@@ -1657,7 +1645,7 @@ static int add_metadata_from_side_data(AVCodecContext *avctx, AVFrame *frame) ...@@ -1657,7 +1645,7 @@ static int add_metadata_from_side_data(AVCodecContext *avctx, AVFrame *frame)
while (side_metadata < end) { while (side_metadata < end) {
const uint8_t *key = side_metadata; const uint8_t *key = side_metadata;
const uint8_t *val = side_metadata + strlen(key) + 1; const uint8_t *val = side_metadata + strlen(key) + 1;
int ret = av_dict_set(ff_frame_get_metadatap(frame), key, val, 0); int ret = av_dict_set(avpriv_frame_get_metadatap(frame), key, val, 0);
if (ret < 0) if (ret < 0)
break; break;
side_metadata = val + strlen(val) + 1; side_metadata = val + strlen(val) + 1;
......
...@@ -23,6 +23,7 @@ HEADERS = adler32.h \ ...@@ -23,6 +23,7 @@ HEADERS = adler32.h \
eval.h \ eval.h \
fifo.h \ fifo.h \
file.h \ file.h \
frame.h \
hmac.h \ hmac.h \
imgutils.h \ imgutils.h \
intfloat.h \ intfloat.h \
...@@ -76,6 +77,7 @@ OBJS = adler32.o \ ...@@ -76,6 +77,7 @@ OBJS = adler32.o \
fifo.o \ fifo.o \
file.o \ file.o \
float_dsp.o \ float_dsp.o \
frame.o \
hmac.o \ hmac.o \
imgutils.o \ imgutils.o \
intfloat_readwrite.o \ intfloat_readwrite.o \
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment