Revert "update video streamtype"

This reverts commit d6b32edaa7d0cd1eb035e3404a12dee2359037ea.


Origin commit data
------------------
Branch: master
Commit: 84fe2aa10c
Author: max_10 <max_10@gmx.de>
Date: 2018-10-06 (Sat, 06 Oct 2018)



------------------
This commit was generated by Migit
This commit is contained in:
max_10
2018-10-06 19:58:35 +02:00
committed by Thilo Graf
parent c6a0133803
commit 526f19c302
2 changed files with 47 additions and 34 deletions

View File

@@ -140,6 +140,15 @@ static const char *vid_modes[] = {
"720p50" // VIDEO_STD_AUTO "720p50" // VIDEO_STD_AUTO
}; };
#define VIDEO_STREAMTYPE_MPEG2 0
#define VIDEO_STREAMTYPE_MPEG4_H264 1
#define VIDEO_STREAMTYPE_VC1 3
#define VIDEO_STREAMTYPE_MPEG4_Part2 4
#define VIDEO_STREAMTYPE_VC1_SM 5
#define VIDEO_STREAMTYPE_MPEG1 6
#define VIDEO_STREAMTYPE_H265_HEVC 7
#define VIDEO_STREAMTYPE_AVS 16
ssize_t write_all(int fd, const void *buf, size_t count) ssize_t write_all(int fd, const void *buf, size_t count)
{ {
int retval; int retval;
@@ -751,26 +760,39 @@ void cVideo::SetSyncMode(AVSYNC_TYPE mode)
int cVideo::SetStreamType(VIDEO_FORMAT type) int cVideo::SetStreamType(VIDEO_FORMAT type)
{ {
const char *VF[] = { static const char *VF[] = {
"VIDEO_STREAMTYPE_MPEG2", "VIDEO_FORMAT_MPEG2",
"VIDEO_STREAMTYPE_MPEG4_H264", "VIDEO_FORMAT_MPEG4",
"VIDEO_STREAMTYPE_MPEG4_H263", "VIDEO_FORMAT_VC1",
"VIDEO_STREAMTYPE_VC1", "VIDEO_FORMAT_JPEG",
"VIDEO_STREAMTYPE_MPEG4_Part2", "VIDEO_FORMAT_GIF",
"VIDEO_STREAMTYPE_VC1_SM", "VIDEO_FORMAT_PNG"
"VIDEO_STREAMTYPE_MPEG1",
"VIDEO_STREAMTYPE_DIVX311"
"VIDEO_STREAMTYPE_H265_HEVC",
"VIDEO_STREAMTYPE_AVS"
}; };
int t;
lt_debug("#%d: %s type=%s\n", devnum, __func__, VF[type]);
lt_info("%s - type=%s\n", __FUNCTION__, VF[type]); switch (type)
{
if (ioctl( fd, VIDEO_SET_STREAMTYPE, type) < 0) case VIDEO_FORMAT_MPEG4_H264:
perror("VIDEO_SET_STREAMTYPE"); t = VIDEO_STREAMTYPE_MPEG4_H264;
break;
StreamType = type; case VIDEO_FORMAT_MPEG4_H265:
t = VIDEO_STREAMTYPE_H265_HEVC;
break;
case VIDEO_FORMAT_AVS:
t = VIDEO_STREAMTYPE_AVS;
break;
case VIDEO_FORMAT_VC1:
t = VIDEO_STREAMTYPE_VC1;
break;
case VIDEO_FORMAT_MPEG2:
default:
t = VIDEO_STREAMTYPE_MPEG2;
break;
}
if (ioctl(fd, VIDEO_SET_STREAMTYPE, t) < 0)
lt_info("%s VIDEO_SET_STREAMTYPE(%d) failed: %m\n", __func__, t);
return 0; return 0;
} }

View File

@@ -35,23 +35,14 @@ typedef enum {
} COLOR_FORMAT; } COLOR_FORMAT;
typedef enum { typedef enum {
VIDEO_STREAMTYPE_UNKNOWN = -1, VIDEO_FORMAT_MPEG2 = 0,
VIDEO_STREAMTYPE_MPEG2 = 0, VIDEO_FORMAT_MPEG4_H264,
VIDEO_STREAMTYPE_MPEG4_H264 = 1, VIDEO_FORMAT_VC1,
VIDEO_STREAMTYPE_H263 = 2, VIDEO_FORMAT_JPEG,
VIDEO_STREAMTYPE_VC1 = 3, VIDEO_FORMAT_GIF,
VIDEO_STREAMTYPE_MPEG4_Part2 = 4, VIDEO_FORMAT_PNG,
VIDEO_STREAMTYPE_VC1_SM = 5, VIDEO_FORMAT_MPEG4_H265,
VIDEO_STREAMTYPE_MPEG1 = 6, VIDEO_FORMAT_AVS = 16
VIDEO_STREAMTYPE_MPEG4_H265 = 7,
VIDEO_STREAMTYPE_VB8 = 8,
VIDEO_STREAMTYPE_VB9 = 9,
VIDEO_STREAMTYPE_XVID = 10,
VIDEO_STREAMTYPE_DIVX311 = 13,
VIDEO_STREAMTYPE_DIVX4 = 14,
VIDEO_STREAMTYPE_DIVX5 = 15,
VIDEO_STREAMTYPE_VB6 = 18,
VIDEO_STREAMTYPE_SPARK = 21
} VIDEO_FORMAT; } VIDEO_FORMAT;
typedef enum { typedef enum {