Ocean
WICImageRecorder.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) Meta Platforms, Inc. and affiliates.
3
*
4
* This source code is licensed under the MIT license found in the
5
* LICENSE file in the root directory of this source tree.
6
*/
7
8
#ifndef META_OCEAN_MEDIA_WIC_WIC_IMAGE_RECORDER_H
9
#define META_OCEAN_MEDIA_WIC_WIC_IMAGE_RECORDER_H
10
11
#include "
ocean/media/wic/WIC.h
"
12
#include "
ocean/media/wic/WICObject.h
"
13
14
#include "
ocean/media/ImageRecorder.h
"
15
16
namespace
Ocean
17
{
18
19
namespace
Media
20
{
21
22
namespace
WIC
23
{
24
25
/**
26
* This class implements an image recorder for WIC.
27
* This recorder can be used to save images to files.
28
* @ingroup mediawic
29
*/
30
class
OCEAN_MEDIA_WIC_EXPORT
WICImageRecorder
:
31
virtual
public
WICObject
,
32
virtual
public
ImageRecorder
33
{
34
friend
class
WICLibrary
;
35
36
public
:
37
38
/**
39
* Saves a given frame as file.
40
* @see ImageRecorder::saveImage().
41
*/
42
bool
saveImage
(
const
Frame
& frame,
const
std::string& filename)
override
;
43
44
/**
45
* Returns a list of possible frame encoders for this recorder.
46
* @see FrameRecorder::frameEncoders().
47
*/
48
Encoders
frameEncoders
()
const override
;
49
50
/**
51
* Locks the most recent frame and returns it so that the image data can be written to this frame.
52
* @see FrameRecorder::lockBufferToFill().
53
*/
54
bool
lockBufferToFill
(
Frame
& recorderFrame,
const
bool
respectFrameFrequency =
true
)
override
;
55
56
/**
57
* Unlocks the filled buffer.
58
* @see ILImageRecorder::unlockBufferToFill().
59
*/
60
void
unlockBufferToFill
()
override
;
61
62
protected
:
63
64
/**
65
* Creates a new image recorder object.
66
*/
67
WICImageRecorder
();
68
69
/**
70
* Destructs an image recorder object.
71
*/
72
virtual
~WICImageRecorder
();
73
74
protected
:
75
76
/// Image buffer if the image is not saved explicitly but by a buffer request.
77
Frame
recorderFrame_
;
78
};
79
80
}
81
82
}
83
84
}
85
86
#endif
// META_OCEAN_MEDIA_WIC_WIC_IMAGE_RECORDER_H
ImageRecorder.h
WIC.h
WICObject.h
Ocean::Frame
This class implements Ocean's image class.
Definition:
Frame.h:1792
Ocean::Media::ImageRecorder
This class is the base class for all image recorders.
Definition:
ImageRecorder.h:45
Ocean::Media::Recorder::Encoders
std::vector< std::string > Encoders
Definition of a vector holding encoder names.
Definition:
Recorder.h:80
Ocean::Media::WIC::WICImageRecorder
This class implements an image recorder for WIC.
Definition:
WICImageRecorder.h:33
Ocean::Media::WIC::WICImageRecorder::unlockBufferToFill
void unlockBufferToFill() override
Unlocks the filled buffer.
Ocean::Media::WIC::WICImageRecorder::~WICImageRecorder
virtual ~WICImageRecorder()
Destructs an image recorder object.
Ocean::Media::WIC::WICImageRecorder::WICImageRecorder
WICImageRecorder()
Creates a new image recorder object.
Ocean::Media::WIC::WICImageRecorder::lockBufferToFill
bool lockBufferToFill(Frame &recorderFrame, const bool respectFrameFrequency=true) override
Locks the most recent frame and returns it so that the image data can be written to this frame.
Ocean::Media::WIC::WICImageRecorder::frameEncoders
Encoders frameEncoders() const override
Returns a list of possible frame encoders for this recorder.
Ocean::Media::WIC::WICImageRecorder::saveImage
bool saveImage(const Frame &frame, const std::string &filename) override
Saves a given frame as file.
Ocean::Media::WIC::WICImageRecorder::recorderFrame_
Frame recorderFrame_
Image buffer if the image is not saved explicitly but by a buffer request.
Definition:
WICImageRecorder.h:77
Ocean::Media::WIC::WICLibrary
This class implements the WIC library.
Definition:
WICLibrary.h:32
Ocean::Media::WIC::WICObject
This class is the base class for all object inside this library.
Definition:
WICObject.h:31
Ocean
The namespace covering the entire Ocean framework.
Definition:
Accessor.h:15
impl
ocean
media
wic
WICImageRecorder.h
Generated on Wed Nov 13 2024 18:48:19 for Ocean by
1.9.1