diff avcodec.h @ 5126:7982b376b58a libavcodec

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
author benoit
date Tue, 12 Jun 2007 08:06:54 +0000
parents 5f9cbdd466fe
children 4dbe6578f811
line wrap: on
line diff
--- a/avcodec.h	Tue Jun 12 07:59:43 2007 +0000
+++ b/avcodec.h	Tue Jun 12 08:06:54 2007 +0000
@@ -2882,6 +2882,30 @@
 
 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. */