Re: [mythtv] [patch] mmx_gcc.cpp

2004-12-29 Thread Andrew Mahone
Darn, and here I was hoping there was a policy change in favor of
vector intrinsics ;-)
Would a patch replacing some of my mmx.h-based work with vector
intrinsics be accepted if the mmx.h macro code were retained and
selected via an #ifdef for older compilers?

On Tue, 28 Dec 2004 19:19:57 -0500, Isaac Richards [EMAIL PROTECTED] wrote:
 Ah - just check out mmx.h in libs/libmythtv/.  They're fairly straightforward.
 Not as optimal as using the mmx intrinsics, but, they work on 2.95. =)
 
 Isaac
-- 
Andrew Mahone
andrew DOT mahone AT gmail DOT com
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


[mythtv] [PATCH] Mythmusic not finding track length for .flac files

2004-12-29 Thread Colin Guthrie
Wendy Seltzer wrote:
I think I've tracked down the problem here but don't have the C++ 
know-how to fix it:
Reading the track length of flac files appears to have broken in the big 
Nov. 26 mythmusic patch.  A rollback to CVS from Nov. 25 reads track 
lengths again (and once they're in the db, they stay there).  It looks 
as though some of the code didn't make it from flacdecoder.cpp into 
metaioflacvorbiscomment.cpp
Bang on Wendy!
I'd not really noticed the FLAC decoders correct identification of track 
length and thought it hadn't been implemented, but it's all there.

A simple comment out of a line just before the Metadata constructor 
would have actually fixed it, but here is a more complete patch that 
sticks to the structure laid down by the metio base class. Not sure if 
it'll be needed in the future in this way, but it's probably wise to 
stick to it just in case.

Having recently upgraded my flac libraries, I had to add in a
#define HAVE_INTTYPES_H to the files that included FLAC/*.h for this 
to compile.

I don't think it will get in the way of the older implementation, but 
there may be a more correct way fo defining the 64 bit compatibility 
layer (I know very little about this!).

The attached patch contains both the length fix and the insertion of 
these #defines into three files. Feel free not to apply the #define bits 
if it's not appropriate (should be trivial to strip out of the patch).

All the best.
Col.
--
++
| Colin Guthrie  |
++
|   [EMAIL PROTECTED]  |
| http://colin.guthr.ie/ |
++
? flac_compile_fix_length_fix.diff
? make_patch.sh
? metadata.diff.bz2
? test.tar.bz2
? mythmusic/docs
? mythmusic/fix.diff
? mythmusic/kak
? mythmusic/mythmusic.diff
? mythmusic/test
Index: mythmusic/flacdecoder.h
===
RCS file: /var/lib/mythcvs/mythmusic/mythmusic/flacdecoder.h,v
retrieving revision 1.6
diff -u -b -B -w -p -r1.6 flacdecoder.h
--- mythmusic/flacdecoder.h	26 Nov 2004 00:13:04 -	1.6
+++ mythmusic/flacdecoder.h	29 Dec 2004 11:09:15 -
@@ -1,6 +1,7 @@
 #ifndef FLACDECODER_H_
 #define FLACDECODER_H_
 
+#define HAVE_INTTYPES_H
 #include FLAC/all.h
 
 #include decoder.h
Index: mythmusic/flacencoder.h
===
RCS file: /var/lib/mythcvs/mythmusic/mythmusic/flacencoder.h,v
retrieving revision 1.6
diff -u -b -B -w -p -r1.6 flacencoder.h
--- mythmusic/flacencoder.h	26 Nov 2004 00:13:04 -	1.6
+++ mythmusic/flacencoder.h	29 Dec 2004 11:09:15 -
@@ -3,6 +3,7 @@
 
 #include qstring.h
 
+#define HAVE_INTTYPES_H
 #include FLAC/file_encoder.h
 
 #include encoder.h
Index: mythmusic/metaioflacvorbiscomment.cpp
===
RCS file: /var/lib/mythcvs/mythmusic/mythmusic/metaioflacvorbiscomment.cpp,v
retrieving revision 1.1
diff -u -b -B -w -p -r1.1 metaioflacvorbiscomment.cpp
--- mythmusic/metaioflacvorbiscomment.cpp	26 Nov 2004 09:00:36 -	1.1
+++ mythmusic/metaioflacvorbiscomment.cpp	29 Dec 2004 11:09:16 -
@@ -139,11 +139,7 @@ Metadata* MetaIOFLACVorbisComment::read(
 FLAC__ASSERT(0 != block);
 FLAC__ASSERT(block-type == FLAC__METADATA_TYPE_STREAMINFO);
 
-int samplerate = block-data.stream_info.sample_rate;
-int totalsamples = block-data.stream_info.total_samples;
-int bytesperms = (samplerate) / 1000;
-
-length = totalsamples / bytesperms;
+length = getTrackLength(block);
 
 do {
 block = FLAC__metadata_iterator_get_block(iterator);
@@ -179,8 +175,6 @@ Metadata* MetaIOFLACVorbisComment::read(
 FLAC__metadata_chain_delete(chain);
 FLAC__metadata_iterator_delete(iterator);
 
-length = getTrackLength(filename);
-
 Metadata *retdata = new Metadata(filename, artist, album, title, genre,
  year, tracknum, length);
 
@@ -192,15 +186,59 @@ Metadata* MetaIOFLACVorbisComment::read(
 /*!
  * \brief Find the length of the track (in seconds)
  *
+ * \note This isn't used at present, but may be desired for public access
+ *   at somepoint in the future.
+ *
  * \param filename The filename for which we want to find the length.
  * \returns An integer (signed!) to represent the length in seconds.
  */
 int MetaIOFLACVorbisComment::getTrackLength(QString filename)
 {
-filename=filename; // -Wall annoyance
+FLAC__Metadata_Chain *chain = FLAC__metadata_chain_new();
+if (!FLAC__metadata_chain_read(chain, filename.local8Bit())
+|| !FLAC__metadata_chain_read(chain, filename.ascii()))
+{
+FLAC__metadata_chain_delete(chain); 
 return 0;
 }
 
+FLAC__StreamMetadata *block = 0;
+FLAC__Metadata_Iterator *iterator = FLAC__metadata_iterator_new();
+
+FLAC__metadata_iterator_init(iterator, chain);
+
+block = FLAC__metadata_iterator_get_block(iterator);
+
+FLAC__ASSERT(0 != block);
+

[mythtv] audio timecode problem

2004-12-29 Thread Mark Spieth



I have just found a problem (no solution yet) with 
a dvbt recorded program.
happens about 40min into the file.
file is nuv transcoded so mpeg4.

a partial trace of the interesting bit 
is

2004-12-30 00:07:37.029 _AddSamples bytes=9216, 
used=161793, free=350207, timecode=954437762004-12-30 00:07:37.059 A/V 
timecodes audio 95442893 video 95442902 frameinterval 4 avdel 9 avg 
-59572004-12-30 00:07:37.093 A/V timecodes audio 95442926 video 95442942 
frameinterval 4 avdel 16 avg -22172004-12-30 00:07:37.096 _AddSamples 
bytes=13824, used=158721, free=353279, timecode=1312004-12-30 00:07:37.142 
A/V timecodes audio -717 video 95442982 frameinterval 4 avdel 95443699 avg 
2337
not sure as Im not up with the idiosyncracies but 
the timecode appears written wrong in the file during recording.
havent traced it completely yet though. 

only 1 file has it so far.
will continue on it tomorrow evening. seems to be 
similar to something we saw previously.
since it doesnt happen much it will be hard to tell 
where it crept in.
any hints that would help would be 
good.
cheers
mark

Mark Spieth, PhDDC Labs Pty Ltd2 Mavron 
StreetAshwood 3147Australiaph:+61-3-9807 
8600Mobile:+61-4-11 515 717Fax:+61-3-9807 9300www.dclabs.com.au
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


[mythtv] [PATCH] DTVRecorder::HandleKeyframe - SetPositionMap/Delta

2004-12-29 Thread John Patrick Poet
I finally discovered why I cannot record three HD shows while watching a 
fourth, for more than an hour.

In the DTV processing of keyframes, it was calling SetPositionMap 
instead of SetPositionMapDelta.  This means that it was trying to 
delete/insert the position map data for the *entire* show, each time!  
After an hour of recording, that was so many DB queries, that no 
ringbuffer was big enough to prevent overruns from the HD device driver.

The attached patch fixes the problem.
John
Index: libs/libmythtv/dtvrecorder.cpp
===
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/dtvrecorder.cpp,v
retrieving revision 1.1
diff -d -u -r1.1 dtvrecorder.cpp
--- libs/libmythtv/dtvrecorder.cpp	24 Dec 2004 23:24:07 -	1.1
+++ libs/libmythtv/dtvrecorder.cpp	29 Dec 2004 12:46:58 -
@@ -206,11 +206,12 @@
 _position_map[frameNum] = startpos;
 
 if (curRecording  db_lock  db_conn 
-((_position_map.size() % 30) == 0))
+(_position_map_delta.size() == 30))
 {
 pthread_mutex_lock(db_lock);
 MythContext::KickDatabase(db_conn);
-curRecording-SetPositionMap(_position_map, MARK_GOP_BYFRAME, db_conn);
+curRecording-SetPositionMapDelta(_position_map_delta,
+  MARK_GOP_BYFRAME, db_conn);
 curRecording-SetFilesize(startpos, db_conn);
 pthread_mutex_unlock(db_lock);
 _position_map_delta.clear();
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] Prefer lower-numbered audio stream

2004-12-29 Thread J. Donavan Stanley
Doug Larrick wrote:
libavformat/libavcodec expose none of this except number of channels, 
and even that is not properly initialized (always 2) by the time we 
use it in avformatdecoder.cpp.  My immediate problem would be solved 
if I fixed this bug, because it turns out the DVS stream is mono.  But 
IMO in order to make an intelligent auto-selection, having all the 
info outlined above would be helpful.
I know that for DVD streams we get the proper number of tracks and what 
not...

___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] Prefer lower-numbered audio stream

2004-12-29 Thread Doug Larrick
Daniel Thor Kristjansson wrote:
Most of audio information with ATSC is not in the stream that ffmpeg 
sees. Even the limited audio descriptor sometimes present in the PMT is 
jettisoned with the PMT rewriting. I don't think ffmpeg even tries to 
look at this information, but we don't save it in the recording to 
begin with.
Yes, that's true, though if needed we could preserve the audio 
information from PMT while rewriting.  The good news is that it *is* 
still present in the AC3 stream itself.  The only use for preserving 
this data in PMT would be for non-AC3 streams (from DVB maybe?)

-Doug


signature.asc
Description: OpenPGP digital signature
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] Prefer lower-numbered audio stream

2004-12-29 Thread Daniel Thor Kristjansson
On Wed, 29 Dec 2004, Doug Larrick wrote:
]Daniel Thor Kristjansson wrote:
] Most of audio information with ATSC is not in the stream that ffmpeg sees.
] Even the limited audio descriptor sometimes present in the PMT is jettisoned
] with the PMT rewriting. I don't think ffmpeg even tries to look at this
] information, but we don't save it in the recording to begin with.
]
]Yes, that's true, though if needed we could preserve the audio information from
]PMT while rewriting.  The good news is that it *is* still present in the AC3
]stream itself.  The only use for preserving this data in PMT would be for
]non-AC3 streams (from DVB maybe?)

