Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Disconnected backend and suspended client #113

Closed
wants to merge 211 commits into from

4 participants

@janbar

Hi Christian,

I resolve socket error on rcv() in cmyth_rcv_length(). Here the code loop when backend stop. Cause the socket signal was up but the rcv buffer was empty. I think this case exists also on Windows. Also i fix the timeout to 30 secs. Now the backend can be stopped even during playback without lock or loop.

Suspend client is not affected by this bug and the timeout is large enougth for the backend on wakeup.

fetzerch and others added some commits
@fetzerch fetzerch [cmyth] Added libcmyth from xbmc/lib (September 5. 2012; c4e4b4a6ac1b…
…62e2b9a00e4ad3096186d1f5f670)
4a20071
@fetzerch fetzerch [cmyth] Modifications and bugfixes for libcmyth
This commit is based on the work from Tonny Petersen (tsp) and
contains his modifications to libcmyth from xbmc/lib (July 25. 2012; f43f465bc6b6ce63ca8f579e1f6ade97c416745b).

The commit has been rebased from tsp/master to xbmc/master mainline code,
warnings have been fixed where possible and the coding style has been adapted to the upstream libcmyth project.

In addition to bugfixes, the modifications also include:
- Timers (Tonny Petersen)
- File operations (Tonny Petersen)
- Backend settings (Tonny Petersen)
- Reconnect (Ino Dekker)
- Card inputs (Christian Fetzer)
- Recording's watched states (Christian Fetzer)
8db0a51
@fetzerch fetzerch [mythtv-cmyth] Fixed win32 build b666dad
@fetzerch fetzerch [gitignore] Added ipch and libs e7d0dc5
@fetzerch fetzerch [mythtv-cmyth] Fixed linux build 5f47677
@fetzerch fetzerch [mythtv-cmyth] Initial import of the mythtv-cmyth plugin into the add…
…on repository. Thanks to Tony Petersen (tsp), the code has been taken from https://github.com/tsp/xbmc/.
3ce2783
@fetzerch fetzerch [mythtv-cmyth] Fixed compiler warnings b8e06fe
@fetzerch fetzerch [mythtv-cmyth] Filter recordings in special storagegroups (Deleted, L…
…iveTV)
b978423
@fetzerch fetzerch [cmyth] Fixed SET_BOOKMARK parameters with protocol version 66
In version 66 the bookmark parameter of SET_BOOKMARK has been changed
from 2 long parameters to a single 64bit integer. Nevertheless the backend
(at least up to 0.25) checks the existence of the 4th parameter.
274e42c
@fetzerch fetzerch [cmyth] Disabled the event tracing functions 1a2e1c3
@fetzerch fetzerch [cmyth] Added support for 64bit integer mysql parameters 82b4981
@fetzerch fetzerch [cmyth] Fixed 64bit conversion in cmyth_get_bookmark_mark and cmyth_g…
…et_bookmark_offset
7f0a8d2
@fetzerch fetzerch [mythtv-cmyth] Adapted bookmark function pointers in libcmyth.h d86d6ae
@fetzerch fetzerch [mythtv-cmyth] Added bookmark support to cppmyth e716096
@fetzerch fetzerch [mythtv-cmyth] Added 'last played position' support
This has been implemented using MythTV's bookmarks.
MythTV uses frame offsets whereas XBMC uses time offsets.
To convert between time and frame offsets a function for
determining the framerate has been added.
ea48c4a
@mzanetti mzanetti [mythtv-cmyth] Group recordings just like mythtv does and get rid of …
…non-working regexp settings
1d013a4
@mzanetti mzanetti [mythtv-cmyth] Separate title from subtitle by ' - ' instead of '::' 09a804a
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master'
Conflicts:
	addons/Makefile.am
