mmshplugins/mmcctranscoder/src/transcodersessioninfo.cpp
changeset 0 f0cf47e981f9
equal deleted inserted replaced
-1:000000000000 0:f0cf47e981f9
       
     1 /*
       
     2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include <e32math.h>
       
    21 #include <mmcctranscoder.h>
       
    22 #include <mmcccodecinformation.h>
       
    23 
       
    24 #include "transcodersessioninfo.h"
       
    25 #include "mcctranscoderlogs.h"
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 const TInt KMccTranscoderProgressMultiplier = 2;
       
    30 const TInt KMccTranscoderProgressMiddle = 50;
       
    31 
       
    32 const TInt KMccTranscoderVideoOnlyBitrate = 64000;
       
    33 
       
    34 const TInt KMccTranscoderAvcTargetSegmentSize = 1300; // Try to fit to MTU
       
    35 
       
    36 
       
    37 // MODULE DATA STRUCTURES
       
    38 
       
    39 // LOCAL FUNCTION PROTOTYPES
       
    40 
       
    41 // FORWARD DECLARATIONS
       
    42 
       
    43 // ============================= LOCAL FUNCTIONS ===============================
       
    44 
       
    45 
       
    46 // ============================ MEMBER FUNCTIONS ===============================
       
    47 
       
    48 // -----------------------------------------------------------------------------
       
    49 // CMccTranscoderSessionInfo::CMccTranscoderSessionInfo
       
    50 // default constructor
       
    51 // -----------------------------------------------------------------------------
       
    52 //
       
    53 CMccTranscoderSessionInfo::CMccTranscoderSessionInfo()
       
    54     {
       
    55     }
       
    56 
       
    57 // -----------------------------------------------------------------------------
       
    58 // CMccTranscoderSessionInfo::ConstructL
       
    59 // Symbian 2nd phase constructor can leave.
       
    60 // -----------------------------------------------------------------------------
       
    61 //
       
    62 void CMccTranscoderSessionInfo::ConstructL( )
       
    63     {
       
    64 
       
    65     }
       
    66 
       
    67 // -----------------------------------------------------------------------------
       
    68 // CMccTranscoderSessionInfo::NewL
       
    69 // Static constructor.
       
    70 // -----------------------------------------------------------------------------
       
    71 //
       
    72 CMccTranscoderSessionInfo* CMccTranscoderSessionInfo::NewLC()
       
    73     {
       
    74     CMccTranscoderSessionInfo* self = new (ELeave) CMccTranscoderSessionInfo;
       
    75 	CleanupStack::PushL( self );
       
    76 	self->ConstructL();
       
    77 	return self;
       
    78     }
       
    79 
       
    80 // -----------------------------------------------------------------------------
       
    81 // CMccTranscoderSessionInfo::~CMccTranscoderSessionInfo
       
    82 // Destructor
       
    83 // -----------------------------------------------------------------------------
       
    84 //
       
    85 CMccTranscoderSessionInfo::~CMccTranscoderSessionInfo()
       
    86     {
       
    87     __TRANSCODER( "CMccTranscoderSessionInfo::~CMccTranscoderSessionInfo" )
       
    88     
       
    89     delete iMovie;
       
    90     delete iVideoCodec;
       
    91     delete iAudioCodec;
       
    92     
       
    93     __TRANSCODER( "CMccTranscoderSessionInfo::~CMccTranscoderSessionInfo, exit" )
       
    94     }
       
    95     
       
    96 // -----------------------------------------------------------------------------
       
    97 // CMccTranscoderSessionInfo::SetQuality
       
    98 // -----------------------------------------------------------------------------
       
    99 //
       
   100 void CMccTranscoderSessionInfo::SetQuality( TUint32 aQuality )
       
   101     {
       
   102     __TRANSCODER_INT1( "CMccTranscoderSessionInfo::SetQuality, quality=", aQuality )
       
   103 
       
   104     switch( aQuality )
       
   105         {
       
   106         case CVedMovie::EQualityAutomatic:
       
   107             iQuality = CVedMovie::EQualityAutomatic;
       
   108             break; 
       
   109         case CVedMovie::EQualityMMSInteroperability:
       
   110             iQuality = CVedMovie::EQualityMMSInteroperability;
       
   111             break;
       
   112         case CVedMovie::EQualityResolutionCIF:
       
   113             iQuality = CVedMovie::EQualityResolutionCIF;        
       
   114             break;
       
   115         case CVedMovie::EQualityResolutionQCIF:
       
   116             iQuality = CVedMovie::EQualityResolutionQCIF;        
       
   117             break;
       
   118         case CVedMovie::EQualityLast: 
       
   119             iQuality = CVedMovie::EQualityLast; 
       
   120             break;
       
   121         default:  
       
   122             iQuality = CVedMovie::EQualityLast; 
       
   123             break;
       
   124         } 
       
   125           
       
   126     __TRANSCODER( "CMccTranscoderSessionInfo::SetQuality, exits" )
       
   127 
       
   128     }
       
   129 
       
   130 // -----------------------------------------------------------------------------
       
   131 // CMccTranscoderSessionInfo::SetDesFileL
       
   132 // -----------------------------------------------------------------------------
       
   133 //
       
   134 void CMccTranscoderSessionInfo::SetDesFileL( const TDesC& aFileName )
       
   135     {
       
   136     __TRANSCODER( "CMccTranscoderSessionInfo::SetDesFileL" )
       
   137 
       
   138     __ASSERT_ALWAYS( aFileName.Length() > 0, User::Leave( KErrArgument ) );
       
   139   
       
   140     iDesFile.Copy( aFileName );
       
   141         
       
   142     __TRANSCODER( "CMccTranscoderSessionInfo::SetDesFileL, exit" )
       
   143     }
       
   144 
       
   145 // -----------------------------------------------------------------------------
       
   146 // CMccTranscoderSessionInfo::SetVideoType
       
   147 // -----------------------------------------------------------------------------
       
   148 //
       
   149 void CMccTranscoderSessionInfo::SetVideoType( 
       
   150     const TDesC8& aSdpName,
       
   151     const TInt aVideoBitRate )
       
   152     {
       
   153     __TRANSCODER( "CMccTranscoderSessionInfo::SetVideoType" )
       
   154 
       
   155     if ( aSdpName.CompareF( KAVCSdpName )  == 0 )
       
   156         {
       
   157         iVideoCodec->SetVideoType( EVedVideoTypeAVCBaselineProfile ); 
       
   158         // Other than zero value will cause transcoding failure for AVC
       
   159         iSyncIntervalInPicture = 0; 
       
   160         iSegmentSizeInBytes = KMccTranscoderAvcTargetSegmentSize;
       
   161         }
       
   162     else if ( aSdpName.CompareF( KH263SdpName ) == 0 ||
       
   163               aSdpName.CompareF( KH2631998SdpName ) == 0||
       
   164               aSdpName.CompareF( KH2632000SdpName  ) == 0 )
       
   165         {
       
   166         const TInt maxBitRateOne = 64000;
       
   167         const TInt maxBitRateTwo = 128000;
       
   168         if ( aVideoBitRate <= maxBitRateOne )
       
   169             {
       
   170             iVideoCodec->SetVideoType( EVedVideoTypeH263Profile0Level10 );
       
   171             }
       
   172         if ( aVideoBitRate >  maxBitRateOne && 
       
   173              aVideoBitRate < maxBitRateTwo )
       
   174             {
       
   175             iVideoCodec->SetVideoType( EVedVideoTypeH263Profile0Level45 ); 
       
   176             }
       
   177         iSyncIntervalInPicture = 1;
       
   178         }
       
   179     else 
       
   180         {
       
   181         iVideoCodec->SetVideoType( EVedVideoTypeUnrecognized) ;
       
   182         } 
       
   183         
       
   184     __TRANSCODER( "CMccTranscoderSessionInfo::SetVideoType, exit" )
       
   185     }
       
   186     
       
   187 // -----------------------------------------------------------------------------
       
   188 // CMccTranscoderSessionInfo::SetVideoType
       
   189 // -----------------------------------------------------------------------------
       
   190 //
       
   191 void CMccTranscoderSessionInfo::SetAudioType( const TDesC8& aSdpName )
       
   192    {
       
   193    __TRANSCODER( "CMccTranscoderSessionInfo::SetAudioType" )
       
   194 
       
   195    if ( iAudioCodec )
       
   196        {
       
   197        if ( aSdpName.CompareF( KAACSdpName )  == 0 )
       
   198             {
       
   199             iAudioCodec->SetAudioType( EVedAudioTypeAAC_LC );  
       
   200             }
       
   201        else if ( aSdpName.CompareF( KAMRSdpName )  == 0  )
       
   202             {
       
   203             iAudioCodec->SetAudioType( EVedAudioTypeAMR );
       
   204             }
       
   205        else
       
   206             {
       
   207             iAudioCodec->SetAudioType( EVedAudioTypeUnrecognized );  
       
   208             } 
       
   209        }
       
   210    __TRANSCODER( "CMccTranscoderSessionInfo::SetAudioType, exit" )
       
   211 
       
   212    }
       
   213    
       
   214 // -----------------------------------------------------------------------------
       
   215 // CMccTranscoderSessionInfo::SetVideoType
       
   216 // -----------------------------------------------------------------------------
       
   217 //
       
   218 TUint32 CMccTranscoderSessionInfo::SessionId()
       
   219    {
       
   220    return iSessionId;    
       
   221    }
       
   222 
       
   223 // -----------------------------------------------------------------------------
       
   224 // CMccTranscoderSessionInfo::SetVideoType
       
   225 // -----------------------------------------------------------------------------
       
   226 //
       
   227 void CMccTranscoderSessionInfo::GenerateSessionId()
       
   228    {
       
   229    __TRANSCODER( "CMccTranscoderSessionInfo::GenerateSessionId" )
       
   230 
       
   231    iSessionId = 0;
       
   232     
       
   233    while( iSessionId == 0 )
       
   234         {
       
   235         iSessionId = static_cast<TUint32>( Math::Random() );
       
   236         }
       
   237    
       
   238    __TRANSCODER( "CMccTranscoderSessionInfo::GenerateSessionId, exit" )
       
   239    }
       
   240 
       
   241 // -----------------------------------------------------------------------------
       
   242 // CMccTranscoderSessionInfo::CreateMovieL()
       
   243 // -----------------------------------------------------------------------------
       
   244 //
       
   245 // ownership is transferred
       
   246 void CMccTranscoderSessionInfo::CreateMovieL( )
       
   247    {
       
   248    __TRANSCODER( "CMccTranscoderSessionInfo::CreateMovieL" )
       
   249 
       
   250    if ( iMovie )
       
   251        {
       
   252        delete iMovie;
       
   253        iMovie = NULL;
       
   254        }
       
   255    iMovie = CVedMovie::NewL( 0 );
       
   256    
       
   257    __TRANSCODER( "CMccTranscoderSessionInfo::CreateMovieL, exit" )
       
   258    }
       
   259 
       
   260 // -----------------------------------------------------------------------------
       
   261 // CMccTranscoderSessionInfo::Movie
       
   262 // -----------------------------------------------------------------------------
       
   263 //
       
   264 CVedMovie& CMccTranscoderSessionInfo::Movie()
       
   265    {
       
   266    return *iMovie;   
       
   267    }
       
   268 
       
   269 
       
   270 // -----------------------------------------------------------------------------
       
   271 // CMccTranscoderSessionInfo::Quality
       
   272 // -----------------------------------------------------------------------------
       
   273 //                    
       
   274 CVedMovie::TVedMovieQuality CMccTranscoderSessionInfo::Quality()
       
   275    {
       
   276    return iQuality;   
       
   277    }
       
   278 
       
   279 // -----------------------------------------------------------------------------
       
   280 // CMccTranscoderSessionInfo::DesFile
       
   281 // -----------------------------------------------------------------------------
       
   282 //
       
   283 const TDesC& CMccTranscoderSessionInfo::DesFile()
       
   284    {
       
   285    return iDesFile;
       
   286    }
       
   287 
       
   288 
       
   289 // -----------------------------------------------------------------------------
       
   290 // CMccTranscoderSessionInfo::VideoCodec
       
   291 // -----------------------------------------------------------------------------
       
   292 //
       
   293 CMccTranscoderVideoCodec& CMccTranscoderSessionInfo::VideoCodec()
       
   294    {
       
   295    return *iVideoCodec;    
       
   296    }
       
   297 
       
   298 // -----------------------------------------------------------------------------
       
   299 // CMccTranscoderSessionInfo::SetVideoCodec
       
   300 // -----------------------------------------------------------------------------
       
   301 //
       
   302 void CMccTranscoderSessionInfo::SetVideoCodec( CMccTranscoderVideoCodec* aCodec )
       
   303    {
       
   304    __TRANSCODER( "CMccTranscoderSessionInfo::SetVideoCodec" )
       
   305 
       
   306    if ( iVideoCodec )
       
   307        {
       
   308        delete iVideoCodec;
       
   309        }
       
   310    iVideoCodec = aCodec;
       
   311    
       
   312    __TRANSCODER( "CMccTranscoderSessionInfo::SetVideoCodec, exit" )
       
   313 
       
   314    }
       
   315 
       
   316 // -----------------------------------------------------------------------------
       
   317 // CMccTranscoderSessionInfo::AudioCodec
       
   318 // -----------------------------------------------------------------------------
       
   319 //
       
   320 CMccTranscoderAudioCodec& CMccTranscoderSessionInfo::AudioCodec()
       
   321    {
       
   322    return *iAudioCodec;
       
   323    }
       
   324 
       
   325 // -----------------------------------------------------------------------------
       
   326 // CMccTranscoderSessionInfo::SetAudioCodec
       
   327 // -----------------------------------------------------------------------------
       
   328 //
       
   329 void CMccTranscoderSessionInfo::SetAudioCodec( CMccTranscoderAudioCodec* aCodec )
       
   330    {
       
   331    __TRANSCODER( "CMccTranscoderSessionInfo::SetAudioCodec " )
       
   332 
       
   333    if ( iAudioCodec )
       
   334        {
       
   335        delete iAudioCodec;
       
   336        }
       
   337        
       
   338    iAudioCodec = aCodec;
       
   339    
       
   340    __TRANSCODER( "CMccTranscoderSessionInfo::SetAudioCodec, exit" )
       
   341 
       
   342    }
       
   343 
       
   344 // -----------------------------------------------------------------------------
       
   345 // CMccTranscoderSessionInfo::CheckVideoCodecL
       
   346 // -----------------------------------------------------------------------------
       
   347 //
       
   348 void CMccTranscoderSessionInfo::CheckVideoCodecL( 
       
   349     const TMccTranscoderCodecInfo& aCodecInfo )
       
   350     {
       
   351     __TRANSCODER( "CMccTranscoderSessionInfo::CheckVideoCodecL " )
       
   352 
       
   353       // check if video code info is not empty, save it
       
   354     if ( aCodecInfo.iMimeType.Length() )
       
   355         {
       
   356         if ( iVideoCodec )
       
   357             {
       
   358             delete iVideoCodec;
       
   359             iVideoCodec = NULL;  
       
   360             }
       
   361         iVideoCodec = CMccTranscoderVideoCodec::NewL();
       
   362         
       
   363         iVideoCodec->SetBitrate( aCodecInfo.iBitrate );
       
   364         iVideoCodec->SetFrameRate( aCodecInfo.iFramerate );
       
   365         iVideoCodec->SetVideoResolution( 
       
   366             TSize(aCodecInfo.iVideoWidth, aCodecInfo.iVideoHeight) );
       
   367         
       
   368         SetVideoType( aCodecInfo.iMimeType, aCodecInfo.iBitrate );       
       
   369         }   
       
   370     
       
   371     __TRANSCODER( "CMccTranscoderSessionInfo::CheckVideoCodecL, exit " )
       
   372 
       
   373     }
       
   374         
       
   375 // -----------------------------------------------------------------------------
       
   376 // CMccTranscoderSessionInfo::CheckAudioCodecL
       
   377 // -----------------------------------------------------------------------------
       
   378 //       
       
   379 void CMccTranscoderSessionInfo::CheckAudioCodecL( 
       
   380     const TMccTranscoderCodecInfo& aCodecInfo )
       
   381     {
       
   382     __TRANSCODER( "CMccTranscoderSessionInfo::CheckAudioCodecL " )
       
   383 
       
   384       // check if audio code info is not empty, save it
       
   385     if (aCodecInfo.iMimeType.Length() )
       
   386         {
       
   387         if ( iAudioCodec )
       
   388             {
       
   389             delete iAudioCodec; 
       
   390             iAudioCodec = NULL; 
       
   391             }
       
   392         iAudioCodec = CMccTranscoderAudioCodec::NewL();
       
   393         iAudioCodec->SetBitrate( aCodecInfo.iBitrate );
       
   394         iAudioCodec->SetAudioChannelMode( EVedAudioChannelModeSingleChannel );
       
   395         iAudioCodec->SetSamplingRate( aCodecInfo.iSamplingFreq );   
       
   396         SetAudioType( aCodecInfo.iMimeType );
       
   397         }
       
   398         
       
   399     __TRANSCODER( "CMccTranscoderSessionInfo::CheckAudioCodecL, exit " )
       
   400     }
       
   401 
       
   402 // -----------------------------------------------------------------------------
       
   403 // CMccTranscoderSessionInfo::CheckAudioCodecL
       
   404 // -----------------------------------------------------------------------------
       
   405 //  
       
   406 void CMccTranscoderSessionInfo::GetPutputParameters( 
       
   407     TVedOutputParameters& params )
       
   408     {
       
   409     __TRANSCODER( "CMccTranscoderSessionInfo::GetPutputParameters " )
       
   410 
       
   411     if ( iVideoCodec )
       
   412         {
       
   413         __TRANSCODER( "Set video output values from codec" )
       
   414         params.iVideoType = iVideoCodec->VideoType();
       
   415         params.iVideoResolution = iVideoCodec->VideoResolution();
       
   416         params.iVideoBitrate = iVideoCodec->Bitrate();
       
   417         params.iVideoFrameRate = iVideoCodec->FrameRate();  
       
   418         }
       
   419     else if ( iMovie )// set video parameters from clip
       
   420         {
       
   421         __TRANSCODER( "Set video output values from mov" )
       
   422         params.iVideoType = iMovie->VideoType();
       
   423         params.iVideoResolution = iMovie->Resolution();
       
   424         params.iVideoBitrate = CalculateVideoBitrate( *iMovie );
       
   425         params.iVideoFrameRate = iMovie->VideoFrameRate();
       
   426         }
       
   427         
       
   428     //insert GOBs into clip
       
   429     params.iSyncIntervalInPicture = iSyncIntervalInPicture;  
       
   430     params.iSegmentSizeInBytes = iSegmentSizeInBytes;
       
   431 
       
   432     // audio parameters are stored in session, 
       
   433     // copy those parameters from session, 
       
   434     if ( iAudioCodec )
       
   435         {
       
   436         __TRANSCODER( "Set audio output values from codec" )
       
   437         params.iAudioType = iAudioCodec->AudioType();
       
   438         params.iAudioBitrate = iAudioCodec->Bitrate();
       
   439         params.iAudioChannelMode = EVedAudioChannelModeSingleChannel;
       
   440         params.iAudioSamplingRate = iAudioCodec->SamplingRate();
       
   441         }
       
   442     else if ( iMovie )// set audio parameters from clip
       
   443         {
       
   444         params.iAudioType = iMovie->AudioType();
       
   445         if ( params.iAudioType != EVedAudioTypeNoAudio )
       
   446             {
       
   447             __TRANSCODER( "Set audio output values from mov" )
       
   448             params.iAudioBitrate = iMovie->AudioBitrate();
       
   449             params.iAudioChannelMode = iMovie->AudioChannelMode();
       
   450             params.iAudioSamplingRate = iMovie->AudioSamplingRate();
       
   451             }
       
   452         else if ( params.iVideoType == EVedVideoTypeAVCBaselineProfile )
       
   453             {
       
   454             __TRANSCODER( "No audio for avc, set compatibility values" )
       
   455             
       
   456             // VideoEditorEngine strangely wants still these specific
       
   457             // audio values if video type is AVC and clip does not contain
       
   458             // audio.
       
   459             const TInt KMccTranscoderVedCompatibility = 16000;
       
   460             params.iAudioBitrate = KMccTranscoderVedCompatibility;
       
   461             params.iAudioSamplingRate = KMccTranscoderVedCompatibility;
       
   462             }
       
   463         else
       
   464             {
       
   465             __TRANSCODER( "No audio, do not set audio output values" )
       
   466             }
       
   467         }   
       
   468        
       
   469     __TRANSCODER( "CMccTranscoderSessionInfo::GetPutputParameters, exit " )
       
   470 
       
   471     }
       
   472 
       
   473 // -----------------------------------------------------------------------------
       
   474 // CMccTranscoderSessionInfo::SetRemoved
       
   475 // -----------------------------------------------------------------------------
       
   476 //
       
   477 void CMccTranscoderSessionInfo::SetRemoved( TBool aIsRemoved )
       
   478     {
       
   479     iIsRemoved = aIsRemoved;
       
   480     }
       
   481 
       
   482 // -----------------------------------------------------------------------------
       
   483 // CMccTranscoderSessionInfo::IsRemoved
       
   484 // -----------------------------------------------------------------------------
       
   485 //       
       
   486 TBool CMccTranscoderSessionInfo::IsRemoved() const
       
   487     {
       
   488     return iIsRemoved;
       
   489     }
       
   490 
       
   491 // -----------------------------------------------------------------------------
       
   492 // CMccTranscoderSessionInfo::Progressed
       
   493 // -----------------------------------------------------------------------------
       
   494 //
       
   495 TInt CMccTranscoderSessionInfo::Progressed( TInt aProgressPercentage )
       
   496     {
       
   497     // If only one media element is present, ved engine progress
       
   498     // percentage has to be multiplied by two (otherwise it goes only to 50%)
       
   499     if ( iAudioNotPresent && 
       
   500        ( aProgressPercentage <= KMccTranscoderProgressMiddle ) )
       
   501         {
       
   502         aProgressPercentage = 
       
   503             ( aProgressPercentage * KMccTranscoderProgressMultiplier );
       
   504         }
       
   505     return aProgressPercentage;
       
   506     }
       
   507 
       
   508 // -----------------------------------------------------------------------------
       
   509 // CMccTranscoderSessionInfo::Progressed
       
   510 // -----------------------------------------------------------------------------
       
   511 //   
       
   512 void CMccTranscoderSessionInfo::ClipAdded()
       
   513     {
       
   514      if ( iMovie )
       
   515         {
       
   516         __TRANSCODER_INT1( "CMccTranscoderSessionInfo::ClipAdded, audio type:", 
       
   517                            iMovie->AudioType() )
       
   518         
       
   519         iAudioNotPresent =
       
   520             ( iMovie->AudioType() == EVedAudioTypeNoAudio || 
       
   521               iMovie->AudioType() == EVedAudioTypeUnrecognized );
       
   522         }
       
   523     }
       
   524 
       
   525 // -----------------------------------------------------------------------------
       
   526 // CMccTranscoderSessionInfo::QualityChangeNeeded
       
   527 // If client has set output video codec, quality setting is ignored
       
   528 // -----------------------------------------------------------------------------
       
   529 //
       
   530 TBool CMccTranscoderSessionInfo::QualityChangeNeeded()
       
   531     {
       
   532     return ( iQuality != CVedMovie::EQualityAutomatic && !iVideoCodec );
       
   533     }
       
   534     
       
   535 // -----------------------------------------------------------------------------
       
   536 // CMccTranscoderSessionInfo::CalculateVideoBitrate
       
   537 // -----------------------------------------------------------------------------
       
   538 // 
       
   539 TInt CMccTranscoderSessionInfo::CalculateVideoBitrate( CVedMovie& aMovie )
       
   540     {
       
   541     __TRANSCODER( "CMccTranscoderSessionInfo::CalculateVideoBitrate" )
       
   542     
       
   543     TInt videoBitrate( KMccTranscoderVideoOnlyBitrate );
       
   544     if ( aMovie.AudioType() != EVedAudioTypeNoAudio && 
       
   545          aMovie.AudioBitrate() > 0 &&
       
   546          aMovie.AudioBitrate() < videoBitrate )
       
   547         {
       
   548         videoBitrate -= aMovie.AudioBitrate();
       
   549         }
       
   550     
       
   551     __TRANSCODER_INT1( "CMccTranscoderSessionInfo::CalculateVideoBitrate, exit bitrate:", 
       
   552                        videoBitrate )    
       
   553     return videoBitrate;
       
   554     }
       
   555     
       
   556 // End of file
       
   557