~ubuntu-branches/ubuntu/lucid/mythtv/lucid

« back to all changes in this revision

Viewing changes to libs/libmythtv/videooutbase.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Dave Walker (Daviey), Jamie Bennett, Mario Limonciello, Dave Walker (Daviey)
  • Date: 2010-03-23 19:32:33 UTC
  • mfrom: (1.1.49 upstream)
  • Revision ID: james.westby@ubuntu.com-20100323193233-5sv9djoxtlmwt3ca
Tags: 0.23.0+fixes23789-0ubuntu1
[ Jamie Bennett ]
* Fix FTBFS on armel (LP: #537714)

[ Mario Limonciello ]
* mythtv-{common,backend}.{config,templates,postinst}: (LP: #483748)
  - Simplify debconf questions by avoiding showing the generated pw
  - Don't warn about mythtv group.
  - Don't notify about running mythtv-setup.  This is optional (but
    of course encouraged!)
* Set version to include a "+" delimitter.
* Restore libfaad-dev dependency. (LP: #546552)

[ Dave Walker (Daviey) ]
* New snapshot (r23789), based from 0.23-fixes.
* debian/control:
  - mythtv-frontend set to Conflict with mythflix, as it's dropped
    upstream. (LP: #544521)
  - Remove unnecessary and potentially problematic use of Pre-Depends.
  - Set the debug package to Priority extra.
  - Change *-perl Section's from libs to perl
  - add ${shlibs:Depends} for mythtv-common Depends field
  - Minor spelling fix.
  - Fixes the long description for one of the packages, ensuring the
    description doesn't exceed 80 characters.
  - Vcs-* set to -fixes, rather than -trunk.
* debian/rules:
  - Use debconf-updatepo to update translations when required
  - Ensure license files are not included in the binary packages, except 
    for debian/copyright.
  - Fixes the permissions of certain files in the packaging.
* debian/copyright:
  - updated to reflect that mythtv is GPL-2 only.
  - inserted better licence statement and Copyright reference.
* debian/mythtv-*.templates
  - Simplified strings; removed verbosity and improved readability.
* Prevent the maintainer scripts from failing in case any questions 
  can't be displayed.
* Added holding debian/mythtv-frontend.config, mainly to appease lintian.
* debian/mythtv-frontend.menu: Changed section to Applications/Graphics.
* debian/mythtv-backend.postinst: Load debconf libraries.
* debian/source.lintian-overrides: Removes the unecessary override of the 
  binNMU warnings.
* Fix perl binding installation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
256
256
 *         vo->ReleaseFrame(frame); // enqueues frame in "used" queue
257
257
 *     }
258
258
 * }
259
 
 *  
 
259
 *
260
260
 * // In the displaying thread
261
261
 * while (playing)
262
262
 * {
291
291
 *        update an OSD for example.
292
292
 *
293
293
 *  The VideoBuffers class handles the buffer tracking,
294
 
 *  see it for more details on the states a buffer can 
 
294
 *  see it for more details on the states a buffer can
295
295
 *  take before it becomes available for reuse.
296
296
 *
297
297
 * \see VideoBuffers, NuppelVideoPlayer
299
299
 
300
300
/**
301
301
 * \fn VideoOutput::VideoOutput()
302
 
 * \brief This constructor for VideoOutput must be followed by an 
 
302
 * \brief This constructor for VideoOutput must be followed by an
303
303
 *        Init(int,int,float,WId,int,int,int,int,WId) call.
304
304
 */
305
305
VideoOutput::VideoOutput() :
478
478
 * \return true if successful, false otherwise.
479
479
 * \param overridefilter optional, explicitly use this nondefault deint filter
480
480
 */
481
 
bool VideoOutput::SetupDeinterlace(bool interlaced, 
 
481
bool VideoOutput::SetupDeinterlace(bool interlaced,
482
482
                                   const QString& overridefilter)
483
483
{
484
484
    PIPState pip_state = windows[0].GetPIPState();
502
502
 
503
503
    m_deinterlacing = interlaced;
504
504
 
505
 
    if (m_deinterlacing) 
 
505
    if (m_deinterlacing)
506
506
    {
507
507
        m_deinterlaceBeforeOSD = true;
508
508
 
509
509
        VideoFrameType itmp = FMT_YV12;
510
510
        VideoFrameType otmp = FMT_YV12;
511
511
        int btmp;
512
 
        
 
512
 
513
513
        if (db_vdisp_profile)
514
514
            m_deintfiltername = db_vdisp_profile->GetFilteredDeint(overridefilter);
515
515
        else
542
542
            }
543
543
        }
544
544
 
545
 
        if (m_deintFilter == NULL) 
 
545
        if (m_deintFilter == NULL)
546
546
        {
547
547
            VERBOSE(VB_IMPORTANT,QString("Couldn't load deinterlace filter %1")
548
548
                    .arg(m_deintfiltername));
586
586
 *   All adaptive full framerate deinterlacers require an extra
587
587
 *   ProcessFrame() call.
588
588
 *
589
 
 *  \return true if deint name contains doubleprocess 
 
589
 *  \return true if deint name contains doubleprocess
590
590
 */
591
591
bool VideoOutput::IsExtraProcessingRequired(void) const
592
592
{
661
661
        db_vdisp_profile->SetInput(windows[0].GetVideoDim());
662
662
 
663
663
    BestDeint();
664
 
    
 
664
 
665
665
    DiscardFrames(true);
666
666
 
667
667
    return true;
691
691
 * \fn VideoOutput::StopEmbedding(void)
692
692
 * \brief Tells video output to stop embedding video in an existing window.
693
693
 * \sa EmbedInWidget(WId, int, int, int, int)
694
 
 */ 
 
694
 */
695
695
void VideoOutput::StopEmbedding(void)
696
696
{
697
697
    windows[0].StopEmbedding();
1012
1012
    const QSize pipVideoDim    = pipplayer->GetVideoBufferSize();
1013
1013
 
1014
1014
    // If PiP is not initialized to values we like, silently ignore the frame.
1015
 
    if ((video_aspect <= 0) || (pipVideoAspect <= 0) || 
 
1015
    if ((video_aspect <= 0) || (pipVideoAspect <= 0) ||
1016
1016
        (frame->height <= 0) || (frame->width <= 0) ||
1017
1017
        !pipimage || !pipimage->buf || pipimage->codec != FMT_YV12)
1018
1018
    {
1051
1051
 
1052
1052
            sws_scale(pip_scaling_context, img_in.data, img_in.linesize, 0,
1053
1053
                      piph, img_out.data, img_out.linesize);
1054
 
          
 
1054
 
1055
1055
            if (pipActive)
1056
1056
            {
1057
1057
                AVPicture img_padded;
1064
1064
                               pip_display_size.height(),
1065
1065
                               pip_display_size.width(),
1066
1066
                               PIX_FMT_YUV420P, 10, 10, 10, 10, color);
1067
 
                
 
1067
 
1068
1068
                pipbuf = pip_tmp_buf2;
1069
1069
            }
1070
1070
            else
1090
1090
 
1091
1091
    uint pip_height = pip_tmp_image.height;
1092
1092
    uint height[3] = { pip_height, pip_height>>1, pip_height>>1 };
1093
 
    
 
1093
 
1094
1094
    for (int p = 0; p < 3; p++)
1095
1095
    {
1096
1096
        for (uint h = 2; h < height[p]; h++)
1097
1097
        {
1098
 
            memcpy((frame->buf + frame->offsets[p]) + (h + yoff2[p]) * 
 
1098
            memcpy((frame->buf + frame->offsets[p]) + (h + yoff2[p]) *
1099
1099
                   frame->pitches[p] + xoff2[p],
1100
1100
                   (pip_tmp_image.buf + pip_tmp_image.offsets[p]) + h *
1101
1101
                   pip_tmp_image.pitches[p], pip_tmp_image.pitches[p]);
1274
1274
 *  converted to greyscale.
1275
1275
 *
1276
1276
 * \return 1 if changed, -1 on error and 0 otherwise
1277
 
 */ 
 
1277
 */
1278
1278
int VideoOutput::DisplayOSD(VideoFrame *frame, OSD *osd, int stride,
1279
1279
                            int revision)
1280
1280
{
1338
1338
/**
1339
1339
 * \fn VideoOutput::CopyFrame(VideoFrame*, const VideoFrame*)
1340
1340
 * \brief Copies frame data from one VideoFrame to another.
1341
 
 * 
 
1341
 *
1342
1342
 *  Note: The frames must have the same width, height, and format.
1343
1343
 * \param to   The destination frame.
1344
 
 * \param from The source frame 
 
1344
 * \param from The source frame
1345
1345
 */
1346
1346
void VideoOutput::CopyFrame(VideoFrame *to, const VideoFrame *from)
1347
1347
{
1362
1362
        memcpy(to->buf + to->offsets[1], from->buf + from->offsets[1],
1363
1363
               from->pitches[1] * (from->height>>1));
1364
1364
        memcpy(to->buf + to->offsets[2], from->buf + from->offsets[2],
1365
 
               from->pitches[2] * (from->height>>1));        
 
1365
               from->pitches[2] * (from->height>>1));
1366
1366
    }
1367
1367
    else
1368
1368
    {