fplayer
C99 Falcon Sequence (fseq) file player for Light-O-Rama hardware (like xLights)
Loading...
Searching...
No Matches
fd.c File Reference

Frame data block list implementation. More...

#include "fd.h"
#include <assert.h>
#include <stdlib.h>
#include "std2/errcode.h"
Include dependency graph for fd.c:

Functions

void FD_free (struct fd_list_s *list)
 Frees all entry nodes in the list, but does not free the list itself.
 
struct fd_node_sFD_shift (struct fd_list_s *list)
 Returns the first node in the list and removes it for consumption by the caller. The caller is responsible for freeing the returned node.
 
int FD_append (struct fd_list_s *list, uint8_t *frame)
 Appends a new frame data block to the end of the list. The frame data provided is not copied, so the caller is responsible for ensuring the memory remains valid until the frame data block is freed.
 

Detailed Description

Frame data block list implementation.

Function Documentation

◆ FD_append()

int FD_append ( struct fd_list_s * list,
uint8_t * frame )

Appends a new frame data block to the end of the list. The frame data provided is not copied, so the caller is responsible for ensuring the memory remains valid until the frame data block is freed.

Parameters
listpointer to the list structure, must be non-NULL and zero initialized
frameframe data to append
Returns
0 on success, a negative error code on failure
Here is the caller graph for this function:

◆ FD_free()

void FD_free ( struct fd_list_s * list)

Frees all entry nodes in the list, but does not free the list itself.

Parameters
listpointer to the list structure to free
Here is the caller graph for this function:

◆ FD_shift()

struct fd_node_s * FD_shift ( struct fd_list_s * list)

Returns the first node in the list and removes it for consumption by the caller. The caller is responsible for freeing the returned node.

Parameters
listpointer to the list structure, must be non-NULL and zero initialized
Returns
the first node in the list, or NULL if the list is empty
Here is the caller graph for this function: