History

avcodec, avutil, avformat: remove AVOption requirement for some fields

Allow all struct fields to be accessed directly, as long as they're public. Before this change, many fields were "public", but could be accessed via AVOption only. This meant they were effectively not public, but were present for documentation purposes, which was incredibly confusing at best.

wm4 committed 9 years ago

Commit 554bc4e1 parent 37330397 files · +42 −76Browse files

Showing the changes to libavcodec/avcodec.h (1 of 7 files). Show all

Unified · Split

libavcodec/avcodec.h+5−20
@@ -1680,7 +1680,7 @@ enum AVFieldOrder { · 1679 unmodified lines
16801680 * New fields can be added to the end with minor version bumps.
16811681 * Removal, reordering and changes to existing fields require a major
16821682 * version bump.
1683− * Please use AVOptions (av_opt* / av_set/get*()) to access these fields from user
1683+ * You can use AVOptions (av_opt* / av_set/get*()) to access these fields from user
16841684 * applications.
16851685 * The name string for AVOptions options matches the associated command line
16861686 * parameter name and can be found in libavcodec/options_table.h
@@ -2951,8 +2951,8 @@ typedef struct AVCodecContext { · 1264 unmodified lines
29512951 #define FF_DEBUG_MMCO 0x00000800
29522952 #define FF_DEBUG_BUGS 0x00001000
29532953 #if FF_API_DEBUG_MV
2954−#define FF_DEBUG_VIS_QP 0x00002000 ///< only access through AVOptions from outside libavcodec
2955−#define FF_DEBUG_VIS_MB_TYPE 0x00004000 ///< only access through AVOptions from outside libavcodec
2954+#define FF_DEBUG_VIS_QP 0x00002000
2955+#define FF_DEBUG_VIS_MB_TYPE 0x00004000
29562956 #endif
29572957 #define FF_DEBUG_BUFFERS 0x00008000
29582958 #define FF_DEBUG_THREADS 0x00010000
@@ -2962,7 +2962,6 @@ typedef struct AVCodecContext { · 3 unmodified lines
29622962 #if FF_API_DEBUG_MV
29632963 /**
29642964 * debug
2965− * Code outside libavcodec should access this field using AVOptions
29662965 * - encoding: Set by user.
29672966 * - decoding: Set by user.
29682967 */
@@ -3097,8 +3096,6 @@ typedef struct AVCodecContext { · 128 unmodified lines
30973096 * low resolution decoding, 1-> 1/2 size, 2->1/4 size
30983097 * - encoding: unused
30993098 * - decoding: Set by user.
3100− * Code outside libavcodec should access this field using:
3101− * av_codec_{get,set}_lowres(avctx)
31023099 */
31033100 int lowres;
31043101 #endif
@@ -3399,8 +3396,6 @@ typedef struct AVCodecContext { · 294 unmodified lines
33993396
34003397 /**
34013398 * Timebase in which pkt_dts/pts and AVPacket.dts/pts are.
3402− * Code outside libavcodec should access this field using:
3403− * av_codec_{get,set}_pkt_timebase(avctx)
34043399 * - encoding unused.
34053400 * - decoding set by user.
34063401 */
@@ -3408,8 +3403,6 @@ typedef struct AVCodecContext { · 1 unmodified line
34083403
34093404 /**
34103405 * AVCodecDescriptor
3411− * Code outside libavcodec should access this field using:
3412− * av_codec_{get,set}_codec_descriptor(avctx)
34133406 * - encoding: unused.
34143407 * - decoding: set by libavcodec.
34153408 */
@@ -3420,8 +3413,6 @@ typedef struct AVCodecContext { · 4 unmodified lines
34203413 * low resolution decoding, 1-> 1/2 size, 2->1/4 size
34213414 * - encoding: unused
34223415 * - decoding: Set by user.
3423− * Code outside libavcodec should access this field using:
3424− * av_codec_{get,set}_lowres(avctx)
34253416 */
34263417 int lowres;
34273418 #endif
@@ -3462,7 +3453,6 @@ typedef struct AVCodecContext { · 34 unmodified lines
34623453 * However for formats that do not use pre-multiplied alpha
34633454 * there might be serious artefacts (though e.g. libswscale currently
34643455 * assumes pre-multiplied alpha anyway).
3465− * Code outside libavcodec should access this field using AVOptions
34663456 *
34673457 * - decoding: set by user
34683458 * - encoding: unused
@@ -3479,7 +3469,6 @@ typedef struct AVCodecContext { · 10 unmodified lines
34793469 #if !FF_API_DEBUG_MV
34803470 /**
34813471 * debug motion vectors
3482− * Code outside libavcodec should access this field using AVOptions
34833472 * - encoding: Set by user.
34843473 * - decoding: Set by user.
34853474 */
@@ -3491,7 +3480,6 @@ typedef struct AVCodecContext { · 5 unmodified lines
34913480
34923481 /**
34933482 * custom intra quantization matrix
3494− * Code outside libavcodec should access this field using av_codec_g/set_chroma_intra_matrix()
34953483 * - encoding: Set by user, can be NULL.
34963484 * - decoding: unused.
34973485 */
@@ -3500,8 +3488,6 @@ typedef struct AVCodecContext { · 2 unmodified lines
35003488 /**
35013489 * dump format separator.
35023490 * can be ", " or "\n " or anything else
3503− * Code outside libavcodec should access this field using AVOptions
3504− * (NO direct access).
35053491 * - encoding: Set by user.
35063492 * - decoding: Set by user.
35073493 */
@@ -3511,13 +3497,12 @@ typedef struct AVCodecContext { · 3 unmodified lines
35113497 * ',' separated list of allowed decoders.
35123498 * If NULL then all are allowed
35133499 * - encoding: unused
3514− * - decoding: set by user through AVOPtions (NO direct access)
3500+ * - decoding: set by user
35153501 */
35163502 char *codec_whitelist;
35173503
35183504 /*
35193505 * Properties of the stream that gets decoded
3520− * To be accessed through av_codec_get_properties() (NO direct access)
35213506 * - encoding: unused
35223507 * - decoding: set by libavcodec
35233508 */
@@ -3668,7 +3653,7 @@ typedef struct AVCodec { · 144 unmodified lines
36683653 const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0
36693654 const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1
36703655 const uint64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0
3671− uint8_t max_lowres; ///< maximum value for lowres supported by the decoder, no direct access, use av_codec_get_max_lowres()
3656+ uint8_t max_lowres; ///< maximum value for lowres supported by the decoder
36723657 const AVClass *priv_class; ///< AVClass for the private context
36733658 const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
36743659

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