Move the video size and rate abbreviations system from libavformat to libavcodec

patch by Stefano Sabatini: [stefano dot sabatini minus lala poste dot it]
original thread:
[FFmpeg-devel] [PATCH] Redesign the video size and rateabbreviations system
date: 06/02/2007 05:30 PM

Originally committed as revision 9288 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Stefano Sabatini
2007-06-12 08:06:54 +00:00
committed by Benoit Fouet
parent 0a4f20c6c5
commit 26ef3220cf
4 changed files with 145 additions and 105 deletions

View File

@@ -2882,6 +2882,30 @@ attribute_deprecated int img_pad(AVPicture *dst, const AVPicture *src, int heigh
extern unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
/**
* Parses \p str and put in \p width_ptr and \p height_ptr the detected values.
*
* @return 0 in case of a successfull parsing, a negative value otherwise
* @param[in] str the string to parse: it has to be a string in the format
* <width>x<height> or a valid video frame size abbreviation.
* @param[in,out] width_ptr pointer to the variable which will contain the detected
* frame width value
* @param[in,out] height_ptr pointer to the variable which will contain the detected
* frame height value
*/
int av_parse_video_frame_size(int *width_ptr, int *height_ptr, const char *str);
/**
* Parses \p str and put in \p frame_rate the detected values.
*
* @return 0 in case of a successfull parsing, a negative value otherwise
* @param[in] str the string to parse: it has to be a string in the format
* <frame_rate_nom>/<frame_rate_den>, a float number or a valid video rate abbreviation
* @param[in,out] frame_rate pointer to the AVRational which will contain the detected
* frame rate
*/
int av_parse_video_frame_rate(AVRational *frame_rate, const char *str);
/* error handling */
#if EINVAL > 0
#define AVERROR(e) (-(e)) /**< Returns a negative error code from a POSIX error code, to return from library functions. */