Skip to content

Commit 04b7217

Browse files
committed
avutil/dict: Move avpriv_dict_set_timestamp() to a header of its own
It is used almost nowhere, so it needn't be auto-included almost everywhere. Signed-off-by: Andreas Rheinhardt <[email protected]>
1 parent 26325cc commit 04b7217

File tree

9 files changed

+44
-12
lines changed

9 files changed

+44
-12
lines changed

libavformat/flvdec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "libavutil/avstring.h"
2929
#include "libavutil/channel_layout.h"
3030
#include "libavutil/dict.h"
31+
#include "libavutil/dict_internal.h"
3132
#include "libavutil/opt.h"
3233
#include "libavutil/internal.h"
3334
#include "libavutil/intfloat.h"

libavformat/ifv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
*/
2222

2323
#include "libavutil/channel_layout.h"
24+
#include "libavutil/dict_internal.h"
2425
#include "avformat.h"
2526
#include "internal.h"
2627
#include "avio_internal.h"

libavformat/matroskadec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include "libavutil/base64.h"
3939
#include "libavutil/bprint.h"
4040
#include "libavutil/dict.h"
41+
#include "libavutil/dict_internal.h"
4142
#include "libavutil/display.h"
4243
#include "libavutil/intfloat.h"
4344
#include "libavutil/intreadwrite.h"

libavformat/mov.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include "libavutil/attributes.h"
3333
#include "libavutil/bprint.h"
3434
#include "libavutil/channel_layout.h"
35+
#include "libavutil/dict_internal.h"
3536
#include "libavutil/internal.h"
3637
#include "libavutil/intreadwrite.h"
3738
#include "libavutil/intfloat.h"

libavformat/mux_utils.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*/
2121

2222
#include "libavutil/dict.h"
23+
#include "libavutil/dict_internal.h"
2324
#include "libavutil/internal.h"
2425
#include "libavutil/log.h"
2526
#include "libavutil/mem.h"

libavformat/mxfdec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
#include "libavcodec/bytestream.h"
5454
#include "libavcodec/internal.h"
5555
#include "libavutil/channel_layout.h"
56+
#include "libavutil/dict_internal.h"
5657
#include "libavutil/intreadwrite.h"
5758
#include "libavutil/parseutils.h"
5859
#include "libavutil/timecode.h"

libavutil/dict.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
#include "avstring.h"
2424
#include "dict.h"
25+
#include "dict_internal.h"
2526
#include "internal.h"
2627
#include "mem.h"
2728
#include "time_internal.h"

libavutil/dict_internal.h

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* This file is part of FFmpeg.
3+
*
4+
* FFmpeg is free software; you can redistribute it and/or
5+
* modify it under the terms of the GNU Lesser General Public
6+
* License as published by the Free Software Foundation; either
7+
* version 2.1 of the License, or (at your option) any later version.
8+
*
9+
* FFmpeg is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+
* Lesser General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU Lesser General Public
15+
* License along with FFmpeg; if not, write to the Free Software
16+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17+
*/
18+
19+
#ifndef AVUTIL_DICT_INTERNAL_H
20+
#define AVUTIL_DICT_INTERNAL_H
21+
22+
#include <stdint.h>
23+
24+
#include "dict.h"
25+
26+
/**
27+
* Set a dictionary value to an ISO-8601 compliant timestamp string.
28+
*
29+
* @param dict pointer to a pointer to a dictionary struct. If *dict is NULL
30+
* a dictionary struct is allocated and put in *dict.
31+
* @param key metadata key
32+
* @param timestamp unix timestamp in microseconds
33+
* @return <0 on error
34+
*/
35+
int avpriv_dict_set_timestamp(AVDictionary **dict, const char *key, int64_t timestamp);
36+
37+
#endif /* AVUTIL_DICT_INTERNAL_H */

libavutil/internal.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
#include "config.h"
4242
#include "attributes.h"
4343
#include "timer.h"
44-
#include "dict.h"
4544
#include "macros.h"
4645
#include "pixfmt.h"
4746

@@ -230,15 +229,4 @@ static av_always_inline av_const int avpriv_mirror(int x, int w)
230229

231230
void ff_check_pixfmt_descriptors(void);
232231

233-
/**
234-
* Set a dictionary value to an ISO-8601 compliant timestamp string.
235-
*
236-
* @param dict pointer to a pointer to a dictionary struct. If *dict is NULL
237-
* a dictionary struct is allocated and put in *dict.
238-
* @param key metadata key
239-
* @param timestamp unix timestamp in microseconds
240-
* @return <0 on error
241-
*/
242-
int avpriv_dict_set_timestamp(AVDictionary **dict, const char *key, int64_t timestamp);
243-
244232
#endif /* AVUTIL_INTERNAL_H */

0 commit comments

Comments
 (0)