172e89e
@fetzerch fetzerch [mythtv-cmyth] Added resource files to project, added changlog.xml an…
…d updated addon.xml
d0ca1d4
@fetzerch fetzerch [mythtv-cmyth] Added setting to enable / disable Live TV support
Set to disabled to use the addon only for watching recordings.
12361a6
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master' d6034a5
@fetzerch fetzerch [mythtv-cmyth] Set setting to enable / disable Live TV support to tru…
…e (default)
350bd03
@fetzerch fetzerch [cmyth] Added mysqlclient.lib (fixes win32 build) 088e067
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master' 869f8dd
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master' c3de7d3
@janbar janbar [cmyth] Cleanup: unified parameter name sgToGetFrom to storage_group a065ec7
@janbar janbar [cmyth] Switched to int64_t instead of long long in file.c: cmyth_fil…
…e_seek_unlocked
7cbd69a
@janbar janbar [cmyth] Fixed some warnings cf8d018
@fetzerch fetzerch [mythtv-cmyth] Renamed back libcmyth function pointer names from came…
…l case to their original names.
6a4d4a1
@fetzerch fetzerch [cmyth] Changed cmyth_proginfo_rec_status_t enum to match libcmyth.h
Based on the changes in dynamic library header file libcmyth.h (by Tonny Petersen).
1bf0dc7
@fetzerch fetzerch [cmyth] Win32: Build a static library (instead of a dynamic one) f75798d
@fetzerch fetzerch [mythtv-cmyth] Link libcmyth statically f13c791
@janbar janbar [cmyth] Improved comment in cmyth_file_read d439e00
@janbar janbar [cmyth] Check if file transfer socket is open before reading. Switch …
…file when closed by backend.

Added cmyth_file_data_conn_fd(cmyth_file_t file).
This speeds up live tv.
57f1261
@fetzerch fetzerch [mythtv-cmyth] Prevent crash on exit. 769c499
@fetzerch fetzerch [mythtv-cmyth] Cleaned up class PVRClientMythTV. df5b3da
@fetzerch fetzerch [mythtv-cmyth] Cleaned up Client.cpp/h. 083ff6a
@fetzerch fetzerch [mythtv-cmyth] Fixed linux build after cleanup of PVRClientMythTV. f4629e5
@fetzerch fetzerch [mythtv-cmyth] Added copyright headers to pvrclient-mythtv.h/cpp clie…
…nt.h/cpp.
3792f9b
@fetzerch fetzerch [mythtv-cmyth] Cleaned up cppmyth (MythChannel, MythFile, MythPointer…
…, MythProgramInfo, MythTimestamp).
5918204
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master'
Conflicts:
	project/VS2010Express/xbmc-pvr-addons.sln
aca177d
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master' 0d8e4d7
@fetzerch fetzerch [mythtv-cmyth] Cleaned up cppmyth (MythDatabase, MythStorageGroupFile…
…, MythSignal, MythTimer).
880bf28
@opdenkamp sync interface v1.4.0 bd50e45
@fetzerch fetzerch [mythtv-cmyth] Enable recording image support (icon, thumbnail, fanart) d693390
@fetzerch fetzerch [mythtv-cmyth] Fixed crash due to incorrect ref_release in MythChanne…
…l::Number().
aaa4298
@fetzerch fetzerch [mythtv-cmyth] Cleaned up cppmyth (MythConnection, MythEventHandler, …
…MythFile, MythRecorder).
9085000
@fetzerch fetzerch [mythtv-cmyth] Replaced SingleLock (from tools.h) by PLATFORM::CLockO…
…bject.
5eff7e2
@fetzerch fetzerch [mythtv-cmyth] Fixed crash when timer was deleted by mythweb (timer w…
…as removed from database, but is still listed by mythprotocol)
54cc7ed
@fetzerch fetzerch [mythtv-cmyth] Reworked FileOps class for image caching.
- Replaced boost::filesystem dependency with calls to lib_XBMCaddon.
- Fixed issue: Preview images of new recordings were not cached (they might not have been generated yet by the backend).
ff39802
@fetzerch fetzerch [mythtv-cmyth] Removed unused leftovers: pthreadVC2.dll, pthreadVC2d.dll 5d47fa7
@fetzerch fetzerch [mythtv-cmyth] Removed RecordingRules UI
RecordingRules UI is not yet compatible with XBMC Frodo.
262dd30
@fetzerch fetzerch [mythtv-cmyth] Switched to Transifex localization platform
Online localization is available at https://www.transifex.com/projects/p/pvrmythtvcmyth.
35f11a0
@fetzerch fetzerch [mythtv-cmyth] Added changelog to vcxproj. b00a1b4
@fetzerch fetzerch [mythtv-cmyth] Version 0.3.0 43ee08b
@janbar janbar [cmyth] Added IPv6 address support to cmyth_proginfo_parse_url.
An IPv6 address in an URI is enclosed in "[" and "]" (for example: myth://[3ffe:2a00:100:7031::1]:1234/path...).
6a57d59
@janbar janbar [cmyth] Use atomic increment and decrement on x86 64bit platforms. 8e56b04
@janbar janbar [cmyth] Reenable warning when atomic decrement is not available. d67584a
@janbar janbar [cmyth] Manage program breaks
This adds the functions cmyth_livetv_watch and cmyth_livetv_done_recording.
40bd53b
@janbar janbar [cmyth] Fixed error message in cmyth_rcv_proginfo (socket.c). b0ab1f9
@janbar janbar [cmyth] Less verbose logging in cmyth_livetv_chain_read (livetv.c). ea6cb33
@janbar janbar [cmyth] Less verbose logging in cmyth_datetime_to_string (timestamp.c). bf69660
@janbar janbar [mythtv-cmyth] Use StrUID as MythProgramInfo's ID (based on MythTV's …
…primary key).