DVB, I believe, always includes this info in the PMT. In ATSC it is 
optional.

-- Daniel
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


[mythtv] [PATCH] osd channel browse mode displays junk when no data for channel

2004-12-29 Thread Jack Porter
Hi,
When using Browse mode while watching live tv, if you pass a channel for 
which there is no current program data, junk is displayed instead of the 
channel name/number.

This patch makes ProgramInfo::GetProgramAtDateTime() check if 
ProgramList::FromProgram() returned any results, and if not it looks up 
just the channel data.

Cheers
Jack
--
Jack Porter   Seoul
[EMAIL PROTECTED]South Korea
Index: mythtv/libs/libmythtv/programinfo.cpp
===
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/programinfo.cpp,v
retrieving revision 1.180
diff -r1.180 programinfo.cpp
506c506,554
 return progList.take(0);
---
 if (!progList.isEmpty())
 {
 return progList.take(0);
 }
 else
 {
 ProgramInfo *p = new ProgramInfo;
 QString querystr = QString(SELECT chanid, channum, callsign, name, 
commfree, outputfilters 
FROM channel 
WHERE chanid = \%1\;)
.arg(channel);
 
 QSqlQuery query(QString::null, db);
 query.prepare(querystr);
 
 if (!query.exec() || !query.isActive())
 {
 MythContext::DBError(ProgramInfo::GetProgramAtDateTime, 
  query.executedQuery());
 return p;
 }
 
 if (query.next())
 {
 p-chanid = query.value(0).toString();
 p-startts = dtime;
 p-endts = dtime;
 p-recstartts = p-startts;
 p-recendts = p-endts;
 p-lastmodified = p-startts;
 p-title = ;
 p-subtitle = ;
 p-description = ;
 p-category = ;
 p-chanstr = query.value(1).toString();
 p-chansign = QString::fromUtf8(query.value(2).toString());
 p-channame = QString::fromUtf8(query.value(3).toString());
 p-repeat = 0;
 p-chancommfree = query.value(4).toInt();
 p-chanOutputFilters = query.value(5).toString();
 p-seriesid = ;
 p-programid = ;
 p-year = ;
 p-stars = 0.f;
 }
 
 return p;
 }
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] [PATCH] DTVRecorder::HandleKeyframe - SetPositionMap/Delta

2004-12-29 Thread John Patrick Poet

