Ticket #5443: hdpvr-channel-change.patch
File hdpvr-channel-change.patch, 3.6 KB (added by , 16 years ago) |
---|
-
libs/libmythtv/mpegrecorder.h
75 75 bool StartEncoding(int fd); 76 76 bool StopEncoding(int fd); 77 77 78 void InitHDpvr(void); 78 79 void ResetForNewFile(void); 79 80 80 81 inline bool CheckCC(uint pid, uint cc); -
libs/libmythtv/v4lchannel.cpp
505 505 if ((*it)->externalChanger.isEmpty()) 506 506 { 507 507 if ((*it)->name.contains("composite", false) || 508 (*it)->name.contains("component", false) || 508 509 (*it)->name.contains("s-video", false)) 509 510 { 510 511 VERBOSE(VB_GENERAL, LOC_WARN + "You have not set " -
libs/libmythtv/mpegrecorder.cpp
861 861 return OpenV4L2DeviceAsInput(); 862 862 } 863 863 864 void MpegRecorder::InitHDpvr(void) 865 { 866 SetPositionMapType(MARK_GOP_BYFRAME); 867 868 int progNum = 1; 869 MPEGStreamData *sd = new MPEGStreamData(progNum, true); 870 sd->SetRecordingType(_recording_type); 871 SetStreamData(sd); 872 873 _stream_data->AddAVListener(this); 874 _stream_data->AddWritingListener(this); 875 876 // Make sure the first things in the file are a PAT & PMT 877 _wait_for_keyframe_option = false; 878 HandleSingleProgramPAT(_stream_data->PATSingleProgram()); 879 HandleSingleProgramPMT(_stream_data->PMTSingleProgram()); 880 _wait_for_keyframe_option = true; 881 } 882 864 883 void MpegRecorder::StartRecording(void) 865 884 { 866 885 if (!Open()) … … 875 894 876 895 if (driver == "hdpvr") 877 896 { 878 SetPositionMapType(MARK_GOP_BYFRAME); 879 880 int progNum = 1; 881 MPEGStreamData *sd = new MPEGStreamData(progNum, true); 882 sd->SetRecordingType(_recording_type); 883 SetStreamData(sd); 884 885 _stream_data->AddAVListener(this); 886 _stream_data->AddWritingListener(this); 887 888 // Make sure the first things in the file are a PAT & PMT 889 _wait_for_keyframe_option = false; 890 HandleSingleProgramPAT(_stream_data->PATSingleProgram()); 891 HandleSingleProgramPMT(_stream_data->PMTSingleProgram()); 892 _wait_for_keyframe_option = true; 897 InitHDpvr(); 893 898 } 894 899 else 895 900 { … … 960 965 continue; 961 966 962 967 case 0: 963 VERBOSE(VB_IMPORTANT, LOC_ERR + "select timeout - " 964 "driver has stopped responding"); 968 VERBOSE(VB_IMPORTANT, LOC_ERR + "select timeout - " 969 "driver has stopped responding"); 970 971 TeardownAll(); 972 if (!Open()) 973 VERBOSE(VB_IMPORTANT, LOC_ERR + "Open failed" + ENO); 974 975 if (driver == "hdpvr") 976 { 977 if (!ringBuffer) 978 return; 965 979 966 if (close(readfd) != 0) 967 { 968 VERBOSE(VB_IMPORTANT, LOC_ERR + "Close error" + ENO); 969 } 980 ringBuffer->WriterSeek(0, SEEK_SET); 970 981 971 // Force card to be reopened on next iteration.. 972 readfd = -1; 982 _start_code = 0xffffffff; 983 _last_gop_seen = 0; 984 _frames_written_count = 0; 985 986 InitHDpvr(); 987 remainder = 0; 988 } 973 989 974 990 continue; 975 991 976 992 default: break; 977 993 }