Skip to content

Commit

Permalink
Tidy up netcam_rtsp.h
Browse files Browse the repository at this point in the history
- place lines not affected by HAVE_FFMPEG outside the ifdef
- add include guards (for consistency with other .h files)
  • Loading branch information
jogu committed Oct 12, 2016
1 parent 80e78f5 commit 6f76d55
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions netcam_rtsp.h
@@ -1,3 +1,6 @@
#ifndef _INCLUDE_NETCAM_RTSP_H
#define _INCLUDE_NETCAM_RTSP_H

#include "netcam.h"

#ifdef HAVE_FFMPEG
Expand Down Expand Up @@ -25,27 +28,20 @@ struct rtsp_context {
struct SwsContext* swsctx;
};

struct rtsp_context *rtsp_new_context(void);
void netcam_shutdown_rtsp(netcam_context_ptr netcam);
int netcam_connect_rtsp(netcam_context_ptr netcam);
int netcam_read_rtsp_image(netcam_context_ptr netcam);
int netcam_setup_rtsp(netcam_context_ptr netcam, struct url_t *url);
int netcam_next_rtsp(unsigned char *image , netcam_context_ptr netcam);

#else /* Do not have FFmpeg */

struct rtsp_context {
int* format_context;
enum RTSP_STATUS status;
};

#endif /* end HAVE_FFMPEG */

struct rtsp_context *rtsp_new_context(void);
void netcam_shutdown_rtsp(netcam_context_ptr netcam);
int netcam_connect_rtsp(netcam_context_ptr netcam);
int netcam_read_rtsp_image(netcam_context_ptr netcam);
int netcam_setup_rtsp(netcam_context_ptr netcam, struct url_t *url);
int netcam_next_rtsp(unsigned char *image , netcam_context_ptr netcam);

#endif /* end HAVE_FFMPEG */


#endif /* _INCLUDE_NETCAM_RTSP_H */

0 comments on commit 6f76d55

Please sign in to comment.