The previously used ID (path/filename) might be NULL.
191e684
@janbar janbar [mythtv-cmyth] Manage program breaks
Make use of CMYTH_EVENT_DONE_RECORDING and CMYTH_EVENT_LIVETV_WATCH.
df465cd
@fetzerch fetzerch [mythtv-cmyth] Set channel switch delay to 0. 2e793c1
@fetzerch fetzerch [mythtv-cmyth] Added Suspend/Resume methods to FileOps class.
The functions will suspend/resume the image caching thread.
bece3bc
@fetzerch fetzerch [mythtv-cmyth] Suspend/resume FileOps (image caching) when stream ope…
…ns/closes.

This is necessary since the FileOps thread locks the MythConnection extensively.
e8e4a0b
@janbar janbar [mythtv-cmyth] Replace SetChannel by close and reopening live stream …
…to speed up channel switching.
602764e
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master' bfd5adb
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master' 423e792
@fetzerch fetzerch [mythtv-cmyth] Added 1.5.0 API stubs (Timeshift for streams) 1ef7017
@fetzerch fetzerch [mythtv-cmyth] Use correct return types in ADDON_Create.
RegisterMe functions must return ADDON_STATUS_PERMANENT_FAILURE on failure.
Return ADDON_STATUS_NEED_SETTINGS if we cannot connect to the backend.
52e4fe7
@fetzerch fetzerch [mythtv-cmyth] Use iterator::find instead of count for better perform…
…ance in class FileOps.
857270d
@fetzerch fetzerch [mythtv-cmyth] Make sure a recording exists before accessing it.
Replaced m_recordings.at() calls by iterator::find() in functions that the PVR manager uses
to access recordings (like DeleteRecording, OpenRecordedStream, ...).
In case of an addon restart, xbmc might still try to access recordings that are not any more (not yet) available.
37f5393
@fetzerch fetzerch [mythtv-cmyth] Load the recordings from the backend on addon start.
This makes sure that the addon has an updated list of recordings in case of an addon restart.
Until now the recordings were only loaded on a GetRecordings call.
6525a53
@fetzerch fetzerch [mythtv-cmyth] Make the event handler a member of MythConnection (ins…
…tead of having it static)

The static event handler was not properly removed after an addon restart.
7aa9d7e
@janbar janbar [cmyth] OSX build / compat: fix noinst_LTLIBRARIES & conditional AM_L…
…DFLAGS
a8fbd0f
@janbar janbar [mythtv-cmyth] OSX build: AM_CONDITIONAL HOST_IS_OSX to specify depen…
…dencies
87f2a5f
@fetzerch fetzerch [mythtv-cmyth] Fixed unused parameter warning in PauseStream. 570431f
@fetzerch fetzerch [mythtv-cmyth] Less verbose logging in FileOps (image caching). e443bab
@janbar janbar [mythtv-cmyth] Less verbose logging in ReadRecordedStream. 353c2e7
@janbar janbar [mythtv-cmyth] Added CloseLiveStreamForReopening method that does not…
… resume fileOps (for faster channel switching).
b540ea0
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master'
Conflicts:
	addons/Makefile.am
	configure.ac
	project/VS2010Express/xbmc-pvr-addons.sln
