# samples/02_video_dec_cuda/videodec_main.cpp File Reference

`#include "NvUtils.h"`
`#include "NvCudaProc.h"`
`#include "nvbuf_utils.h"`
`#include <errno.h>`
`#include <fstream>`
`#include <iostream>`
`#include <string>`
`#include <linux/videodev2.h>`
`#include <malloc.h>`
`#include <pthread.h>`
`#include <string.h>`
`#include <unistd.h>`
`#include <stdlib.h>`
`#include <sys/prctl.h>`
`#include "videodec.h"`
`#include "nvosd.h"`

Go to the source code of this file.

## Defines

#define | TEST_ERROR(cond, str, label)
#define | CHUNK_SIZE 4000000
#define | MIN(a, b) (((a) < (b)) ? (a) : (b))
#define | IS_NAL_UNIT_START(buffer_ptr)
#define | IS_NAL_UNIT_START1(buffer_ptr)
#define | BORDER_WIDTH 5

## Functions

int | main (int argc, char *argv[])

## Define Documentation

#define BORDER_WIDTH 5

Definition at line 61 of file videodec_main.cpp.

#define CHUNK_SIZE 4000000

Definition at line 52 of file videodec_main.cpp.

#define IS_NAL_UNIT_START | ( | buffer_ptr |  | ) |

Value:

    (!buffer_ptr[0] && !buffer_ptr[1] && \
            !buffer_ptr[2] && (buffer_ptr[3] == 1))

Definition at line 55 of file videodec_main.cpp.

#define IS_NAL_UNIT_START1 | ( | buffer_ptr |  | ) |

Value:

    (!buffer_ptr[0] && !buffer_ptr[1] && \
            (buffer_ptr[2] == 1))

Definition at line 58 of file videodec_main.cpp.

#define MIN | ( | a,
|  | b |  | ) | (((a) < (b)) ? (a) : (b))

Definition at line 53 of file videodec_main.cpp.

#define TEST_ERROR | ( | cond,
|  | str,
|  | label |  | ) |

Value:

    if(cond) { \
                                            cerr << str << endl; \
                                            error = 1; \
                                            goto label; }

Definition at line 47 of file videodec_main.cpp.

## Function Documentation

int main | ( | int | argc,
|  | char * | argv[] |
| ) |  |  |

Definition at line 763 of file videodec_main.cpp.