00001
00002 #include "vidl_vil1_frame.h"
00003
00004
00005
00006 #include <vidl_vil1/vidl_vil1_codec_sptr.h>
00007 #include <vidl_vil1/vidl_vil1_frame_as_image.h>
00008 #include <vil1/vil1_image.h>
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 vidl_vil1_frame::vidl_vil1_frame(int position, vidl_vil1_codec_sptr coder) :
00019 position_(position), coder_(coder)
00020 {
00021 }
00022
00023
00024 vidl_vil1_frame::~vidl_vil1_frame()
00025 {
00026 }
00027
00028
00029 vil1_image vidl_vil1_frame::get_image()
00030 {
00031 if (! image_) {
00032 image_ = vil1_image(new vidl_vil1_frame_as_image(this));
00033 }
00034 return image_;
00035 }
00036
00037
00038 bool vidl_vil1_frame::get_section(void* ib, int x0, int y0, int width, int height) const
00039 {
00040 return coder_->get_section(position_, ib, x0, y0, width, height);
00041 }