3b43434
@fetzerch fetzerch [mythtv-cmyth] Version 0.4.0 d8e6192
@janbar janbar [mythtv-cmyth] Enable timeshift / support new feature from API 1.5.0 381cab1
@fetzerch fetzerch [project] Provide MYSQL_LIBS and MYSQL_INCLUDES in configure.ac.
Also added option --disable-mysql to build without mysql.
a7ac5a8
@fetzerch fetzerch [mythtv-cmyth] Use typedefs for stl types, replace boost::unordered_m…
…ap by std::map, don't link boost-system.
bb3efe2
@fetzerch fetzerch [mythtv-cmyth] Remove boost::regex. d589cba
@fetzerch fetzerch [project] Win32: Download mysql client as win32 build dependency. 6e387ba
@fetzerch fetzerch [cmyth] Win32: Use mysql client from build dependencies and don't pro…
…vide internal mysql client.
67b145d
@fetzerch fetzerch [cmyth] Use MYSQL_LIBS and MYSQL_INCLUDES instead of hardcoded paths. d68c956
@fetzerch fetzerch [project] Win32: Removed boost libs from downloaded build dependencies. 13d14a8
@fetzerch fetzerch [mythtc-cmyth] Win32: Do not link boost::filesystem. bda22fc
@fetzerch fetzerch [mythtv-cmyth] Moved program categories into class Categories (implem…
…ented with 2 multimaps instead of boost::bimap).
9c4d580
@janbar janbar [mythtv-cmyth] Add playback mode for backend event handler to keep qu…
…iet during playback.
aee27c8
@fetzerch fetzerch [cmyth] Win32: Fixed mysql client lib path in project files. 0e733eb
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master' 82e8a83
@janbar janbar [cmyth] Prevent crash in cmyth_livetv_chain_update when recorder is n…
…ot recording.

This checks if cmyth_recorder_get_cur_proginfo returns a null pointer and exits properly in that case.
40b325a
@janbar janbar [cmyth] Changed log message type from ERROR to DEBUG in cmyth_storage…
…group_get_filelist.
16421df
@janbar janbar [mythtv-cmyth] Enabled function 'Delete Timer'. f072916
@fetzerch fetzerch [mythtv-cmyth] Added comment to AddTimer (completion signaled by SCHE…
…DULE_CHANGE).
6edb907
@janbar janbar [cmyth] Fixed crash when cmyth_proginfo_fill returned null pointer.
The bacackend might return a program length of 0. This is not an error,
hence returning duplicated program info.
1d9b29e
@janbar janbar [cmyth] Unified cmyth_set_bookmark: Make use of rcv_okay("OK") and re…
…turn 0 on success.
e6a36ad
@janbar janbar [mythtv-cmyth] Adapt SetBookmark.
- Changed return type to bool.
- Adapt to cmyth_set_bookmark returns 0 on success
126cad6
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master' 4143423
@janbar janbar [cmyth] Support MythTV 0.26
- Added protocol version to protomap
- MythTV started to use UTC time (in many places)
- Splitted cmyh_rcv_okay into cmyth_rcv_okay ('ok' case insensitive) and cmyth_rcv_feedback (parameter specifies value to check)
dbac7c6
@janbar janbar [cmyth] Fixed memory leaks in mythtv_mysql.c (unreleased references)
In: cmyth_livetv_keep_recording, cmyth_mysql_add_timer, cmyth_mysql_update_timer, cmyth_mysql_get_prog_finder_time_title_chan
5511074
@janbar janbar [cmyth] Fixed MySQL string binding without escape characters in cmyth…
…_mysql_get_prog_finder_time_title_chan.
d55c365
@janbar janbar [cmyth] Fixed memory leaks in mythtv_mysql.c (unreleased references)
In: cmyth_mysql_get_prog_finder_char_title, cmyth_mysql_get_prog_finder_time
bf4c461
@janbar janbar [cmyth] Unify mythtv_mysql.c by using cmyth_mysql_query_create(). 1bc4a1b
@janbar janbar [cmyth] Cleaned up mythtv_mysql.c (DEBUG messages instead ERROR of me…
…ssages).
020391e
@janbar janbar [cmyth] Deprecate backdoors and provide new function cmyth_conn_resch…
…edule_recordings() as alternative for cmyth_schedule_recording().

