Welcome to mirror list, hosted at ThFree Co, Russian Federation.

LAVFVideoHelper.h « Demuxers « demuxer - github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b880f7b3aed4d64c260d01d2ed2254ea9cd2fe09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
 *      Copyright (C) 2010-2012 Hendrik Leppkes
 *      http://www.1f0.de
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 *  Contributions by Ti-BEN from the XBMC DSPlayer Project, also under GPLv2
 */

#pragma once

#include "dvdmedia.h"

const AVCodecTag mp_bmp_tags[] = {
  { AV_CODEC_ID_AMV,               MKTAG('A', 'M', 'V', 'V')},
  { AV_CODEC_ID_BETHSOFTVID,       MKTAG('B', 'E', 'T', 'H')},
  { AV_CODEC_ID_BFI,               MKTAG('B', 'F', 'I', 'V')},
  { AV_CODEC_ID_C93,               MKTAG('C', '9', '3', 'V')},
  { AV_CODEC_ID_CDGRAPHICS,        MKTAG('C', 'D', 'G', 'R')},
  { AV_CODEC_ID_DNXHD,             MKTAG('A', 'V', 'd', 'n')},
  { AV_CODEC_ID_DSICINVIDEO,       MKTAG('D', 'C', 'I', 'V')},
  { AV_CODEC_ID_DXA,               MKTAG('D', 'X', 'A', '1')},
  { AV_CODEC_ID_FLIC,              MKTAG('F', 'L', 'I', 'C')},
  { AV_CODEC_ID_IDCIN,             MKTAG('I', 'D', 'C', 'I')},
  { AV_CODEC_ID_INTERPLAY_VIDEO,   MKTAG('I', 'N', 'P', 'V')},
  { AV_CODEC_ID_MDEC,              MKTAG('M', 'D', 'E', 'C')},
  { AV_CODEC_ID_MOTIONPIXELS,      MKTAG('M', 'V', 'I', '1')},
  { AV_CODEC_ID_NUV,               MKTAG('N', 'U', 'V', '1')},
  { AV_CODEC_ID_RL2,               MKTAG('R', 'L', '2', 'V')},
  { AV_CODEC_ID_ROQ,               MKTAG('R', 'o', 'Q', 'V')},
  { AV_CODEC_ID_RV10,              MKTAG('R', 'V', '1', '0')},
  { AV_CODEC_ID_RV20,              MKTAG('R', 'V', '2', '0')},
  { AV_CODEC_ID_RV30,              MKTAG('R', 'V', '3', '0')},
  { AV_CODEC_ID_RV40,              MKTAG('R', 'V', '4', '0')},
  { AV_CODEC_ID_TGV,               MKTAG('f', 'V', 'G', 'T')},
  { AV_CODEC_ID_THP,               MKTAG('T', 'H', 'P', 'V')},
  { AV_CODEC_ID_TIERTEXSEQVIDEO,   MKTAG('T', 'S', 'E', 'Q')},
  { AV_CODEC_ID_TXD,               MKTAG('T', 'X', 'D', 'V')},
  { AV_CODEC_ID_VP6A,              MKTAG('V', 'P', '6', 'A')},
  { AV_CODEC_ID_VMDVIDEO,          MKTAG('V', 'M', 'D', 'V')},
  { AV_CODEC_ID_WS_VQA,            MKTAG('V', 'Q', 'A', 'V')},
  { AV_CODEC_ID_XAN_WC3,           MKTAG('W', 'C', '3', 'V')},
  { AV_CODEC_ID_NONE,              0}
};
const struct AVCodecTag * const mp_bmp_taglists[] = { avformat_get_riff_video_tags(), mp_bmp_tags, 0};

class CLAVFVideoHelper
{
public:
  CLAVFVideoHelper() {};
  CMediaType initVideoType(AVCodecID codecId, unsigned int &codecTag, std::string container);

  VIDEOINFOHEADER *CreateVIH(const AVStream *avstream, ULONG *size, std::string container);
  VIDEOINFOHEADER2 *CreateVIH2(const AVStream *avstream, ULONG *size, std::string container);
  MPEG1VIDEOINFO *CreateMPEG1VI(const AVStream *avstream, ULONG *size, std::string container);
  MPEG2VIDEOINFO *CreateMPEG2VI(const AVStream *avstream, ULONG *size, std::string container, BOOL bAnnexB = FALSE);
};

extern CLAVFVideoHelper g_VideoHelper;