/*****************************************************************************
* ts.c: Transport Stream input module for VLC.
*****************************************************************************
* Copyright (C) 2004-2005 the VideoLAN team
* $Id: e93ffa9f7bf03963b48a999684f8ab77f97cd6da $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Jean-Paul Saman <jpsaman #_at_# m2x.nl>
*
* 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.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <ctype.h>
#include <vlc_access.h> /* DVB-specific things */
#include <vlc_demux.h>
#include <vlc_meta.h>
#include <vlc_epg.h>
#include <vlc_iso_lang.h>
#include <vlc_network.h>
#include <vlc_charset.h>
#include "../mux/mpeg/csa.h"
/* Include dvbpsi headers */
#ifdef HAVE_DVBPSI_DR_H
# include <dvbpsi/dvbpsi.h>
# include <dvbpsi/demux.h>
# include <dvbpsi/descriptor.h>
# include <dvbpsi/pat.h>
# include <dvbpsi/pmt.h>
# include <dvbpsi/sdt.h>
# include <dvbpsi/dr.h>
# include <dvbpsi/psi.h>
#else
# include "dvbpsi.h"
# include "demux.h"
# include "descriptor.h"
# include "tables/pat.h"
# include "tables/pmt.h"
# include "tables/sdt.h"
# include "descriptors/dr.h"
# include "psi.h"
#endif
/* EIT support */
#ifdef _DVBPSI_DR_4D_H_
# define TS_USE_DVB_SI 1
# ifdef HAVE_DVBPSI_DR_H
# include <dvbpsi/eit.h>
# else
# include "tables/eit.h"
# endif
#endif
#ifdef HAVE_TIME_H
# include <time.h>
#endif
#undef TS_DEBUG
/* TODO:
* - XXX: do not mark options message to be translated, they are too osbcure for now ...
* - test it
* - ...
*/
/*****************************************************************************
* Callback prototypes
*****************************************************************************/
static int ChangeKeyCallback ( vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void * );
/*****************************************************************************
* Module descriptor
*****************************************************************************/
static int Open ( vlc_object_t * );
static void Close ( vlc_object_t * );
/* TODO
* - Rename "extra pmt" to "user pmt"
* - Update extra pmt description
* pmt_pid[:pmt_number][=pid_description[,pid_description]]
* where pid_description could take 3 forms:
* 1. pid:pcr (to force the pcr pid)
* 2. pid:stream_type
* 3. pid:type=fourcc where type=(video|audio|spu)
*/
#define PMT_TEXT N_("Extra PMT")
#define PMT_LONGTEXT N_( \
"Allows a user to specify an extra pmt (pmt_pid=pid:stream_type[,...])." )
#define PID_TEXT N_("Set id of ES to PID")
#define PID_LONGTEXT N_("Set the internal ID of each elementary stream" \
" handled by VLC to the same value as the PID in" \
" the TS stream, instead of 1, 2, 3, etc. Useful to" \
" do \'#duplicate{..., select=\"es=<pid>\"}\'.")
#define TSOUT_TEXT N_("Fast udp streaming")
#define TSOUT_LONGTEXT N_( \
"Sends TS to specific ip:port by udp (you must know what you are doing).")
#define MTUOUT_TEXT N_("MTU for out mode")
#define MTUOUT_LONGTEXT N_("MTU for out mode.")
#define CSA_TEXT N_("CSA ck")
#define CSA_LONGTEXT N_("Control word for the CSA encryption algorithm")
#define CSA2_TEXT N_("Second CSA Key")
#define CSA2_LONGTEXT N_("The even CSA encryption key. This must be a " \
"16 char string (8 hexadecimal bytes).")
#define SILENT_TEXT N_("Silent mode")
#define SILENT_LONGTEXT N_("Do not complain on encrypted PES.")
#define CAPMT_SYSID_TEXT N_("CAPMT System ID")
#define CAPMT_SYSID_LONGTEXT N_("Only forward descriptors from this SysID to the CAM.")
#define CPKT_TEXT N_("Packet size in bytes to decrypt")
#define CPKT_LONGTEXT N_("Specify the size of the TS packet to decrypt. " \
"The decryption routines subtract the TS-header from the value before " \
"decrypting. " )
#define TSDUMP_TEXT N_("Filename of dump")
#define TSDUMP_LONGTEXT N_("Specify a filename where to dump the TS in.")
#define APPEND_TEXT N_("Append")
#define APPEND_LONGTEXT N_( \
"If the file exists and this option is selected, the existing file " \
"will not be overwritten." )
#define DUMPSIZE_TEXT N_("Dump buffer size")
#define DUMPSIZE_LONGTEXT N_( \
"Tweak the buffer size for reading and writing an integer number of packets." \
"Specify the size of the buffer here and not the number of packets." )
vlc_module_begin();
set_description( N_("MPEG Transport Stream demuxer") );
set_shortname ( "MPEG-TS" );
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_DEMUX );
add_string( "ts-extra-pmt", NULL, NULL, PMT_TEXT, PMT_LONGTEXT, true );
add_bool( "ts-es-id-pid", 1, NULL, PID_TEXT, PID_LONGTEXT, true );
add_string( "ts-out", NULL, NULL, TSOUT_TEXT, TSOUT_LONGTEXT, true );
add_integer( "ts-out-mtu", 1400, NULL, MTUOUT_TEXT,
MTUOUT_LONGTEXT, true );
add_string( "ts-csa-ck", NULL, NULL, CSA_TEXT, CSA_LONGTEXT, true );
add_string( "ts-csa2-ck", NULL, NULL, CSA_TEXT, CSA_LONGTEXT, true );
add_integer( "ts-csa-pkt", 188, NULL, CPKT_TEXT, CPKT_LONGTEXT, true );
add_bool( "ts-silent", 0, NULL, SILENT_TEXT, SILENT_LONGTEXT, true );
add_file( "ts-dump-file", NULL, NULL, TSDUMP_TEXT, TSDUMP_LONGTEXT, false );
change_unsafe();
add_bool( "ts-dump-append", 0, NULL, APPEND_TEXT, APPEND_LONGTEXT, false );
add_integer( "ts-dump-size", 16384, NULL, DUMPSIZE_TEXT,
DUMPSIZE_LONGTEXT, true );
set_capability( "demux", 10 );
set_callbacks( Open, Close );
add_shortcut( "ts" );
vlc_module_end();
/*****************************************************************************
* Local prototypes
*****************************************************************************/
typedef struct
{
uint8_t i_objectTypeIndication;
uint8_t i_streamType;
bool b_upStream;
uint32_t i_bufferSizeDB;
uint32_t i_maxBitrate;
uint32_t i_avgBitrate;
int i_decoder_specific_info_len;
uint8_t *p_decoder_specific_info;
} decoder_config_descriptor_t;
typedef struct
{
bool b_useAccessUnitStartFlag;
bool b_useAccessUnitEndFlag;
bool b_useRandomAccessPointFlag;
bool b_useRandomAccessUnitsOnlyFlag;
bool b_usePaddingFlag;
bool b_useTimeStampsFlags;
bool b_useIdleFlag;
bool b_durationFlag;
uint32_t i_timeStampResolution;
uint32_t i_OCRResolution;
uint8_t i_timeStampLength;
uint8_t i_OCRLength;
uint8_t i_AU_Length;
uint8_t i_instantBitrateLength;
uint8_t i_degra
没有合适的资源?快使用搜索试试~ 我知道了~
vlc-0.9.3.tar.gz
需积分: 9 24 下载量 6 浏览量
2009-05-26
15:35:24
上传
评论
收藏 21.5MB GZ 举报
温馨提示
共2624个文件
c:626个
h:353个
png:351个
vlc-0.9.3.tar.gz linux下vlc 0.9.3源代码
资源推荐
资源详情
资源评论
收起资源包目录
vlc-0.9.3.tar.gz (2624个子文件)
vlc.1 2KB
vlc-config.1 2KB
ABOUT-NLS 1B
configure.ac 192KB
.access 12B
Makefile.am 48KB
Makefile.am 21KB
Makefile.am 17KB
Makefile.am 13KB
Makefile.am 12KB
Makefile.am 10KB
Makefile.am 10KB
Makefile.am 8KB
Makefile.am 7KB
Modules.am 7KB
Makefile.am 7KB
Makefile.am 6KB
Makefile.am 6KB
Modules.am 6KB
Makefile.am 5KB
Makefile.am 5KB
Makefile.am 4KB
Makefile.am 4KB
Makefile.am 3KB
Makefile.am 3KB
Makefile.am 3KB
Makefile.am 3KB
Makefile.am 3KB
Makefile.am 3KB
Makefile.am 3KB
Makefile.am 3KB
Makefile.am 3KB
Makefile.am 3KB
Makefile.am 3KB
Makefile.am 2KB
Makefile.am 2KB
Makefile.am 2KB
Makefile.am 2KB
Makefile.am 2KB
Modules.am 2KB
Makefile.am 2KB
Makefile.am 2KB
Makefile.am 1KB
Makefile.am 1KB
Modules.am 1KB
Modules.am 1KB
Modules.am 1KB
Makefile.am 1KB
Makefile.am 1KB
Makefile.am 1KB
Makefile.am 1KB
Modules.am 1KB
Modules.am 1KB
Modules.am 1KB
Makefile.am 964B
common.am 964B
Modules.am 913B
Makefile.am 909B
Makefile.am 873B
Makefile.am 868B
Makefile.am 861B
Makefile.am 840B
Makefile.am 817B
Makefile.am 792B
Makefile.am 785B
Makefile.am 785B
Makefile.am 785B
Makefile.am 771B
Makefile.am 757B
Makefile.am 757B
Makefile.am 755B
Modules.am 754B
Makefile.am 753B
Makefile.am 749B
Makefile.am 746B
Makefile.am 745B
Makefile.am 745B
Makefile.am 741B
Makefile.am 738B
Makefile.am 738B
Makefile.am 733B
Makefile.am 733B
Makefile.am 733B
Makefile.am 732B
Makefile.am 729B
Makefile.am 729B
Makefile.am 725B
Makefile.am 725B
Makefile.am 721B
Makefile.am 721B
Makefile.am 713B
Makefile.am 709B
Makefile.am 709B
Makefile.am 709B
Makefile.am 705B
Makefile.am 705B
Makefile.am 705B
Makefile.am 705B
Makefile.am 697B
Makefile.am 697B
共 2624 条
- 1
- 2
- 3
- 4
- 5
- 6
- 27
资源评论
morre
- 粉丝: 187
- 资源: 2337
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功