亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? mmread.m

?? mmread reads virtually any media file. If Windows Media Play can play it, so should mmread. It uses
?? M
字號(hào):
function [video, audio] = mmread(filename, frames, time, disableVideo, disableAudio)
% function [video, audio] = mmread(filename, frames, time, disableVideo, disableAudio)
% mmread reads virtually any media file.  If Windows Media Play can play
% it, so should mmread.  It uses the Window's DirectX infrastructure to
% render the media, so other OSs are out of luck.
%
% INPUT
% filename      input file to read (mpg, avi, wmv, asf, wav, mp3, gif, jpg, ...)
% frames        specifies which video frames to capture, default [] for all or 
%               to specify time
% time          [startTime stopTime], default [] for all
% disableVideo  disables ALL video capturing, to save memory or time
% disableAudio  disables ALL audio capturing, to save memory or time
%
% OUTPUT
% video is a struct with the following fields:
%   width           width of the video frames
%   height          height of the video frames
%   rate            the frame rate of the video, if it can't be determined
%                   it will be 1.
%   nrFramesTotal   the total number of frames in the movie regardless of
%                   how many were captured.  Unfortunately, this can not
%                   always be determined.  If it is negative then it
%                   is an estimate based upon the duration and rate
%                   (normally accurate to within .1%).   It can be 0, 
%                   in which case it could not be determined at all.  If it
%                   is a possitive number then it should always be accurate.
%   frames          a struct array with the following fields:
%       cdata       [height X width X 3] uint8 matricies
%       colormap    always empty
%
% audio is a struct with the following fields:
%   nrChannels      the number of channels in the audio stream (1 or 2)
%   rate            sampling rate of the audio, ex. 44100.  If it can't be
%                   determined then it will be 1.
%   bits            bit depth of the samples (8 or 16)
%   data            the real data of the whole audio stream.  This can be
%                   played using wavplay.  If time ranges are specified,
%                   the length of the data may not correspond to the total
%                   time.  This normally happens with movies.  The issue is
%                   that the start of the audio stream is generally counted
%                   at the END of the first frame.  So, time is shifted by
%                   1/framerate.
%   nrFramesTotal   Audio comes in packets or frames when captured, the
%                   division of the audio into frames may or may not make
%                   sense.
%   frames          cell array of uint8s.  Probably not of great use.
%
% If there is no video or audio stream the corresponding structure will be
% empty.
%
% Specifying frames does not effect audio capturing.  If you want only a
% subsection of the audio use the 3rd parameter "time".  Specifying time
% effects both audio and video.  Time is specified in seconds (subsecond
% resolution is supported with fractional numbers ex. 1.125), starting at 0.
% Time is defined as startTime (inclusive) to stopTime (exclusive), or
% using set notation [startTime stopTime).
%
% If there are multiple video or audio streams, then the structure will be
% of length > 1.  For example: audio(1).data and audio(2).data.
%
% Images work, however the frames must be specified.  For some reason
% DirectShow doesn't ever stop when "playing" an image.  So to deal with
% this, I added support so that the processing stops once the last
% specified frame is captured instead of waiting until the media completes.
%
% EXAMPLES
% [video, audio] = mmread('chimes.wav'); % read whole wav file
% wavplay(audio.data,audio.rate);
%
% video = mmread('mymovie.mpg'); % read whole movie
% movie(video.frames);
%
% video = mmread('mymovie.mpg',1:10); %get only the first 10 frames
%
% video = mmread('mymovie.mpg',[],[0 3.5]); %read the first 3.5 seconds of the video
%
% [video, audio] = mmread('chimes.wav',[],[0 0.25]); %read the first 0.25 seconds of the wav
% [video, audio] = mmread('chimes.wav',[],[0.25 0.5]); %read 0.25 to 0.5 seconds of the wav, there is no overlap with the previous example.
%
% video = mmread('mymovie.mpg',[],[],false,true); %read all frames, disable audio
%
% Written by Micah Richert

if nargin < 5
    disableAudio = false;
    if nargin < 4
        disableVideo = false;
        if nargin < 3
            time = [];
            if nargin < 2
                frames = [];
            end
        end
    end
end