On Wed, 29 Dec 2004, Daniel Thor Kristjansson wrote:

 On Wed, 29 Dec 2004, John Patrick Poet wrote:
 ]I finally discovered why I cannot record three HD shows while watching a
 ]fourth, for more than an hour.
 ]In the DTV processing of keyframes, it was calling SetPositionMap instead of
 ]SetPositionMapDelta.  This means that it was trying to delete/insert the
 ]position map data for the *entire* show, each time!

 Ah! This explains why this only happens late in the recordings, and not
 for everyone. If your DB can keep up with these mad inserts after 2
 hours, the problem is unlikely to ever be triggered. I'm impressed that
 this worked as well as it did, mysql must be pretty speedy.

 -- Daniel


While a ringbuffer is still necessary to prevent the overruns, this fix does
mean that the ringbuffer size can be much smaller.  In a preliminary test, I
saw a maximum of 4.7MB used after an hour of recording three shows.  These
shows were just upconverts and not true HD, but that is promising.

I will go back and rework the hdtv ringbuffer code (again), to use a fixed,
single 10MB buffer.  That should give it enough breathing space to handle
just about any situation.

I admit that I feel greatly relieved now that this problem has been tracked
down.  It was really irritating me!

John
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] [patch] mythtv-HOWTO-5.html - compiling for different processors

2004-12-29 Thread Jason Gabriele
No, I only have Intel processors at my disposal. Compiling for pentium4 
gives me a 30% speed boost. For the rest, I based this on the gcc 
manual. I've heard rumors about xp optimization being broken, but I 
can't verify this myself.
Not really an authority at all but this article does touch on this: 
http://www.anandtech.com/linux/showdoc.aspx?i=2308p=10

However, this is just gzip compression. I would like to see a shootout 
on video compression/playback.

--
Jason Gabriele
jason.gabriele at gmail dot com
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


[mythtv] [patch] NuppelVideoRecorder cleanup patches

2004-12-29 Thread Daniel Thor Kristjansson
There are two patches here. The first, cleanup-verbose-nvr-v1.patch,
replaces most of the cerr redirects with VERBOSE macros. This one should 
be completely safe to apply.

The second, cleanup-exit-nvr-v1.patch, replaces a number of exits with a 
errored boolean and some tests of that variable. This also replaces two 
cerr's with VERBOSE macros, this was done here so that the patches would 
be compatible with each other.

-- Daniel

cleanup-verbose-nvr-v1.patch.bz2
Description: Binary data


cleanup-exit-nvr-v1.patch.bz2
Description: Binary data
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] [patch] mythtv-HOWTO-5.html - compiling for different processors

2004-12-29 Thread Daniel Thor Kristjansson
On Wed, 29 Dec 2004, Jason Gabriele wrote:
]Not really an authority at all but this article does touch on this:
]http://www.anandtech.com/linux/showdoc.aspx?i=2308p=10
]
]However, this is just gzip compression. I would like to see a shootout 
]on video compression/playback.

Yeah, this is completely different from MythTV, gzip is all integer OPs.

-- Daniel
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] [PATCH] DTVRecorder::HandleKeyframe - SetPositionMap/Delta

2004-12-29 Thread Taylor Jacob
 While a ringbuffer is still necessary to prevent the overruns, this fix does
 mean that the ringbuffer size can be much smaller.  In a preliminary test, I
 saw a maximum of 4.7MB used after an hour of recording three shows.  These
 shows were just upconverts and not true HD, but that is promising.

What difference does it make if its an upconvert or not?  Since you are just
saving the mpeg streams it doesn't care about what format it is in.  If the
content was (foolishly) upconverted to say 720p or 1080i it would be just the
same as if the content were true 720p or 1080i.  The bandwidth usage should be
the same, so I don't understand what you are getting at..

Taylor
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] [PATCH] osd channel browse mode displays junk when no data for channel

2004-12-29 Thread Steven
Jack Porter schreef:
Hi,
When using Browse mode while watching live tv, if you pass a channel 
for which there is no current program data, junk is displayed instead 
of the channel name/number.

This patch makes ProgramInfo::GetProgramAtDateTime() check if 
ProgramList::FromProgram() returned any results, and if not it looks 
up just the channel data.

Cheers
Jack
Thanks for that. I think you have to resend the patch as a unified diff 
to get it committed here (diff -u).
Maybe it would be nice to also show the string value from the database 
that is shown in the guide when there is nothing on? (=the result from 
select data from settings where value = 'UnknownTitle'; )

Steven
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


[mythtv] mythfilldatabase: symbol lookup error: mythfilldatabase: undefined symbol: _ZN11MythContextC1ERK7QStringbb

2004-12-29 Thread Paul Barrette
I just noticed this error in my mythbackend.log.  This is a fresh
build from cvs.  Any ideas as to what this is?

thanks,
Pb
-- 
Utque fit, in gremium pulvis si forte puellae
  Deciderit, digitis excutiendus erit:
Etsi nullus erit pulvis, tamen excute nullum:
  Quaelibet officio causa sit apta tuo.   (Ov. Ars 1.149ff.)
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] [PATCH] DTVRecorder::HandleKeyframe - SetPositionMap/Delta

2004-12-29 Thread John Patrick Poet

On Wed, 29 Dec 2004, Taylor Jacob wrote:

  While a ringbuffer is still necessary to prevent the overruns, this fix does
  mean that the ringbuffer size can be much smaller.  In a preliminary test, I
  saw a maximum of 4.7MB used after an hour of recording three shows.  These
  shows were just upconverts and not true HD, but that is promising.

 What difference does it make if its an upconvert or not?  Since you are just
 saving the mpeg streams it doesn't care about what format it is in.  If the
 content was (foolishly) upconverted to say 720p or 1080i it would be just the
 same as if the content were true 720p or 1080i.  The bandwidth usage should be
 the same, so I don't understand what you are getting at..

 Taylor


I *think* my local stations send out a lower bitrate when broadcasting
non-primetime programming, but I could be wrong.

The upconverted shows are not stretched.  They are pillar boxed.  That much
black area should be easily compressed, so I assumed that the station would
dial down the bitrate


John
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] [PATCH] DTVRecorder::HandleKeyframe - SetPositionMap/Delta

2004-12-29 Thread Taylor Jacob
 The upconverted shows are not stretched.  They are pillar boxed.  That much
 black area should be easily compressed, so I assumed that the station would
 dial down the bitrate

The concept of upconverting is broken in itself, and from the example I have
seen here the bitrate is fixed regardless of what the originating content was..
480i or 1080i.. If you are going to destroy the quality by upconverting chances
are you aren't going to do anything with the bitrates either..  But either way
you can check the PES header of the video and get the bitrate I believe.. Its
in the dvbdev/transform.c code somewhere buried if you want to see how to do
it.. I should patch it into dtvrecorder.cpp at some point so we can see what
streams are being recorded anyway..

Taylor
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] [PATCH] Mythmusic not finding track length for .flac files

2004-12-29 Thread Wendy Seltzer
At 11:15 AM 12/29/2004 +, Colin Guthrie wrote:
The attached patch contains both the length fix and the insertion of these 
#defines into three files. Feel free not to apply the #define bits if it's 
not appropriate (should be trivial to strip out of the patch).
Thanks for the quick response Colin!  Works here.
--Wendy

