DirectShow.NETCF

DirectShow.NETCF - Library that allows you to use DirectShow (play multimedia, capture/compress/recompress/preview audio and video) on Windows Mobile 5 or older devices.

Current version: 1.9.0.0

Available:
DirectShowNETCF

ComImports + PInvoke necessary API + some useful classes and methods

DirectShowNETCF.Player

Player class allows you to play audio and video files.
Methods:

  • public bool renderFile(string fileName) - build graph for required file if it possible
  • public bool play() - starts or continues play media file
  • public bool stop() - stops play file
  • public bool pause() - pauses play file
  • public bool setVideoWindow(IntPtr owner) - if it video file then you can set control that video should be rendered on

DirectShowNETCF.Camera

Allows you to preview video from camera, still images (still images and preview in the same time) in future record video.
Methods and Properties:

  • public CaptureType CapType - you can set one of type Preview, Still, PreviewStill
  • public bool init() - builds graph (note: you should set CaptureType, befor init camera)
  • public void release() - destroys graph (free all camera resources)
  • public void stop() - stops graph
  • public bool run(IntPtr owner) - runs graph and starts render captured video on required control
  • public bool run() - runs graph
  • public bool stillImage(string tmpPath) - stills and saves video.
  • public List<string> getMediaTypes() - returns list of supported resolutions
  • public void setMediaType(int index) - changes resolution from current to required
  • public bool resize(IntPtr owner, int width, int height) - call this method if you resized preview control and you want preview to be stretched for new control size
  • public bool flashOn() - turns flash on
  • public bool flashOff() - turns flash off
  • public bool zoomOut() - Zoom -
  • public bool zoomIn() - Zoom +
  • public bool focusMinus() - Focus -
  • public bool focusPlus() - Focus +
  • public bool autoFocusOff() - Turns Off autofocus
  • public bool autoFocusOn() - Turns On autofocus

DirectShowNETCF.Camera.AMCamera

Allows you to preview video from camera and grab raw frames
Methods and Properties:

  • public bool init() - builds graph
  • public void release() - destroys graph (free all camera resources)
  • public void stop() - stops graph
  • public bool run(IntPtr owner) - runs graph and starts render captured video on required control
  • public IntPtr grabFrame(ref long bufSize) - returns raw frame and buffer size, you have to free buffer when you dont need it (call DirectShowNETCF.PInvoke.LocalFree(IntPtr))
  • public bool getGrayScaleImage(IntPtr scan0, int stride) - grabs raw frame and make grayscale image from it. Now works wor rgb565 and YV12 formats.
  • public void getParams(out int width, out int height, out RawFrameFormat format) - returns width, height and format of raw frame
  • public void startDrawText(string text) - draws text on preview
  • stopDrawText() - stops draw text
  • public List<string> getMediaTypes() - returns list of supported resolutions
  • public void setMediaType(int index) - changes resolution from current to required (you have to call init and start again after changing resolution)
  • public bool resize(IntPtr owner, int width, int height) - call this method if you resized preview control and you want preview to be stretched for new control size
  • public bool flashOn() - turns flash on
  • public bool flashOff() - turns flash off
  • public bool zoomOut() - Zoom -
  • public bool zoomIn() - Zoom +
  • public bool focusMinus() - Focus -
  • public bool focusPlus() - Focus +
  • public bool autoFocusOff() - Turns Off autofocus
  • public bool autoFocusOn() - Turns On autofocus
  • public bool drawTarget(Rect rect, int type) - draws target on preview, you can define rect and target type
  • public bool stopDrawTarget() - stops draw target on preview
  • public bool getRgb565(IntPtr scan0) - grabs raw frame and makes rgb565 image from it. Now works wor rgb565 and YV12 formats.

DirectShowNETCF.Camera.AMCameraEx

Allows you to preview video from camera, grab raw RGB24 frames, apply effects for video, draws up to 10 bitmaps on preview
Methods and Properties:

  • public bool init(RotationType rotationType) - builds graph (you can choose type of rotation: None, Auto, Degree90)
  • public void release() - destroys graph (free all camera resources)
  • public void stop() - stops graph
  • public bool run(IntPtr owner) - runs graph and starts render captured video on required control
  • public IntPtr grabFrame() - returns raw frame (RGB24, size = 3 * width * height), you have to free buffer when you dont need it (call DirectShowNETCF.PInvoke.LocalFree(IntPtr))
  • public void applyEffect(Effets effect) - applies one of availabel effects (none, grayscale, black and white, sepia…)
  • public void drawBitmap(IntPtr ptr, int id, int x, int y, int width, int height) - draws bitmap on preview
  • public void drawTransparentBitmap(IntPtr ptr, int id, int x, int y, int width, int height, int r, int g, int b) - draws bitmap on preview except pixels that the same with transparent color
  • public void eraseBitmap(int id) - Erases earlier drawn bitmap
  • public void getRect(out int width, out int height) - returns width and height of raw frame
  • public List<string> getMediaTypes() - returns list of supported resolutions
  • public void setMediaType(int index) - changes resolution from current to required (you have to call init and start again after changing resolution)
  • public bool resize(IntPtr owner, int width, int height) - call this method if you resized preview control and you want preview to be stretched for new control size
  • public bool flashOn() - turns flash on
  • public bool flashOff() - turns flash off
  • public bool zoomOut() - Zoom -
  • public bool zoomIn() - Zoom +
  • public bool focusMinus() - Focus -
  • public bool focusPlus() - Focus +
  • public bool autoFocusOff() - Turns Off autofocus
  • public bool autoFocusOn() - Turns On autofocus

