Page 1 of 1

Cannot get libvlc_media_new_callbacks to work properly

Posted: 27 Jun 2015 03:36
by gmpreussner
I'm trying to stream media from memory on Windows 64-bit using today's nightly build.

I have tried different containers, including .wmv, .avi and .mkv. The videos play fine when loaded from file via libvlc_media_new_path or when loaded from the internet via libvlc_media_new_location. However, playing from memory with libvlc_media_new_callbacks using the read/seek callbacks and without the open callback has not been successful so far.

Looking at the log, it seems that the library is always overshooting the size of the buffer, trying to read more data than is available. When I return the actual number of bytes read (which is then less than the buffer size) from the read callback, libvlc hits EOF and then closes my media without playing it. I noticed that the seek callback is never called, regardless of the type and size of the media being played. I have attached the full log below.

I also tried using the open callback in order to specify the total size of the media, but had even less success. From the documentation it is not clear to me what datap is supposed to be. I assumed that it is a pointer to the entire in-memory media buffer. However, setting it up seems to result in a bogus Opaque pointer being sent down to the read callback. I have not debugged it yet, but wonder if the data pointer is sent instead. Either way, having the entire media data in memory is not desirable for me anyway, and I would rather get the read/seek only solution to work.

Is this feature already supported and tested? How can I investigate this further without having to dig into the VLC code? Is there a working example/test case for libvlc_media_new_callbacks somewhere?

Any help would be greatly appreciated. Thank you!

__________________

The video I used for the following log can be downloaded here:
http://www.mediacollege.com/video/forma ... lename.wmv

