Streaming

#navi(contents-page-name): No such page: Vweb

CONTENTS


REFERENCES


HEC

Problem

HEC wrote:

MPEG-2 TS

TS
Transport Stream
DSM-CC
Digital Storage Media Command and Control

疑惑のUDP送信シーン

udp_send_data( (char*)p_buf, read_size, p_network_info );

read_sizeはどうやって決められているかというと

chip_interface->readData( (RWDeviceOption)p_param->dev_opt,
                          (PVOID)p_buf,
                          p_param->TransferSize,
                          read_size,
                          p_param->lpOverlapIo );

ところでp_bufの大きさは

PVOID p_buf = malloc(p_param->TransferSize);

TransferSizeは

capture_param.TransferSize  = xferSize;

xferSizeは

 xferSize = computeTransferSize( cfg_parser.getBitRate(),
                                 cfg_parser.getStreamType(),
                                 cfg_parser.getSignalType(),
                                 cfg_parser.getMPEGType(),
                                 cfg_parser.getControlMode(),
                                (cfg_parser.getFirmwareType() == G7XX_CODEC) );

computeTransferSizeでTSのときは

// cap this at 66176 bytes (multiple of 2*188)
xfer_size = MIN(xfer_size, 66176);

つまり最大で2パケット分の倍数にしてある。

stoneでudpを中継

VW2010 Streaming実験

リファレンスマニュアルからの覚書

net_send/net_recv

Vweb SDK付属のnet_send/net_recvを修正し,以下のようなことができるようになりました。

  1. NTSC信号を入力
  2. MPEG-2TSにハードウェアエンコード
  3. UDP通信
  4. ハードウェアデコード
  5. NTSC/VGA信号を出力

Hardware

+----------------+           +--------------+           +-----+
+ Vweb on x86 PC |---<UDP>---| Vweb on WPAR |---<VGA>---| CRT |
+----------------+           +--------------+           +-----+
        |                           |
      <NTSC>                      <NTSC>
        |                           |
     +-----+                     +--+--+
     | VCR |                     | TV  +
     +-----+                     +-----+

Software

net_send on x86

net_send option_files/enc_mp2ts_ntsc_01m.ini do_network=true hostname=192.168.100.10 \\
  video_input_device=0xc40242

net_recv on WPAR

reset the chipの後に以下の3行を挿入。vw2002モードで動くようにする。

   UINT32 size = 0;
   printf("=> Enable VW2002 MODE\n");
   chip_interface->sendCommand(VW_IOCTL_DECODER_ONLY, NULL, size, NULL);
net_recv option_files/dec_mp2ts_ntsc.ini do_network=true hostname=192.168.100.7

encoder/decoder

encoder.exe option_files\enc_mp2ts_ntsc_03m.ini foo.mpg video_input_device=0xc40242
decoder.exe option_files\dec_mp2ts_ntsc.ini foo.mpg -vw2002

net_send/net_recv on x86

VW2010ひとつだけでnet_send/net_recvを動かす方法。

net_send option_files/enc_mp2ts_ntsc_01m.ini do_network=true hostname=127.0.0.1 \\
  video_input_device=0xc40242
net_recv option_files/dec_mp2ts_ntsc.ini -save hoge.mpg do_network=true hostname=127.0.0.1

net_recvで-saveオプションを用いると,ハードウェアデコードが無効化され, 単に受け取ったストリームをファイルに書き込むようになる。

書き込まれたファイルは(実行属性を与えて)decoderで再生することができる。

option_files

VWeb謎のコツ


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS