46 #include "mcedefs.h" |
47 #include "mcedefs.h" |
47 #include "mcevideocodec.h" |
48 #include "mcevideocodec.h" |
48 #include "mcestreambundle.h" |
49 #include "mcestreambundle.h" |
49 #include "mceavsink.h" |
50 #include "mceavsink.h" |
50 #include "mceavccodec.h" |
51 #include "mceavccodec.h" |
|
52 #include "mcemessagestream.h" |
|
53 #include "mcemsrpsource.h" |
|
54 #include "mcemsrpsink.h" |
|
55 #include "mceexternalsource.h" |
|
56 #include "mceexternalsink.h" |
|
57 #include "mcemsrpcodec.h" |
|
58 #include "mcemessagesource.h" |
|
59 #include "mcemessagesink.h" |
|
60 |
51 |
61 |
52 // ============================ MEMBER FUNCTIONS =============================== |
62 // ============================ MEMBER FUNCTIONS =============================== |
53 |
63 |
54 |
64 |
55 // ----------------------------------------------------------------------------- |
65 // ----------------------------------------------------------------------------- |
596 CleanupStack::PushL( codec ); |
641 CleanupStack::PushL( codec ); |
597 codec->InternalizeL( aSerCtx ); |
642 codec->InternalizeL( aSerCtx ); |
598 return codec; |
643 return codec; |
599 } |
644 } |
600 |
645 |
|
646 |
|
647 // ----------------------------------------------------------------------------- |
|
648 // TMceMessageCodecFactory::CreateLC |
|
649 // ----------------------------------------------------------------------------- |
|
650 // |
|
651 CMceMessageCodec* TMceMessageCodecFactory::CreateLC( TBuf8<KMceMaxSdpNameLength> aSdpName ) |
|
652 { |
|
653 CMceMessageCodec* codec = CreateL( aSdpName ); |
|
654 CleanupStack::PushL( codec ); |
|
655 return codec; |
|
656 } |
|
657 |
|
658 // ----------------------------------------------------------------------------- |
|
659 // TMceMessageCodecFactory::CreateL |
|
660 // ----------------------------------------------------------------------------- |
|
661 // |
|
662 CMceMessageCodec* TMceMessageCodecFactory::CreateL( TBuf8<KMceMaxSdpNameLength> aSdpName ) |
|
663 { |
|
664 CMceMessageCodec* codec = NULL; |
|
665 if( !aSdpName.CompareF(KMceSDPNameMsrp) ) |
|
666 { |
|
667 codec = CMceMsrpCodec::NewL( aSdpName ); |
|
668 } |
|
669 //else if( !aSdpName.CompareF(KMceSDPNameRED) ) |
|
670 // { |
|
671 // codec = CMceRedCodec::NewL( aSdpName ); |
|
672 // } |
|
673 else |
|
674 { |
|
675 User::Leave( KErrNotSupported ); |
|
676 } |
|
677 return codec; |
|
678 |
|
679 } |
|
680 |
|
681 // ----------------------------------------------------------------------------- |
|
682 // TMceMessageCodecFactory::CreateLC |
|
683 // ----------------------------------------------------------------------------- |
|
684 // |
|
685 CMceMessageCodec* TMceMessageCodecFactory::CreateLC( MMceComSerializationContext& aSerCtx ) |
|
686 { |
|
687 RReadStream& readStream = aSerCtx.ReadStream(); |
|
688 |
|
689 MStreamBuf* streamBuf = readStream.Source(); |
|
690 TStreamPos pos = streamBuf->TellL( MStreamBuf::ERead ); |
|
691 TBuf8<KMceMaxSdpNameLength> sdpName; |
|
692 MceSerial::DecodeL( sdpName, readStream ); |
|
693 |
|
694 streamBuf->SeekL( MStreamBuf::ERead, pos ); |
|
695 |
|
696 CMceMessageCodec* codec = CreateL( sdpName ); |
|
697 CleanupStack::PushL( codec ); |
|
698 codec->InternalizeL( aSerCtx ); |
|
699 return codec; |
|
700 } |