Deprecated are now: cmyth_mysql_get_recgroups, cmyth_mysql_insert_into_record, cmyth_schedule_recording.
50ee59b
@janbar janbar [mythtv-cmyth] Use cmyth_reschedule_recordings() instead of deprecate…
…d cmyth_schedule_recording().
c583c23
@janbar janbar [cmyth] Manage backend disconnect: Set connection hang status to 1 wh…
…en backend is disconnected.
5bab71d
@janbar janbar [mythtv-cmyth] Manage backend disconnect: Fix crash when no recorder …
…found (error -22).
59fdfab
@janbar janbar [mythtv-cmyth] Manage backend disconnect: Remove retry count limit an…
…d don't reconnect event handler in MythConnection.

The event handler has to take care of backend disconnect itself.
7fc708c
@janbar janbar [mythtv-cmyth] Manage backend disconnect: MythEventHandler.
Split management of connection hung (select returns 0) and disconnected backend (select returns error).
When event connection is closed sleep 1 second and try to connect until stop or connected.
f5a7a8b
@janbar janbar [cmyth] Set connection control hang status down only when connection …
…is reconnected.

Avoid general hang for client and backend too because threads try to select even if connection still disconnected.
81f45c4
@janbar janbar [mythtv-cmyth] Manage backend disconnect: Check status of close strea…
…m to avoid hang.
0ca5350
@fetzerch fetzerch [cmyth] Fixed compiler warnings in mythtv_mysql.c. 670060a
@janbar janbar [cmyth] Fixed DST in cmyth_timestamp_tz_diff.
tm_isdst could be negative when input date has no DST info.
Test flag with 1 to add summer hour.
d93a09b
@fetzerch fetzerch [cmyth] Don't query guide data for hidden channels (cmyth_mysql_get_g…
…uide).
9d6b4d3
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master' into pr
Conflicts:
	addons/pvr.mythtv.cmyth/src/cppmyth/MythConnection.cpp
	addons/pvr.mythtv.cmyth/src/cppmyth/MythConnection.h
	addons/pvr.mythtv.cmyth/src/cppmyth/MythEventHandler.cpp
	addons/pvr.mythtv.cmyth/src/pvrclient-mythtv.cpp
	configure.ac
	lib/Makefile.am
	lib/cmyth/Win32/libcmyth.vcxproj
	lib/cmyth/include/cmyth/cmyth.h
	lib/cmyth/libcmyth/bookmark.c
	lib/cmyth/libcmyth/cmyth_local.h
	lib/cmyth/libcmyth/commbreak.c
	lib/cmyth/libcmyth/connection.c
	lib/cmyth/libcmyth/file.c
	lib/cmyth/libcmyth/livetv.c
	lib/cmyth/libcmyth/mythtv_mysql.c
	lib/cmyth/libcmyth/proginfo.c
	lib/cmyth/libcmyth/proglist.c
	lib/cmyth/libcmyth/recorder.c
	lib/cmyth/libcmyth/socket.c
	lib/cmyth/libcmyth/timestamp.c
a76aa2c
@janbar janbar [cmyth] Fixed memory leak on error (connect or create chain add). 5bf75ab
@janbar janbar [cmyth] Unify buffer size for Live TV chain.
Use same tcp receive buffer size for all files of Live TV chain (stored in the chain struct).
Internal buffer (size buflen) is not used on direct read. So use minimal value of 4KB.
ef193b6
@janbar janbar [mythtv-cmyth] Increased Live TV tcp buffer size to 64KB.
Fix 64KB, chain update use stored buffer size when spawning live TV.
afe5e6b
@janbar janbar [mythtv-cmyth] Increased FileOps tcp buffer size up to 64KB.
The size of requested block is increased to 32KB to avoid most roundtrips.
72532ea
@janbar janbar [cmyth] Resolve DST issue: Use MYSQL CONVERT_TZ() instead of computed…
… TZ diff (secs).
22203f2
@fetzerch fetzerch [cmyth] Fixed cmyth_mysql_get_timers.
Missing parameters in sql after DST fixes.
7231067
@fetzerch fetzerch [cmyth] Fixed return value in cmyth_mysql_get_timers. d7b9941
@fetzerch fetzerch [cmyth] RESCHEDULE_RECORDINGS changed in protocol 73 (0.26)
The syntax of RESCHEDULE_RECORDINGS changed in protocol version 73:
http://code.mythtv.org/trac/changeset/cbb8eb1e/mythtv

