MUAN
|
This file represents an ImageNode and ImageList interface. More...
Go to the source code of this file.
Classes | |
struct | ImgNode |
The ImageNode structure. More... | |
struct | ImgList |
The ImageList structure. More... | |
Typedefs | |
typedef struct ImgNode | ImgNode |
The ImageNode structure. | |
typedef struct ImgList | ImgList |
The ImageList structure. | |
Functions | |
void | setMessage (const char *m) |
ImgNode * | imgnode_alloc (Frame *f, int delay, int frame_duration) |
Creates a new ImageNode. | |
void | imgnode_dispose (ImgNode *i) |
Disposes an ImageNode. | |
ImgNode * | imgnode_copy (ImgNode *i) |
Copies an ImageNode. | |
ImgList * | imglist_alloc (int w, int h) |
Creates a new ImageList. | |
void | imglist_clear (ImgList *q) |
Clears an ImageList. | |
void | imglist_dispose (ImgList *q) |
Disposes an ImageList. | |
int | imglist_isempty (ImgList *q) |
Returns true if the ImageList is empty, false otherwise. | |
Frame * | imglist_peek_current_frame (ImgList *q) |
Gets the current image in the ImageList. | |
void | imglist_insert (ImgList *q, ImgNode *i) |
Inserts an ImageNode in the ImageList. | |
void | imglist_insert (ImgList *q, ImgList *c, bool invert) |
Merges two ImageList. | |
void | imglist_removeInRange (ImgList *q, int begin, int end) |
Removes the current ImageNode in the ImageList. | |
void | imglist_step (ImgList *q, int step) |
Forwards/Backwards the current ImageNode in the ImageList using step. | |
void | imglist_step_foward (ImgList *q) |
Forwards the current ImageNode in the ImageList. | |
void | imglist_step_backward (ImgList *q) |
Backwards the current ImageNode in the ImageList. | |
void | imglist_rew (ImgList *q) |
Rewinds an ImageList. | |
void | imglist_go_to_end (ImgList *q) |
Goes to the end of the ImageList. | |
void | imglist_update_frames (ImgList *q) |
Updates all the ImageNodes frame number, frame_pos and time_stamp in the ImageList. | |
void | imglist_go_to_frame (ImgList *q, int frameNumber) |
Shows a desired frame. | |
int | imglist_getTotalFrames (ImgList *q) |
Gets the total of frames in an ImageList. | |
int | imglist_getTotalRealFrames (ImgList *q) |
Calculate the total of real frames (frame*duration) in an ImageList. | |
void | imglist_setFrameDuration (ImgList *q, int begin, int end, int duration) |
Sets the current frame duration. | |
int | imglist_getCurrentFnum (ImgList *q) |
Get the current frame number. | |
void | insert_frame_from_imagefile (ImgList *imgl, char *fname) |
Inserts a frame from image file (RAS or JPG). | |
void | insert_frame_from_jpgfile (ImgList *imgl, char *fname) |
Inserts a frame from JPG image file. |
This file represents an ImageNode and ImageList interface.
ImgList* imglist_alloc | ( | int | w, |
int | h | ||
) |
Creates a new ImageList.
References ImgList::current, ImgList::head, ImgList::img_h, ImgList::img_w, ImgList::totFrames, and ImgList::totRealFrames.
Referenced by ImageViewer::initialize().
void imglist_clear | ( | ImgList * | q | ) |
Clears an ImageList.
q | the ImageList. |
References ImgList::current, ImgList::head, imgnode_dispose(), ImgNode::next, t, ImgList::totFrames, and ImgList::totRealFrames.
Referenced by ImageViewer::copy_frame(), and imglist_dispose().
void imglist_dispose | ( | ImgList * | q | ) |
int imglist_getCurrentFnum | ( | ImgList * | q | ) |
Get the current frame number.
References ImgList::current, and ImgNode::frame_number.
int imglist_getTotalFrames | ( | ImgList * | q | ) |
Gets the total of frames in an ImageList.
q | the ImageList |
References ImgList::totFrames.
int imglist_getTotalRealFrames | ( | ImgList * | q | ) |
Calculate the total of real frames (frame*duration) in an ImageList.
q | the ImageList |
References ImgList::totRealFrames.
void imglist_go_to_end | ( | ImgList * | q | ) |
Goes to the end of the ImageList.
q | the ImageList. |
References ImgList::current, and ImgNode::next.
void imglist_go_to_frame | ( | ImgList * | q, |
int | frameNumber | ||
) |
Shows a desired frame.
q | the image list. |
frameNumber | the desired frame number. |
References ImgList::current, ImgNode::frame_number, ImgList::head, and ImgNode::next.
Referenced by ImageViewer::copy_frame(), ImageViewer::goToFrame(), and ImageViewer::playInRange().
Inserts an ImageNode in the ImageList.
q | the ImageList. |
i | the ImageNode to be inserted. |
References ImgList::current, ImgNode::frame_duration, ImgList::head, imglist_update_frames(), ImgNode::next, ImgNode::prev, ImgList::totFrames, and ImgList::totRealFrames.
Referenced by insert_frame_from_jpgfile().
Merges two ImageList.
q | the main ImageList. |
c | the ImageList to be merged. |
References ImgList::current, ImgNode::frame_duration, ImgList::head, imglist_update_frames(), imgnode_copy(), ImgNode::next, ImgNode::prev, ImgList::totFrames, and ImgList::totRealFrames.
int imglist_isempty | ( | ImgList * | q | ) |
Returns true if the ImageList is empty, false otherwise.
q | the ImageList. |
References ImgList::head.
Frame* imglist_peek_current_frame | ( | ImgList * | q | ) |
Gets the current image in the ImageList.
q | the ImageList. |
References ImgList::current, ImgNode::frame, ImgList::img_h, and ImgList::img_w.
Referenced by ImageViewer::draw().
void imglist_removeInRange | ( | ImgList * | q, |
int | begin, | ||
int | end | ||
) |
Removes the current ImageNode in the ImageList.
q | the ImageList. |
References ImgList::current, ImgNode::delay, ImgNode::frame_duration, ImgNode::frame_number, ImgNode::frame_pos, ImgList::head, imgnode_dispose(), ImgNode::next, ImgNode::prev, ImgNode::time_stamp, ImgList::totFrames, and ImgList::totRealFrames.
void imglist_rew | ( | ImgList * | q | ) |
Rewinds an ImageList.
q | the ImageList. |
References ImgList::current, and ImgList::head.
Referenced by ImageViewer::play().
void imglist_setFrameDuration | ( | ImgList * | q, |
int | begin, | ||
int | end, | ||
int | duration | ||
) |
Sets the current frame duration.
begin | the begin of the range where to set the new duration. |
end | the end of the range where to set the new duration. |
duration | the new duration. |
q | the ImageList |
References ImgNode::delay, ImgNode::frame_duration, ImgNode::frame_number, ImgNode::frame_pos, ImgList::head, ImgNode::next, ImgNode::time_stamp, and ImgList::totRealFrames.
void imglist_step | ( | ImgList * | q, |
int | step | ||
) |
Forwards/Backwards the current ImageNode in the ImageList using step.
q | the ImageList. |
step | the number to increment/decrement current ImageNode position. |
References ImgList::current, ImgNode::next, and ImgNode::prev.
void imglist_step_backward | ( | ImgList * | q | ) |
Backwards the current ImageNode in the ImageList.
q | the ImageList. |
References ImgList::current, and ImgNode::prev.
void imglist_step_foward | ( | ImgList * | q | ) |
Forwards the current ImageNode in the ImageList.
q | the ImageList. |
References ImgList::current, and ImgNode::next.
Referenced by ImageViewer::play(), and ImageViewer::playInRange().
void imglist_update_frames | ( | ImgList * | q | ) |
Updates all the ImageNodes frame number, frame_pos and time_stamp in the ImageList.
q | the ImageList. |
References ImgNode::delay, ImgNode::frame_duration, ImgNode::frame_number, ImgNode::frame_pos, ImgList::head, ImgNode::next, and ImgNode::time_stamp.
Referenced by imglist_insert().
ImgNode* imgnode_alloc | ( | Frame * | f, |
int | delay, | ||
int | frame_duration | ||
) |
Creates a new ImageNode.
f | an ImageNode Frame attribute. |
delay | an ImageNode delay attribute. |
References ImgNode::delay, ImgNode::frame, ImgNode::frame_duration, ImgNode::frame_number, ImgNode::frame_pos, ImgNode::next, ImgNode::prev, and ImgNode::time_stamp.
Referenced by VideoEncoder::avffmpeg_read(), ImageViewer::draw(), imgnode_copy(), ImageViewer::insert_frame(), insert_frame_from_jpgfile(), and VideoEncoder::jpg_read().
Copies an ImageNode.
i | the ImageNode to be copied. |
References ImgNode::delay, ImgNode::frame, ImgNode::frame_duration, and imgnode_alloc().
Referenced by ImageViewer::copy_frame(), and imglist_insert().
void imgnode_dispose | ( | ImgNode * | i | ) |
Disposes an ImageNode.
i | the ImageNode to be deleted.. |
References ImgNode::frame.
Referenced by imglist_clear(), and imglist_removeInRange().
void insert_frame_from_imagefile | ( | ImgList * | imgl, |
char * | fname | ||
) |
Inserts a frame from image file (RAS or JPG).
imgl | imageList where the frame will be inserted. |
fname | image file name. |
References insert_frame_from_jpgfile(), and setMessage().
void insert_frame_from_jpgfile | ( | ImgList * | imgl, |
char * | fname | ||
) |
Inserts a frame from JPG image file.
imgl | imageList where the frame will be inserted. |
fname | image file name. |
References ImgList::img_h, ImgList::img_w, imglist_insert(), imgnode_alloc(), and read_JPEG_file().
Referenced by insert_frame_from_imagefile().
void setMessage | ( | const char * | m | ) |
Referenced by ImageViewer::draw(), and insert_frame_from_imagefile().