try
    mexDDGrab('buildGraph',filename);
    if (isempty(time))
        mexDDGrab('setFrames',frames);
    else
        if (numel(time) ~= 2), error('time must be a vector of length 2: [startTime stopTime]'); end
        mexDDGrab('setTime',time(1),time(2));
    end
    if (disableVideo), mexDDGrab('disableVideo'); end;
    if (disableAudio | nargout < 2), mexDDGrab('disableAudio'); end;
    mexDDGrab('doCapture');
    
    [nrVideoStreams, nrAudioStreams] = mexDDGrab('getCaptureInfo');
    
    video = struct('width',{},'height',{},'nrFramesTotal',{},'frames',{});
    audio = struct('nrChannels',{},'rate',{},'bits',{},'nrFramesTotal',{},'data',{},'frames',{});
    
    warned = false;
    
    % loop through getting all of the video data from each stream
    for i=1:nrVideoStreams
        [width, height, rate, nrFramesCaptured, nrFramesTotal] = mexDDGrab('getVideoInfo',i-1);
        video(i).width = width;
        video(i).height = height;
        video(i).rate = rate;
        video(i).nrFramesTotal = nrFramesTotal;
        video(i).frames = struct('cdata',cell(1,nrFramesCaptured),'colormap',cell(1,nrFramesCaptured));
        
        if (any(frames > nrFramesTotal))
            warning(['Frame(s) ' num2str(frames(frames>nrFramesTotal)) ' exceed the number of frames in the movie.']);
        end
        
        scanline = ceil(width*3/4)*4; % the scanline size must be a multiple of 4.
        
        for f=1:nrFramesCaptured
            data = mexDDGrab('getVideoFrame',i-1,f-1);
            
            if (numel(data) ~= scanline*height)
                if (numel(data) > 3*width*height)
                    if (~warned)
                        warning('dimensions do not match data size. Guessing badly...');
                        warned = true;
                    end
                    scanline = width*3;
                    data = data(1:3*width*height);
                else
                    error('dimensions do not match data size. Too little data.');
                end
            end
            
            % if there is any extra scanline data, remove it
            data = reshape(data,scanline,height);
            data = data(1:3*width,:);
            
            % the data ordering is wrong for matlab images, so permute it
            tmp = permute(reshape(data, 3, width, height),[3 2 1]);
            % the images are also upside down and colors were backwards.
            video(i).frames(f).cdata = tmp(end:-1:1,:,3:-1:1);
        end
        
        % if frames are specified then make sure that the order is the same
        if (~isempty(frames) && nrFramesCaptured > 0)
            [uniqueFrames, dummy, frameOrder] = unique(frames);
            if (length(uniqueFrames) > nrFramesCaptured)
                warning('Not all frames specified were captured.  Returning what was captured, but order may be different than specified.');
                remainingFrames = frames(frames<=uniqueFrames(nrFramesCaptured));
                [dummy, dummy, frameOrder] = unique(remainingFrames);
            end
            
            video(i).frames = video(i).frames(frameOrder);
        end
    end
    
    % loop through getting all of the audio data from each stream
    for i=1:nrAudioStreams
        [nrChannels, rate, bits, nrFramesCaptured, nrFramesTotal] = mexDDGrab('getAudioInfo',i-1);
        audio(i).nrChannels = nrChannels;
        audio(i).rate = rate;
        audio(i).bits = bits;
        audio(i).nrFramesTotal = nrFramesTotal;
        audio(i).frames = cell(1,nrFramesCaptured);
        for f=1:nrFramesCaptured
            data = mexDDGrab('getAudioFrame',i-1,f-1);
            audio(i).frames{f} = data;
        end
        % combine the data across frames
        d = double(cat(1,audio(i).frames{:}));
        % reshape and rescale the data so that it is nrChannels x Samples
        % and -1.0 to 1.0.  This should be the same output as wavread.
        audio(i).data = reshape(d/2^(bits-1),nrChannels,length(d)/nrChannels)';
    end
    
    mexDDGrab('cleanUp');
catch
    err = lasterror;
    mexDDGrab('cleanUp');
    rethrow(err);
