LiveStreaming + DirectShow [英] LiveStreaming + DirectShow

查看:66
本文介绍了LiveStreaming + DirectShow的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我正在开发一个Windows Mobile 6应用程序,我从相机中获取视频并将其(实时)发送到服务器。我正在尝试使用directshow来做这件事,我已经看了一下CameraSDK的例子,并且很清楚directshow是如何工作的,但我仍然没有完全理解它。$ / b>

我听说我必须做一个RtpFilter来通过互联网传输视频,但我不知道该怎么做。


如果有人可以提出如何做到这一点,我会非常感激。一些链接到directshow的教程或只是一些提示就足够了。


 


谢谢!


 

解决方案


RTP / RTSP是基于流的协议,其中视频文件存储在服务器中作为文件,在客户端上实时共享。


但是你的要求不是那样的。


我之间已经采取过相似的方法使用主动同步数据表通过TCP / IP移动到桌面。


从我的观点来看,下面给出的解决方案是:


(1你必须从相机中捕获视频。


(2)通过网络将数据发送到服务器套接字或使用http发送到终点,在那里可以显示。


(3)在进行沟通之前,你需要使用/实现你的需求特定协议,如最大块大小,文件类型的东西。


(4)现在问题是如何支持播放,暂停和停止机制realy streaming。


使用grpah(进一步由过滤器组成)的直接显示表现得像mechine,并暴露api播放,停止和暂停图形。对于每个这三个事件服务器(其中发生视频捕获)可以将命令发送到客户端(其中显示实际的
显示),这进一步表现为停止,暂停和开始显示 视频。


(5)你需要在两个连续的实时视频数据共享之间保持一些时间间隔。


我会建议你在小型应用程序中对你的请求进行处理验证您自己的协议的级别,如下所示:


(1)使用带有SDK的microsoft示例应用程序,该SDK捕获记录实时视频并保存在本地设备中。


(2)修改了代码,使其能够使用计时器而不是用户事件自动启动视频录制


(3)开发服务器套接字用于与客户共享实时视频


(4)Microsft winodow mobile不支持流式过滤,因此示例代码将设备中的实时视频记录为文件,


(5)服务器套接字将文件读取为共享模式,并通过套接字发送文件内容。


(6)删除视频文件


(7)转到步骤


(8)再次使用微软的示例代码,用于使用Microsoft SDK进行媒体播放,


(9)Impelemnt一个客户端应用程序将获取视频作为内容并修改源以播放已记录的视频。


(10)最后它将提供在microsoft上实现自己的视频流协议的工具平台。


祝你好运


问候,


Ashakant


 


 


 


 


Hello,

I am developing a Windows Mobile 6 application where I obtain video from the camera and send it (live) to a server. I'm trying to use directshow to do it, I have looked at CameraSDK example and got a small grasp how directshow works, but I still don't fully understand it.

I heard I have to do a RtpFilter to stream the video over the Internet, but I have no idea how to do it.

If anyone could put an heads up on how to do this, I'd be very thankful. Some links to directshow's tutorial or just some tips would suffice.

 

Thank you!

 

解决方案

Hi ,

RTP/RTSP is streaming based protocol , where video file is stored in the server as file which is shared live on client .

But yours requirement is not like that .

I have perfomed similiar approach between mobile to desktop over TCP/IP using active sync datacable .

From my point of view following given below is approach for yours solution:

(1)You will have to capture video from camera .

(2)Send the data over network either server socket or using http to end point , where it can be display .

(3)Before making communication you need to use/implement yours requirement specific protocol like maximum chunk size , filetype stuff .

(4)Now the question is how to support play , pause, and stop mechanism for realy streaming .

Direct show which use grpah( which further consist of filter ) behave like mechine , and exposed api to play , stop and pause the graph . for each these three events server ( where  video capture is happening can send the command to client ( where actual display is going on) , which further behave to stop, pause and start of  display of  video .

(5) you need to keep some timeinterval between two consecutive live video data sharing .

what i will suggest you impelement the yours requireemnt at  small application level to verified yours own protocol which is  explan below:

(1) Use microsoft sample application ship with the SDK which capture record the live video and save in local device .

(2) Modified the code so that it  automatically start the video recording using the timer in stead of user event

(3)Develeoped the server socket which will be used to share live video with the client

(4)Microsft winodow mobile doesn't support streaming filter , so sample code record the live video in the device as file ,

(5) Server socket read the file as shared mode and send the file content over socket .

(6)Delete the video file

(7)Go to step

(8)Use again the sample code of microsoft for media player shiped with Microsoft SDK ,

(9) Impelemnt one client application that will get the recored video as content and modified the source to play the recored viedo .

(10) Lastly it would provides the facility to implement yours own video streaming protocol on microsoft plat form .

Good Luck

Regards,

Ashakant

 

 

 

 


这篇关于LiveStreaming + DirectShow的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