Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Disconnected backend and suspended client #113

wants to merge 211 commits into from

4 participants

Jean-Luc Barrière Christian Fetzer mzanetti Lars Op den Kamp
Jean-Luc Barrière

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
Christian Fetzer fetzerch [cmyth] Added libcmyth from xbmc/lib (September 5. 2012; c4e4b4a6ac1b…
Christian Fetzer 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)
Christian Fetzer fetzerch [mythtv-cmyth] Fixed win32 build b666dad
Christian Fetzer fetzerch [gitignore] Added ipch and libs e7d0dc5
Christian Fetzer fetzerch [mythtv-cmyth] Fixed linux build 5f47677
Christian Fetzer 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
Christian Fetzer fetzerch [mythtv-cmyth] Fixed compiler warnings b8e06fe
Christian Fetzer fetzerch [mythtv-cmyth] Filter recordings in special storagegroups (Deleted, L…
Christian Fetzer 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.
Christian Fetzer fetzerch [cmyth] Disabled the event tracing functions 1a2e1c3
Christian Fetzer fetzerch [cmyth] Added support for 64bit integer mysql parameters 82b4981
Christian Fetzer fetzerch [cmyth] Fixed 64bit conversion in cmyth_get_bookmark_mark and cmyth_g…
Christian Fetzer fetzerch [mythtv-cmyth] Adapted bookmark function pointers in libcmyth.h d86d6ae
Christian Fetzer fetzerch [mythtv-cmyth] Added bookmark support to cppmyth e716096
Christian Fetzer 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.
mzanetti mzanetti [mythtv-cmyth] Group recordings just like mythtv does and get rid of …
…non-working regexp settings
mzanetti mzanetti [mythtv-cmyth] Separate title from subtitle by ' - ' instead of '::' 09a804a
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master'
Christian Fetzer fetzerch [mythtv-cmyth] Added resource files to project, added changlog.xml an…
…d updated addon.xml
Christian Fetzer fetzerch [mythtv-cmyth] Added setting to enable / disable Live TV support
Set to disabled to use the addon only for watching recordings.
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master' d6034a5
Christian Fetzer fetzerch [mythtv-cmyth] Set setting to enable / disable Live TV support to tru…
…e (default)
Christian Fetzer fetzerch [cmyth] Added mysqlclient.lib (fixes win32 build) 088e067
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master' 869f8dd
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master' c3de7d3
Jean-Luc Barrière janbar [cmyth] Cleanup: unified parameter name sgToGetFrom to storage_group a065ec7
Jean-Luc Barrière janbar [cmyth] Switched to int64_t instead of long long in file.c: cmyth_fil…
Jean-Luc Barrière janbar [cmyth] Fixed some warnings cf8d018
Christian Fetzer fetzerch [mythtv-cmyth] Renamed back libcmyth function pointer names from came…
…l case to their original names.
Christian Fetzer 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).
Christian Fetzer fetzerch [cmyth] Win32: Build a static library (instead of a dynamic one) f75798d
Christian Fetzer fetzerch [mythtv-cmyth] Link libcmyth statically f13c791
Jean-Luc Barrière janbar [cmyth] Improved comment in cmyth_file_read d439e00
Jean-Luc Barrière 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.
Christian Fetzer fetzerch [mythtv-cmyth] Prevent crash on exit. 769c499
Christian Fetzer fetzerch [mythtv-cmyth] Cleaned up class PVRClientMythTV. df5b3da
Christian Fetzer fetzerch [mythtv-cmyth] Cleaned up Client.cpp/h. 083ff6a
Christian Fetzer fetzerch [mythtv-cmyth] Fixed linux build after cleanup of PVRClientMythTV. f4629e5
Christian Fetzer fetzerch [mythtv-cmyth] Added copyright headers to pvrclient-mythtv.h/cpp clie…
Christian Fetzer fetzerch [mythtv-cmyth] Cleaned up cppmyth (MythChannel, MythFile, MythPointer…
…, MythProgramInfo, MythTimestamp).
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master'
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master' 0d8e4d7
Christian Fetzer fetzerch [mythtv-cmyth] Cleaned up cppmyth (MythDatabase, MythStorageGroupFile…
…, MythSignal, MythTimer).
Lars Op den Kamp sync interface v1.4.0 bd50e45
Christian Fetzer fetzerch [mythtv-cmyth] Enable recording image support (icon, thumbnail, fanart) d693390
Christian Fetzer fetzerch [mythtv-cmyth] Fixed crash due to incorrect ref_release in MythChanne…
Christian Fetzer fetzerch [mythtv-cmyth] Cleaned up cppmyth (MythConnection, MythEventHandler, …
…MythFile, MythRecorder).
Christian Fetzer fetzerch [mythtv-cmyth] Replaced SingleLock (from tools.h) by PLATFORM::CLockO…
Christian Fetzer fetzerch [mythtv-cmyth] Fixed crash when timer was deleted by mythweb (timer w…
…as removed from database, but is still listed by mythprotocol)
Christian Fetzer 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).
Christian Fetzer fetzerch [mythtv-cmyth] Removed unused leftovers: pthreadVC2.dll, pthreadVC2d.dll 5d47fa7
Christian Fetzer fetzerch [mythtv-cmyth] Removed RecordingRules UI
RecordingRules UI is not yet compatible with XBMC Frodo.
Christian Fetzer fetzerch [mythtv-cmyth] Switched to Transifex localization platform
Online localization is available at
Christian Fetzer fetzerch [mythtv-cmyth] Added changelog to vcxproj. b00a1b4
Christian Fetzer fetzerch [mythtv-cmyth] Version 0.3.0 43ee08b
Jean-Luc Barrière 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...).
Jean-Luc Barrière janbar [cmyth] Use atomic increment and decrement on x86 64bit platforms. 8e56b04
Jean-Luc Barrière janbar [cmyth] Reenable warning when atomic decrement is not available. d67584a
Jean-Luc Barrière janbar [cmyth] Manage program breaks
This adds the functions cmyth_livetv_watch and cmyth_livetv_done_recording.
Jean-Luc Barrière janbar [cmyth] Fixed error message in cmyth_rcv_proginfo (socket.c). b0ab1f9
Jean-Luc Barrière janbar [cmyth] Less verbose logging in cmyth_livetv_chain_read (livetv.c). ea6cb33
Jean-Luc Barrière janbar [cmyth] Less verbose logging in cmyth_datetime_to_string (timestamp.c). bf69660
Jean-Luc Barrière janbar [mythtv-cmyth] Use StrUID as MythProgramInfo's ID (based on MythTV's …
…primary key).

