Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Add IPTV capabilities to the existing Digital TV UI #145

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

xpc1000
Copy link
Contributor

@xpc1000 xpc1000 commented Nov 1, 2014

Extending the current interface for using it not only for DVB but also for IPTV.

Commits:
1- Add IPTV capabilities to the existing DVB UI

  • Basic IPTV capabilities
  • Navigation TV panel: tabbed filters for DVB-T, IPTV and Radio

2- Digital TV: adapting the channel management UI for IPTV:

  • Channel Scan is now called Digital TV tools
  • UI: new tab for managing IPTV channels
  • IPTV: option for adding individual channels
  • IPTV: option for importing a m3u list of channels
  • New checkbox for removing existing channels when saving. Removes only the channels of the same type (DVB or IPTV)
  • Adding channels: new counter for preventing having duplicate prefNumber channels

3- Digital TV: split options from analog capture and new Digital TV options

3.1. General

  • Split menu entry into: Open Digital TV / Open Analog Capture. File->Open Device now only refers to analog device
  • Split class OpenDeviceData into OpenDeviceAnalogData and OpenDeviceDigitalData
  • Channel navigation panel: only enabled tabs visible (depending on Digital TV options). Set initial active tab depending on current channel type.
  • Add IGMP membership management: manage IGMP group join/leave for multicast IPTV streaming sources. Supports only IPv4 and IGMPv2. IPv6 and IGMPv3 could be added in the future if needed.
  • Add shortcut for Digital TV

3.2. Exception handling:

  • error controls (checking devices, etc.) moved from the general entry point to each channel switch operation
  • Change current behavior: when error switching to a channel -> show error message in info bar and then stay ready for switching to another channel
  • If the IPTV switching channel operation fails, we don't change the window size

3.3. Options & preferences:

  • Split Digital TV options from analog capture
  • New Digital TV options: DVB (BDA) and IPTV (include option: enable/disable IGMP multicast membership management)