NullCamera

Allows to grab frames from camera without preview
Methods:

  • public bool init() - builds grap
  • public void release() - destroys graph
  • public void stop() - stops graph
  • public bool run() - runs graph

Events:

  • EventHandler<FrameEventArgs> GotFrame - fires every time we got new frame from camera.

AMCameraExControl 1.0.0.0

Control that allows you to preview stream from camera, grab bitmaps, draw bitmap on preview, control flash/focus/zoom (if your camera allows it)
Methods and Properties:

  • public bool Start() - starts preview
  • public void Stop() - stops camera
  • public Bitmap GrabFrame() - grabs current frame and returns it as Bitmap
  • public void Overlay(Bitmap bmp, int id, int x, int y) - draws bitmap on preview, x and y - coord of left top corner, id - id that will be used to erase bitmap when you need
  • public void OverlayTransparent(Bitmap bmp, int id, int x, int y, Color transparentColor) - draws bitmap on preview except pixels that equal to transparentColor, x and y - coord of left top corner, id - id that will be used to erase bitmap when you need
  • public void eraseBitmap(int id) - Erases earlier drawn bitmap
  • public Effects Effect - allows you to aplly 1 of supported effects (None, GrayScale, BlackAndWhite, EdgeDetection)
  • public bool FlashOn() - turns flash on
  • public bool FlashOff() - turns flash off
  • public bool ZoomOut() - Zoom -
  • public bool ZoomIn() - Zoom +
  • public bool FocusMinus() - Focus -
  • public bool FocusPlus() - Focus +
  • public bool AutoFocusOff() - Turns Off autofocus
  • public bool AutoFocusOn() - Turns On autofocus
  • Allows to handle mouse click (mouse down)

PlayerControl 1.2.0.0

Player class allows you to play audio and video files and mms streams. Also player allow to seek on media, control volume and grab frames.
Properties:

  • public bool Loop - if true then when video ended starts play again
  • public int VideoWidth - real video width
  • public int VideoHeight - real video height
  • public int Volume - you can control player volume (range 0-10000)
  • public int Balance - you can control sound balance
  • public int BitRate - video bitrate if possible to detect

Methods:

  • public void OpenFile(string filePath) - Builds graph that allows to play required file
  • public void Play() - starts or continues play media file
  • public void Stop() - stops play file
  • public void Pause() - pauses play file
  • public void Seek(TimeSpan position) - Sets media to required position
  • public TimeSpan GetDuration() - Gets Duration of media file

Events:

  • public event EventHandler MediaFailed - fiers if its impossible to render file
  • public event EventHandler MediaEnded -fiers when file plaed to the end
  • public event EventHandler<ProgressEventArgs> MediaProgress - fiers every 0,3 seconds and informs about current progress

Download Library and Examples

P.S:

If you need sources of library you can Buy it

200 Responses to “DirectShow.NETCF”

Pages: [20] 19 18 17 16 15 14 13 12 11 101 » Show All

  1. 200
    admin Says:

    Hello Steve,

    currency = US dollar, but we can always communicate (via email) if you got problems with it

  2. 199
    steve Says:

    hello alex, at what currency are you selling your source code for?

  3. 198
    admin Says:

    version 1.9.0.0 released, NullCamera added

  4. 197
    admin Says:

    Actually there i bug exist, so current version cannot play that wmp can i`m working on fix it, but if wmp cannot play some files on your device you then this is codes problem

  5. 196
    Charlos Says:

    I have a iPAQ 214. It has a Windows Mobile 6 Classic SO CE 5.2.1711 (Compilation 18165.0.5.0). Why DirectShowNETCF.Player does not work?
    it always says to me “MediaFailed”.

    Regards.

  6. 195
    admin Says:

    2Markus & RichardT please use forum for questions:
    directshownetcf.com/forum/

  7. 194
    Markus Says:

    Hi there,

    first of all thank you for that great library. I tried to get the AMCameraEx-Class working, but on each try it says “CameraFilterError” can you please hint me what I am doing wrong?

    Kind regards,
    Markus :)

  8. 193
    RichardT Says:

    Hi Alex

    I have made great progress with your toolkit but I still have one problem.

    I went to use AmcameraEX because I need to be able to init the camera at a certain rotation. I cant find any EX examples or code in your downloads. So how do I get the EX version running.

    But I also see that the EX version doesnt have Jpeg save. So either I have the preview rotated correctly or I can save the image, but I cant have both?

    Could you point me the right direction?

    Thanks for all your help
    Best Wishes
    Richard

  9. 192
    admin Says:

    you can use Camera its free if you dont need sources… other classes you can use for free if you ok with messageboxes… otherwise you need to buy library

  10. 191
    Peter Krohn Says:

    Hello Alex, I just found your software tools. Got it running. Fantastic software. I want to use it in a software which checks special places in companies. With a SMS my program makes a shot and will send the picture to a server …

    Can i use your DLLs free of charge?

    Regards Peter Krohn

Pages: [20] 19 18 17 16 15 14 13 12 11 101 » Show All

Leave a Reply