The previously used ID (path/filename) might be NULL.
Jean-Luc Barrière janbar [mythtv-cmyth] Manage program breaks
Christian Fetzer fetzerch [mythtv-cmyth] Set channel switch delay to 0. 2e793c1
Christian Fetzer fetzerch [mythtv-cmyth] Added Suspend/Resume methods to FileOps class.
The functions will suspend/resume the image caching thread.
Christian Fetzer fetzerch [mythtv-cmyth] Suspend/resume FileOps (image caching) when stream ope…

This is necessary since the FileOps thread locks the MythConnection extensively.
Jean-Luc Barrière janbar [mythtv-cmyth] Replace SetChannel by close and reopening live stream …
…to speed up channel switching.
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master' bfd5adb
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master' 423e792
Christian Fetzer fetzerch [mythtv-cmyth] Added 1.5.0 API stubs (Timeshift for streams) 1ef7017
Christian Fetzer 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.
Christian Fetzer fetzerch [mythtv-cmyth] Use iterator::find instead of count for better perform…
…ance in class FileOps.
Christian Fetzer fetzerch [mythtv-cmyth] Make sure a recording exists before accessing it.
Replaced 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.
Christian Fetzer 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.
Christian Fetzer 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.
Jean-Luc Barrière janbar [cmyth] OSX build / compat: fix noinst_LTLIBRARIES & conditional AM_L…
Jean-Luc Barrière janbar [mythtv-cmyth] OSX build: AM_CONDITIONAL HOST_IS_OSX to specify depen…
Christian Fetzer fetzerch [mythtv-cmyth] Fixed unused parameter warning in PauseStream. 570431f
Christian Fetzer fetzerch [mythtv-cmyth] Less verbose logging in FileOps (image caching). e443bab
Jean-Luc Barrière janbar [mythtv-cmyth] Less verbose logging in ReadRecordedStream. 353c2e7
Jean-Luc Barrière janbar [mythtv-cmyth] Added CloseLiveStreamForReopening method that does not…
… resume fileOps (for faster channel switching).
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master'
Christian Fetzer fetzerch [mythtv-cmyth] Version 0.4.0 d8e6192
Jean-Luc Barrière janbar [mythtv-cmyth] Enable timeshift / support new feature from API 1.5.0 381cab1
Christian Fetzer fetzerch [project] Provide MYSQL_LIBS and MYSQL_INCLUDES in
Also added option --disable-mysql to build without mysql.
Christian Fetzer fetzerch [mythtv-cmyth] Use typedefs for stl types, replace boost::unordered_m…
…ap by std::map, don't link boost-system.
Christian Fetzer fetzerch [mythtv-cmyth] Remove boost::regex. d589cba
Christian Fetzer fetzerch [project] Win32: Download mysql client as win32 build dependency. 6e387ba
Christian Fetzer fetzerch [cmyth] Win32: Use mysql client from build dependencies and don't pro…
…vide internal mysql client.
Christian Fetzer fetzerch [cmyth] Use MYSQL_LIBS and MYSQL_INCLUDES instead of hardcoded paths. d68c956
Christian Fetzer fetzerch [project] Win32: Removed boost libs from downloaded build dependencies. 13d14a8
Christian Fetzer fetzerch [mythtc-cmyth] Win32: Do not link boost::filesystem. bda22fc
Christian Fetzer fetzerch [mythtv-cmyth] Moved program categories into class Categories (implem…
…ented with 2 multimaps instead of boost::bimap).
Jean-Luc Barrière janbar [mythtv-cmyth] Add playback mode for backend event handler to keep qu…
…iet during playback.
Christian Fetzer fetzerch [cmyth] Win32: Fixed mysql client lib path in project files. 0e733eb
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master' 82e8a83
Jean-Luc Barrière 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.
Jean-Luc Barrière janbar [cmyth] Changed log message type from ERROR to DEBUG in cmyth_storage…
Jean-Luc Barrière janbar [mythtv-cmyth] Enabled function 'Delete Timer'. f072916
Christian Fetzer fetzerch [mythtv-cmyth] Added comment to AddTimer (completion signaled by SCHE…
Jean-Luc Barrière 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.
Jean-Luc Barrière janbar [cmyth] Unified cmyth_set_bookmark: Make use of rcv_okay("OK") and re…
…turn 0 on success.
Jean-Luc Barrière janbar [mythtv-cmyth] Adapt SetBookmark.
- Changed return type to bool.
- Adapt to cmyth_set_bookmark returns 0 on success
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master' 4143423
Jean-Luc Barrière 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)
Jean-Luc Barrière 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
Jean-Luc Barrière janbar [cmyth] Fixed MySQL string binding without escape characters in cmyth…
Jean-Luc Barrière 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
Jean-Luc Barrière janbar [cmyth] Unify mythtv_mysql.c by using cmyth_mysql_query_create(). 1bc4a1b
Jean-Luc Barrière janbar [cmyth] Cleaned up mythtv_mysql.c (DEBUG messages instead ERROR of me…
Jean-Luc Barrière 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.
Jean-Luc Barrière janbar [mythtv-cmyth] Use cmyth_reschedule_recordings() instead of deprecate…
…d cmyth_schedule_recording().
Jean-Luc Barrière janbar [cmyth] Manage backend disconnect: Set connection hang status to 1 wh…
…en backend is disconnected.
Jean-Luc Barrière janbar [mythtv-cmyth] Manage backend disconnect: Fix crash when no recorder …
…found (error -22).
Jean-Luc Barrière 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.
Jean-Luc Barrière 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.
Jean-Luc Barrière 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.
Jean-Luc Barrière janbar [mythtv-cmyth] Manage backend disconnect: Check status of close strea…
…m to avoid hang.
Christian Fetzer fetzerch [cmyth] Fixed compiler warnings in mythtv_mysql.c. 670060a
Jean-Luc Barrière 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.
Christian Fetzer fetzerch [cmyth] Don't query guide data for hidden channels (cmyth_mysql_get_g…
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master' into pr
Jean-Luc Barrière janbar [cmyth] Fixed memory leak on error (connect or create chain add). 5bf75ab
Jean-Luc Barrière 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.
Jean-Luc Barrière janbar [mythtv-cmyth] Increased Live TV tcp buffer size to 64KB.
Fix 64KB, chain update use stored buffer size when spawning live TV.
Jean-Luc Barrière janbar [mythtv-cmyth] Increased FileOps tcp buffer size up to 64KB.
The size of requested block is increased to 32KB to avoid most roundtrips.
Jean-Luc Barrière janbar [cmyth] Resolve DST issue: Use MYSQL CONVERT_TZ() instead of computed…
… TZ diff (secs).
Christian Fetzer fetzerch [cmyth] Fixed cmyth_mysql_get_timers.
Missing parameters in sql after DST fixes.
Christian Fetzer fetzerch [cmyth] Fixed return value in cmyth_mysql_get_timers. d7b9941
Christian Fetzer fetzerch [cmyth] RESCHEDULE_RECORDINGS changed in protocol 73 (0.26)
The syntax of RESCHEDULE_RECORDINGS changed in protocol version 73:

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.
Christian Fetzer fetzerch [mythtv-cmyth] Renamed MythProgramInfo::RecStartTime to RecordingStar…
Christian Fetzer fetzerch [mythtv-cmyth] Added MythProgramInfo::RecordingEndTime. 2f6c1a2
Christian Fetzer fetzerch [mythtv-cmyth] MythProgramInfo: Use RecordedStartTime for building th…
…e UID.
Christian Fetzer fetzerch [mythtv-cmyth] Use StartTime instead of RecordingStartTime for record…

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.
Christian Fetzer 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.
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master' 34eb8fb
Jean-Luc Barrière 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.
Jean-Luc Barrière janbar [cmyth] Protocol improvement
- Skip NULL connection when reconnecting
- Set the retry timeout for protocol >= 44
Jean-Luc Barrière 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.
Jean-Luc Barrière janbar [mythtv-cmyth] Improved log message on LiveTVChainUpdate. f3886fb
Jean-Luc Barrière 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.
Jean-Luc Barrière 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.
Jean-Luc Barrière janbar [mythtv-cmyth] Recording stream Lock/Unlock
- Remove macro to reconnect because not applicable.
- Recording stream has own control connection. Remove Lock/Unlock.
Jean-Luc Barrière janbar [mythtv-cmyth] fileOps: No need lock control connection during file t…

Latch is in ConnectPath() only
Jean-Luc Barrière janbar [mythtv-cmyth] Added locks to Get/SetRecordingPlayCount/Position.
Should be thread safe => Add Lock/Unlock on control connection m_con.
Jean-Luc Barrière janbar [cmyth] Fix warning in cmyth_chain_read ebfe6d0
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master' 605418e
Jean-Luc Barrière janbar [mythtv-cmyth] Added lock to DeleteRecording.
Should be thread safe => Add Lock/Unlock on control connection m_con.
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master' 638115b
Christian Fetzer fetzerch [cmyth] Win32: Moved winsock2.h include in cmyth_local.h. c583f32
David Teirney [cmyth] Pull across upstream changes for librefmem. da07316
Christian Fetzer fetzerch [mythtv-cmyth] Version 0.5.0 91205ce
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master' d3acb3a
Jean-Luc Barrière 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.
Jean-Luc Barrière 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).
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master' 3ecfb37
Christian Fetzer fetzerch [mythtv-cmyth] Cleaned up settings names. (MythDB -> DB) b55ecae
Jean-Luc Barrière janbar [mythtv-cmyth] Safe lock on GetRecordings and GetRecordingsAmount 5ee3833
Christian Fetzer fetzerch [mythtv-cmyth] Log compile time PVR API version. b20e0e9
Christian Fetzer fetzerch [cmyth] Added function cmyth_database_get_version. 1a58bf1
Christian Fetzer fetzerch [mythtv-cmyth] Reworked GetBackendName, GetBackendVersion and GetConn…