Pending issues and known limitations:

  • ONLY English version: to be updated once it is ready for merge
  • IPTV Channel management: additional options (scan range of IP's and service discovery for multicast) are in progress and will be included in a different PR.
  • Access to channel management from options menu: will be also included in a future PR.

@@ -0,0 +1,209 @@
/*
* (C) 2009-2014 see Authors.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since these news files appear to be new code, just use 2014.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I'll apply that to all the new files.

@XhmikosR
Copy link
Contributor

XhmikosR commented Nov 1, 2014

Huge patch, @xpc1000! Made some (not so) important comments, so /spam off :P

@xpc1000
Copy link
Contributor Author

xpc1000 commented Nov 1, 2014

I've been working on this during the last 6 months. Thanks for your comments @XhmikosR . I'll update the commits in the next hours.

@@ -400,6 +403,7 @@ void CAppSettings::CreateCommands()
ADDCMD((ID_FILE_OPENMEDIA, 'O', FVIRTKEY | FCONTROL | FNOINVERT, IDS_AG_OPEN_FILE));
ADDCMD((ID_FILE_OPENDVDBD, 'D', FVIRTKEY | FCONTROL | FNOINVERT, IDS_AG_OPEN_DVD));
ADDCMD((ID_FILE_OPENDEVICE, 'V', FVIRTKEY | FCONTROL | FNOINVERT, IDS_AG_OPEN_DEVICE));
ADDCMD((ID_FILE_OPENDIGITALTV, 'B', FVIRTKEY | FCONTROL | FNOINVERT, IDS_AG_OPEN_DIGITALTV));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@kasper93
Copy link
Contributor

kasper93 commented Nov 1, 2014

I still have this UI glitch on Win8 http://i.imgbox.com/UqNhKTCe.png If you need help with this I can take a look for the fix.

Also in settings page. I suggest to place check boxes over the groupbox frame same as we do on other pages. See "Hide conterols in fullscreen" in options->fullscreen page

There is also minor issue with memory handling. few instances of 408 bytes are not freed correctly.

@alexmarsev
Copy link
Contributor

Code looks decent. I currently have problems with my local iptv provider, but they should be resolved in a couple of days. Hopefully. Will write a detailed review after that.

For now, good job! :)

@Underground78
Copy link
Contributor

I can't review now but I do have IPTV so I will try tomorrow or on Monday
maybe.

@MarkusGaugg
Copy link
Contributor

Is there any test build for non-developers? (like pull-request #123)

@xpc1000
Copy link
Contributor Author

xpc1000 commented Nov 1, 2014

@kasper93

I still have this UI glitch on Win8 http://i.imgbox.com/UqNhKTCe.png If you need help with this I can take a look for the fix.

I thought this was already solved! In my Win7 machine it is OK. Could you take a look? Thanks

@xpc1000
Copy link
Contributor Author

xpc1000 commented Nov 1, 2014

@kasper93

There is also minor issue with memory handling. few instances of 408 bytes are not freed correctly.

Could you check if this is happening always or only under certain conditions? (For example after TVToolsDlg is called, or after watching a channel with option "IGMP multicast membership management" switched on).

@xpc1000
Copy link
Contributor Author

xpc1000 commented Nov 1, 2014

Is there any test build for non-developers?

OK. Here is the link:
https://www.mediafire.com/?a06zyc3cgch2xny

sh0wTuan2016 referenced this pull request Mar 19, 2016
… to get the icons for the toolbar (play, pause, etc) buttons; else it uses built-in icons.

"Toolbar.bmp" can be of bitdepth <= 24, in which case RGB(255, 0, 255) is considered transparent or of bitdepth 32, in which case the alpha channel is used for transparency / gradients; 32 bit bitmaps mustn't use any compression in order to load properly; its resolution should be 15h x h to load, each icon being h x h in size for bigger toolbar.bmp files, the player minimum width is set so that all icons remain visible.
The volume slider isn't modified yet - it keeps its size.

Patch by foxx1337

git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1706 10f7b99b-c216-0410-bff0-8a66a9350fd8
@vBm
Copy link
Contributor

vBm commented Apr 10, 2016

Is there a way to open EPG by any chance ? (or do you even plan to add support for it)

@xpc1000
Copy link
Contributor Author

xpc1000 commented Apr 20, 2016

Is there a way to open EPG by any chance ? (or do you even plan to add support for it)

I planned to start with a similar support to what we currently have for DVB for "now and next" and then make them grow together. Nevertheless I didn't see too much interest in merging this pull request after one year and a half, so for the moment development is almost frozen.

This is the version that I'm using myself since more than one year so I try to keep it updated.

@vBm
Copy link
Contributor

vBm commented Apr 20, 2016

Nice. Would love to see such feature in future :)

When it comes to review and merging, let's give a nudge to the team xD
@XhmikosR @kasper93 @alexmarsev @Underground78

@vBm
Copy link
Contributor

vBm commented May 10, 2017

@xpc1000 Any chance to get this rebased ? (I've failed to do it on my own and would really like new build xD)

@xpc1000
Copy link
Contributor Author

xpc1000 commented May 10, 2017

OK. I'll take a look...

@xpc1000
Copy link
Contributor Author

xpc1000 commented May 12, 2017

Rebased to the latest version.

Link to test build (64bits):
[(http://www.mediafire.com/file/856vasfgcfk5px1/mpc-hc64.7z)]

@vBm
Copy link
Contributor

vBm commented May 12, 2017

Thanks @xpc1000 :)

@xpc1000
Copy link
Contributor Author

xpc1000 commented Aug 3, 2017

Rebased to the latest version.

- Basic IPTV capabilities
- Navigation panel: tabbed filters for DVB-T, IPTV and Radio

Signed-off-by: xpc1000 <xavier_portell@hotmail.com>
- IPTV: add individual channels
- IPTV: import m3u list of channels
- New check for removing existing channels when saving. In any case, it removes only the channels of the same type (DVB or IPTV)
- Save channels now updates the existing channels without loosing the personalization already done (for both DVB and IPTV)
- Adding channels: new counter for preventing having duplicate prefNumber channels

Signed-off-by: xpc1000 <xavier_portell@hotmail.com>

Conflicts:
	src/mpc-hc/mpc-hc.vcxproj.filters
	src/mpc-hc/resource.h

# Conflicts:
#	src/mpc-hc/MainFrm.cpp
#	src/mpc-hc/TunerScanDlg.cpp
#	src/mpc-hc/mpc-hc.vcxproj
#	src/mpc-hc/mpc-hc.vcxproj.filters
#	src/mpc-hc/resource.h
1. General
- Split menu entry into: Open Digital TV / Open Analog Capture. File->Open Device now only refers to analog device
- Split class OpenDeviceData into OpenDeviceAnalogData and OpenDeviceDigitalData
- Channel navigation panel: only enabled tabs visible (depending on Digital TV options). Set initial active tab depending
on current channel type.
- Add IGMP membership management: manage IGMP group join/leave for multicast IPTV streaming sources.
Supports only IPv4 and IGMPv2. IPv6 and IGMPv3 could be added in the future if needed.
- Add shortcut for Digital TV

2. Exception handling:
- error controls (checking devices, etc.) moved from the general entry point to each channel switch operation
- Change current behavior: when error switching to a channel -> show error message in info bar and then stay ready for switching to another channel
- If the IPTV switching channel operation fails, we don't change the window size

3. Options & preferences:
- Split Digital TV options from analog capture
- New Digital TV options: DVB (BDA) and IPTV (include option: enable/disable IGMP multicast membership management)

Signed-off-by: xpc1000 <xavier_portell@hotmail.com>

Conflicts:
	src/mpc-hc/MainFrm.cpp

Conflicts:
	src/mpc-hc/TVToolsDlg.cpp
	src/mpc-hc/TVToolsDlg.h

Conflicts:
	src/mpc-hc/IPTVScanDlg.cpp

Conflicts:
	src/mpc-hc/MainFrm.cpp

# Conflicts:
#	src/mpc-hc/DVBChannel.h
#	src/mpc-hc/IPTVScanDlg.cpp
#	src/mpc-hc/MainFrm.h
#	src/mpc-hc/mpc-hc.rc
#	src/mpc-hc/mpc-hc.vcxproj
- Add service discovery option in IPTV Channels Management
- Add IP Scan range of IP's option in IPTV Channels Management
- The IPTV channels management dialog can be called from Options/Digital TV
Signed-off-by: xpc1000 <xavier_portell@hotmail.com>

Conflicts:
	src/mpc-hc/IPTVMcastTools.cpp
	src/mpc-hc/IPTVMcastTools.h
	src/mpc-hc/IPTVScanDlg.cpp
	src/mpc-hc/IPTVScanDlg.h
	src/mpc-hc/TVToolsDlg.cpp
	src/mpc-hc/TVToolsDlg.h

Conflicts:
	src/mpc-hc/IPTVMcastTools.cpp

Conflicts:
	src/mpc-hc/IPTVMcastTools.h
	src/mpc-hc/TVToolsDlg.h
@lnxus
Copy link

lnxus commented Oct 16, 2017

Hello, I'm using the latest version posted here. Everytime I restart MPC HC, I lose my saved IPTV streams (actually, one remains, the first one I added). Any ideas?

@xpc1000
Copy link
Contributor Author

xpc1000 commented Oct 25, 2017

Hi, I'm quite busy now, but I'll take a look in a couple of weeks. In the mean time, you can try to set "Store settings in .ini file" in Options->Player. This is the way I use it and it works perfectly for me.

- Create a dedicated filter graph separated from the main filter graph for DVB Channels Management
- DVB Channels management can be called from options with its own filter graph being created in a separate thread
- Remove DoTunerScan, StartTunerScan and StopTunerScan from MainFrm.cpp
- Scroll down the channel list during the channel scan operation

Signed-off-by: xpc1000 <xavier_portell@hotmail.com>

Conflicts:
	src/mpc-hc/IPTVMcastTools.cpp
	src/mpc-hc/IPTVMcastTools.h
	src/mpc-hc/IPTVScanDlg.cpp
	src/mpc-hc/IPTVScanDlg.h
	src/mpc-hc/TVToolsDlg.cpp
	src/mpc-hc/TVToolsDlg.h

Conflicts:
	src/mpc-hc/IPTVMcastTools.cpp

Conflicts:
	src/mpc-hc/IPTVMcastTools.cpp
	src/mpc-hc/IPTVMcastTools.h
	src/mpc-hc/TVToolsDlg.cpp

Conflicts:
	src/mpc-hc/IPTVDiscoverySetupDlg.cpp
	src/mpc-hc/IPTVMcastTools.h
	src/mpc-hc/TVToolsDlg.cpp

Conflicts:
	src/mpc-hc/TVToolsDlg.cpp

# Conflicts:
#	src/mpc-hc/TVToolsDlg.cpp
- Now only the graph is closed and restarted instead of performing a complete closing and restarting operation. This change affects both DVB and IPTV channels
- Fixed error in DVB when using threads. FGManagerBDA members now called from graph thread

Conflicts:
	src/mpc-hc/MainFrm.cpp
- Play button disabled to avoid the problems the internal splitter has when stopping/playing life streams
- Instead of using the button, a channel can be selected. The possibility of choosing the same current channel has been activated so in case there is an error and the player is stopped, the same channel can be re-selected.
- Do not show OSD "Stop" during a channel switch operation for digital TV
- IPTV: update the name of the channel in window title (as DVB )
- Enable the OSD message with the channel name
- Fixed problem when pressing stop not stopping
@xpc1000
Copy link
Contributor Author

xpc1000 commented Nov 3, 2017

I rebased and did some corrections.
@lnxus: could you test?

@vBm
Copy link
Contributor

vBm commented Nov 5, 2017

Just did the testing and I don't lose the channel list upon restart of MPC-HC however current list of already saved channels isn't populated in the IPTV channels management.
That didn't work like ever so it's not a regression :)
Other than that it works quite well, so thanks @xpc1000 👍

@vBm
Copy link
Contributor

vBm commented Nov 9, 2017

@xpc1000 could you possibly add logging info so we know when, why and which stream failed. Tapping into 762f0f2 ?

@Eagle3386
Copy link

@xpc1000 Are you willing to adjust your awesome work like @clsid2 stated over in his fork clsid2#32?
If so, I'd happily assist in testing in case you need a tester as I happen to be an IPTV user.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.