From: dooglus Date: Thu, 25 Oct 2007 23:30:03 +0000 (+0000) Subject: Write header giving image height, width, and frame rate in .yuv output. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=c6813c86286b1e3185f883eb7e52a292fee07428;p=synfig.git Write header giving image height, width, and frame rate in .yuv output. git-svn-id: http://svn.voria.com/code@980 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/modules/mod_yuv420p/trgt_yuv.cpp b/synfig-core/trunk/src/modules/mod_yuv420p/trgt_yuv.cpp index 81482c9..d45f8ad 100644 --- a/synfig-core/trunk/src/modules/mod_yuv420p/trgt_yuv.cpp +++ b/synfig-core/trunk/src/modules/mod_yuv420p/trgt_yuv.cpp @@ -76,6 +76,18 @@ yuv::~yuv() } bool +yuv::init() +{ + if (!file) + return false; + + fprintf(file.get(), "YUV4MPEG2 W%d H%d F%d:1 Ip\n", + desc.get_w(), desc.get_h(), + round_to_int(desc.get_frame_rate())); + return true; +} + +bool yuv::set_rend_desc(RendDesc *given_desc) { given_desc->clear_flags(); @@ -95,6 +107,7 @@ yuv::set_rend_desc(RendDesc *given_desc) bool yuv::start_frame(synfig::ProgressCallback */*callback*/) { + fprintf(file.get(), "FRAME\n"); return static_cast(file); } diff --git a/synfig-core/trunk/src/modules/mod_yuv420p/trgt_yuv.h b/synfig-core/trunk/src/modules/mod_yuv420p/trgt_yuv.h index a796425..7ed9ee5 100644 --- a/synfig-core/trunk/src/modules/mod_yuv420p/trgt_yuv.h +++ b/synfig-core/trunk/src/modules/mod_yuv420p/trgt_yuv.h @@ -56,6 +56,7 @@ public: yuv(const char *filename); virtual ~yuv(); + virtual bool init(); virtual bool set_rend_desc(synfig::RendDesc *desc); virtual bool start_frame(synfig::ProgressCallback *cb); virtual void end_frame();