VideoVis
0.9
Generates a volume visualisation of a video
|
This class loads video files and save them into a 3D texture. More...
#include <VideoFrameToTextureLoader.h>
Public Member Functions | |
CVideoFrameToTextureLoader () | |
This is the default constructor. More... | |
CVideoFrameToTextureLoader (PWSTR filePath) | |
Constructor to load a file. More... | |
~CVideoFrameToTextureLoader (void) | |
Destructor. More... | |
VFLResult | loadAllFramesIntoTexture () |
Loads all video frames of the opend video file and transfers it into the bound texture. More... | |
VFLResult | loadAllFramesIntoTexture (int offset, int distanceBetween) |
Loads all video frames with offset and distance between and transfers it into the bound texture. More... | |
VFLResult | loadAllFramesIntoTexture (int offset, int distanceBetween, int lastFrame) |
Loads all video frames with offset, distance between and sets a last frame and transfers it into the bound texture. More... | |
VFLResult | transferVideoBufferToTexture () |
Transfers the video buffer byte array into a previously bound texture. More... | |
Public Member Functions inherited from CVideoFrameLoader | |
CVideoFrameLoader (void) | |
This is the default constructor. More... | |
CVideoFrameLoader (PWSTR filePath) | |
Constructor to load a file. More... | |
~CVideoFrameLoader (void) | |
Destructor. More... | |
VFLResult | setVideoPath (PWSTR filePath) |
Opens a new videofile. More... | |
VFLResult | setVideoURL (PWSTR fileURL) |
Opens a new videofile. More... | |
VFLResult | loadAllFramesIntoBuffer () |
Loads all video frames of the opend video file. More... | |
VFLResult | loadAllFramesIntoBuffer (int offset, int distanceBetween) |
Loads all video frames with offset and distance between. More... | |
VFLResult | loadAllFramesIntoBuffer (int offset, int distanceBetween, int lastFrame) |
Loads all video frames with offset, distance between and sets a last frame. More... | |
VFLResult | addNextFrameToBuffer () |
Adds the next frame at the current video file position. More... | |
VFLResult | addNextFrameToBuffer (int distanceFromLast) |
Adds the next frame at an offset from the current video file position. More... | |
VFLResult | getVideoResolution (int *width, int *height) |
Returns the resolution of the current loaded video file. More... | |
VFLResult | getVideoBuffer (PBYTE *videoArray) |
Returns the BYTE-Array in which the video data is stored. More... | |
VFLResult | getBufferFrameCount (int *frameCount) |
Returns the number of fames that have been saved to the byte array. More... | |
void | reset () |
Resets the "play head" to the starting position. More... | |
HRESULT | setPosition (const LONGLONG &hnsPosition) |
Sets the position of the "play head" to a new time code. More... | |
Protected Member Functions | |
virtual VFLResult | resetProperties () |
Completly resets the object. More... | |
Protected Member Functions inherited from CVideoFrameLoader | |
void | copyVideoListToVideoArray () |
Copies the video data from the internal storage into the video array. More... | |
Protected Attributes | |
PFNGLTEXIMAGE3DPROC | glTexImage3D |
Protected Attributes inherited from CVideoFrameLoader | |
PBYTE | p_videoArray |
This class loads video files and save them into a 3D texture.
This class can load video files into a BYTE-Array and transfer this array into a 3D texture. It is derived from the CVideoFrameLoader class. It uses the windows media foundation framework and should work under Windows 7, 8 and later. It can load all frames of a video file, all frames after an offset or single frames with a given distance to the last loaded frame.
Definition at line 16 of file VideoFrameToTextureLoader.h.
CVideoFrameToTextureLoader::CVideoFrameToTextureLoader | ( | ) |
This is the default constructor.
It simple initialises the object. To open a video file you can use the other constructor, the setVideoPath(PWSTR filePath) method or the setVideoURL(PWSTR fileURL) method.
Definition at line 3 of file VideoFrameToTextureLoader.cpp.
CVideoFrameToTextureLoader::CVideoFrameToTextureLoader | ( | PWSTR | filePath) |
Constructor to load a file.
Initialises the object and loads the specified file.
filePath | a pointer to a WSTR which contains the path to the video file in windows syntax |
Definition at line 8 of file VideoFrameToTextureLoader.cpp.
CVideoFrameToTextureLoader::~CVideoFrameToTextureLoader | ( | void | ) |
Destructor.
Cleans up all reserved memory.
Definition at line 13 of file VideoFrameToTextureLoader.cpp.
VFLResult CVideoFrameToTextureLoader::loadAllFramesIntoTexture | ( | ) |
Loads all video frames of the opend video file and transfers it into the bound texture.
The frames will be saved into a BYTE buffer. The buffer is then transfered into a 3D texture. You have to bind an apropriate texture before calling this method.
Definition at line 18 of file VideoFrameToTextureLoader.cpp.
VFLResult CVideoFrameToTextureLoader::loadAllFramesIntoTexture | ( | int | offset, |
int | distanceBetween | ||
) |
Loads all video frames with offset and distance between and transfers it into the bound texture.
The frames will be saved into a BYTE buffer. The buffer is then transfered into a 3D texture. You have to bind an apropriate texture before calling this method.
offset | an integer value starting by 0 that specifies the offset of frames from the start of the video |
distanceBetween | an integer value the specifies the number of frames between to frames, that are left out |
Definition at line 23 of file VideoFrameToTextureLoader.cpp.
VFLResult CVideoFrameToTextureLoader::loadAllFramesIntoTexture | ( | int | offset, |
int | distanceBetween, | ||
int | lastFrame | ||
) |
Loads all video frames with offset, distance between and sets a last frame and transfers it into the bound texture.
The frames will be saved into a BYTE buffer. The buffer is then transfered into a 3D texture. You have to bind an apropriate texture before calling this method.
offset | an integer value starting by 0 that specifies the offset of frames from the start of the video |
distanceBetween | an integer value the specifies the number of frames between to frames, that are left out |
lastFrame | an inteber value specifying the last frame that should be read; if 0 the method reads till the last frame of the video file |
Definition at line 28 of file VideoFrameToTextureLoader.cpp.
|
protectedvirtual |
Completly resets the object.
This virtual method is called to reset the reset all neccessary member properties bevor a new video file is loaded. Overwrite this method to reset your own properties before a new video file is loaded, if you derive from this class.
Reimplemented from CVideoFrameLoader.
Definition at line 79 of file VideoFrameToTextureLoader.cpp.
VFLResult CVideoFrameToTextureLoader::transferVideoBufferToTexture | ( | ) |
Transfers the video buffer byte array into a previously bound texture.
The video array is transfered into a 3D texture. You have to bind an apropriate texture before calling this method.
Definition at line 61 of file VideoFrameToTextureLoader.cpp.
|
protected |
Definition at line 94 of file VideoFrameToTextureLoader.h.