All the best.
Col.
--
++
| Colin Guthrie  |
++
|   [EMAIL PROTECTED]  |
| http://colin.guthr.ie/ |
++
? flac_compile_fix_length_fix.diff
? make_patch.sh
? metadata.diff.bz2
? test.tar.bz2
? mythmusic/docs
? mythmusic/fix.diff
? mythmusic/kak
? mythmusic/mythmusic.diff
? mythmusic/test
Index: mythmusic/flacdecoder.h
===
RCS file: /var/lib/mythcvs/mythmusic/mythmusic/flacdecoder.h,v
retrieving revision 1.6
diff -u -b -B -w -p -r1.6 flacdecoder.h
--- mythmusic/flacdecoder.h 26 Nov 2004 00:13:04 -  1.6
+++ mythmusic/flacdecoder.h 29 Dec 2004 11:09:15 -
@@ -1,6 +1,7 @@
 #ifndef FLACDECODER_H_
 #define FLACDECODER_H_
+#define HAVE_INTTYPES_H
 #include FLAC/all.h
 #include decoder.h
Index: mythmusic/flacencoder.h
===
RCS file: /var/lib/mythcvs/mythmusic/mythmusic/flacencoder.h,v
retrieving revision 1.6
diff -u -b -B -w -p -r1.6 flacencoder.h
--- mythmusic/flacencoder.h 26 Nov 2004 00:13:04 -  1.6
+++ mythmusic/flacencoder.h 29 Dec 2004 11:09:15 -
@@ -3,6 +3,7 @@
 #include qstring.h
+#define HAVE_INTTYPES_H
 #include FLAC/file_encoder.h
 #include encoder.h
