Code Monkey home page Code Monkey logo

dtplayer_c's Introduction

dtplayer

dtplayer is an open-source project based on C , aimed to provide multimedia playing service base on ffmpeg(linux version2.0+).

At present, dtplayer have provided examples on stream-demuxer-decoder-render modules. User can easily understand how to add new element.

User can also remove ffmpeg dependence through modifing makefile (set DT_FFMPEG = no), Then you will get an aac player for now.

For more details.

Installation

Mac

  • install sdl2.0
  • install ffmpeg
  • make -f makefile-mac

Linux

  • install sdl2.0
  • install ffmpeg
  • make -j8

Android

  • [Install ToolChain]
  • Install [ffmpeg-android]
  • ./build.sh android

Demos

  • [dttv-desktop] - pc multimedia player
  • [dttv-android]- android multimedia player

Licence

GPL v3.0

dtplayer_c's People

Contributors

peterfuture avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dtplayer_c's Issues

sub pts计算错误

ffmpeg解码出来的内置字幕pts,是时间单位(us), 需要换算成pts单位和av做同步

Android 版本 seek crash

01-02 07:17:50.980 I/VIDEO-DEC(14340): [video_decode_loop:155] receive decode loop exit cmd
01-02 07:17:50.980 I/VIDEO-DEC(14340): [file:dtvideo/dtvideo_decoder.c][video_decode_loop:323]decoder loop thread exit ok

01-02 07:17:51.060 I/DTP-UTILS(14340): [dtp_frame_unref:37] Render one mediacodec frame to surface. buffer:0xab94ee20

01-02 07:17:51.160 I/DEBUG (14241): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-02 07:17:51.160 I/DEBUG (14241): Build fingerprint: 'Android/p201_iptv/p201_iptv:4.4.2/KOT49H/20180807:user/test-keys'
01-02 07:17:51.160 I/DEBUG (14241): Revision: '0'
01-02 07:17:51.160 I/DEBUG (14241):
01-02 07:17:51.160 I/DEBUG (14241):
01-02 07:17:51.160 I/DEBUG (14241): Crash Time:----- 2015-01-02-07-17 -----
01-02 07:17:51.170 I/DEBUG (14241): pid: 14340, tid: 14363, name: dttv.app >>> dttv.app <<<
01-02 07:17:51.170 I/DEBUG (14241): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000088
01-02 07:17:51.240 I/DEBUG (14241): r0 ab593b10 r1 00000000 r2 00000001 r3 00000000
01-02 07:17:51.240 I/DEBUG (14241): r4 00000000 r5 00000000 r6 00000002 r7 00000000
01-02 07:17:51.240 I/DEBUG (14241): r8 00272a0b r9 00000000 sl ff90615c fp 6e60ac7c
01-02 07:17:51.240 I/DEBUG (14241): ip 00000001 sp 6e60abd8 lr 4160b4b8 pc 6d40156a cpsr 600f0030
01-02 07:17:51.240 I/DEBUG (14241): d0 3032656534396261 d1 726566667562202e
01-02 07:17:51.240 I/DEBUG (14241): d2 206365646f636169 d3 6f7420656d617266
01-02 07:17:51.240 I/DEBUG (14241): d4 0000000000000000 d5 0000000000000000
01-02 07:17:51.240 I/DEBUG (14241): d6 0000000000000000 d7 0000000000000000
01-02 07:17:51.240 I/DEBUG (14241): d8 0000000000000000 d9 0000000000000000
01-02 07:17:51.240 I/DEBUG (14241): d10 0000000000000000 d11 0000000000000000
01-02 07:17:51.240 I/DEBUG (14241): d12 0000000000000000 d13 0000000000000000
01-02 07:17:51.240 I/DEBUG (14241): d14 0000000000000000 d15 0000000000000000
01-02 07:17:51.240 I/DEBUG (14241): d16 3feffffffd546800 d17 4023ffffffd54680
01-02 07:17:51.240 I/DEBUG (14241): d18 416312d000000000 d19 bfdffffffd0c5e81
01-02 07:17:51.240 I/DEBUG (14241): d20 4016c28f5c28f5c2 d21 404c733333333333
01-02 07:17:51.240 I/DEBUG (14241): d22 4017750cc0000000 d23 bfc5256bd4469403
01-02 07:17:51.240 I/DEBUG (14241): d24 bf29f0f8e2ce35a1 d25 3fc67574f0dfdb58
01-02 07:17:51.240 I/DEBUG (14241): d26 404c733333333333 d27 bfb2d0a6dba87af4
01-02 07:17:51.240 I/DEBUG (14241): d28 3f9f865fd80117f2 d29 3ec6cd878c3b46a7
01-02 07:17:51.240 I/DEBUG (14241): d30 bf628923b9f36fa0 d31 4000000000000000
01-02 07:17:51.240 I/DEBUG (14241): scr 80000010
01-02 07:17:51.240 I/DEBUG (14241):
01-02 07:17:51.240 I/DEBUG (14241): backtrace:
01-02 07:17:51.240 I/DEBUG (14241): #00 pc 0015356a /data/app-lib/dttv.app-1/libdtp.so (ff_AMediaCodec_releaseOutputBuffer+21)
01-02 07:17:51.240 I/DEBUG (14241): #1 pc 000014b4 /system/lib/libdvm.so
01-02 07:17:51.240 I/DEBUG (14241):
01-02 07:17:51.240 I/DEBUG (14241): stack:

在解码器退出之后又render了一帧引起的问题

连续seek到结尾出现crash

gdb保存的栈信息如下:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffb3ff7700 (LWP 9849)]
0x000000000041c82c in port_read_frame (pctx=0x12420b0505, frame=0x7fffb3ff6ea0, type=3) at dtport/dtport.c:118
118 dt_debug(TAG, "[%s:%d]READ FRAME START, start read frame type:%d nb:%d\n",
(gdb) bt
#0 0x000000000041c82c in port_read_frame (pctx=0x12420b0505, frame=0x7fffb3ff6ea0, type=3) at dtport/dtport.c:118
#1 0x000000000041c420 in dtport_read_frame (port=0x12420b0505, frame=0x7fffb3ff6ea0, type=3) at dtport/dtport_api.c:56
#2 0x000000000041a528 in host_read_frame (hctx=0x7fffc4000ca0, frame=0x7fffb3ff6ea0, type=3) at dthost/dthost.c:564
#3 0x000000000041857b in dthost_read_frame (host_priv=0x7fffc4000ca0, frame=0x7fffb3ff6ea0, type=3) at dthost/dthost_api.c:102
#4 0x000000000041bea3 in dtsub_read_pkt (priv=0x7fffc400e290, pkt=0x7fffb3ff6ea0) at dtsub/dtsub_api.c:34
#5 0x0000000000416e6f in sub_decode_loop (arg=0x7fffc400e2b0) at dtsub/dtsub_decoder.c:189
#6 0x00007ffff5a32182 in start_thread (arg=0x7fffb3ff7700) at pthread_create.c:312
#7 0x00007ffff515447d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(gdb)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.