Therefore cmyth_conn_reschedule_recordings has been adapted to use
CHECK if the recording id specified is 0 or otherwise MATCH.
The changes are similar to MythTV's php and python bindings.
c0edbbd
@fetzerch fetzerch [mythtv-cmyth] Renamed MythProgramInfo::RecStartTime to RecordingStar…
…tTime.
889bedc
@fetzerch fetzerch [mythtv-cmyth] Added MythProgramInfo::RecordingEndTime. 2f6c1a2
@fetzerch fetzerch [mythtv-cmyth] MythProgramInfo: Use RecordedStartTime for building th…
…e UID.
8033732
@fetzerch fetzerch [mythtv-cmyth] Use StartTime instead of RecordingStartTime for record…
…ings.

If StartTime is 20:15, RecordingStartTime might be set to 20:10 in case the show
starts a bit earlier.

Hence recordings represent a specific show, it's better to show the StartTime
in the recordings view.
f8ceee6
@fetzerch fetzerch [mythtv-cmyth] Use RecordingStart/EndTime instead of Start/EndTime fo…
…r timers.

If StartTime is 20:15, RecordingStartTime might be set to 20:10 in case the show
starts a bit earlier.

Hence scheduled / upcoming recordings block the recorder for the full time
between RecordingStartTime and RecordingEndTime, it's better to show those values
in the timers view.
e29f22e
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master' 34eb8fb
@janbar janbar [mythtv-cmyth] Protocol improvement
Stop livetv spawn if chain is not updated after 30 secs, with error "Chain update failed."
Update Live TV chain only when it was updated successfully.
f1a8dd4
@janbar janbar [cmyth] Protocol improvement
- Skip NULL connection when reconnecting
- Set the retry timeout for protocol >= 44
6551999
@janbar janbar [cmyth] Protocol improvement
- Use variable block size depending on backend feedback.
- Manage timeout in "chain read" instead "chain switch".
- Chain setup workflow improvement: skip dummy file on chain setup and wait chain update for valid program.
- Chain update improvement: skip dummy file.
b8ac851
@janbar janbar [mythtv-cmyth] Improved log message on LiveTVChainUpdate. f3886fb
@janbar janbar [mythtv-cmyth] Recorder Lock/Unlock
- Decouples recorder operations from control connection.
- Remove macro to reconnect because not applicable for recorder.
- Live stream has its own control connection. Decouples operations of others by removing lock.
b1e71eb
@janbar janbar [mythtv-cmyth] Re-enable GetRecordings() during playback
Since lock issue is resolved we can re-enable it. Now recordings list is enable during playback.
18efc9d
@janbar janbar [mythtv-cmyth] Recording stream Lock/Unlock
- Remove macro to reconnect because not applicable.
- Recording stream has own control connection. Remove Lock/Unlock.
e73c99d
@janbar janbar [mythtv-cmyth] fileOps: No need lock control connection during file t…
…ransfer

Latch is in ConnectPath() only
bce4b66
@janbar janbar [mythtv-cmyth] Added locks to Get/SetRecordingPlayCount/Position.
Should be thread safe => Add Lock/Unlock on control connection m_con.
2bcb7ab
@janbar janbar [cmyth] Fix warning in cmyth_chain_read ebfe6d0
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master' 605418e
@janbar janbar [mythtv-cmyth] Added lock to DeleteRecording.
Should be thread safe => Add Lock/Unlock on control connection m_con.
2a948a0
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master' 638115b
@fetzerch fetzerch [cmyth] Win32: Moved winsock2.h include in cmyth_local.h. c583f32
David Teirney [cmyth] Pull across upstream changes for librefmem. da07316
@fetzerch fetzerch [mythtv-cmyth] Version 0.5.0 91205ce
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master' d3acb3a
@janbar janbar [cmyth] Added parameter port to cmyth_database_init.
This allows connecting to a user specified database port.
A value of 0 defaults to the default MySQL port 3306.
2c57fee
@janbar janbar [mythtv-cmyth] Support database connection on a different host than t…
…he mythbackend host.