This is how I initialize libvlc (I'm using video callbacks to render the frames into a texture):

Code: Select all

"--intf", "dummy", "--no-audio", "--no-disable-screensaver", "--no-snapshot-preview", "--no-stats", "--no-video-title-show", "--no-xlib", "--vout", "dummy",
Log file:

Code: Select all

core input debug: Creating an input for 'imem://' core input debug: using timeshift granularity of 50 MiB, in path 'C:\Users\MAX~1.PRE\AppData\Local\Temp' core input debug: `imem://' gives access `imem' demux `' path `' core input debug: specified demux `any' core input debug: creating demux: access='imem' demux='any' location='' file='(null)' core demux debug: looking for access_demux module matching "imem": 13 candidates imem demux error: Invalid get/release function pointers core demux debug: no access_demux modules matched core input debug: creating access 'imem' location='', path='(null)' core access debug: looking for access module matching "imem": 23 candidates core access debug: using access module "imem_access" core stream debug: Using stream method for AStream* core stream debug: starting pre-buffering core stream debug: received first data after 0 ms core stream debug: pre-buffering done 1024 bytes in 0s - 1000000 KiB/s core stream debug: looking for stream_filter module matching "any": 5 candidates core stream debug: no stream_filter modules matched core stream debug: looking for stream_filter module matching "record": 5 candidates core stream debug: using stream_filter module "record" core input debug: creating demux: access='imem' demux='any' location='' file='(null)' core demux debug: looking for demux module matching "any": 69 candidates asf stream debug: found object guid: 0x75b22630-0x668e-0x11cf-0xa6d900aa0062ce6c size:4094 at 0 asf stream debug: read "header object" subobj:10, reserved1:1, reserved2:2 asf stream debug: found object guid: 0x8cabdca1-0xa947-0x11cf-0x8ee400c00c205365 size:104 at 30 asf stream debug: read "file properties object" file_id:0xee9b1748-0x9fe0-0x47b3-0xba95c0c678a7f837 file_size:18254 creation_date:127594088857650000 data_packets_count:10 play_duration:75860000 send_duration:52590000 preroll:3550 flags:2 min_data_packet_size:1400 max_data_packet_size:1400 max_bitrate:24351 asf stream debug: found object guid: 0x5fbf03b5-0xa92e-0x11cf-0x8ee300c00c205365 size:1701 at 134 asf stream debug: read "header extension object" reserved1:0xabd3d211-0xa9ba-0x11cf-0x8ee600c00c205365 reserved2:6 header_extension_size:1655 asf stream debug: found object guid: 0x7c4346a9-0xefe0-0x4bfc-0xb229393ede415c85 size:39 at 180 asf stream debug: read "language list object" 1 entries asf stream debug: - 'en-nz' asf stream debug: found object guid: 0xc5f8cbea-0x5baf-0x4877-0x8467aa8c44fa4cca size:308 at 219 asf stream debug: read "metadata object" 6 entries asf stream debug: - AspectRatioX=1 asf stream debug: - AspectRatioY=1 asf stream debug: - IsVBR=0 asf stream debug: - DeviceConformanceTemplate=S1 asf stream debug: - IsVBR=1 asf stream debug: - DeviceConformanceTemplate=MP@LL asf stream debug: found object guid: 0x26f18b5d-0x4584-0x47ec-0x9f5f0e651f0452c9 size:26 at 527 asf stream debug: found object guid: 0x1806d474-0xcadf-0x4509-0xa4ba9aabcb96aae8 size:1024 at 553 asf stream debug: found object guid: 0xa08649cf-0x4775-0x4670-0x8a166e35357566cd size:44 at 1577 asf stream debug: read "advanced mutual exclusion object" type Bitrate asf stream debug: - stream=1 asf stream debug: found object guid: 0x14e6a5cb-0xc672-0x4332-0x8399a96952065b5a size:88 at 1621 asf stream debug: read "extended stream properties object": asf stream debug: - start=0 end=0 asf stream debug: - data bitrate=8000 buffer=3550 initial fullness=0 asf stream debug: - alternate data bitrate=8000 buffer=3550 initial fullness=0 asf stream debug: - maximum object size=300 asf stream debug: - flags=0x2 asf stream debug: - stream number=1 language=0 asf stream debug: - average time per frame=243000 asf stream debug: - stream name count=0 asf stream debug: - payload extension system count=0 asf stream debug: found object guid: 0x14e6a5cb-0xc672-0x4332-0x8399a96952065b5a size:88 at 1709 asf stream debug: read "extended stream properties object": asf stream debug: - start=0 end=0 asf stream debug: - data bitrate=21000 buffer=2385 initial fullness=0 asf stream debug: - alternate data bitrate=11072 buffer=3000 initial fullness=0 asf stream debug: - maximum object size=2394 asf stream debug: - flags=0x2 asf stream debug: - stream number=2 language=0 asf stream debug: - average time per frame=1153402 asf stream debug: - stream name count=0 asf stream debug: - payload extension system count=0 asf stream debug: found object guid: 0xd9aade20-0x7c17-0x4f9c-0xbc288555dd98e2a2 size:38 at 1797 asf stream warning: unknown asf object (not loaded): 0xd9aade20-0x7c17-0x4f9c-0xbc288555dd98e2a2 asf stream debug: found object guid: 0xd2d0a440-0xe307-0x11d2-0x97f000a0c95ea850 size:1594 at 1835 asf stream debug: read "extended content description object" asf stream debug: - 'WMFSDKVersion' = '9.00.00.3250' asf stream debug: - 'WMFSDKNeeded' = '0.0.0.0000' asf stream debug: - 'IsVBR' = 'true' asf stream debug: - 'ASFLeakyBucketPairs' = '0000C05D0000E803000030750000B8010000C8AF0000F800000090E20000C100000000C201006100000080A903002E000000305705002000000020A107001600000090230B000F00000040420F000B000000C05C150008000000200B200005000000404B4C00020000008096980001000000' asf stream debug: - 'VBR Peak' = '11072' asf stream debug: - 'Buffer Average' = '2385' asf stream debug: - 'WM/AlbumTitle' = '' asf stream debug: - 'WM/Track' = '' asf stream debug: - 'WM/PromotionURL' = '' asf stream debug: - 'WM/AlbumCoverURL' = '' asf stream debug: - 'WM/Genre' = '' asf stream debug: - 'WM/Year' = '' asf stream debug: - 'WM/GenreID' = '' asf stream debug: - 'WM/Composer' = '' asf stream debug: - 'WM/Lyrics' = '' asf stream debug: - 'WM/ToolName' = '' asf stream debug: - 'WM/ToolVersion' = '' asf stream debug: - 'WM/AlbumArtist' = '' asf stream debug: - 'WM/AuthorURL' = '' asf stream debug: - 'WM/AudioFileURL' = '' asf stream debug: - 'WM/Language' = '' asf stream debug: - 'WM/ParentalRating' = '' asf stream debug: - 'WM/BeatsPerMinute' = '' asf stream debug: - 'WM/InitialKey' = '' asf stream debug: - 'WM/Mood' = '' asf stream debug: - 'WM/DVDID' = '' asf stream debug: - 'WM/UniqueFileIdentifier' = '' asf stream debug: - 'WM/ModifiedBy' = '' asf stream debug: - 'WM/RadioStationName' = '' asf stream debug: - 'WM/RadioStationOwner' = '' asf stream debug: - 'WM/PlaylistDelay' = '' asf stream debug: - 'WM/Codec' = '' asf stream debug: - 'WM/DRM' = '' asf stream debug: - 'WM/ISRC' = '' asf stream debug: - 'WM/Provider' = '' asf stream debug: - 'WM/ProviderRating' = '' asf stream debug: - 'WM/ProviderStyle' = '' asf stream debug: - 'WM/ContentDistributor' = '' asf stream debug: - 'WM/SubscriptionContentID' = '' asf stream debug: found object guid: 0xd6e229dc-0x35da-0x11d1-0x903400a0c90349be size:44 at 3429 asf stream debug: read "bitrate exclusion object" type Bitrate asf stream debug: - stream=2 asf stream debug: found object guid: 0x86d15240-0x311d-0x11d0-0xa3a400a0c90348f6 size:214 at 3473 asf stream debug: read "codec list object" reserved_guid:0x86d15241-0x311d-0x11d0-0xa3a400a0c90348f6 codec_entries_count:2 asf stream debug: - codec[0] audio name:"Windows Media Audio 9 Voice" description:" 8 kbps, 8 kHz, mono" information_length:2 asf stream debug: - codec[1] video name:"Windows Media Video 9" description:"" information_length:4 asf stream debug: found object guid: 0xb7dc0791-0xa9b7-0x11cf-0x8ee600c00c205365 size:150 at 3687 asf stream debug: read "stream Properties object" stream_type:0xf8699e40-0x5b4d-0x11cf-0xa8fd00805f5c442b error_correction_type:0xbfc3cd50-0x618f-0x11cf-0x8bb200aa00b4e220 time_offset:0 type_specific_data_length:64 error_correction_data_length:8 flags:0x1 stream_number:1 asf stream debug: found object guid: 0xb7dc0791-0xa9b7-0x11cf-0x8ee600c00c205365 size:133 at 3837 asf stream debug: read "stream Properties object" stream_type:0xbc19efc0-0x5b4d-0x11cf-0xa8fd00805f5c442b error_correction_type:0x20fb5700-0x5b55-0x11cf-0xa8fd00805f5c442b time_offset:0 type_specific_data_length:55 error_correction_data_length:0 flags:0x2 stream_number:2 asf stream debug: found object guid: 0x7bf875ce-0x468d-0x11d1-0x8d82006097c9a2b2 size:38 at 3970 asf stream debug: read "stream bitrate properties object" asf stream debug: - stream=1 bitrate=8703 asf stream debug: - stream=2 bitrate=15648 asf stream debug: found object guid: 0x75b22633-0x668e-0x11cf-0xa6d900aa0062ce6c size:44 at 4008 asf stream debug: read "content description object" title:"" artist:"" copyright:"" description:"" rating:"" asf stream debug: found object guid: 0x2211b3fa-0xbd23-0x11d2-0xb4b700a0c955fc6e size:42 at 4052 asf stream warning: unknown asf object (not loaded): 0x2211b3fa-0xbd23-0x11d2-0xb4b700a0c955fc6e asf stream debug: found object guid: 0x75b22636-0x668e-0x11cf-0xa6d900aa0062ce6c size:14050 at 4094 asf stream debug: read "data object" file_id:0xee9b1748-0x9fe0-0x47b3-0xba95c0c678a7f837 total data packet:10 reserved:257 asf stream debug: + 'Root'GUID 0x0-0x0-0x0-0x564c43524f4f5400 size:0 pos:0 asf stream debug: | + 'Header'GUID 0x75b22630-0x668e-0x11cf-0xa6d900aa0062ce6c size:4094 pos:0 asf stream debug: | | + 'File Properties'GUID 0x8cabdca1-0xa947-0x11cf-0x8ee400c00c205365 size:104 pos:30 asf stream debug: | | + 'Header Extension'GUID 0x5fbf03b5-0xa92e-0x11cf-0x8ee300c00c205365 size:1701 pos:134 asf stream debug: | | | + 'Language List'GUID 0x7c4346a9-0xefe0-0x4bfc-0xb229393ede415c85 size:39 pos:180 asf stream debug: | | | + 'Metadata'GUID 0xc5f8cbea-0x5baf-0x4877-0x8467aa8c44fa4cca size:308 pos:219 asf stream debug: | | | + 'Object Compatibility'GUID 0x26f18b5d-0x4584-0x47ec-0x9f5f0e651f0452c9 size:26 pos:527 asf stream debug: | | | + 'Padding'GUID 0x1806d474-0xcadf-0x4509-0xa4ba9aabcb96aae8 size:1024 pos:553 asf stream debug: | | | + 'Advanced Mutual Exclusion'GUID 0xa08649cf-0x4775-0x4670-0x8a166e35357566cd size:44 pos:1577 asf stream debug: | | | + 'Extended Stream Properties'GUID 0x14e6a5cb-0xc672-0x4332-0x8399a96952065b5a size:88 pos:1621 asf stream debug: | | | + 'Extended Stream Properties'GUID 0x14e6a5cb-0xc672-0x4332-0x8399a96952065b5a size:88 pos:1709 asf stream debug: | | | + 'Index Placeholder'GUID 0xd9aade20-0x7c17-0x4f9c-0xbc288555dd98e2a2 size:38 pos:1797 asf stream debug: | | + 'Extended content description'GUID 0xd2d0a440-0xe307-0x11d2-0x97f000a0c95ea850 size:1594 pos:1835 asf stream debug: | | + 'Bitrate Mutual Exclusion'GUID 0xd6e229dc-0x35da-0x11d1-0x903400a0c90349be size:44 pos:3429 asf stream debug: | | + 'Codec List'GUID 0x86d15240-0x311d-0x11d0-0xa3a400a0c90348f6 size:214 pos:3473 asf stream debug: | | + 'Stream Properties'GUID 0xb7dc0791-0xa9b7-0x11cf-0x8ee600c00c205365 size:150 pos:3687 asf stream debug: | | + 'Stream Properties'GUID 0xb7dc0791-0xa9b7-0x11cf-0x8ee600c00c205365 size:133 pos:3837 asf stream debug: | | + 'Stream Bitrate Properties'GUID 0x7bf875ce-0x468d-0x11d1-0x8d82006097c9a2b2 size:38 pos:3970 asf stream debug: | | + 'Content Description'GUID 0x75b22633-0x668e-0x11cf-0xa6d900aa0062ce6c size:44 pos:4008 asf stream debug: | | + 'Unknown'GUID 0x2211b3fa-0xbd23-0x11d2-0xb4b700a0c955fc6e size:42 pos:4052 asf stream debug: | + 'Data'GUID 0x75b22636-0x668e-0x11cf-0xa6d900aa0062ce6c size:14050 pos:4094 asf demux debug: found 2 streams asf demux debug: added new audio stream(codec:0xa,ID:1) core input debug: selecting program id=0 asf demux debug: added new video stream(ID:2) core demux debug: using demux module "asf" core input debug: audio is disabled, not selecting ES 0x1 core decoder debug: looking for decoder module matching "any": 44 candidates avcodec decoder debug: CPU flags: 0x010053db avcodec decoder debug: trying to use direct rendering avcodec decoder debug: allowing 4 thread(s) for decoding avcodec decoder debug: available hardware decoder output format 61 (dxva2_vld) avcodec decoder debug: available software decoder output format 0 (yuv420p) core spu text debug: looking for text renderer module matching "any": 3 candidates freetype spu text debug: Using Arial as font from file C:\Windows\Fonts\arial.ttf freetype spu text debug: Using Courier New as mono-font from file C:\Windows\Fonts\cour.ttf freetype spu text debug: using fontsize: 2 core spu text debug: using text renderer module "freetype" core scale debug: looking for video filter2 module matching "any": 60 candidates swscale scale debug: 32x32 (32x32) chroma: YUVA -> 16x16 (16x16) chroma: RGBA with scaling using Bicubic (good quality) core scale debug: using video filter2 module "swscale" core scale debug: looking for video filter2 module matching "any": 60 candidates yuvp scale debug: YUVP to YUVA converter core scale debug: using video filter2 module "yuvp" core video output debug: Deinterlacing available core video output debug: deinterlace 0, mode blend, is_needed 0 core window debug: looking for vout window module matching "any": 3 candidates core window debug: no vout window modules matched core video output debug: Opening vout display wrapper core vout display debug: looking for vout display module matching "dummy": 10 candidates core vout display debug: using vout display module "vdummy" core video output debug: original format sz 192x144, of (0,0), vsz 192x144, 4cc DXA9, sar 1:1, msk r0x0 g0x0 b0x0 core vout display debug: VoutDisplayEvent 'window state' 0 core vout display debug: VoutDisplayEvent 'window state' 0 core vout display debug: VoutDisplayEvent 'resize' 192x144 core spu text debug: removing module "freetype" core spu text debug: looking for text renderer module matching "any": 3 candidates freetype spu text debug: Using Arial as font from file C:\Windows\Fonts\arial.ttf freetype spu text debug: Using Courier New as mono-font from file C:\Windows\Fonts\cour.ttf freetype spu text debug: using fontsize: 2 core spu text debug: using text renderer module "freetype" core generic debug: looking for hw decoder module matching "any": 1 candidates core generic debug: no hw decoder modules matched avcodec decoder debug: available hardware decoder output format 61 (dxva2_vld) avcodec decoder debug: available software decoder output format 0 (yuv420p) core generic debug: looking for hw decoder module matching "any": 1 candidates core generic debug: no hw decoder modules matched avcodec decoder debug: codec (wmv3) started core decoder debug: using decoder module "avcodec" core demux meta debug: looking for meta reader module matching "any": 2 candidates lua demux meta debug: Trying Lua scripts in C:\Users\Max.Preussner\AppData\Roaming\vlc\lua\meta\reader lua demux meta debug: Trying Lua scripts in d:\Perforce\Main\UE4\Engine\Plugins\Media\VlcMedia\ThirdParty\vlc\Win64\lua\meta\reader core demux meta debug: no meta reader modules matched core input debug: `imem://' successfully opened asfpacket demux debug: 3 payloads asfpacket demux debug: payload(1) stream_number:1 media_object_number:1 media_object_offset:0 replicated_data_length:8 payload_data_length 300 asfpacket demux debug: pts=0 st=0 asfpacket demux debug: payload(2) stream_number:2 media_object_number:1 media_object_offset:0 replicated_data_length:1 payload_data_length 143 asfpacket demux debug: pts=0 st=0 asfpacket demux debug: payload(3) stream_number:2 media_object_number:2 media_object_offset:0 replicated_data_length:8 payload_data_length 899 asfpacket demux debug: pts=115000 st=0 asfpacket demux debug: 4 payloads asfpacket demux debug: payload(1) stream_number:1 media_object_number:2 media_object_offset:0 replicated_data_length:8 payload_data_length 300 asfpacket demux debug: pts=300000 st=300 asfpacket demux debug: payload(2) stream_number:2 media_object_number:2 media_object_offset:899 replicated_data_length:8 payload_data_length 622 asfpacket demux debug: pts=115000 st=300 asfpacket demux debug: payload(3) stream_number:2 media_object_number:3 media_object_offset:0 replicated_data_length:1 payload_data_length 289 asfpacket demux debug: pts=230000 st=300 asfpacket demux debug: payload(4) stream_number:2 media_object_number:10 media_object_offset:0 replicated_data_length:8 payload_data_length 115 asfpacket demux debug: pts=2191000 st=300 asfpacket demux debug: 2 payloads asfpacket demux debug: payload(1) stream_number:1 media_object_number:3 media_object_offset:0 replicated_data_length:8 payload_data_length 300 asfpacket demux debug: pts=480000 st=600 asfpacket demux debug: payload(2) stream_number:2 media_object_number:10 media_object_offset:115 replicated_data_length:8 payload_data_length 1052 asfpacket demux debug: pts=2191000 st=600 asfpacket demux debug: 2 payloads asfpacket demux debug: payload(1) stream_number:1 media_object_number:4 media_object_offset:0 replicated_data_length:8 payload_data_length 300 asfpacket demux debug: pts=600000 st=900 asfpacket demux debug: payload(2) stream_number:2 media_object_number:10 media_object_offset:1167 replicated_data_length:8 payload_data_length 1052 asfpacket demux debug: pts=2191000 st=900 asfpacket demux debug: 3 payloads asfpacket demux debug: payload(1) stream_number:1 media_object_number:5 media_object_offset:0 replicated_data_length:8 payload_data_length 300 asfpacket demux debug: pts=780000 st=1200 asfpacket demux debug: payload(2) stream_number:2 media_object_number:10 media_object_offset:2219 replicated_data_length:8 payload_data_length 175 asfpacket demux debug: pts=2191000 st=1200 asfpacket demux debug: payload(3) stream_number:2 media_object_number:11 media_object_offset:0 replicated_data_length:8 payload_data_length 860 asfpacket demux debug: pts=2306000 st=1200 asfpacket demux debug: 2 payloads asfpacket demux debug: payload(1) stream_number:1 media_object_number:6 media_object_offset:0 replicated_data_length:8 payload_data_length 300 asfpacket demux debug: pts=960000 st=1500 asfpacket demux debug: payload(2) stream_number:2 media_object_number:11 media_object_offset:860 replicated_data_length:8 payload_data_length 1052 asfpacket demux debug: pts=2306000 st=1500 asfpacket demux debug: 6 payloads asfpacket demux debug: payload(1) stream_number:1 media_object_number:7 media_object_offset:0 replicated_data_length:8 payload_data_length 300 asfpacket demux debug: pts=1080000 st=1800 asfpacket demux debug: payload(2) stream_number:2 media_object_number:11 media_object_offset:1912 replicated_data_length:8 payload_data_length 128 asfpacket demux debug: pts=2306000 st=1800 asfpacket demux debug: payload(3) stream_number:2 media_object_number:12 media_object_offset:0 replicated_data_length:1 payload_data_length 22 asfpacket demux debug: pts=2422000 st=1800 asfpacket demux debug: payload(4) stream_number:2 media_object_number:13 media_object_offset:0 replicated_data_length:8 payload_data_length 274 asfpacket demux debug: pts=3229000 st=1800 asfpacket demux debug: payload(5) stream_number:2 media_object_number:14 media_object_offset:0 replicated_data_length:1 payload_data_length 227 asfpacket demux debug: pts=3344000 st=1800 asfpacket demux debug: payload(6) stream_number:1 media_object_number:8 media_object_offset:0 replicated_data_length:8 payload_data_length 300 asfpacket demux debug: pts=1260000 st=1800 asfpacket demux debug: 4 payloads asfpacket demux debug: payload(1) stream_number:1 media_object_number:9 media_object_offset:0 replicated_data_length:8 payload_data_length 300 asfpacket demux debug: pts=1440000 st=2400 asfpacket demux debug: payload(2) stream_number:1 media_object_number:10 media_object_offset:0 replicated_data_length:8 payload_data_length 300 asfpacket demux debug: pts=1620000 st=2400 asfpacket demux debug: payload(3) stream_number:1 media_object_number:11 media_object_offset:0 replicated_data_length:8 payload_data_length 300 asfpacket demux debug: pts=1860000 st=2400 asfpacket demux debug: payload(4) stream_number:1 media_object_number:12 media_object_offset:0 replicated_data_length:8 payload_data_length 300 asfpacket demux debug: pts=2040000 st=2400 asfpacket demux debug: 4 payloads asfpacket demux debug: payload(1) stream_number:1 media_object_number:13 media_object_offset:0 replicated_data_length:8 payload_data_length 300 asfpacket demux debug: pts=2280000 st=3600 asfpacket demux debug: payload(2) stream_number:1 media_object_number:14 media_object_offset:0 replicated_data_length:8 payload_data_length 300 asfpacket demux debug: pts=2520000 st=3600 asfpacket demux debug: payload(3) stream_number:1 media_object_number:15 media_object_offset:0 replicated_data_length:8 payload_data_length 300 asfpacket demux debug: pts=2760000 st=3600 asfpacket demux debug: payload(4) stream_number:1 media_object_number:16 media_object_offset:0 replicated_data_length:8 payload_data_length 300 asfpacket demux debug: pts=3000000 st=3600 asfpacket demux debug: 4 payloads asfpacket demux debug: payload(1) stream_number:1 media_object_number:17 media_object_offset:0 replicated_data_length:8 payload_data_length 300 asfpacket demux debug: pts=3300000 st=4800 asfpacket demux debug: payload(2) stream_number:1 media_object_number:18 media_object_offset:0 replicated_data_length:8 payload_data_length 300 asfpacket demux debug: pts=3540000 st=4800 asfpacket demux debug: payload(3) stream_number:1 media_object_number:19 media_object_offset:0 replicated_data_length:8 payload_data_length 300 asfpacket demux debug: pts=3840000 st=4800 asfpacket demux debug: payload(4) stream_number:1 media_object_number:20 media_object_offset:0 replicated_data_length:8 payload_data_length 300 asfpacket demux debug: pts=4036000 st=4800 core input debug: Buffering 0% core input debug: Buffering 0% avcodec decoder debug: available hardware decoder output format 61 (dxva2_vld) avcodec decoder debug: available software decoder output format 0 (yuv420p) core generic debug: looking for hw decoder module matching "any": 1 candidates core generic debug: no hw decoder modules matched core input debug: Buffering 33% core input debug: Buffering 66% core input debug: Buffering 100% core input debug: Stream buffering done (400 ms in 5 ms) core vout display debug: removing module "vdummy" core video output debug: Opening vout display wrapper core vout display debug: looking for vout display module matching "dummy": 10 candidates core vout display debug: using vout display module "vdummy" core video output debug: original format sz 192x160, of (0,0), vsz 192x144, 4cc I420, sar 1:1, msk r0x0 g0x0 b0x0 core generic debug: reusing provided vout core vout display debug: VoutDisplayEvent 'window state' 0 avcodec decoder warning: plane 0 not aligned: disabling direct rendering core vout display debug: VoutDisplayEvent 'window state' 0 core decoder debug: Received first picture core vout display debug: VoutDisplayEvent 'resize' 192x144 core input debug: Decoder wait done in 7 ms asfpacket demux warning: cannot peek while getting new packet, EOF ? core vout display debug: auto hiding mouse cursor core input debug: EOF reached core input debug: waiting decoder fifos to empty core input debug: waiting decoder fifos to empty core decoder debug: removing module "avcodec" avcodec decoder debug: ffmpeg codec (wmv3) stopped core decoder debug: killing decoder fourcc `WMV3', 0 PES in FIFO core generic debug: saving a free vout core generic debug: reusing provided vout core vout display debug: VoutDisplayEvent 'resize' 192x144 core demux debug: removing module "asf" core vout display debug: VoutDisplayEvent 'window state' 0 asf stream debug: free asf object 0x8cabdca1-0xa947-0x11cf-0x8ee400c00c205365 core vout display debug: VoutDisplayEvent 'window state' 0 asf stream debug: free asf object 0x7c4346a9-0xefe0-0x4bfc-0xb229393ede415c85 asf stream debug: free asf object 0xc5f8cbea-0x5baf-0x4877-0x8467aa8c44fa4cca asf stream debug: free asf object 0xa08649cf-0x4775-0x4670-0x8a166e35357566cd asf stream debug: free asf object 0x14e6a5cb-0xc672-0x4332-0x8399a96952065b5a asf stream debug: free asf object 0x14e6a5cb-0xc672-0x4332-0x8399a96952065b5a asf stream debug: free asf object 0x5fbf03b5-0xa92e-0x11cf-0x8ee300c00c205365 asf stream debug: free asf object 0xd2d0a440-0xe307-0x11d2-0x97f000a0c95ea850 asf stream debug: free asf object 0xd6e229dc-0x35da-0x11d1-0x903400a0c90349be asf stream debug: free asf object 0x86d15240-0x311d-0x11d0-0xa3a400a0c90348f6 asf stream debug: free asf object 0xb7dc0791-0xa9b7-0x11cf-0x8ee600c00c205365 asf stream debug: free asf object 0xb7dc0791-0xa9b7-0x11cf-0x8ee600c00c205365 asf stream debug: free asf object 0x7bf875ce-0x468d-0x11d1-0x8d82006097c9a2b2 asf stream debug: free asf object 0x75b22633-0x668e-0x11cf-0xa6d900aa0062ce6c asf stream debug: free asf object 0x75b22630-0x668e-0x11cf-0xa6d900aa0062ce6c asf stream debug: free asf object 0x75b22636-0x668e-0x11cf-0xa6d900aa0062ce6c core input debug: Program doesn't contain anymore ES core stream debug: removing module "record" core access debug: removing module "imem_access" core input debug: Destroying the input for 'imem://' core video output debug: destroying useless vout core vout display debug: removing module "vdummy" core spu text debug: removing module "freetype" core scale debug: removing module "yuvp" core scale debug: removing module "swscale"

Re: Cannot get libvlc_media_new_callbacks to work properly

Posted: 27 Jun 2015 10:19
by RĂ©mi Denis-Courmont
The usual convention is expected. If you have data but less than requested, return what you have. If you have no data, wait until you have some. If you return 0, EOF is assumed.

Re: Cannot get libvlc_media_new_callbacks to work properly

Posted: 27 Jun 2015 15:15
by gmpreussner
Thanks a lot Remi, that helped me figure things out. I was trying to initialize the tracks before they were ready. Everything works now.

Re: Cannot get libvlc_media_new_callbacks to work properly

Posted: 09 Jul 2015 22:21
by Jean-Baptiste Kempf
Can you share, by any chance, a documentation sample?