[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libcvd-members] libcvd cvd/videofilebuffer_frame.h cvd_src/vide... [vid
From: |
Ethan Eade |
Subject: |
[Libcvd-members] libcvd cvd/videofilebuffer_frame.h cvd_src/vide... [videofilebuffer_test_23052006] |
Date: |
Wed, 24 May 2006 00:27:02 +0000 |
CVSROOT: /cvsroot/libcvd
Module name: libcvd
Branch: videofilebuffer_test_23052006
Changes by: Ethan Eade <address@hidden> 06/05/24 00:27:02
Modified files:
cvd : videofilebuffer_frame.h
cvd_src : videofilebuffer.cc
Log message:
Make Ed's recent changes compile.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/libcvd/cvd/videofilebuffer_frame.h.diff?only_with_tag=videofilebuffer_test_23052006&tr1=1.6&tr2=1.6.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/libcvd/libcvd/cvd_src/videofilebuffer.cc.diff?only_with_tag=videofilebuffer_test_23052006&tr1=1.9.2.1&tr2=1.9.2.2&r1=text&r2=text
Patches:
Index: libcvd/cvd/videofilebuffer_frame.h
diff -u /dev/null libcvd/cvd/videofilebuffer_frame.h:1.6.2.1
--- /dev/null Wed May 24 00:27:02 2006
+++ libcvd/cvd/videofilebuffer_frame.h Wed May 24 00:27:01 2006
@@ -0,0 +1,69 @@
+/*
+ This file is part of the CVD Library.
+
+ Copyright (C) 2005 The Authors
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+// Paul Smith 1 March 2005
+// Uses ffmpeg libraries to play most types of video file
+
+#ifndef CVD_VIDEOFILEBUFFER_FRAME_H
+#define CVD_VIDEOFILEBUFFER_FRAME_H
+
+#include <cvd/localvideoframe.h>
+#include <cvd/rgb.h>
+#include <cvd/byte.h>
+
+struct AVCodecContext;
+
+namespace CVD
+{
+ namespace VFB
+ {
+ class RawVideoFileBuffer;
+ }
+
+ /// A frame from a VideoFileBuffer.
+ /// @ingroup gVideoFrame
+ /// @param T The pixel type of the video frames. Currently only
<code>CVD::Rgb<CVD::byte> ></code> and
+ /// <code>CVD::byte></code> are supported.
+ template<class T>
+ class VideoFileFrame: public CVD::LocalVideoFrame<T>
+ {
+ friend class VFB::RawVideoFileBuffer;
+
+ public:
+ inline void delete_self() { delete this; }
+ protected:
+ ~VideoFileFrame()
+ {
+ }
+
+ /// Construct a video frame from an Image and a
timestamp
+ /// @param time The timestamp of this frame
+ /// @param local The Image to use for this frame
+ VideoFileFrame(double time, CVD::Image<T>& local)
+ :LocalVideoFrame<T>(time, local)
+ {
+ }
+
+ private:
+ };
+}
+
+
+#endif
Index: libcvd/cvd_src/videofilebuffer.cc
diff -u libcvd/cvd_src/videofilebuffer.cc:1.9.2.1
libcvd/cvd_src/videofilebuffer.cc:1.9.2.2
--- libcvd/cvd_src/videofilebuffer.cc:1.9.2.1 Tue May 23 23:41:33 2006
+++ libcvd/cvd_src/videofilebuffer.cc Wed May 24 00:27:02 2006
@@ -302,10 +302,10 @@
VideoFileFrame<byte> *vfb = NULL;
- VideoFileFrame<Rgb<byte> > *vffgb = NULL;
+ VideoFileFrame<Rgb<byte> > *vfrgb = NULL;
if(is_rgb)
- vfrgb = new VideoFileFrame<byte>(frame_time, next_frame_rgb);
+ vfrgb = new VideoFileFrame<Rgb<byte> >(frame_time,
next_frame_rgb);
else
vfb = new VideoFileFrame<byte>(frame_time, next_frame);
@@ -344,12 +344,12 @@
template<class C> void delete_frame_or_throw(void* f)
{
VideoFrame<C>* vf = reinterpret_cast<VideoFrame<C>*>(f);
- VideoFileFrame<C>* vff = dynamic_cast<VideoFileFrame<C*>(vf);
+ VideoFileFrame<C>* vff = dynamic_cast<VideoFileFrame<C>*>(vf);
if(!vff)
throw Exceptions::VideoBuffer::BadPutFrame();
else
- delete vff;
+ vff->delete_self();
}
//
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Libcvd-members] libcvd cvd/videofilebuffer_frame.h cvd_src/vide... [videofilebuffer_test_23052006],
Ethan Eade <=