Author Topic: KVideoPlayer API (madVR interface)  (Read 9972 times)

Emil Weiss

  • Sr. Member
  • ****
  • Posts: 318
Re: KVideoPlayer API (madVR interface)
« Reply #195 on: October 10, 2017, 07:16:41 am »
Hi, Patrice

I have 85% of the implementation for playing DVD finished with all existing filters. (in 32Bit)
Works well.

after finish i want port it to 64Bit and upload a new Sample.

greets
« Last Edit: October 10, 2017, 07:18:17 am by Emil Weiss »

Patrice Terrier

  • Administrator
  • *****
  • Posts: 547
    • zapsolution
Re: KVideoPlayer API (madVR interface)
« Reply #196 on: October 10, 2017, 03:38:53 pm »
Emil

I have been looking around to find a way to retrieve movie posters from the internet.
I did register to "TheMovieDatabase", unfortunatly their API is web oriented, and no example on how to use it with C++.
I did try to use the MSDN API URLDownloadToFile, but couldn't get a valid jpg file  :-[

My thought was to create a PopCorn like interface to select a movie from its poster, or something similar to what i have on my Synology DiskStation when using "Video Station".

I could adapt the code i wrote in my Accordion project
http://www.objreader.com/index.php?topic=16.0
« Last Edit: October 10, 2017, 03:43:06 pm by Patrice Terrier »

Emil Weiss

  • Sr. Member
  • ****
  • Posts: 318
Re: KVideoPlayer API (madVR interface)
« Reply #197 on: October 10, 2017, 05:16:29 pm »
Emil

I have been looking around to find a way to retrieve movie posters from the internet.
I did register to "TheMovieDatabase", unfortunatly their API is web oriented, and no example on how to use it with C++.
I did try to use the MSDN API URLDownloadToFile, but couldn't get a valid jpg file  :-[

My thought was to create a PopCorn like interface to select a movie from its poster, or something similar to what i have on my Synology DiskStation when using "Video Station".

I could adapt the code i wrote in my Accordion project
http://www.objreader.com/index.php?topic=16.0

if that not better then use it from OMO?
i have fix now Problem with madvr which not want drawn DVD Menu Text if move the Mouse hover.
and also remove *.vob Format so use only *.ifo now.

new functions

Code: [Select]
   KVideo_IsDVD,
   KVideo_DVD_GetTitlesCount,
   KVideo_DVD_GetNumberOfChapters,
   KVideo_DVD_PlayTitle,
   KVideo_DVD_MouseClick,
   KVideo_DVD_MouseMove;


porting now to x64 ;)

greets
« Last Edit: October 10, 2017, 05:20:59 pm by Emil Weiss »

Emil Weiss

  • Sr. Member
  • ****
  • Posts: 318
Re: KVideoPlayer API (madVR interface)
« Reply #198 on: October 11, 2017, 12:49:26 am »
Hi, Patrice

i have add the stuff for DVD (90% finish not all)
if you has any question tell me and i want see added it to my lib.

fps is not correctly Change it later.  :o

greets
« Last Edit: October 16, 2017, 09:09:27 am by Emil Weiss »

Patrice Terrier

  • Administrator
  • *****
  • Posts: 547
    • zapsolution
Re: KVideoPlayer API (madVR interface)
« Reply #199 on: October 11, 2017, 10:25:57 am »
Quote
if that not better then use it from OMO?
What is OMO ?

I have downloaded sk_KVplayer.zip, i shall try it and will tell you how it works by me.

...

Emil Weiss

  • Sr. Member
  • ****
  • Posts: 318
Re: KVideoPlayer API (madVR interface)
« Reply #200 on: October 11, 2017, 03:08:58 pm »
Quote
if that not better then use it from OMO?
What is OMO ?

Hmm your has forgot your own project?

http://www.jose.it-berater.org/smfforum/index.php?topic=3924.0

greets

Patrice Terrier

  • Administrator
  • *****
  • Posts: 547
    • zapsolution
Re: KVideoPlayer API (madVR interface)
« Reply #201 on: October 11, 2017, 05:30:26 pm »
About OMO, i thought you were refering to an alternative to the use of "TheMovieDatabase" not about the GUI interface ;)

I did check the new DVD feature, and that looks promising.

The main issue i have encountered so far, is that
KVideo_GetMediaProperty(&gP.aMediaProperty);
doesn't return the correct values for the video size, and the whole movie duration.
Also there is no way to get the real Movie name.

That would be very nice to be able to bypass all the introduction(s), and play directly the real movie.
Trying to let it work exactly like when playing avi, mp4, wmv, or mkv video.
The contextual menu could be used to select the correct subtitles and/or the audio track to use (language), then DVD could work like the other video format.

« Last Edit: October 11, 2017, 05:35:22 pm by Patrice Terrier »

Emil Weiss

  • Sr. Member
  • ****
  • Posts: 318
Re: KVideoPlayer API (madVR interface)
« Reply #202 on: October 11, 2017, 05:48:43 pm »
Quote
The contextual menu could be used to select the correct subtitles and/or the audio track to use (language)
subtitles are present from DVD Menu and i must deactivate xysubfilter fro madvr or mouse hover over any Menu entrys not work.
the Trouble is madvr not supports more then one subtile filter for DVD to.

Quote
Trying to let it work exactly like when playing avi, mp4, wmv, or mkv video.
that is not available *.IFO Format has no Information over Video Format see what i can if parse the Ifo-Header before. (not supportet yet)

http://dvd.sourceforge.net/dvdinfo/ifo.html

Quote
KVideo_GetMediaProperty(&gP.aMediaProperty);
doesn't return the correct values for the video size, and the whole movie duration.
See MovieTimer..
you can not give the right video size before the root menu is gone! and a file *.vob is playing.