New hidden settings "db_host" (defaults to setting "host") and "db_port" (defaults to 3306).
c600422
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master' 3ecfb37
@fetzerch fetzerch [mythtv-cmyth] Cleaned up settings names. (MythDB -> DB) b55ecae
@janbar janbar [mythtv-cmyth] Safe lock on GetRecordings and GetRecordingsAmount 5ee3833
@fetzerch fetzerch [mythtv-cmyth] Log compile time PVR API version. b20e0e9
@fetzerch fetzerch [cmyth] Added function cmyth_database_get_version. 1a58bf1
@fetzerch fetzerch [mythtv-cmyth] Reworked GetBackendName, GetBackendVersion and GetConn…
…ectionString

- Moved string creation out from Connect() to the functions itself.
- GetBackendName now shows 'MythTV (<backend>)'
- GetBackendVersion now shows 'Protocol version: XX - Database version: XX' (added translatable string)
fe762b2
@fetzerch fetzerch [mythtv-cmyth] Reworked error notifications.
Make notifications translateable.
Only show detailed information in the log file.
1ee5199
@fetzerch fetzerch [mythtv-cmyth] Make debug message in OpenLiveStream an error message. e11d0b1
@fetzerch fetzerch [cmyth] Added cmyth_mysql_get_recording_markup function.
The function allows to read markup information like framerate
or video width, height from the database.
8f69d7b
@janbar janbar [cmyth] Added cmyth_mysql_get_recording_framerate function
Try to use recording markup and fallback by estimated framerate
df6cebc
@fetzerch fetzerch [mythtv-cmyth] Added GetRecordingMarkup and GetRecordingFrameRate to …
…MythDatabase class.
c96d1b9
@fetzerch fetzerch [mythtv-cmyth] Make use of GetRecordingFrameRate to query a recording…
…'s frame rate.
0e7df0a
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master'
[mythtv-cmyth] Merged language updates.

Conflicts:
	addons/pvr.mythtv.cmyth/addon/resources/language/English/strings.po
d3ab1e3
@janbar janbar [cmyth] Reworked ProgramInfo 471486e
@janbar janbar [cmyth] Refactoring & cleanup (recordingrule.c, channel.c, storagegro…
…up.c)

- Added recordingrule.c, channel.c, storagegroup.c
- Renamed cmyth_update_file_length() to cmyth_file_update_length()
- Removed unused functions
9d115f3
@janbar janbar [mythtv-cmyth] Refactored cmyth, MythTimer->MythRecordingRule a5d538f
@fetzerch fetzerch [cmyth] Win32: Removed leftover project files 0ab382f
@fetzerch fetzerch [cmyth] Fixed compiler warnings. d6b2794
@fetzerch fetzerch [mythtv-cmyth] Fixed compiler warning in MythEventHandler 6613a4f
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master' 79a9102
@janbar janbar [cmyth] Check if Live TV chain exists before getting filename. Else r…
…eturns empty string.

Since protocol improvement for Live TV, current chain might be non existent until backend feedback.
4809393
@janbar janbar [cmyth] Cosmetics in recorder.c 54740d7
@janbar janbar [cmyth] IPv6 support: Resolve broken connect_path() when using IPv6.
'server' and 'port' are already stored in struct 'cmyth_conn'.
Use them instead trying to convert peer name.
8dbbc2f
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master' 3516d0a
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master' 575f327
@janbar janbar [mythtv-cmyth] Improved timer deletion / creation
Fixes issue #45.

