Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Schlaile <peter@schlaile.de>2011-08-28 18:46:03 +0400
committerPeter Schlaile <peter@schlaile.de>2011-08-28 18:46:03 +0400
commitc07bd1439a3f026b8603c52662c3e7ccc364321a (patch)
treef6ce8cd3e01b0701c9b3d0cd3e17987be33803b8 /source/blender/imbuf/IMB_imbuf.h
parent852a03a6af6d67da58154b848b45a118eb38cdc0 (diff)
== Sequencer ==
This patch adds: * support for proxy building again (missing feature from Blender 2.49) additionally to the way, Blender 2.49 worked, you can select several strips at once and make Blender build proxies in the background (using the job system) Also a new thing: movie proxies are now build into AVI files, and the proxy system is moved into ImBuf-library, so that other parts of blender can also benefit from it. * Timecode support: to fix seeking issues with files, that have a) varying frame rates b) very large GOP lengths c) are broken inbetween d) use different time code tracks the proxy builder can now also build timecode indices, which are used (optionally) for seeking. For the first time, it is possible, to do frame exact seeking on all file types. * Support for different video-streams in one video file (can be selected in sequencer, other parts of blender can also use it, but UI has to be added accordingly) * IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since older versions don't support the pkt_pts field, that is essential for building timecode indices. Windows and Mac libs are already updated, Linux-users have to build their own ffmpeg verions until distros keep up.
Diffstat (limited to 'source/blender/imbuf/IMB_imbuf.h')
-rw-r--r--source/blender/imbuf/IMB_imbuf.h69
1 files changed, 60 insertions, 9 deletions
diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h
index 36123592c54..1fbe8e01fd4 100644
--- a/source/blender/imbuf/IMB_imbuf.h
+++ b/source/blender/imbuf/IMB_imbuf.h
@@ -133,6 +133,7 @@ struct ImBuf *IMB_allocImBuf(unsigned int x, unsigned int y,
*/
void IMB_refImBuf(struct ImBuf *ibuf);
+struct ImBuf * IMB_makeSingleUser(struct ImBuf *ibuf);
/**
*
@@ -193,17 +194,70 @@ void IMB_rectblend(struct ImBuf *dbuf, struct ImBuf *sbuf, int destx,
int desty, int srcx, int srcy, int width, int height, IMB_BlendMode mode);
/**
+ *
+ * @attention Defined in indexer.c
+ */
+
+typedef enum IMB_Timecode_Type {
+ IMB_TC_NONE = 0, /* don't use timecode files at all */
+ IMB_TC_RECORD_RUN = 1, /* use images in the order as they are recorded
+ (currently, this is the only one implemented
+ and is a sane default)
+ */
+ IMB_TC_FREE_RUN = 2, /* use global timestamp written by recording
+ device (prosumer camcorders e.g. can do
+ that) */
+ IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN = 4,
+ /* interpolate a global timestamp using the
+ record date and time written by recording
+ device (*every* consumer camcorder can do
+ that :) )*/
+ IMB_TC_MAX_SLOT = 3
+} IMB_Timecode_Type;
+
+typedef enum IMB_Proxy_Size {
+ IMB_PROXY_NONE = 0,
+ IMB_PROXY_25 = 1,
+ IMB_PROXY_50 = 2,
+ IMB_PROXY_75 = 4,
+ IMB_PROXY_100 = 8,
+ IMB_PROXY_MAX_SLOT = 4
+} IMB_Proxy_Size;
+
+/* defaults to BL_proxy within the directory of the animation */
+void IMB_anim_set_index_dir(struct anim * anim, const char * dir);
+
+int IMB_anim_index_get_frame_index(struct anim * anim, IMB_Timecode_Type tc,
+ int position);
+
+/* will rebuild all used indices and proxies at once */
+void IMB_anim_index_rebuild(struct anim * anim,
+ IMB_Timecode_Type build_tcs,
+ IMB_Proxy_Size build_preview_sizes,
+ int build_quality,
+ short *stop, short *do_update, float *progress);
+
+/**
* Return the length (in frames) of the given @a anim.
*/
-int IMB_anim_get_duration(struct anim *anim);
+int IMB_anim_get_duration(struct anim *anim, IMB_Timecode_Type tc);
+
+
+/**
+ * Return the fps contained in movie files (function rval is FALSE,
+ * and frs_sec and frs_sec_base untouched if none available!)
+ */
+int IMB_anim_get_fps(struct anim * anim,
+ short * frs_sec, float * frs_sec_base);
/**
*
* @attention Defined in anim.c
*/
-struct anim *IMB_open_anim(const char *name, int ib_flags);
+struct anim *IMB_open_anim(const char *name, int ib_flags, int streamindex);
void IMB_close_anim(struct anim *anim);
+
/**
*
* @attention Defined in anim.c
@@ -218,7 +272,10 @@ int IMB_anim_get_preseek(struct anim *anim);
* @attention Defined in anim.c
*/
-struct ImBuf *IMB_anim_absolute(struct anim *anim, int position);
+struct ImBuf *IMB_anim_absolute(
+ struct anim *anim, int position,
+ IMB_Timecode_Type tc /* = 1 = IMB_TC_RECORD_RUN */,
+ IMB_Proxy_Size preview_size /* = 0 = IMB_PROXY_NONE */);
/**
*
@@ -231,12 +288,6 @@ struct ImBuf *IMB_anim_previewframe(struct anim *anim);
*
* @attention Defined in anim.c
*/
-void IMB_free_anim_ibuf(struct anim *anim);
-
-/**
- *
- * @attention Defined in anim.c
- */
void IMB_free_anim(struct anim *anim);
/**