the chapter works only correctly yet if use a DVD from Drive.. !! not from HD

but..
i work on my ownerdraw Dialog i have Problem with filter (no Events fired  :-[) after replace my Combobox for it.
Fixed

greets
« Last Edit: October 11, 2017, 11:56:52 pm by Emil Weiss »

Patrice Terrier

  • Administrator
  • *****
  • Posts: 547
    • zapsolution
Re: KVideoPlayer API (madVR interface)
« Reply #203 on: October 11, 2017, 07:46:15 pm »
Here is how to retrieve the correct movie name from DVD

void SetMediaInfo(IN WCHAR* MediaFileName) {
    WCHAR Drive[_MAX_DRIVE], Dir[_MAX_DIR], FileName[_MAX_FNAME], Ext[_MAX_EXT];

    KVideo_GetMediaProperty(&gP.aMediaProperty);

    LPCWSTR Time = TimeToString(gP.aMediaProperty.PlaybackLength);
    SetWindowText(HW(LB_STREAMDURATION), Time);
    if (gP.hPanel) { SetWindowText(HP(LB_STREAMDURATION), Time); }

    //wsplitpath((LPWSTR)MediaFileName, Drive, Dir, FileName, Ext);
wsplitpath(gP.aMediaProperty.MediaFile, Drive, Dir, FileName, Ext);
if (_wcsicmp(FileName, L"VIDEO_TS") == 0) {
    WCHAR pathName[4] = { 0 };
    WCHAR FileSystemNameBuffer[40];
    DWORD MaxComponent = 0, FileSystemFlags = 0;
    wcscopy(pathName, Drive); PathAddBackslash(pathName);
    GetVolumeInformation(pathName, FileName, _MAX_FNAME, NULL, &MaxComponent, &FileSystemFlags, FileSystemNameBuffer, 40);
}


    SetWindowText(gP.hMain, FileName);

    WCHAR VideoInfo[MAX_PATH] = { 0 };
    _snwprintf_s(VideoInfo, MAX_PATH, 259, L"Video %d x %d, %6.3f FPS", gP.aMediaProperty.Video_Width, gP.aMediaProperty.Video_Height, gP.aMediaProperty.Video_FPS);
    SetWindowText(HW(LB_VIDEO), VideoInfo);
    if (gP.hPanel) { SetWindowText(HP(LB_VIDEO), VideoInfo); }

    WCHAR AudioProperty[MAX_PATH] = { 0 };
    _snwprintf_s(AudioProperty, MAX_PATH, 259, L"Audio %d Channel, %d SPS, %d BPS", gP.aMediaProperty.Audio_Channels, gP.aMediaProperty.Audio_Samplerate, gP.aMediaProperty.Audio_BitsPerSample);
    SetWindowText(HW(LB_AUDIO), AudioProperty);
    if (gP.hPanel) { SetWindowText(HP(LB_AUDIO), AudioProperty); }
   
    if (gP.aMediaProperty.PlaybackLength != 0) {
        gP.MaxPos = gP.aMediaProperty.PlaybackLength / 10000000;
        SendMessage(HW(ID_SLIDER), TBM_SETRANGE, int(TRUE), MAKELONG(0, (int)gP.MaxPos));
        skSetTrackRange(HP(ID_SLIDER), 0, (long)gP.MaxPos);
    }

    ResizeVideoWindow();
}

Emil Weiss

  • Sr. Member
  • ****
  • Posts: 318
Re: KVideoPlayer API (madVR interface)
« Reply #204 on: October 11, 2017, 11:57:15 pm »
Oh  ;)
Thanks i want test it.

i have test it and works only for DVD Drives.. not from Folder (return is then the Name of my HD)

greets
« Last Edit: October 12, 2017, 12:07:58 am by Emil Weiss »

Patrice Terrier

  • Administrator
  • *****
  • Posts: 547
    • zapsolution
Re: KVideoPlayer API (madVR interface)
« Reply #205 on: October 12, 2017, 07:51:46 am »
Yes of course, that is intended to work from DVD drive only just like when using the Windows Explorer.
The GetVolume API couldn't be used from a specific disk folder except if you used the name of the movie to create the folder name.

Emil Weiss

  • Sr. Member
  • ****
  • Posts: 318
Re: KVideoPlayer API (madVR interface)
« Reply #206 on: October 12, 2017, 08:08:07 am »
Yes of course, that is intended to work from DVD drive only just like when using the Windows Explorer.
The GetVolume API couldn't be used from a specific disk folder except if you used the name of the movie to create the folder name.

ok no problem ;)

i have added to night 4 new functions

Quote
    Ver 1.2.1.0    12 Okt 2017 (Emil Weiss)
   - Added functions : KVideo_DVD_ShowMenu
   - Added functions : KVideo_DVD_GetAudioLangCount
   - Added functions : KVideo_IsDVDMenu
   - Added functions : KVideo_DVD_SetAudio

upload a patch after port to x64

by the way
i have created a screenshot over 20 MB ;) 800% from original with madvr

greets
« Last Edit: October 12, 2017, 09:11:14 am by Emil Weiss »

Patrice Terrier

  • Administrator
  • *****
  • Posts: 547
    • zapsolution
Re: KVideoPlayer API (madVR interface)
« Reply #207 on: October 12, 2017, 09:29:07 am »
Emil

No hurry, take your time, the most important i think is to return the correct video size (see VLC as a matter of comparison)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 547
    • zapsolution
Re: KVideoPlayer API (madVR interface)
« Reply #208 on: October 12, 2017, 01:38:14 pm »

Emil Weiss

  • Sr. Member
  • ****
  • Posts: 318
Re: KVideoPlayer API (madVR interface)
« Reply #209 on: October 12, 2017, 06:11:43 pm »