summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2007-06-12 08:06:54 +0000
committerBenoit Fouet <benoit.fouet@free.fr>2007-06-12 08:06:54 +0000
commit26ef3220cf6ad4a3cb1580086c244394f5aa3094 (patch)
treec3de96a135b2d5457d1da797113d85c32abe71fa /libavcodec/avcodec.h
parent0a4f20c6c5425be5ceccc72cd6adbca96fabcbac (diff)
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
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 77ef978348..6403e59e56 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -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. */