Index: mythmusic/metaioflacvorbiscomment.cpp
===
RCS file: /var/lib/mythcvs/mythmusic/mythmusic/metaioflacvorbiscomment.cpp,v
retrieving revision 1.1
diff -u -b -B -w -p -r1.1 metaioflacvorbiscomment.cpp
--- mythmusic/metaioflacvorbiscomment.cpp   26 Nov 2004 09:00:36 
-  1.1
+++ mythmusic/metaioflacvorbiscomment.cpp   29 Dec 2004 11:09:16 -
@@ -139,11 +139,7 @@ Metadata* MetaIOFLACVorbisComment::read(
 FLAC__ASSERT(0 != block);
 FLAC__ASSERT(block-type == FLAC__METADATA_TYPE_STREAMINFO);

-int samplerate = block-data.stream_info.sample_rate;
-int totalsamples = block-data.stream_info.total_samples;
-int bytesperms = (samplerate) / 1000;
-
-length = totalsamples / bytesperms;
+length = getTrackLength(block);
 do {
 block = FLAC__metadata_iterator_get_block(iterator);
@@ -179,8 +175,6 @@ Metadata* MetaIOFLACVorbisComment::read(
 FLAC__metadata_chain_delete(chain);
 FLAC__metadata_iterator_delete(iterator);
-length = getTrackLength(filename);
-
 Metadata *retdata = new Metadata(filename, artist, album, title, genre,
  year, tracknum, length);
@@ -192,15 +186,59 @@ Metadata* MetaIOFLACVorbisComment::read(
 /*!
  * \brief Find the length of the track (in seconds)
  *
+ * \note This isn't used at present, but may be desired for public access
+ *   at somepoint in the future.
+ *
  * \param filename The filename for which we want to find the length.
  * \returns An integer (signed!) to represent the length in seconds.
  */
 int MetaIOFLACVorbisComment::getTrackLength(QString filename)
 {
-filename=filename; // -Wall annoyance
+FLAC__Metadata_Chain *chain = FLAC__metadata_chain_new();
+if (!FLAC__metadata_chain_read(chain, filename.local8Bit())
+|| !FLAC__metadata_chain_read(chain, filename.ascii()))
+{
+FLAC__metadata_chain_delete(chain);
 return 0;
 }
+FLAC__StreamMetadata *block = 0;
+FLAC__Metadata_Iterator *iterator = FLAC__metadata_iterator_new();
+
+FLAC__metadata_iterator_init(iterator, chain);
+
+block = FLAC__metadata_iterator_get_block(iterator);
+
+FLAC__ASSERT(0 != block);
+FLAC__ASSERT(block-type == FLAC__METADATA_TYPE_STREAMINFO);
+
+int length = getTrackLength(block);
+
+FLAC__metadata_chain_delete(chain);
+FLAC__metadata_iterator_delete(iterator);
+
+return length;
+}
+
+
+//==
+/*!
+ * \brief Find the length of the track (in seconds)
+ *
+ * \note The FLAC StreamMetadata block must be asserted 
FLAC__METADATA_TYPE_STREAMINFO
+ *
+ * \param pBlock Pointer to a FLAC Metadata block
+ * \returns An integer (signed!) to represent the length in seconds.
+ */
+inline int MetaIOFLACVorbisComment::getTrackLength(FLAC__StreamMetadata* 
pBlock)
+{
+if (!pBlock)
+return 0;
+
+return pBlock-data.stream_info.total_samples /
+(pBlock-data.stream_info.sample_rate / 1000);
+}
+

 //==
 /*!
Index: mythmusic/metaioflacvorbiscomment.h
===
RCS file: /var/lib/mythcvs/mythmusic/mythmusic/metaioflacvorbiscomment.h,v
retrieving 

Re: [mythtv] [PATCH] Mythmusic not finding track length for .flac files

2004-12-29 Thread Colin Guthrie
Wendy Seltzer wrote:
At 11:15 AM 12/29/2004 +, Colin Guthrie wrote:
The attached patch contains both the length fix and the insertion of 
these #defines into three files. Feel free not to apply the #define 
bits if it's not appropriate (should be trivial to strip out of the 
patch).

Thanks for the quick response Colin!  Works here.
No probs, you caught me when I was trying to avoid working, so it fitted 
in well ;)

Col.
--
++
| Colin Guthrie  |
++
|   [EMAIL PROTECTED]  |
| http://colin.guthr.ie/ |
++
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


RE: [mythtv] audio timecode problem

2004-12-29 Thread Torbjörn Jansson
I don't know if it's related or not, but there is some timecode wierdness in
mythtv.
A while back there was some discussion about the audio time code sync
packets being wrong for some reason and that caused playback problems.
If i remember correctly the source of the problem was not found and instead
a workaround was developed and this fixed the problem.

Maybe this is related somehow?

When i was developing the windows filters i found that some files have video
timecodes thats realy wierd, they start realy high, then increase for a few
frames, and then reset back to zero and then continue normaly.
I had to develop a workaround for this because windows (actualy directshow)
doesn't like when timecodes jump down, they must always increase.
Note that this problem is only at the begining of the file, the very first
few video frames.
I don't know if this is still a problem or not.


[EMAIL PROTECTED]  wrote:
 I have just found a problem (no solution yet) with a dvbt
 recorded program.
 happens about 40min into the file.
 file is nuv transcoded so mpeg4.
 
 a partial trace of the interesting bit is
 
 2004-12-30 00:07:37.029 _AddSamples bytes=9216, used=161793,
 free=350207, timecode=95443776
 2004-12-30 00:07:37.059 A/V timecodes audio 95442893 video
 95442902 frameinterval 4 avdel 9 avg -5957
 2004-12-30 00:07:37.093 A/V timecodes audio 95442926 video
 95442942 frameinterval 4 avdel 16 avg -2217
 2004-12-30 00:07:37.096 _AddSamples bytes=13824, used=158721,
 free=353279, timecode=131 2004-12-30 00:07:37.142 A/V timecodes audio
 -717 video 95442982 frameinterval 4 avdel 95443699 avg 2337
 
 not sure as Im not up with the idiosyncracies but the
 timecode appears written wrong in the file during recording.
 havent traced it completely yet though.
 only 1 file has it so far.
 will continue on it tomorrow evening. seems to be similar to
 something we saw previously. since it doesnt happen much it will be
 hard to tell where it crept in. any hints that would help would be
 good. 
 cheers
 mark
 

___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


[mythtv] [patch] channelbase cleanup

2004-12-29 Thread Daniel Thor Kristjansson
This patch cleans up the handling of errors encountered when executing 
an external channel changing program or script. I've also added some 
code to timeout if this program does not exit within 30 seconds. However 
I've left in the  in the execution of the script because this 
function is not called in a separate thread and could possibly take a 
very long time when changing the channel involves moving a dish. But if 
we address this problem in the future, this timeout handling would allow 
us to wait for the tuning program to finish, and let us observe the 
return value; this lets the external program signal problems to MythTV.

This function was returning 'no error' when the fork call didn't work, 
this has been fixed. I've also added a check of the return value of 
execl, which will tell us if there was an access error. And I've fixed 
the status checking so it differentiates between a program killed by a 
signal or returning a non-zero value. This patch also changes the cerr 
redirects and perror's in channelbase to use the VERBOSE macro.

-- DanielIndex: libs/libmythtv/channelbase.cpp
===
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/channelbase.cpp,v
retrieving revision 1.9
diff -u -r1.9 channelbase.cpp
--- libs/libmythtv/channelbase.cpp  19 Aug 2004 02:02:20 -  1.9
+++ libs/libmythtv/channelbase.cpp  29 Dec 2004 19:05:15 -
@@ -107,7 +107,8 @@
 if (input = 0)
 SwitchToInput(input, true);
 else
-cerr  Couldn't find input:   inputname   on card\n;
+VERBOSE(VB_IMPORTANT, QString(ChannelBase: Could not find input: 
+  %1 on card\n).arg(inputname));
 }
 
 void ChannelBase::SwitchToInput(const QString inputname, const QString chan)
@@ -120,7 +121,9 @@
 SetChannelByString(chan);
 }
 else
-cerr  Couldn't find input:   inputname   on card\n;
+VERBOSE(VB_IMPORTANT,
+QString(ChannelBase: Could not find input: %1 on card when 
+setting channel %2\n).arg(inputname).arg(chan));
 }
 
 bool ChannelBase::ChangeExternalChannel(const QString channum)
@@ -134,28 +137,73 @@
 VERBOSE(VB_CHANNEL, QString(External channel change: %1).arg(command));
 pid_t child = fork();
 if (child  0)
-{
-perror(fork);
+{   // error encountered in creating fork
+QString msg(ChannelBase: fork error -- );
+msg.append(strerror(errno));
+VERBOSE(VB_IMPORTANT, msg);
+return false;
 }
 else if (child == 0)
-{
+{   // we are the new fork
 for(int i = 3; i  sysconf(_SC_OPEN_MAX) - 1; ++i)
 close(i);
-execl(/bin/sh, sh, -c, command.ascii(), NULL);
-perror(exec);
-_exit(-11);
+int ret=execl(/bin/sh, sh, -c, command.ascii(), NULL);
+QString msg(ChannelBase: );
+if (EACCES==ret) {
+msg.append(QString(Access denied to /bin/sh
+when executing %1\n).arg(command.ascii()));
+}
+msg.append(strerror(errno));
+VERBOSE(VB_IMPORTANT, msg);
+_exit(1); // this exit is ok, we are just exiting from the channel 
changing fork with an error.
 }
 else
-{
-int status;
-if (waitpid(child, status, 0)  0)
+{   // child contains the pid of the new process
+int status=0, pid=0;
+VERBOSE(VB_CHANNEL, Waiting for External Tuning program to exit);
+
+bool timed_out = false;
+uint timeout = 30; // how long to wait in seconds
+time_t start_time = time(0);
+while (-1!=pid  !timed_out)
 {
-perror(waitpid);
+sleep(1);
+pid = waitpid(child, status, WUNTRACED|WNOHANG);
+VERBOSE(VB_IMPORTANT, QString(ret_pid(%1) child(%2) status(0x%3))
+.arg(pid).arg(child).arg(status,0,16));
+if (pid==child)
+break;
+else if (time(0)start_time+timeout)
+timed_out = true;
 }
-else if (status != 0)
+if (timed_out)
 {
-cerr  External channel change command exited with status 
-  status  endl;
+VERBOSE(VB_IMPORTANT, External Tuning program timed out, 
killing);
+kill(child, SIGTERM);
+usleep(500);
+kill(child, SIGKILL);
+return false;
+}
+
+VERBOSE(VB_CHANNEL, External Tuning program no longer running);
+if (WIFEXITED(status))
+{   // program exited normally
+int ret = WEXITSTATUS(status);
+if (ret)
+{   // external tuning program returned error value
+VERBOSE(VB_IMPORTANT,
+QString(ChannelBase: external tuning program 
+exited with error %1).arg(ret));
+return false;
+}
+   

[mythtv] [patch] datadirect.cpp exit cleanup

2004-12-29 Thread Daniel Thor Kristjansson
This removes exit()'s in datadirect.cpp, and changes grabLineupsOnly(), 
grabData() and grabAllData() so that they return true on successful 
completion, and false on unsuccessful completion. It also adds checks 
for error conditions, where appropriate.

-- DanielIndex: libs/libmythtv/datadirect.h
===
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/datadirect.h,v
retrieving revision 1.2
diff -u -r1.2 datadirect.h
--- libs/libmythtv/datadirect.h 24 Dec 2004 23:24:07 -  1.2
+++ libs/libmythtv/datadirect.h 29 Dec 2004 20:04:00 -
@@ -254,9 +254,9 @@
 void updateStationViewTable();
 void updateProgramViewTable(int sourceid);
 
-void grabLineupsOnly();
-void grabData(bool plineupsonly, QDateTime pstartdate, QDateTime penddate);
-void grabAllData(void);
+bool grabLineupsOnly();
+bool grabData(bool plineupsonly, QDateTime pstartdate, QDateTime penddate);
+bool grabAllData(void);
 
 void parseLineups();
 void parseStations();
Index: libs/libmythtv/datadirect.cpp
===
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/datadirect.cpp,v
retrieving revision 1.11
diff -u -r1.11 datadirect.cpp
--- libs/libmythtv/datadirect.cpp   24 Dec 2004 23:24:07 -  1.11
+++ libs/libmythtv/datadirect.cpp   29 Dec 2004 20:04:00 -
@@ -433,7 +433,7 @@
 MythContext::DBError(Analyzing table dd_productioncrew, query);
 }
 
-void DataDirectProcessor::grabData(bool plineupsOnly, QDateTime pstartDate, 
+bool DataDirectProcessor::grabData(bool plineupsOnly, QDateTime pstartDate, 
QDateTime pendDate) 
 {
 QString ddurl = 
http://datadirect.webservices.zap2it.com/tvlistings/xtvdService;;
@@ -452,9 +452,9 @@
 char ctempfilename[] = /tmp/mythpostXX;
 if (mkstemp(ctempfilename) == -1) 
 {
- perror(mkstemp);
- VERBOSE(VB_IMPORTANT, DDP: error creating temp files);
- exit(-12);
+VERBOSE(VB_IMPORTANT, QString(DDP: error creating temp files -- %1).
+arg(strerror(errno)));
+return false;
 }
 
 QString tmpfilename = QString(ctempfilename);
@@ -494,9 +494,9 @@
 FILE* fp = popen(command.ascii(), r);
 if (fp == NULL) 
 {
-VERBOSE(VB_GENERAL, Failed to get data);
-perror(command.ascii());
-return;
+VERBOSE(VB_IMPORTANT, QString(DDP: Failed to get data (%1) -- %2).
+arg(command.ascii()).arg(strerror(errno)));
+return false;
 }
 
 QFile f;
@@ -504,7 +504,7 @@
 if (!f.open(IO_ReadOnly, fp)) 
 {
VERBOSE(VB_GENERAL,Error opening DataDirect file);
-   return;
+   return false;
 }
 
 DDStructureParser ddhandler(*this);
@@ -515,23 +515,26 @@
 xmlsimplereader.parse(xmlsource);
 f.close();
 postfile.remove();
+return true;
 }
 
-void DataDirectProcessor::grabLineupsOnly() 
+bool DataDirectProcessor::grabLineupsOnly() 
 {
+bool ok = true;
 if ((lastrunuserid != getUserID()) || (lastrunpassword != getPassword())) 
 {
 lastrunuserid = getUserID();
 lastrunpassword = getPassword();
-grabData(true, QDateTime::currentDateTime(),
- QDateTime::currentDateTime());
-}   
+ok = grabData(true, QDateTime::currentDateTime(),
+  QDateTime::currentDateTime());
+}
+return ok;
 }   
 
-void DataDirectProcessor::grabAllData() 
+bool DataDirectProcessor::grabAllData() 
 {
-grabData(false, QDateTime(QDate::currentDate()).addDays(-2),
- QDateTime(QDate::currentDate()).addDays(15));
+return grabData(false, QDateTime(QDate::currentDate()).addDays(-2),
+QDateTime(QDate::currentDate()).addDays(15));
 }
 
 void DataDirectProcessor::createATempTable(const QString ptablename, 
Index: libs/libmythtv/videosource.cpp
===
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/videosource.cpp,v
retrieving revision 1.52
diff -u -r1.52 videosource.cpp
--- libs/libmythtv/videosource.cpp  20 Nov 2004 05:54:23 -  1.52
+++ libs/libmythtv/videosource.cpp  29 Dec 2004 20:04:01 -
@@ -132,8 +132,11 @@
 
 pdlg.setProgress(1);
 
-ddp.grabLineupsOnly();
-
+if (!ddp.grabLineupsOnly())
+{
+VERBOSE(VB_IMPORTANT, DDLS: fillSelections did not successfully load 
selections);
+return;
+}
 QValueListDataDirectLineup lineups = ddp.getLineups();
 
 QValueListDataDirectLineup::iterator it;
Index: programs/mythfilldatabase/filldata.cpp
===
RCS file: /var/lib/mythcvs/mythtv/programs/mythfilldatabase/filldata.cpp,v
retrieving revision 1.140
diff -u -r1.140 filldata.cpp
--- programs/mythfilldatabase/filldata.cpp  27 Dec 2004 04:33:08 -  
1.140
+++ 

Re: [mythtv] [Pseudo-PATCH] SBE crash when MBE restarted

2004-12-29 Thread Isaac Richards
On Saturday 25 December 2004 04:19 pm, Shane Shrybman wrote:
 Hi,

 This is almost definitely not the correct fix for this. However, I hope
 it does illustrate the problem.

 This bug causes the SBE to crash when the MBE is restarted. This patch
 allows my SBE to survive. What is the correct way to fix this?

Try current CVS to see if what I just checked in works..

 (BTW: Just curious, is there a name for this general type of problem? )

Using a pointer after it's been deleted? =)

Isaac
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


[mythtv] [patch] NuppelVideoPlayer cleanup

2004-12-29 Thread Daniel Thor Kristjansson
This is the last in the series of exit cleanup patches for a while. I'm 
tackling ffmpeg next, and expect that to take some time. This is the 
biggest of the series as well, it removes premature exit()'s from the 
player and aborts the playing instead with an informational dialog for 
the user. It adds a errored variable to NVP and the videoout classes as 
well. If an error is encountered in either the NVP errored variable is 
set and the player is shut down. I think I got this right, but this 
patch needs review the most of all the cleanup patches as it's slightly 
more complex.

-- Daniel

cleanup-nvp-v1.patch.bz2
Description: Binary data
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] AIR2PC Compiling Instructions

2004-12-29 Thread Angel Li
Taylor Jacob wrote:
I have seen some prople having problems compiling the dvb-kernel drivers to work
with the Air2PC..  2.6.10 came out on Dec-24-2004..
I just downloaded 2.6.10, got the dvb-kernel cvs code from today..
Ran the makelinks script in dvb-kernel to inject the driver into the linux
source tree..
Then I selected the B2C2 SkyStar2/AirStar2 card in the config screens and
compiled..
It all worked just like it should.. Apparently there was something fubared with
2.6.9 + dvb-kernel.. Either way I had no problems, so if you are strugling try
out 2.6.10..
 

You just wrote the HOWTO I was working on :) I had not tried the latest 
CVS dvb-kernel code and was running the one from mid December but 2.6.10 
has been working like a charm and my PVR-250 is happy with 
ivtv-0.2.0-rc3b and that kernel.

Anyways, I'm really happy with the Air2PC card. There are 2 outstanding 
problems right now: the TV guide and bad sound from 780p programming. 
Guess these problems are not due to the card.

Angel
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] [PATCH] livetv timestretch speed revert at endof buffer/file ver 7B

2004-12-29 Thread Isaac Richards
On Sunday 26 December 2004 10:07 pm, Mark Spieth wrote:
 as per isaacs observation, continually asking the db for info is a very bad
 thing. so here is a patch with an estimating version. works ok I think but
 not perfect of course. also included is improved video smoothness in
 playback esp when playback speed  output framerate. tested with audio as
 timebase.
 hopefully this is closer to being something useful and commitable.

Closer, but, wouldn't it be simpler to simply estimate the value and only 
update it every few seconds, instead of the extremely overcomplicated stuff 
you have now?

Isaac
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] [PATCH] mythfrontend segfault fix

2004-12-29 Thread Isaac Richards
On Sunday 26 December 2004 05:08 pm, vitold wrote:
 Hi,

 I'am a litle conffused, I realise that my first patch wasn't very clear,
 there was a second fix for a segfault than can occur at the end of the
 playback becose of a bad sycronization of two threads:

I think a better fix would be to remove the eof test in the OutputVideoLoop 
while loop, and wait for it to be killed in the actual player loop.

Isaac
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] [PATCH] amd64 (-march=k8) frontend crash with ivtv

2004-12-29 Thread Isaac Richards
On Tuesday 28 December 2004 01:37 am, tommy wrote:
 The pointer manipulation in the two lines of code are incorrect for k8
 processors, they were causing the frontend to segfault on playback.
 This hasn't been tested on a 32 bit processor, so if someone could make
 sure it compiles without warnings and works that would be great.

Can someone test this so I can commit it?  My pvr-350 using machine isn't 
booting at the moment.. 

Isaac
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] Re: [PATCH] Add metadata editor to MythMusic

2004-12-29 Thread Isaac Richards
On Tuesday 28 December 2004 09:13 am, Paul wrote:
  Isaac wrote:
   The attached patch adds a metadata editor to MythMusic which
   allows you to save the changes optionally to both the database and
   the file. You access the editor from the playback screen by pressing
   the INFO button. Useful if you notice the track that you are playing
   has been wrongly tagged or the imported metadata is wrong.
  
  Are there images for this that weren't sent along with the patch?
  
  Isaac

 Just noticed a discrepancy in MythMusic's dbcheck.cpp which updates
 the database schema.

 At the top of the file currentDatabaseVersion is set to 1001 but at the
 bottom of the file there is an update from version 1001 to 1002.

 Shouldn't the currentDatabaseVersion not be set to 1002?

It's really just there as a placeholder, so things don't conflict with mfd if 
someone else were to change the schema.

 If  I understand the code properly the update from version 1001 to 1002
 will never take place. If that is the case the above patch will not work
 because it uses the compilation field which is only available after the
 update to 1002.

 Not sure why my database already contains the update. Possibly it was
 updated
 by the mfd stuff?

Yup.

Isaac
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] [PATCH] Fix weather icons in MythWeather

2004-12-29 Thread Isaac Richards
On Tuesday 28 December 2004 11:19 am, Paul wrote:
 This patch fixes the problem of MythWeather not always being able
 to find the correct weather icons after recent changes by J. Donovan
 to allow weather icons to be in a weather sub directory under the theme
 directory, which only Titivillus has that sub directory at the moment.

Should be all in CVS now.

Isaac
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] [PATCH] unicode channel names and callsigns

2004-12-29 Thread Isaac Richards
On Tuesday 28 December 2004 11:51 pm, Jack Porter wrote:
 Hi,

 This is a trivial patch that adds missing fromUtf8 conversions for
 channel name and callsign in a few places.  Some places were already
 doing the conversion but others were missing, causing junk in some menus
 such as the Watch Recordings and Upcoming Recordings menus.

Applied - please use unified diffs (diff -u) in the future, since they are 
easier for me to read.

Isaac
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] audio timecode problem

2004-12-29 Thread Ed Wildgoose

When i was developing the windows filters i found that some files have video
timecodes thats realy wierd, they start realy high, then increase for a few
frames, and then reset back to zero and then continue normaly.
I had to develop a workaround for this because windows (actualy directshow)
doesn't like when timecodes jump down, they must always increase.
Note that this problem is only at the begining of the file, the very first
few video frames.
I don't know if this is still a problem or not.
 

I'm just looking through the xine code at the moment (for other 
reasons).  They seem to have something they call the metronome which 
basically calculates their own timestamps based on all available info, 
eg the timestamps in the mpeg stream.  Specifically this is to deal with 
timestamps which wrap or go negative, etc.  Interesting idea...
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] [PATCH] livetv timestretch speed revert at endofbuffer/file ver 7B

2004-12-29 Thread Mark Spieth
the stuff in GetFrame is not for the end of buffer detect.
this was for smoothness in playback when videooutrate  playrate
yes that bit is complicated.
the stuff in IsLiveAndNearEnd is quite simple I thought and works quite
well.
I can redo the patch without the stuff in GetFrame if you like but wont
unless you think the rest is ok.
cheers
mark


 Closer, but, wouldn't it be simpler to simply estimate the value and only
 update it every few seconds, instead of the extremely overcomplicated
stuff
 you have now?

 Isaac
 ___
 mythtv-dev mailing list
 mythtv-dev@mythtv.org
 http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] mythfilldatabase: symbol lookup error: mythfilldatabase: undefined symbol: _ZN11MythContextC1ERK7QStringbb

2004-12-29 Thread Nigel Pearson
I just noticed this error in my mythbackend.log.  This is a fresh
build from cvs.  Any ideas as to what this is?
I think your mythbackend binary is calling a different
libmyth than it was compiled with. Forgot to do a make install?
Different PREFIX to your runtime LD_LIB paths?
--
Nigel Pearson, [EMAIL PROTECTED] | People say I'm strange, does it
Telstra BID, Sydney, Australia   |make me a stranger?
Office: 8255 4222Fax:  8255 3153  |  My best friend was born
Mobile: 0408 664435  Home: 9792 6998  | in a manger-DC Talk
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] some comments

2004-12-29 Thread Thomas M. Pluth
 i was lookin the code of some complex sources of
 mythtv (such as main.cpp) and i wonder why is that
 there are no comments of the code (or very few).
 i'm tryin' to understand it (the code, i mean) and i
 realy can't!
 ¿thus anybody have a diagram of the layers on myht?
 it's a real pain in the ass to seat in front of the
 machine and try to debug something so complex.
 any help will be welcome.
 pedro.
 yes, my english sucks, i know that already!


I agree.  Comments would be nice.


___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] Re: [mythtv-users] Unable to change channel

2004-12-29 Thread Kyle Rose
Doug Larrick [EMAIL PROTECTED] writes:

 Your big issue here is that WGBHDT3 and WGBHDT4 don't really exist. 
 Unsubscribe from them at zap2it, and remove them.  WHDHDT2 is another 
 phantom.  The others look all right to me (I'm in the Boston area), but 
 you have duplicate channel numbers which you should fix.  Or, if you 
 clear your HDTV channels from your channel table entirely and fix your 
 zap2it subscription, mythfilldatabase should recreate them properly (in 
 the new form, with _ in the channum).

I took the latter approach, and things now look correct.  Thanks for
the info, Doug.

Cheers,
Kyle
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] [PATCH] osd channel browse mode displays junk when no data for channel

2004-12-29 Thread Jack Porter
Steven wrote:
Thanks for that. I think you have to resend the patch as a unified diff 
to get it committed here (diff -u).
Doh!  Can you tell I'm new here?
Maybe it would be nice to also show the string value from the database 
that is shown in the guide when there is nothing on? (=the result from 
select data from settings where value = 'UnknownTitle'; )
Good idea, I'll add that and resubmit a unified diff tonight.
- Jack
--
Jack Porter   Programmer
[EMAIL PROTECTED]Softmax
[EMAIL PROTECTED]South Korea
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


[mythtv] [PATCH] (take 2) osd channel browse mode displays junk when no data for channel

2004-12-29 Thread Jack Porter
Sorry, here's the patch again in unified diff format.
Jack Porter wrote:
Hi,
When using Browse mode while watching live tv, if you pass a channel for 
which there is no current program data, junk is displayed instead of the 
channel name/number.

This patch makes ProgramInfo::GetProgramAtDateTime() check if 
ProgramList::FromProgram() returned any results, and if not it looks up 
just the channel data.

Cheers
Jack
--
Jack Porter   Seoul
[EMAIL PROTECTED]South Korea
Index: mythtv/libs/libmythtv/programinfo.cpp
===
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/programinfo.cpp,v
retrieving revision 1.180
diff -u -r1.180 programinfo.cpp
--- mythtv/libs/libmythtv/programinfo.cpp   26 Dec 2004 02:55:30 -  
1.180
+++ mythtv/libs/libmythtv/programinfo.cpp   30 Dec 2004 02:16:41 -
@@ -503,7 +503,55 @@
 schedList.FromScheduler();
 progList.FromProgram(db, querystr, schedList);
 
-return progList.take(0);
+if (!progList.isEmpty())
+{
+return progList.take(0);
+}
+else
+{
+ProgramInfo *p = new ProgramInfo;
+QString querystr = QString(SELECT chanid, channum, callsign, name, 
+   commfree, outputfilters 
+   FROM channel 
+   WHERE chanid = \%1\;)
+   .arg(channel);
+
+QSqlQuery query(QString::null, db);
+query.prepare(querystr);
+
+if (!query.exec() || !query.isActive())
+{
+MythContext::DBError(ProgramInfo::GetProgramAtDateTime, 
+ query.executedQuery());
+return p;
+}
+
+if (query.next())
+{
+p-chanid = query.value(0).toString();
+p-startts = dtime;
+p-endts = dtime;
+p-recstartts = p-startts;
+p-recendts = p-endts;
+p-lastmodified = p-startts;
+p-title = gContext-GetSetting(UnknownTitle);
+p-subtitle = ;
+p-description = ;
+p-category = ;
+p-chanstr = query.value(1).toString();
+p-chansign = QString::fromUtf8(query.value(2).toString());
+p-channame = QString::fromUtf8(query.value(3).toString());
+p-repeat = 0;
+p-chancommfree = query.value(4).toInt();
+p-chanOutputFilters = query.value(5).toString();
+p-seriesid = ;
+p-programid = ;
+p-year = ;
+p-stars = 0.f;
+}
+
+return p;
+}
 }
 
 ProgramInfo *ProgramInfo::GetProgramFromRecorded(QSqlDatabase *db,
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] [patch] datadirect.cpp exit cleanup

2004-12-29 Thread Isaac Richards
On Wednesday 29 December 2004 03:08 pm, Daniel Thor Kristjansson wrote:
 This removes exit()'s in datadirect.cpp, and changes grabLineupsOnly(),
 grabData() and grabAllData() so that they return true on successful
 completion, and false on unsuccessful completion. It also adds checks
 for error conditions, where appropriate.

I've applied this, your channelbase cleanup, and the two NVR patches.  Thanks. 
=)

Isaac
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


[mythtv] [PATCH] missing errno.h include

2004-12-29 Thread Kyle Rose
This patch should be self-explanatory.

Cheers,
Kyle

Index: libs/libmythtv/channelbase.cpp
===
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/channelbase.cpp,v
retrieving revision 1.10
diff -u -r1.10 channelbase.cpp
--- libs/libmythtv/channelbase.cpp  30 Dec 2004 02:40:16 -  1.10
+++ libs/libmythtv/channelbase.cpp  30 Dec 2004 03:49:14 -
@@ -6,6 +6,7 @@
 #include sys/types.h
 #include sys/stat.h
 #include sys/wait.h
+#include errno.h
 #include videodev_myth.h
 #include channel.h
 #include frequencies.h
Index: libs/libmythtv/datadirect.cpp
===
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/datadirect.cpp,v
retrieving revision 1.12
diff -u -r1.12 datadirect.cpp
--- libs/libmythtv/datadirect.cpp   30 Dec 2004 02:40:16 -  1.12
+++ libs/libmythtv/datadirect.cpp   30 Dec 2004 03:49:16 -
@@ -4,6 +4,7 @@
 
 #include qfile.h
 #include qstring.h
+#include errno.h
 
 // XXX Program duration should be stored as seconds, not as a QTime.
 // limited to 24 hours this way.
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re : [mythtv] [patch] mythtv-HOWTO-5.html - compiling for different processors

2004-12-29 Thread manu
Le 28.12.2004 16:12:56, Daniel Thor Kristjansson a écrit :
On Tue, 28 Dec 2004, Isaac Richards wrote:
] This patch removes the -mfpmath=sse performance recommendation, but
] keeps the additional archs, such as the winchip, the updated C3
info,
] and other Intel and AMD processors.
]
]Have you profiled on each of those processors to see if setting the
arch
]actually creates faster code?  I've seen -march=athlon-xp create 50%
slower
]code than -march=pentiumpro with a recent gcc..
]
]Isaac
No, I only have Intel processors at my disposal. Compiling for
pentium4
gives me a 30% speed boost. For the rest, I based this on the gcc
manual. I've heard rumors about xp optimization being broken, but I
can't verify this myself.
I made this patch to the documentation because someone was having
problems compiling mmx_gcc.cpp because they were targeting the
pentiumpro, which did not support MMX. The compiler, rightly, did
not generate the MMX code.
Well I have an AMD XP so I could compile with the two different arch  
flags, question is: how do you measure the difference (for now I just  
basically stare at top during liveTV, but I guess there's something  
more scientific ;-).
Bye
Manu


pgpsKeSekn8Xv.pgp
Description: PGP signature
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] [PATCH] Get remote backend status

2004-12-29 Thread Nigel Pearson
These are now in CVS, but without any MYTH_PROTO_VERSION change.
This should be safe if the frontend is newer than the backend,
since they are new queries that should be ignored.
--
Nigel Pearson, [EMAIL PROTECTED]|  Let's see how Spike is going
Telstra BID, Sydney, Australia  |  ...
Office: 8255 4222Fax:  8255 3153 |I'd like to keep Spike as my 
pet.
Mobile: 0408 664435  Home: 9792 6998 |Illyria - Angel

___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev