summaryrefslogtreecommitdiff
path: root/libavutil/stereo3d.h
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2016-04-21 17:24:07 -0400
committerVittorio Giovara <vittorio.giovara@gmail.com>2016-05-17 12:25:27 -0400
commit0c4468dc185fa8b9e7d6add914595c5e928b24fd (patch)
tree72ca617953ba608bf21bb3584058770a353d11e2 /libavutil/stereo3d.h
parentd621b2f795684f7119057f986066060adbe84220 (diff)
stereo3d: Add API to get name from value or value from name
Use it in av_dump_format() instead of a huge switch case.
Diffstat (limited to 'libavutil/stereo3d.h')
-rw-r--r--libavutil/stereo3d.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/libavutil/stereo3d.h b/libavutil/stereo3d.h
index b1910b1f87..aea1b7052b 100644
--- a/libavutil/stereo3d.h
+++ b/libavutil/stereo3d.h
@@ -149,4 +149,22 @@ AVStereo3D *av_stereo3d_alloc(void);
*/
AVStereo3D *av_stereo3d_create_side_data(AVFrame *frame);
+/**
+ * Provide a human-readable name of a given stereo3d type.
+ *
+ * @param type The input stereo3d type value.
+ *
+ * @return The name of the stereo3d value, or "unknown".
+ */
+const char *av_stereo3d_type_name(unsigned int type);
+
+/**
+ * Get the AVStereo3DType form a human-readable name.
+ *
+ * @param type The input string.
+ *
+ * @return The AVStereo3DType value, or -1 if not found.
+ */
+int av_stereo3d_from_name(const char *name);
+
#endif /* AVUTIL_STEREO3D_H */