MultiMedia Soft forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

SMF - Just Installed!

Author Topic: How to set Video File Filters  (Read 422 times)

Ravindra

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
How to set Video File Filters
« on: November 14, 2019, 03:29:39 PM »

Hello,

I am opening a video file directly from given path and not from openfiledialog.
I want to set filter to open various types of video files like
"Some video formats (*.avi;*.mpg;*.mpeg;*.wmv;*.asx;*.asf;*.mp4;*.vob;*.flv)|" & "*.avi;*.mpg;*.mpeg;*.wmv;*.asx;*.asf;*.mp4;*.vob;*.flv|" & "All files (*.*)|*.*"

Where do i write this ?

Thanks and Regards,

Ravindra

Logged

Administrator

  • Administrator
  • Sr. Member
  • *****
  • Posts: 291
    • View Profile
    • MultiMedia Soft
Re: How to set Video File Filters
« Reply #1 on: November 14, 2019, 06:00:54 PM »

Hello,

I'm afraid your question is not clear enough: could you be so kind to better explain with some more detail what you need to obtain?

Kind regards

Severino Delaurenti
MultiMedia Soft
Logged

Ravindra

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: How to set Video File Filters
« Reply #2 on: November 15, 2019, 07:52:30 AM »

Hi Severino,

Well i will elaborate.
I have developed a video player in which i open .mp4 files with internal path.
Usually we open using openfiledialog and where we define filter to open video files of format other than
.mp4 like MPEG, wav etc and accordingly we write it into its filter property.

However when i do not use openfiledialog my querry is,
Should i define this filter and where to define it or i am still able to open any video file in any format
without defining a filter directly ?

Thanks and Regards,

Ravindra
Logged

Administrator

  • Administrator
  • Sr. Member
  • *****
  • Posts: 291
    • View Profile
    • MultiMedia Soft
Re: How to set Video File Filters
« Reply #3 on: November 15, 2019, 10:36:58 AM »

Hello,

well, if you are not using the openfiledialog it's likely that you are invoking the VideoPlayer.Load method using a full pathname directly so you don't need a filter for the simple fact that the DirectShow filter graph builder will always attempt to manage the file independently from the file extension: if the file format shouldn't be supported the method will return an error code.

Hope to have answered your question.

Kind Regards

Severino Delaurenti
MultiMedia Soft

Logged