- Properly remove recording rules (overrides, parent rules)
- Stop recordings before deleting them with StopRecording()
- Unify setup of new rules with PVRtoMythRecordingRule()
- Support more fields of PVR_TIMER_STATE
790efcd
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master' daa200c
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master' c6df3ba
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master' ea8cff6
@fetzerch fetzerch [mythtv-cmyth] Added cache for GetArtworkPath and added UpdateStorage…
…GroupFileList
ddc2b32
@janbar janbar [mythtv-cmyth] Move IsRecordingVisible() to MythProgramInfo::IsVisible() 0c0816e
@janbar janbar [cmyth] Cleanups in event.c and timestamp.c 570a42c
@janbar janbar [cmyth] cmyth_timestamp_from_string(): const char* instead char* bba39a5
@janbar janbar [cmyth] Added cmyth_event_get_message() and cmyth_proginfo_get_from_t…
…imeslot()
808f836
@fetzerch fetzerch [mythtv-cmyth] Fixed GetRecordingLastPlayedPosition's return value on…
… error
fa35f6a
@fetzerch fetzerch [mythtv-cmyth] Added HasBookmark to MythProgramInfo 6906288
@fetzerch fetzerch [mythtv-cmyth] Use HasBookmark in GetRecordingLastPlayedPosition
Only ask the backend for bookmarks if the recording info indicates
that it has a bookmark.

Currently GetRecordingLastPlayedPosition is called for every recording.
Until PVR_RECORDING is extended, this should help to speed up
the recordings view a bit.
5edac4d
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master' f6fba78
@janbar janbar [cmyth] Added functions to retreive recording artworks
- Added cmyth_get_storagegroup_fileinfo
- Added cmyth_mysql_get_recording_artwork
c193dfd
@janbar janbar [cmyth] Fixed comment typo in cmyth_mysql_get_recording_markup 9b7e117
@janbar janbar [cmyth] Change cmyth_proginfo_get_from_timeslot (use time_t for recst…
…art)
5007911
@janbar janbar [mythtv-cmyth] Improve recording updates
- Pool recording changes received by event handler
- Trigger recording update by event handler
- Use dedicated mutex for recordings map on read/write
- GetRecordings(): Apply pooled recording change instead reloading all recordings
- Cache recording framerate
3e62abb
@janbar janbar [mythtv-cmyth] Improve artwork retreiving
- Remove usage of storagegroup file list
- Retrieve artworks refs for backend database
7fab580
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master' ad15e66
@janbar janbar [cmyth] Resolve Live TV lock on file creation error
cmyth_file_destroy is locked and calls to ref_release(file) can cause deadlock.
Resolved by reviewing livetv chain lock:
- Only chain_add and chain_switch should be locked against mutual read/write
- Create file struct only after valid response from backend
e7424ef
@janbar janbar [cmyth] Resolve issue in rcv_length when connection to backend hangs
EBADF insted of TIMEOUT was returned for timeouts.
- When connection hang retry 6 times to wait backend response. After delay return TIMEOUT.
- EBADF is returned only on bad file descriptor.
5220a39
@fetzerch fetzerch [mythtv-cmyth] Refactor GetSetting into GetSettingOnHost in MythConne…
…ction
fc98d5d
@janbar janbar [cmyth] Adding cmyth_mysql_get_setting to query global settings e228421
@janbar janbar [mythtv-cmyth] Add new MythDatabase::GetSetting to retrieve global se…
…tting
c608942
@fetzerch fetzerch [mythtv-cmyth] Fix applying default recording rules for new timers
Default recording rule settings are global setting that need to be queried
from the database (MythDatabase::GetSetting).

Inn addition OverTimeCategory/CategoryOverTime is applied.
dd9f22f
@janbar janbar [cmyth] Reduce retries on connection hang to 3 in rcv_length b534500
@janbar janbar [cmyth] Fix issue with Live TV chain lock after e7424effdfe1dd5e584e3…
…d922038cc0a94486db4
e633f96
@fetzerch fetzerch Merge remote-tracking branch 'upstream/master'
Conflicts:
	addons/pvr.mythtv.cmyth/src/pvrclient-mythtv.cpp
f70ab42
@janbar janbar [cmyth] Disconnected backend - Client suspended
Review socket TIMEOUT.

- Manage hang on select() and rcv()
- Return TIMEOUT after 30 secs
93cd6f4
@janbar janbar [mythtv-cmyth] Disconnected backend - Client suspended
Review socket ERROR for Event Handler connection.

- Broken message returns EVENT_CLOSE. So we loop to retry a new connection. 
- EBADF: We loop to retry a new connection.
- Other hang (cmyth connection hang status): Try reconnect else loop to retry a new connection.
be21c11
@janbar

Sorry Lars. I missed to fix to target.

@janbar janbar closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.