- 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)
Christian Fetzer fetzerch [mythtv-cmyth] Reworked error notifications.
Make notifications translateable.
Only show detailed information in the log file.
Christian Fetzer fetzerch [mythtv-cmyth] Make debug message in OpenLiveStream an error message. e11d0b1
Christian Fetzer 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.
Jean-Luc Barrière janbar [cmyth] Added cmyth_mysql_get_recording_framerate function
Try to use recording markup and fallback by estimated framerate
Christian Fetzer fetzerch [mythtv-cmyth] Added GetRecordingMarkup and GetRecordingFrameRate to …
…MythDatabase class.
Christian Fetzer fetzerch [mythtv-cmyth] Make use of GetRecordingFrameRate to query a recording…
…'s frame rate.
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master'
[mythtv-cmyth] Merged language updates.

Jean-Luc Barrière janbar [cmyth] Reworked ProgramInfo 471486e
Jean-Luc Barrière janbar [cmyth] Refactoring & cleanup (recordingrule.c, channel.c, storagegro…

- Added recordingrule.c, channel.c, storagegroup.c
- Renamed cmyth_update_file_length() to cmyth_file_update_length()
- Removed unused functions
Jean-Luc Barrière janbar [mythtv-cmyth] Refactored cmyth, MythTimer->MythRecordingRule a5d538f
Christian Fetzer fetzerch [cmyth] Win32: Removed leftover project files 0ab382f
Christian Fetzer fetzerch [cmyth] Fixed compiler warnings. d6b2794
Christian Fetzer fetzerch [mythtv-cmyth] Fixed compiler warning in MythEventHandler 6613a4f
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master' 79a9102
Jean-Luc Barrière 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.
Jean-Luc Barrière janbar [cmyth] Cosmetics in recorder.c 54740d7
Jean-Luc Barrière 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.
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master' 3516d0a
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master' 575f327
Jean-Luc Barrière 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
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master' daa200c
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master' c6df3ba
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master' ea8cff6
Christian Fetzer fetzerch [mythtv-cmyth] Added cache for GetArtworkPath and added UpdateStorage…
Jean-Luc Barrière janbar [mythtv-cmyth] Move IsRecordingVisible() to MythProgramInfo::IsVisible() 0c0816e
Jean-Luc Barrière janbar [cmyth] Cleanups in event.c and timestamp.c 570a42c
Jean-Luc Barrière janbar [cmyth] cmyth_timestamp_from_string(): const char* instead char* bba39a5
Jean-Luc Barrière janbar [cmyth] Added cmyth_event_get_message() and cmyth_proginfo_get_from_t…
Christian Fetzer fetzerch [mythtv-cmyth] Fixed GetRecordingLastPlayedPosition's return value on…
… error
Christian Fetzer fetzerch [mythtv-cmyth] Added HasBookmark to MythProgramInfo 6906288
Christian Fetzer 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.
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master' f6fba78
Jean-Luc Barrière janbar [cmyth] Added functions to retreive recording artworks
- Added cmyth_get_storagegroup_fileinfo
- Added cmyth_mysql_get_recording_artwork
Jean-Luc Barrière janbar [cmyth] Fixed comment typo in cmyth_mysql_get_recording_markup 9b7e117
Jean-Luc Barrière janbar [cmyth] Change cmyth_proginfo_get_from_timeslot (use time_t for recst…
Jean-Luc Barrière 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
Jean-Luc Barrière janbar [mythtv-cmyth] Improve artwork retreiving
- Remove usage of storagegroup file list
- Retrieve artworks refs for backend database
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master' ad15e66
Jean-Luc Barrière 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
Jean-Luc Barrière 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.
Christian Fetzer fetzerch [mythtv-cmyth] Refactor GetSetting into GetSettingOnHost in MythConne…
Jean-Luc Barrière janbar [cmyth] Adding cmyth_mysql_get_setting to query global settings e228421
Jean-Luc Barrière janbar [mythtv-cmyth] Add new MythDatabase::GetSetting to retrieve global se…
Christian Fetzer 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.
Jean-Luc Barrière janbar [cmyth] Reduce retries on connection hang to 3 in rcv_length b534500
Jean-Luc Barrière janbar [cmyth] Fix issue with Live TV chain lock after e7424ef e633f96
Christian Fetzer fetzerch Merge remote-tracking branch 'upstream/master'
Jean-Luc Barrière janbar [cmyth] Disconnected backend - Client suspended
Review socket TIMEOUT.

- Manage hang on select() and rcv()
- Return TIMEOUT after 30 secs
Jean-Luc Barrière 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.
Jean-Luc Barrière

Sorry Lars. I missed to fix to target.

Jean-Luc Barrière 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.