![]() |
MediaX v1.0.0rc7 [7e6cb74]
Video streaming for military vehicles
|
A simple video transmitter example. More...
#include <byteswap.h>
#include <gflags/gflags.h>
#include <limits.h>
#include <netdb.h>
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
#include <array>
#include <climits>
#include <csignal>
#include <iostream>
#include <memory>
#include <ostream>
#include <vector>
#include "example.h"
#include "example_helpers.h"
#include "mediax_version.h"
#include "pngget.h"
#include "rtp/rtp.h"
#include "sap/sap_announcer.h"
#include "v4l2/v4l2_source.h"
Functions | |
DEFINE_string (ipaddr, kIpAddressDefault, "the IP address of the transmit stream") | |
DEFINE_uint32 (port, kPortDefault, "the port to use for the transmit stream") | |
DEFINE_uint32 (height, kHeightDefault, "the height of the image") | |
DEFINE_uint32 (width, kWidthDefault, "the width of the image") | |
DEFINE_uint32 (framerate, 25, "the image framerate") | |
DEFINE_uint32 (source, 2, "The video source (0-10)\n\t" "0 - Use a PNG file (see -filename)\n\t" "1 - v4l2src\n\t" "2 - EBU Colour bars \n\t" "3 - Greyscale bars\n\t" "4 - Scaled RGB values\n\t" "5 - Chequered test card\n\t" "6 - Solid white\n\t" "7 - Solid black\n\t" "8 - Solid red\n\t" "9 - Solid green\n\t" "10 - Solid blue\n\t" "11 - White noise\n\t" "12 - Colour bars \n\t") | |
DEFINE_string (filename, "testcard.png", "the PNG file to use as the source of the video stream (only with -source 0)") | |
DEFINE_string (device, "/dev/video0", "the V4L2 device source (only with -source 1)") | |
DEFINE_string (session_name, "TestVideo1", "the SAP/SDP session name") | |
DEFINE_uint32 (mode, 1, "The video mode (0-4)\n\t" "0 - Uncompressed RGB\n\t" "1 - Uncompressed YUV\n\t" "2 - Mono16\n\t" "3 - Mono8\n\t") | |
DEFINE_uint32 (num_frames, 0, "The number of frames to send") | |
DEFINE_bool (verbose, false, "For verbose output") | |
void | signalHandler (int signum) |
The signal handler. | |
int | main (int argc, char **argv) |
The main entry point. | |
A simple video transmitter example.
int main | ( | int | argc, |
char ** | argv | ||
) |
The main entry point.
argc | the argument count |
argv | the argument values |
Make it RGB
void signalHandler | ( | int | signum | ) |
The signal handler.
signum | the signal number |