end

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产视频一区在线观看| 五月综合激情网| 日韩一区二区电影| 99精品偷自拍| 国产在线播放一区三区四| 亚洲综合色在线| 欧美高清一级片在线观看| 日韩一卡二卡三卡四卡| 欧美婷婷六月丁香综合色| 懂色av一区二区三区蜜臀| 蜜臂av日日欢夜夜爽一区| 亚洲一区二区五区| 国产精品私人影院| 久久久久久久综合狠狠综合| 宅男噜噜噜66一区二区66| 色综合视频在线观看| 国产精品一区二区果冻传媒| 美女一区二区久久| 日韩黄色在线观看| 亚洲国产中文字幕在线视频综合| 中文字幕一区二区三区四区不卡| 国产亚洲精品资源在线26u| 日韩午夜激情免费电影| 欧美日韩成人一区| 欧美综合一区二区| 91福利在线导航| 色噜噜狠狠一区二区三区果冻| 成人午夜激情在线| 成人永久免费视频| 本田岬高潮一区二区三区| 懂色一区二区三区免费观看| 风间由美一区二区三区在线观看 | 91麻豆精品久久久久蜜臀 | 色婷婷综合在线| 99国产精品久| 色老头久久综合| 日本精品视频一区二区三区| 一本久道中文字幕精品亚洲嫩| 91麻豆精品秘密| 欧美视频你懂的| 国产亚洲短视频| 国产欧美一区二区精品婷婷 | 亚洲精品综合在线| 亚洲精品亚洲人成人网在线播放| 亚洲靠逼com| 亚洲综合激情网| 天天综合色天天| 久久国产精品无码网站| 狠狠色丁香九九婷婷综合五月| 韩国精品在线观看| 丁香婷婷综合色啪| 色婷婷久久综合| 欧美精品黑人性xxxx| 欧美一区日本一区韩国一区| www日韩大片| 国产精品美女一区二区三区| 亚洲日本护士毛茸茸| 亚洲.国产.中文慕字在线| 日韩电影在线免费看| 国内精品伊人久久久久av一坑 | 国产无人区一区二区三区| 中文字幕在线不卡视频| 夜夜亚洲天天久久| 日本v片在线高清不卡在线观看| 美女视频黄频大全不卡视频在线播放| 精久久久久久久久久久| 成人激情开心网| 欧美日韩电影在线播放| 精品国产乱码久久久久久蜜臀 | 欧美麻豆精品久久久久久| 久久综合九色综合欧美亚洲| 国产精品白丝在线| 日韩一区欧美二区| 国产成人在线色| 欧美三级一区二区| 精品三级av在线| 亚洲免费看黄网站| 久久精品国产免费看久久精品| 高清在线成人网| 欧美丰满嫩嫩电影| 国产精品水嫩水嫩| 日本亚洲免费观看| 91色在线porny| 欧美videossexotv100| 亚洲精品成人在线| 国产乱子轮精品视频| 91久久国产最好的精华液| 精品不卡在线视频| 亚洲国产一区在线观看| 丁香网亚洲国际| 日韩一级免费观看| 一区二区国产盗摄色噜噜| 韩国v欧美v日本v亚洲v| 欧美三级三级三级| 欧美国产在线观看| 麻豆精品蜜桃视频网站| 91激情五月电影| 欧美国产精品中文字幕| 久久精品国产色蜜蜜麻豆| 欧美主播一区二区三区美女| 中文字幕第一区| 韩国理伦片一区二区三区在线播放| 精品视频一区 二区 三区| 亚洲欧洲日韩在线| 国产一区二区伦理| 欧美一二三四在线| 成人自拍视频在线| 精品国产免费一区二区三区四区 | 日本在线不卡视频| 在线欧美一区二区| 中文一区二区在线观看| 麻豆国产91在线播放| 欧美日精品一区视频| 一区在线播放视频| 成人av资源在线观看| 久久久久久麻豆| 狠狠久久亚洲欧美| 日韩午夜在线播放| 免费看黄色91| 日韩免费高清电影| 秋霞午夜鲁丝一区二区老狼| 欧美老肥妇做.爰bbww| 一本大道综合伊人精品热热| 欧美一区二区三区免费观看视频 | 色狠狠色狠狠综合| 精品国产a毛片| 天堂影院一区二区| 欧美日韩中文一区| 亚洲大型综合色站| 欧美性猛交xxxxxxxx| 亚洲精选免费视频| 欧美在线视频不卡| 亚洲高清视频的网址| 欧美日韩午夜在线| 亚洲成人综合网站| 91精品在线观看入口| 日本美女视频一区二区| 欧美成人精品1314www| 精品一区二区三区视频| 2023国产精品自拍| 国产精品一二三四五| 国产精品乱码一区二区三区软件 | 国产一区二区三区四| 久久综合丝袜日本网| 国产成人av电影在线观看| 国产精品久久久久久久久图文区| 韩国av一区二区三区| 裸体歌舞表演一区二区| 麻豆视频观看网址久久| 精品一区二区免费看| 成人免费毛片app| 日韩美女主播在线视频一区二区三区| 91麻豆精品国产91久久久久久久久| 99视频精品在线| 成人理论电影网| 亚洲乱码国产乱码精品精可以看| 91麻豆国产福利在线观看| 亚洲福利电影网| 日韩一区二区在线看片| 国产真实精品久久二三区| 欧美激情一区三区| 91黄色免费版| 久久精品99国产国产精| 国产视频一区在线观看| 日本丰满少妇一区二区三区| 偷偷要91色婷婷| 26uuu亚洲综合色欧美| 成人激情黄色小说| 午夜精品久久久久久久蜜桃app| 日韩欧美成人激情| 成人动漫中文字幕| 午夜精品123| 久久无码av三级| voyeur盗摄精品| 男人的天堂亚洲一区| 中文字幕第一区二区| 在线不卡免费欧美| 国产成人免费视| 91精品国产乱| 一区二区三区日韩欧美| 国产日韩欧美激情| 色婷婷久久久久swag精品| 麻豆国产一区二区| 亚洲免费高清视频在线| 精品国产乱码久久| 欧美在线看片a免费观看| 国产乱色国产精品免费视频| 久久国产欧美日韩精品| 日韩理论片中文av| 精品国产一区二区亚洲人成毛片| 日本道在线观看一区二区| 韩国女主播一区| 天天免费综合色| 亚洲色图清纯唯美| 久久色在线视频| 欧美精品一级二级三级| 91猫先生在线| 国产99久久久久| 久久精品国产一区二区| 亚洲国产cao|