Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 448718 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-8 / +36 lines)
Line  Link Here
0
-- HomerMultimedia/include/Header_Ffmpeg.h
0
++ HomerMultimedia/include/Header_Ffmpeg.h
Lines 173-176 Link Here
173
	#endif
173
	#endif
174
}
174
}
175
175
176
inline AVStream *HM_avformat_new_stream(AVFormatContext *s, int id)
177
{
178
       #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(53, 10, 0)
179
               return av_new_stream(s, c);
180
       #else
181
               AVStream *st = avformat_new_stream(s, NULL);
182
               if (st)
183
                       st->id = id;
184
               return st;
185
       #endif
186
}
187
176
#endif
188
#endif
177
-- HomerMultimedia/src/MediaSource.cpp
189
++ HomerMultimedia/src/MediaSource.cpp
Lines 236-246 Link Here
236
    {
236
    {
237
        if (tCodec->type == AVMEDIA_TYPE_VIDEO)
237
        if (tCodec->type == AVMEDIA_TYPE_VIDEO)
238
        {
238
        {
239
            #if (LIBAVCODEC_VERSION_MAJOR < 55)
239
            bool tEncode = (tCodec->encode != NULL);
240
            bool tEncode = (tCodec->encode != NULL);
241
            #else
242
            bool tEncode = (tCodec->encode2 != NULL);
243
            #endif
240
            bool tDecode = (tCodec->decode != NULL);
244
            bool tDecode = (tCodec->decode != NULL);
241
            if ((tNextCodec != NULL) && (strcmp(tCodec->name, tNextCodec->name) == 0))
245
            if ((tNextCodec != NULL) && (strcmp(tCodec->name, tNextCodec->name) == 0))
242
            {
246
            {
247
                #if (LIBAVCODEC_VERSION_MAJOR < 55)
243
                tEncode |= (tNextCodec->encode != NULL);
248
                tEncode |= (tNextCodec->encode != NULL);
249
                #else
250
                tEncode |= (tNextCodec->encode2 != NULL);
251
                #endif
244
                tDecode |= (tNextCodec->decode != NULL);
252
                tDecode |= (tNextCodec->decode != NULL);
245
                tCodec = tNextCodec;
253
                tCodec = tNextCodec;
246
            }
254
            }
Lines 296-306 Link Here
296
//				tNextCodec->encode ? "E" : " ",
304
//				tNextCodec->encode ? "E" : " ",
297
//				tNextCodec->name,
305
//				tNextCodec->name,
298
//				tNextCodec->long_name ? tCodec->long_name : "");
306
//				tNextCodec->long_name ? tCodec->long_name : "");
307
            #if (LIBAVCODEC_VERSION_MAJOR < 55)
299
            bool tEncode = (tCodec->encode != NULL);
308
            bool tEncode = (tCodec->encode != NULL);
309
            #else
310
            bool tEncode = (tCodec->encode2 != NULL);
311
            #endif
300
            bool tDecode = (tCodec->decode != NULL);
312
            bool tDecode = (tCodec->decode != NULL);
301
            if ((tNextCodec != NULL) && (strcmp(tCodec->name, tNextCodec->name) == 0))
313
            if ((tNextCodec != NULL) && (strcmp(tCodec->name, tNextCodec->name) == 0))
302
            {
314
            {
315
                #if (LIBAVCODEC_VERSION_MAJOR < 55)
303
                tEncode |= (tNextCodec->encode != NULL);
316
                tEncode |= (tNextCodec->encode != NULL);
317
                #else
318
                tEncode |= (tNextCodec->encode2 != NULL);
319
                #endif
304
                tDecode |= (tNextCodec->decode != NULL);
320
                tDecode |= (tNextCodec->decode != NULL);
305
                tCodec = tNextCodec;
321
                tCodec = tNextCodec;
306
            }
322
            }
Lines 1622-1628 Link Here
1622
    sprintf(mRecorderFormatContext->filename, "%s", pSaveFileName.c_str());
1638
    sprintf(mRecorderFormatContext->filename, "%s", pSaveFileName.c_str());
1623
1639
1624
    // allocate new stream structure
1640
    // allocate new stream structure
1625
    tStream = av_new_stream(mRecorderFormatContext, 0);
1641
    tStream = HM_avformat_new_stream(mRecorderFormatContext, 0);
1626
    mRecorderCodecContext = tStream->codec;
1642
    mRecorderCodecContext = tStream->codec;
1627
1643
1628
    // put sample parameters
1644
    // put sample parameters
1629
-- HomerMultimedia/src/MediaSourceMuxer.cpp
1645
++ HomerMultimedia/src/MediaSourceMuxer.cpp
Lines 377-383 Link Here
377
377
378
    // allocate new stream structure
378
    // allocate new stream structure
379
    LOG(LOG_VERBOSE, "..allocating new stream");
379
    LOG(LOG_VERBOSE, "..allocating new stream");
380
    tStream = av_new_stream(mFormatContext, 0);
380
    tStream = HM_avformat_new_stream(mFormatContext, 0);
381
    mCodecContext = tStream->codec;
381
    mCodecContext = tStream->codec;
382
    mCodecContext->codec_id = tFormat->video_codec;
382
    mCodecContext->codec_id = tFormat->video_codec;
383
    mCodecContext->codec_type = AVMEDIA_TYPE_VIDEO;
383
    mCodecContext->codec_type = AVMEDIA_TYPE_VIDEO;
Lines 710-716 Link Here
710
    }
710
    }
711
711
712
    // allocate new stream structure
712
    // allocate new stream structure
713
    tStream = av_new_stream(mFormatContext, 0);
713
    tStream = HM_avformat_new_stream(mFormatContext, 0);
714
    mCodecContext = tStream->codec;
714
    mCodecContext = tStream->codec;
715
    mCodecContext->codec_id = tFormat->audio_codec;
715
    mCodecContext->codec_id = tFormat->audio_codec;
716
    mCodecContext->codec_type = AVMEDIA_TYPE_AUDIO;
716
    mCodecContext->codec_type = AVMEDIA_TYPE_AUDIO;
717
-- HomerMultimedia/src/RTP.cpp
717
++ HomerMultimedia/src/RTP.cpp
Lines 512-518 Link Here
512
    // verbose timestamp debugging    mRtpFormatContext->debug = FF_FDEBUG_TS;
512
    // verbose timestamp debugging    mRtpFormatContext->debug = FF_FDEBUG_TS;
513
513
514
    // allocate new stream structure
514
    // allocate new stream structure
515
	tOuterStream = av_new_stream(mRtpFormatContext, 0);//(AVStream*)av_mallocz(sizeof(AVStream));
515
	tOuterStream = HM_avformat_new_stream(mRtpFormatContext, 0);//(AVStream*)av_mallocz(sizeof(AVStream));
516
    if (tOuterStream == NULL)
516
    if (tOuterStream == NULL)
517
    {
517
    {
518
        LOG(LOG_ERROR, "Memory allocation failed");
518
        LOG(LOG_ERROR, "Memory allocation failed");

Return to bug 448718