2014-12-14 2 views
0

/mnt/iso 폴더에 마운트 된 DVD를 열고 화면에 출력을 인쇄하는 샘플 코드가 있습니다. 내가 코드를 컴파일하고 나는 다음과 같은 오류 얻을 실행하려고 할 때, 그러나libdvdnav를 사용할 때 libdvdcss 오류가 발생합니다.

#include <stdio.h> 
#include <dvdnav/dvdnav.h> 
#include <dvdnav/dvdnav_events.h> 
#include <sys/types.h> 
#include <stdlib.h> 

int main(int argc, char **argv) { 
    dvdnav_t *dvdnav; 
    int finished, len, event; 
    uint8_t buf[2050]; 
    /* Open the DVD */ 
    dvdnav_open(&dvdnav, "/mnt/iso"); 
    fprintf(stderr, "Reading...\n"); 
    finished = 0; 
    while (!finished) { 
     int result = dvdnav_get_next_block(dvdnav, buf, &event, &len); 
     if (result == DVDNAV_STATUS_ERR) { 
      fprintf(stderr, "Error getting next block (%s)\n", 
       dvdnav_err_to_string(dvdnav)); 
      exit(1); 
     } 
     switch (event) { 
      case DVDNAV_BLOCK_OK: 
       /* Write output to stdout */ 
       fwrite(buf, len, 1, stdout); 
       break; 
      case DVDNAV_STILL_FRAME: 
       fprintf(stderr, "Skipping still frame\n"); 
       dvdnav_still_skip(dvdnav); 
       break; 
      case DVDNAV_STOP: 
       finished = 1; 
       break; 
      default: 
       fprintf(stderr, "Unhandled event (%i)\n", event); 
       finished = 1; 
     } 
    } 
    dvdnav_close(dvdnav); 
    return 0; 
} 

: 나는 문제가 무엇인지 정확하게 확인

libdvdnav: Using dvdnav version 4.2.1 
libdvdread: Attempting to use device /dev/loop1 mounted on /mnt/iso for CSS authentication 
libdvdread: Could not open /dev/loop1 with libdvdcss. 
libdvdread: Can't open /dev/loop1 for reading 
libdvdread: Device /dev/loop1 inaccessible, CSS authentication not available. 
libdvdnav: Can't read name block. Probably not a DVD-ROM device. 
libdvdnav: Unable to find map file '/home/user/.dvdnav/.map' 
libdvdnav: DVD disk reports itself with Region mask 0x00c00000. Regions: 1 2 3 4 5 6 
Reading... 
Unhandled event (9) 

을 아니에요 그리고 여기 코드입니다 누군가가 문제를 지적 할 수 있다면 좋을 것입니다. 감사!

답변

0

ISO 파일을 마운트 대신 직접 사용하면 잘 작동합니다. CSS 문제가 해결되면 제대로 작동합니다.

관련 문제